Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1538873ybg; Wed, 29 Jul 2020 17:34:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMf9KW+NwisNB1CE5w25otc74P+D6gsYjVceKidQGJG1C/lGQu7Loef42VKks9v0HGBXPh X-Received: by 2002:a17:906:3b01:: with SMTP id g1mr181554ejf.353.1596069242761; Wed, 29 Jul 2020 17:34:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596069242; cv=none; d=google.com; s=arc-20160816; b=kwfZs/ojZC3SKhXgOlnxN8bN8qL3EAXjCu7Rthgjt3qfnkMIqxtFbAtdpba1modCV5 IyRLT2C3P27/wyYNhTQe2nQrOP4cvIs0ujqVEAoDSNLPzfof4ClSiOuXKh1ud2nPHpqm iEJSvkZ4icCJReJQ/uUxTY5ZOHvqzuF+lr7vwgXHvOyyLvBKWrXhQ/DZZ/CYlCUcm7Oi Uok5/FT55qyj9ShvKKLvP3xubl2Kl+b98T0Mzli4hGkb/Sx01ZFlMmKi4OOPtO2a6yiH JuYiKKRNtyFXwJWGEvEdM4cc2b5jibHBvdsahLE3pbRO0yqdjxbrIm35MyE1J6BtTeeB ikjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=k3VcDycZsXhB43FKH6fx87shOxXnFVYdJfbp6APBdDY=; b=ZzAX0AdJYmEm2C8kC1/wWheL7hFlKrLrRNVychVBA1JBaF+1OIEis3aIMwx3XcTQTd D7R0vuWQXZ5BT6Yq7XqCcTpLAunbM9uKZBbhV7RtFSEzhN97lGaqzu97TDtSgXPqVcFQ fwSS+e8Y8+WQpa7cziEdFrA/jROAcIUrtP95hRSmAUHCLsP8AgemsR6fURGaOgmhPKdu ZWsiokZcWwrwTUefPfqwF4PUihLYgSbg1BNlv465MmtcGOCnPswwY49uupmPgJSa+OOl o98nYIfcLSAHs4Yzvsxw3tVe0+udOy53RJDJVK9qXKroK3BWElt8uuQSRQhlhXoShB4f Py3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=UFeyzBSw; 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 v6si683354edx.215.2020.07.29.17.33.39; Wed, 29 Jul 2020 17:34:02 -0700 (PDT) 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=fail header.i=@infradead.org header.s=casper.20170209 header.b=UFeyzBSw; 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 S1728233AbgG3Aan (ORCPT + 99 others); Wed, 29 Jul 2020 20:30:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727858AbgG3Aan (ORCPT ); Wed, 29 Jul 2020 20:30:43 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5473C061794; Wed, 29 Jul 2020 17:30:42 -0700 (PDT) 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" Cc: dl-linux-imx 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-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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