Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp738851ybt; Mon, 6 Jul 2020 22:14:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwgzJSUpxQX1l6SSIF65K2idzhDW3H6FUoWLgMBghTf7tPzrXxIh3Uz1lRnfHs856MuSrQ X-Received: by 2002:a17:906:3f82:: with SMTP id b2mr2307278ejj.240.1594098898861; Mon, 06 Jul 2020 22:14:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594098898; cv=none; d=google.com; s=arc-20160816; b=MdPJ1QLzfGi5PhyLIfvYEOneyCU/q69JK2c+H9/Ob1GC638sjNoNGpnM+JS8yJLKsv AbniWaERvUjd14ZaMCOpb1g/7m32OJvnCIZFK9DDBVgk9VLJ8qktRvgr6V3Ewzmq8dIT drN1sAlCL24fJzHTJvwaTJm2/LBJoT5NFsz2USohPLWZaIY6djaJGs1z/2Rn07l9vQsD JSaBmzcoTDq3HPjgZYYG3no0mT440BF7BjoSq8ddWFS3uVunwLywaFyl6J0lvwcX9ofV DVKplwcl9V22hrYoDLdP8eqE991oV1cWhhM8sKt6Gk5SYd1uGYgHOypbU7vya4ufo+Ti 2mtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=GDoXY4+xW3QH7zeaKcQLACSHlkn/ASmpDonu/OwtEkE=; b=BtqB0aHiNY2SXm/NWV4wCUBVSczZhVvsRdNbypErVR96AM49cO6mOzK5Oa38R/U0Ri RrhDJwy+E4J5Qu65MdCt0ovMdjODD5h339d6CBCgXG1UmCpJTPmTvhhPQzlR9xgd2Wxy eUZ2qEqLBeWXayRD1dDpAzAGPD+d/RXo7oGbL1SdBDygVL/R8YEfO2JSu4AmvCOrSAoc 4nLPm2qkV7flmW3pYip0kJszPtN+Jwv1QCh07xmluEmd/Ssf5bBOV0MtG4RWm/0JwYSv Y2KUVCihKORoAV6yvusCL+CAxjJC6pCcJbHhGVbQ3K8l06fQyStxZIIlur7HGlJ1Bz2z 9EzA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ds2si19162586ejc.114.2020.07.06.22.14.35; Mon, 06 Jul 2020 22:14:58 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728178AbgGGFNZ (ORCPT + 99 others); Tue, 7 Jul 2020 01:13:25 -0400 Received: from inva021.nxp.com ([92.121.34.21]:53432 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727088AbgGGFNX (ORCPT ); Tue, 7 Jul 2020 01:13:23 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id AF4CC200844; Tue, 7 Jul 2020 07:13:21 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 0CDBD20084B; Tue, 7 Jul 2020 07:13:12 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id C35DE40305; Tue, 7 Jul 2020 13:12:52 +0800 (SGT) From: Anson Huang To: mturquette@baylibre.com, sboyd@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, aisheng.dong@nxp.com, abel.vesa@nxp.com, peng.fan@nxp.com, sfr@canb.auug.org.au, j.remmet@phytec.de, georg.waibel@wiedemann-group.de, Georg.Waibel@wiedemann-group.com, laurent.pinchart@ideasonboard.com, chen.fang@nxp.com, fugang.duan@nxp.com, daniel.baluta@nxp.com, yuehaibing@huawei.com, andrew.smirnov@gmail.com, horia.geanta@nxp.com, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Linux-imx@nxp.com Subject: [PATCH V6 6/6] clk: imx6sl: Fix build warning reported by kernel test robot Date: Tue, 7 Jul 2020 13:09:39 +0800 Message-Id: <1594098579-25050-7-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1594098579-25050-1-git-send-email-Anson.Huang@nxp.com> References: <1594098579-25050-1-git-send-email-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- New patch. --- 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 #include #include #include @@ -14,19 +15,19 @@ #include "clk.h" #define CCSR 0xc -#define BM_CCSR_PLL1_SW_CLK_SEL (1 << 2) +#define BM_CCSR_PLL1_SW_CLK_SEL BIT(2) #define CACRR 0x10 #define CDHIPR 0x48 -#define BM_CDHIPR_ARM_PODF_BUSY (1 << 16) +#define BM_CDHIPR_ARM_PODF_BUSY BIT(16) #define ARM_WAIT_DIV_396M 2 #define ARM_WAIT_DIV_792M 4 #define ARM_WAIT_DIV_996M 6 #define PLL_ARM 0x0 -#define BM_PLL_ARM_DIV_SELECT (0x7f << 0) -#define BM_PLL_ARM_POWERDOWN (1 << 12) -#define BM_PLL_ARM_ENABLE (1 << 13) -#define BM_PLL_ARM_LOCK (1 << 31) +#define BM_PLL_ARM_DIV_SELECT 0x7f +#define BM_PLL_ARM_POWERDOWN BIT(12) +#define BM_PLL_ARM_ENABLE BIT(13) +#define BM_PLL_ARM_LOCK BIT(31) #define PLL_ARM_DIV_792M 66 static const char *step_sels[] = { "osc", "pll2_pfd2", }; @@ -145,7 +146,7 @@ static void imx6sl_enable_pll_arm(bool enable) val |= BM_PLL_ARM_ENABLE; val &= ~BM_PLL_ARM_POWERDOWN; writel_relaxed(val, anatop_base + PLL_ARM); - while (!(__raw_readl(anatop_base + PLL_ARM) & BM_PLL_ARM_LOCK)) + while (!(readl_relaxed(anatop_base + PLL_ARM) & BM_PLL_ARM_LOCK)) ; } else { writel_relaxed(saved_pll_arm, anatop_base + PLL_ARM); -- 2.7.4