From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0051C433DB for ; Fri, 22 Jan 2021 18:19:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A09B923AA1 for ; Fri, 22 Jan 2021 18:19:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729400AbhAVSSc (ORCPT ); Fri, 22 Jan 2021 13:18:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729364AbhAVRYH (ORCPT ); Fri, 22 Jan 2021 12:24:07 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59486C06174A; Fri, 22 Jan 2021 09:23:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=/1OGUuSh8UTx2h39ipHbvJAcdb29iqtzaaFfOzJpWBw=; b=RO/x/RV5jTG78QmHWtQlBG20gp ZqwEdo8lONzmuAiGidQusdA8sq3W+YGFl8SuNvBGH31iPg6tz/lerRjZopvE7zEuUqCN+Xe+DgUyP Nr3v1wFNvah06wJtgmvEe2itJg5sdFOjSKvo2i4EpCY4Jrjp6/grhdTSV2PdYXYlmKLtFPv8Y+3mE mNfzX+Q4rRBH0PfKacJf+ovfim35xemVvVAkr4FRE3sLqJdkv0UNcXoahP5r4xOgAo1PkufxRZJOF pM9F/+gwhecuJt7fnNODh8MBfpH3orJfykRo3T/hPF0/XPh1T/x4zgcD7Sf+5RqDJ06jz8vF+dLHD SXfIhUfg==; Received: from [2601:1c0:6280:3f0::9abc] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1l309X-00039n-GX; Fri, 22 Jan 2021 17:23:19 +0000 Subject: Re: [PATCH v2] mmc: sdhci-of-aspeed: Fix kunit-related build error To: Andrew Jeffery , linux-mmc@vger.kernel.org Cc: adrian.hunter@intel.com, ulf.hansson@linaro.org, joel@jms.id.au, linux-aspeed@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, brendanhiggins@google.com References: <20210122114852.3790565-1-andrew@aj.id.au> From: Randy Dunlap Message-ID: Date: Fri, 22 Jan 2021 09:23:10 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20210122114852.3790565-1-andrew@aj.id.au> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/22/21 3:48 AM, Andrew Jeffery wrote: > Randy found that with the following Kconfig settings we have duplicate > definitions (e.g. __inittest()) in sdhci-of-aspeed due to competing > module_init()/module_exit() calls from kunit and driver the itself. > > ``` > CONFIG_MMC_SDHCI_OF_ASPEED=m > CONFIG_MMC_SDHCI_OF_ASPEED_TEST=y > ``` > > Conditionally open-code the kunit initialisation to avoid the error. > > Fixes: 7efa02a981d6 ("mmc: sdhci-of-aspeed: Add KUnit tests for phase calculations") > Reported-by: Randy Dunlap > Signed-off-by: Andrew Jeffery > --- > > v2: > * Collapse the #ifdef-ery > > drivers/mmc/host/sdhci-of-aspeed-test.c | 9 +++++- > drivers/mmc/host/sdhci-of-aspeed.c | 42 ++++++++++++++++++++++--- > 2 files changed, 45 insertions(+), 6 deletions(-) Acked-by: Randy Dunlap # build-tested Thanks. -- ~Randy From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1F10C433E0 for ; Fri, 22 Jan 2021 17:24:48 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 71DFB23A9A for ; Fri, 22 Jan 2021 17:24:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 71DFB23A9A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pq/nYu0bLQDtdP6KexHK33VXbJkURIFuJ6H4OBhB5RQ=; b=J1LDvgRoJK9SWL95RN85YyFN9 TWh/GunfMl9pZQrnpIoGNpvpOhn2V9S7iienbdjP4TV7z7/jGAfpOxE9V9qpPi27/ZCy1s3iwnVeQ KsJOk2c7mf94pg5qjiDXiCDVQhT/QkryMvPWREYITqbtgNv8H3j1atIBKrHnK9cP+e0J01DWazAw0 /13v9oARsL8EPXjkn3wNTpEOMbPLZTmsqxnHNJict7YSb/t4tr9d3p47OZEBElj3uc/F0nJE0dWKU FWOjR6Wk0piVuDqJ0mUojQnmoIctCaDEOjrw6774MM7VgwUiXn+VC484YvIPClIyrEUi3KtYLCGf1 dtJQNoL8A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l309a-0003Bm-Jv; Fri, 22 Jan 2021 17:23:22 +0000 Received: from [2601:1c0:6280:3f0::9abc] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1l309X-00039n-GX; Fri, 22 Jan 2021 17:23:19 +0000 Subject: Re: [PATCH v2] mmc: sdhci-of-aspeed: Fix kunit-related build error To: Andrew Jeffery , linux-mmc@vger.kernel.org References: <20210122114852.3790565-1-andrew@aj.id.au> From: Randy Dunlap Message-ID: Date: Fri, 22 Jan 2021 09:23:10 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20210122114852.3790565-1-andrew@aj.id.au> Content-Language: en-US X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ulf.hansson@linaro.org, linux-aspeed@lists.ozlabs.org, brendanhiggins@google.com, linux-kernel@vger.kernel.org, adrian.hunter@intel.com, joel@jms.id.au, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 1/22/21 3:48 AM, Andrew Jeffery wrote: > Randy found that with the following Kconfig settings we have duplicate > definitions (e.g. __inittest()) in sdhci-of-aspeed due to competing > module_init()/module_exit() calls from kunit and driver the itself. > > ``` > CONFIG_MMC_SDHCI_OF_ASPEED=m > CONFIG_MMC_SDHCI_OF_ASPEED_TEST=y > ``` > > Conditionally open-code the kunit initialisation to avoid the error. > > Fixes: 7efa02a981d6 ("mmc: sdhci-of-aspeed: Add KUnit tests for phase calculations") > Reported-by: Randy Dunlap > Signed-off-by: Andrew Jeffery > --- > > v2: > * Collapse the #ifdef-ery > > drivers/mmc/host/sdhci-of-aspeed-test.c | 9 +++++- > drivers/mmc/host/sdhci-of-aspeed.c | 42 ++++++++++++++++++++++--- > 2 files changed, 45 insertions(+), 6 deletions(-) Acked-by: Randy Dunlap # build-tested Thanks. -- ~Randy _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel