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=-12.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,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 BC8FFC433E4 for ; Thu, 30 Jul 2020 00:32:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 8D5632083E for ; Thu, 30 Jul 2020 00:32:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kKrvEt3m"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="UFeyzBSw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8D5632083E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=aFrvP6boQeFk3/p32jD25basxd82ZDu2SIbkt0BFxKc=; b=kKrvEt3mFQbbC54wtUn65gkSe WfhVcDz74pLECCbjLMG+ph0REP7qJF7O8lAsvC1CoavG/WIak3nraECJzpk0iitq3gCfH8oY+0FsQ hm+mG9OdCBUhajPGae3t30u7Pk9SIODK8zww5URZcocjiB3dI9FWPaZjkDs1SDTp6qEPuBZfKYZhr TWTeya90C0XlobUPBov80Bs8ITfQKrfaXSsmA/ke8oIpyaKidSU3TAbBte7Y3PSa938AFNEkYWkMo GxtI+/w5mi6ddKsHZDt6bV9RaF0gyVrXDOvVcGWVA3sKSrZrXbyGO1UKEXXOO4uezVR5aYm3fu0Qz wVCXW2DhQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0wT3-000389-MY; Thu, 30 Jul 2020 00:30:41 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0wT2-00037u-2b for linux-arm-kernel@merlin.infradead.org; Thu, 30 Jul 2020 00:30:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=k3VcDycZsXhB43FKH6fx87shOxXnFVYdJfbp6APBdDY=; b=UFeyzBSwMc1lvdJ0bDk0iTuqcz UHJWHWlbmXpFKA1iGKIt3GH2vaJFIXmiEB4Fw28Ic75EcDi4/NWotnnSCiaQOcohUqg861nmoS8xH iukPNVGFZvGlVb9C3bFrDSKadBS6dAoxms+5AgtCn6r+J7piWLatep6aABbsvD08wMKIWX0bWkIQw aTIES75hu+r0pe9szSDYzGKjRTHA8G11Fyea65331ppWsAuu28Yupi5itfphg3hdC7ramQdEXQ4iT skKLOtVKMr2dyQ68ALn8c2Xx8qU9geiFac2CCX+ffSe0nkRaNo9xk4OqJW2iVNLA/fStIlvHWWZaG j1chOjXg==; Received: from [2601:1c0:6280:3f0::19c2] by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0wSv-0006h9-Hu; Thu, 30 Jul 2020 00:30:35 +0000 Subject: Re: [PATCH V7 1/6] clk: imx6sl: Use BIT(x) to avoid shifting signed 32-bit value by 31 bits To: Anson Huang , "mturquette@baylibre.com" , "sboyd@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , Aisheng Dong , "arnd@arndb.de" , Peng Fan , Abel Vesa , Andy Duan , Daniel Baluta , "yuehaibing@huawei.com" , "linux-clk@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" References: <1596034117-24246-1-git-send-email-Anson.Huang@nxp.com> <1596034117-24246-2-git-send-email-Anson.Huang@nxp.com> <86ae1d4e-27c9-07e4-73be-37d490cb0063@infradead.org> From: Randy Dunlap Message-ID: <34161e5c-0e83-97de-3cb6-1040d8abdc71@infradead.org> Date: Wed, 29 Jul 2020 17:30:28 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dl-linux-imx 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 7/29/20 4:51 PM, Anson Huang wrote: > Hi, Randy > > >> Subject: Re: [PATCH V7 1/6] clk: imx6sl: Use BIT(x) to avoid shifting signed >> 32-bit value by 31 bits >> >> On 7/29/20 7:48 AM, Anson Huang wrote: >>> Use readl_relaxed() instead of __raw_readl(), and use BIT(x) instead >>> of (1 << X) to fix below build warning reported by kernel test robot: >>> >>> drivers/clk/imx/clk-imx6sl.c:149:49: warning: Shifting signed 32-bit >>> value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] >>> while (!(__raw_readl(anatop_base + PLL_ARM) & >> BM_PLL_ARM_LOCK)) >>> >>> Signed-off-by: Anson Huang >>> Reported-by: kernel test robot >>> --- >>> Changes since V6: >>> - improve the subject. >>> --- >>> drivers/clk/imx/clk-imx6sl.c | 15 ++++++++------- >>> 1 file changed, 8 insertions(+), 7 deletions(-) >>> >>> diff --git a/drivers/clk/imx/clk-imx6sl.c >>> b/drivers/clk/imx/clk-imx6sl.c index 0f647d1..e69dba1 100644 >>> --- a/drivers/clk/imx/clk-imx6sl.c >>> +++ b/drivers/clk/imx/clk-imx6sl.c >>> @@ -3,6 +3,7 @@ >>> * Copyright 2013-2014 Freescale Semiconductor, Inc. >>> */ >>> >>> +#include >> >> Hi, >> I think you want >> #include >> >> for BIT() usage. > > Actually, the linux/of.h already includes linux/bitops.h and linux/bitops.h includes > linux/bits.h, so I will just drop linux/bitfield.h and send a V8. or you could read Documentation/process/submit-checklist.rst, where rule #1 says: 1) If you use a facility then #include the file that defines/declares that facility. Don't depend on other header files pulling in ones that you use. -- ~Randy _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel