Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp81840pxu; Tue, 24 Nov 2020 19:36:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJz80I1fBAp89ytt+VzP29F8aTM2/KJlB6j003AFRvspROFDHVX96eCPgR37HBuIK2kfPoOD X-Received: by 2002:a05:6402:17d1:: with SMTP id s17mr1602116edy.2.1606275392074; Tue, 24 Nov 2020 19:36:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606275392; cv=none; d=google.com; s=arc-20160816; b=qu1mXpCAokcohpVAiT95kbkbXdQN926ldzpchlazT8mHdUB1pG1fDTkXBZN/xSw7CG PLoba/jI2XVC+3QH03RcHoQTy1JKAC/wl/YrBw548FAhyMBQwN+qczfFfrbowg6bnHnw akNtJgAxFT4rwvaAxeHQjUcywM0fXK9mn7/6e6hbHwMhiUMbXaZtypq+GLv8wG10bPnT qBrvQSwq07S9ZDImv3WRXhgsIL9a1yKD4Hf6tArL5B2aWzsR1H95bkVHy4dpgU7Y7/7l PhAQ+yH/75sMBgLjHmSP19jnocP4EdUtBYf9yB+Ki4m9bmHWlvNkcGcs6jCiK86FS5zE ccSw== 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=Q+qJl/9t8h7AnV78msTDTm5ihOt81igPQbotI3Sr0s4=; b=bgqaktBAcuTLfhPDiaavJWspZl5dutxK0lmZLBw+7lgEgSQlDBhB9I/jBI0T/NEF80 ft4yxfARyo7tm6dVb4ZR6d++Yp0tGiyH7Zpl5q3VcobGdQV/tLzDjSxS2W4EqcO/iRgT nl1Ukkb5gj2+8z1W4F8lrLBHR+F0kofSHnZAuK/k/pLEwSArp5WE6zdV7Z+SESa8pXhc 0o3wHO2yiPxmdwbzwd4I6Qo3OpmPSE7f+caDOyAHzw/CD3xcmrioOQ7DUp/+JzJ0eGd6 4PxbYKTODFIrjTxpkq7ePqH/80iOmfEVhwK7XdBgyJ9d2DkbCrpO47Zyx81AI20A4Ies EmCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=UyFZx+mO; 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 z13si523698ejf.662.2020.11.24.19.36.09; Tue, 24 Nov 2020 19:36:32 -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=UyFZx+mO; 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 S1727669AbgKYDbT (ORCPT + 99 others); Tue, 24 Nov 2020 22:31:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726192AbgKYDbT (ORCPT ); Tue, 24 Nov 2020 22:31:19 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21AE4C0613D4 for ; Tue, 24 Nov 2020 19:31:19 -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=Q+qJl/9t8h7AnV78msTDTm5ihOt81igPQbotI3Sr0s4=; b=UyFZx+mOElChhPnb3tSSDkRtrf NE0Yck57d6YkQrcaDFnJejtJwR+6JSaMRGxEMJQzkqMtNc0U1I0bG4L8TRj00ZQdXf5cfUG7/tGha ALfhL7+dxSA2aZCJyRO8uRmiADC8ytLPaITUSsbDYJQIIJsYzuKNvZJmSs3m261h3i7OniEvJGG0o a2MUXzbp198/6EZBAhgbEgI1HJDmsGpFlAneXLqIjRPOQFvA/qS75VBBwTimYSRPKl+uDU0U134Y1 dhr71dr8E7iWyIe1/whQwghWcBbBU/jk7Ox2ghpB3XVMeV4ixjfpFL2/5QebXBR+YifQ12MOYUWn4 BxuqdKKA==; Received: from [2601:1c0:6280:3f0::cc1f] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1khlWU-00006x-ET; Wed, 25 Nov 2020 03:31:14 +0000 Subject: Re: [PATCH] phy/mediatek: Make PHY_MTK_XSPHY depend on HAS_IOMEM and OF_ADDRESS to fix build errors To: Chunfeng Yun , Tiezhu Yang Cc: Vinod Koul , Kishon Vijay Abraham I , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Heiko Stuebner , Xuefeng Li References: <1606211233-7425-1-git-send-email-yangtiezhu@loongson.cn> <1606271044.32484.20.camel@mhfsdcap03> From: Randy Dunlap Message-ID: Date: Tue, 24 Nov 2020 19:31:08 -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: <1606271044.32484.20.camel@mhfsdcap03> 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 11/24/20 6:24 PM, Chunfeng Yun wrote: > Hi Tiezhu, > > On Tue, 2020-11-24 at 17:47 +0800, Tiezhu Yang wrote: >> devm_ioremap_resource() will be not built in lib/devres.c if >> CONFIG_HAS_IOMEM is not set, of_address_to_resource() will be >> not built in drivers/of/address.c if CONFIG_OF_ADDRESS is not >> set, and then there exists two build errors about undefined >> reference to "devm_ioremap_resource" and "of_address_to_resource" >> in phy-mtk-xsphy.c under COMPILE_TEST and CONFIG_PHY_MTK_XSPHY, >> make PHY_MTK_XSPHY depend on HAS_IOMEM and OF_ADDRESS to fix it. >> >> Reported-by: kernel test robot >> Signed-off-by: Tiezhu Yang >> --- >> drivers/phy/mediatek/Kconfig | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/phy/mediatek/Kconfig b/drivers/phy/mediatek/Kconfig >> index 50c5e93..66df045 100644 >> --- a/drivers/phy/mediatek/Kconfig >> +++ b/drivers/phy/mediatek/Kconfig >> @@ -30,6 +30,8 @@ config PHY_MTK_XSPHY >> tristate "MediaTek XS-PHY Driver" >> depends on ARCH_MEDIATEK || COMPILE_TEST >> depends on OF >> + depends on HAS_IOMEM >> + depends on OF_ADDRESS > Why not add them into deconfig but here? In fact I don't know which way > is better and follow the kernel rule. > > Vinod and Kishon, do you have any suggestion about this? Putting them into a defconfig won't prevent random build errors while putting them here will (or at least should). >> select GENERIC_PHY >> help >> Enable this to support the SuperSpeedPlus XS-PHY transceiver for > The patch LGTM. Acked-by: Randy Dunlap thanks. -- ~Randy