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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5FEFC52D7C for ; Thu, 22 Aug 2024 13:26:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/NR+h+2NCBq1Zw5Fl0n+ny6ScEodkcMC6ze0RrHcNkk=; b=qDAnQVKzTKrcYvCxf6wvfwA/h/ V0NT1KzVX9OAMrAG3Clhwqf/yudT+pOWlODC0vAftZhi3KjDhlrp4ls4sy3HR5rcciybyJzOSDyQd tseSE/sy9Lp1jmkidtbmUeqPSDcmaF/uzyUofA/Y44+rtD3YmeEEZmJ5G2RxxzTWF39gxZdmnAuOa PyjdSalM6sCwn3e4APfI89ZYn2ir5G8iXARHd3j2h4FO4aJyCsqPBLD+j7gdKVzlOLBaw8HvziazC R0pdmdRyoQblHphf2y0Zoh+KrQj3jcHELCk6el01X+V3Y2qxUeyne2eWDwd5udwi8V3hzstYCPNRg 2/oYyOpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh7pu-0000000CvlL-17ur; Thu, 22 Aug 2024 13:26:46 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh7ox-0000000CvPf-3aPm for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 13:25:49 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 9629560FF3; Thu, 22 Aug 2024 13:25:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DCDCC32782; Thu, 22 Aug 2024 13:25:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724333146; bh=G4MWnl1LTsJIZXk3+Kb2HykN4Id8Tei1TL23UkRqcMI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XXmJAaH0/b90nuscjjjO+6BYNF1wjBNpFCIHF/X0h/+kG3d/0gQ2f87QTr0pyiBw6 KCaHDz3DdvzQKuRf7x/RlxmxU+aZTujW9THvY1MHY46Qv6UlJfAEYarr+yyq7YJvSH IaxiRgorIEr3ur7qVvTa4MwifgedC47oAJr1eVAR+qpcsLd4t1skoo73nOcEqf309+ u7hRlzyuluanDngBe6Xengc/LzfXDlWkSZE+gIfn5rchfu/QEULlL2vVAKzeHlalBe uRmpYjaYV+H3Kx4Sp6UO0Tg4a06bOVRx6UAT+GQYiE/kO7RZS580My+pqFjLaFDCAj zYHmjEnEJTnUA== Date: Thu, 22 Aug 2024 14:25:39 +0100 From: Simon Horman To: Yangtao Li Cc: clement.leger@bootlin.com, andrew@lunn.ch, f.fainelli@gmail.com, olteanv@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, ulli.kroll@googlemail.com, linus.walleij@linaro.org, marcin.s.wojtas@gmail.com, linux@armlinux.org.uk, alexandre.torgue@foss.st.com, joabreu@synopsys.com, mcoquelin.stm32@gmail.com, hkallweit1@gmail.com, justinstitt@google.com, kees@kernel.org, u.kleine-koenig@pengutronix.de, jacob.e.keller@intel.com, shannon.nelson@amd.com, linux-renesas-soc@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [net-next 2/9] net: stmmac: platform: Convert to devm_clk_get_enabled() and devm_clk_get_optional_enabled() Message-ID: <20240822132539.GQ2164@kernel.org> References: <20240822084733.1599295-1-frank.li@vivo.com> <20240822084733.1599295-3-frank.li@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240822084733.1599295-3-frank.li@vivo.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_062548_041449_8BA9CBF6 X-CRM114-Status: UNSURE ( 9.24 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Aug 22, 2024 at 02:47:26AM -0600, Yangtao Li wrote: > Use devm_clk_get_enabled() and devm_clk_get_optional_enabled() > to simplify code. > > Signed-off-by: Yangtao Li Hi Yangtao Li, I feel that I am missing something obvious here, but this patch fails to build when applied to net-next. clang-18 for an x86_64 allmodconfig W=1 build says: drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:625:10: error: incompatible pointer types returning 'struct clk *' from a function with result type 'struct plat_stmmacenet_data *' [-Werror,-Wincompatible-pointer-types] 625 | return plat->pclk; | ^~~~~~~~~~ drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:641:10: error: incompatible pointer types returning 'struct reset_control *' from a function with result type 'struct plat_stmmacenet_data *' [-Werror,-Wincompatible-pointer-types] 641 | return plat->stmmac_rst; | ^~~~~~~~~~~~~~~~ drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:646:10: error: incompatible pointer types returning 'struct reset_control *' from a function with result type 'struct plat_stmmacenet_data *' [-Werror,-Wincompatible-pointer-types] 646 | return plat->stmmac_ahb_rst; | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:437:8: warning: unused variable 'ret' [-Wunused-variable] 437 | void *ret; | ^~~