Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1254029pxb; Fri, 22 Jan 2021 10:38:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxY7/j282IL/8NCLamPxlx7xhXSl92KhL4XIh15ZDq5cjvYVbDdK9vI2HsAP92IC+2GlNR X-Received: by 2002:aa7:c7d8:: with SMTP id o24mr4382994eds.328.1611340736673; Fri, 22 Jan 2021 10:38:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611340736; cv=none; d=google.com; s=arc-20160816; b=uDHIpOkGo6OxqJjSdHQd7ZvIySAba1leEkvP53bgYhfebH6UyPdKZbDeUP2iE70iJk ZviyTn+4acWPpGQBDXtxwij4xEZyZM9MQ79isLcujXU/vLoLtwaSsShPd3YLl/zGykXf gu6zx9p+5gUGHlV7yJi40XaFAw4+MRn9u1xXUo7gqIE3Eac74eg1DUsuGjDT+U4bg/sS hGhtmDRKXjfOnNBijPsETsvvL72UHdnQmjJFhbKTO4pZ3g1yTvG5yXMaD2dz7bnd9r6f nZ0eERtT4lWui9NoLyb7emtbwP5EclvFwkugY0RaMlLKgfXSMipnxI67DBC0Nvd2fEDu xFLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=/1OGUuSh8UTx2h39ipHbvJAcdb29iqtzaaFfOzJpWBw=; b=JezYfNxtkJA1scFjFd/Lf/FiRRjwawwzAU3UuL1Vz+ycViPSHCd1//mfqlDXelxHPE dt28AZy/w6hZY1Oad755eBbbV/+fzRLm9ZBqmzUN/ZceqCYbkFBKEKb72P0U2EKfLpcX cJyAEsQbYmZH5FfS3Jw8UXpz+Y3ryzP4pAXSOTTu+Jim3CtelvcYeJJGohz1twqtNwof NABRXm59reRETU4Kr46g81WjAYE7GONHNECXBttcbGdpzwK4XCtGRZDHekFCIdMz0n/4 h1Tupn0g+C0JuCP0+PGWuN1MFN7Os1DYEl/KkYdMXjvZmHjTAKTWEhVqHgDM952bw7h1 f5Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b="RO/x/RV5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n7si3324002ejx.635.2021.01.22.10.38.32; Fri, 22 Jan 2021 10:38:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b="RO/x/RV5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729363AbhAVSS3 (ORCPT + 99 others); Fri, 22 Jan 2021 13:18:29 -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