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.9 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,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 48E4EC4338F for ; Wed, 11 Aug 2021 13:35:35 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0927660FC0 for ; Wed, 11 Aug 2021 13:35:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0927660FC0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UKtmfk+OTt2ywBDy1LdCbBUARX6+LdZqI2WFRiGLyMI=; b=WZ4Z6jSzNn/BmL A/2jTFTnPHbDNUwMaEc1PONQ5HyzUKb5KPz0PwKlPk5qiAKaSXX8FKtUgANNgBqR1HKQA0QyUvSRB 0B7OdhUrVm5FaiicNR5oAoxU+skBa5hsPfreJpdIkEXEmyxmy6tCcTudSkVjMalxEPufXjl08wO7d ShsalGeLgkU+fH4v5w0hT2wJF1dalCCsR956VSbRzMIxM7/TIVMoXB+CwRPXXtQS7hiqk3rlZ+ExS Jh7bhOJE8VQGXmFO4fazC3/pzDN5W0nBWsGToP8L80N/+YPfBiBCdsbo6ru39UTgZWKuxySyq/8cX 3BTiv3YWua7hzAs0QO9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDoMS-007LAN-RG; Wed, 11 Aug 2021 13:33:36 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDoMM-007Ki5-72 for linux-arm-kernel@lists.infradead.org; Wed, 11 Aug 2021 13:33:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender: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-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Z/i7uQ6NKzurDPa7kL9kranXmn5doyAE8sAhZqvAspI=; b=coUue+pPIg0Yq4CHnDyn+K7Al Kho/NHvDSf05QcdOdTXMnJW3EbccdgpHkjtjFVREEiv0NPbmTUHb/gh/7lqL0ZuAkWhh1X3Ft4mK5 WmIlbFl2nO4EXVyk0dsILamKbJYbNYuDTeGKh+c0UQvNiM/N+CUzNFlvuJT/YuUuHl0Ks36PEF26l fKKEMrAYKYlhIK+/Xvv2o0pT+c1oQZ54gUmwJcrDlkcAbwMNJerZPZKYbYdUI1jmsTgwQVN93eOTi N4+QyNilC3uAwbC8ANiwkGAL5qnLC29Xv8pOpqEoptyRuPiHU9/+qd4sXkhq23xGgEdnsSsY29zXV pUzcFF6GA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:47182) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDoKJ-0000Z6-1p; Wed, 11 Aug 2021 14:31:23 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1mDoKI-0003Bu-QI; Wed, 11 Aug 2021 14:31:22 +0100 Date: Wed, 11 Aug 2021 14:31:22 +0100 From: "Russell King (Oracle)" To: Tang Bin Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM/smp_twd: Cleanup the unnecessary cast Message-ID: <20210811133121.GV22278@shell.armlinux.org.uk> References: <20210811131512.940-1-tangbin@cmss.chinamobile.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210811131512.940-1-tangbin@cmss.chinamobile.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210811_063330_318460_F7762953 X-CRM114-Status: GOOD ( 18.63 ) 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: , 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 Wed, Aug 11, 2021 at 09:15:12PM +0800, Tang Bin wrote: > It's not necessary to specify 'int' castingfor 'PTR_ERR(twd_clk)'. > > Signed-off-by: Tang Bin > --- > arch/arm/kernel/smp_twd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c > index 9a14f721a..423e9079d 100644 > --- a/arch/arm/kernel/smp_twd.c > +++ b/arch/arm/kernel/smp_twd.c > @@ -199,7 +199,7 @@ static void twd_get_clock(struct device_node *np) > twd_clk = clk_get_sys("smp_twd", NULL); > > if (IS_ERR(twd_clk)) { > - pr_err("smp_twd: clock not found %d\n", (int) PTR_ERR(twd_clk)); > + pr_err("smp_twd: clock not found %d\n", PTR_ERR(twd_clk)); Sorry, NAK. This change _will_ produce a compiler warning. "%d" expects an argument of type "int", but PTR_ERR() returns a type of "long". Sorry, but the cast is entirely necessary. A better solution today would be to get rid of the PTR_ERR() entirely and use %pe, which will get us a textual description of the error when the appropriate kernel configuration option is enabled. Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel