Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp754224pxb; Thu, 21 Jan 2021 20:41:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxi4GzioLIMk5dYb1NMicGILko/GavwfRwMGZeL1pPJtebcBMCnwcy5KVzCOnQKsc9SAofX X-Received: by 2002:aa7:d610:: with SMTP id c16mr1845977edr.354.1611290514672; Thu, 21 Jan 2021 20:41:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611290514; cv=none; d=google.com; s=arc-20160816; b=P2kRwkkUXApKBIfJLp9gJTdJI82u9shgexc+FbJ1IzbOO23iAgjEoIROAa+G+4mh2Z wBOnqK5AcuYr99bCZoNYvp4ST5JC+vzKwHcJdJ0O+hWaOIY8vNkiF+G2JbLQbPvo3Nbc r82j3kLgsl7FoCeQZhUzB3FjRKnD2IDafgXbbq0h6b3UoMOONfCgWui0xvQO2UZpVyhP QPE4pHvb4qhfwg3HJgh8lBGTyhkX6Su2ysblVbRz/kfI/Wvrr03Lg/VeehTWTnQ8fscj kTQ5023IjAkuzkxmuA8O6KHrICxTiB68ClLZCemYHAHQdThqf+67tir0eBKrpn0KbGLT yGUg== 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=M3pOp5kptZ6YgzfG0S1o6cFzqzbA+kUwayqUm25hHcM=; b=tdfu7Jv7AN9bW/Kg/NUOuwX0mPykHAVhJqSswzQIcw9EPproCVN6MJefX+ctC+crSb t+W3nn/HobmvJiymKVIll8U+L1jpnh68K6jzqv4Exu+X3pS0/NoLv+6CgE2kULRT3Nny idD6ZGylylYsmqGnwd+tk1kdClviOahjbbxEpX9OQ6Y7JWD2SoR2wCDTa5xp3zpFB98O upNRRP5QCVQpwlf6huf6eyc7zlFtOFS5YsqGPS8TW5wKoAAP4olUvdnRPx92qP65xzX5 FCsFzDfBcp+Jl7Sw+oSrhmLRS9oaJaUPjW+HW8OBrDmfvLjLuV6AlpN+zJk/jvQiLAc4 jMNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=LvfVrjVA; 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 lg3si2571967ejb.158.2021.01.21.20.41.31; Thu, 21 Jan 2021 20:41:54 -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=LvfVrjVA; 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 S1726379AbhAVDhV (ORCPT + 99 others); Thu, 21 Jan 2021 22:37:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726160AbhAVDhR (ORCPT ); Thu, 21 Jan 2021 22:37:17 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C8ABC06174A; Thu, 21 Jan 2021 19:36:37 -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=M3pOp5kptZ6YgzfG0S1o6cFzqzbA+kUwayqUm25hHcM=; b=LvfVrjVA/4jzbyfI6AIhmS7+di aMB4ehdbvNADYyYINdG1nIbN8D8R5RIP2mIJhBgCEPa3B33AqGUIHDvX1WjwhprtQFKtdGZLmAhJp JTGUsZCgdWt+MVJ3UhpUahOJrIxZXM3d190SGF5Q7ORdrpbXMKCmABvLa+YnsrYzm3oMD3ejpbJIP 12y83YrPLjX+YGZc0ZSXykJyHVD9pQLy0NMy8cOxosLO1D5MyCAjebN7Ma1EZjU86hu9+7XSFv06x 5CkPaS4Kxe+isBaELueIr8pvwvSPpMjx3hJarXCauM6wcT4ddhgBRnbZ+CK1oJ8sUtrfEID9CnjG9 9Ivb9mZg==; Received: from [2601:1c0:6280:3f0::9abc] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2nFQ-00041g-Rz; Fri, 22 Jan 2021 03:36:33 +0000 Subject: Re: [PATCH] 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: <20210122032334.3663056-1-andrew@aj.id.au> From: Randy Dunlap Message-ID: Date: Thu, 21 Jan 2021 19:36:25 -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: <20210122032334.3663056-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/21/21 7:23 PM, 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 Acked-by: Randy Dunlap # build-tested Thanks. > --- > drivers/mmc/host/sdhci-of-aspeed-test.c | 9 ++++++++- > drivers/mmc/host/sdhci-of-aspeed.c | 27 ++++++++++++++++++++----- > 2 files changed, 30 insertions(+), 6 deletions(-) -- ~Randy RFC: Features and documentation: http://lwn.net/Articles/260136/