From patchwork Fri Dec 1 09:56:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mateusz Majewski X-Patchwork-Id: 13475593 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 AB71DC07E97 for ; Fri, 1 Dec 2023 09:57:24 +0000 (UTC) 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:References:MIME-Version:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KzSFkvCtptxLFRpohmoLZxw6hhpS89OR82J+QFgAKgs=; b=TYQvxBVnBoaYms HmeJjwJVpcTj84DbLW4ZBINlqIJWTWmMxhBcYQ8V4EVQ5YN15ugipeb6SnTnwAFBr9Id52UChoZX+ oiktHyjUINDHbjq3CaqOYlk0SE06u3mb26a8gbCG8wfa5cZyTUa3kv+a9Qs98oYnhpwYrw03gZGes Qttt9diIb30ufEnfJ94vmxq/Z2rlQWMaPSvxR2TLeHbmWHQHHHa+Onz39l9DpZa3/P24qu/4HnA+t ckzbjvONWQWv9AulzOeNTWOnJOt0eyTLUhU8U4MsHU7MwJWegmD+JFJ2k9Otwpvxdxjn0ORqJOYEi j9z8i0mht2hYmTz1pXsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r90GV-00D917-0v; Fri, 01 Dec 2023 09:56:55 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r90GP-00D8xW-2m for linux-arm-kernel@lists.infradead.org; Fri, 01 Dec 2023 09:56:52 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20231201095648euoutp010b4d370fb890623f6a5f8c49e89af5ed~crKq7MoKC3265732657euoutp019 for ; Fri, 1 Dec 2023 09:56:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20231201095648euoutp010b4d370fb890623f6a5f8c49e89af5ed~crKq7MoKC3265732657euoutp019 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1701424608; bh=qcDWdYyFz+aTs42Xky3P8FBnBFXfbsLTVwl0UxX68ME=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LPNaCsDYkWxkLvjrKP3KCoqWuphcGv3MALiDB+tfGdg2j0QSjag6hMZ99vxuW8LUA 4Ugc405/Q++h4SkhCiOSYHgR3BZogQ4mVmood9p7zIP8JiBAA2fCjQS2C6/RIRvaAg ZliIur0AXUwUtFw1G+zN3s+rLN+yj48S3vosepRQ= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20231201095647eucas1p29930c7c10aa5b4a957f9035af650d3b5~crKqZDZ2S1612516125eucas1p2m; Fri, 1 Dec 2023 09:56:47 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 4B.42.09814.FDDA9656; Fri, 1 Dec 2023 09:56:47 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20231201095647eucas1p25f6068381aa2b5f00ed7a8c093fe7a7b~crKp-CGz51612616126eucas1p2n; Fri, 1 Dec 2023 09:56:47 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20231201095647eusmtrp1333961b5c91481da07f8a5a9ca494a28~crKp_QkLI0759907599eusmtrp1E; Fri, 1 Dec 2023 09:56:47 +0000 (GMT) X-AuditID: cbfec7f4-727ff70000002656-fe-6569addf66d8 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 51.30.09146.FDDA9656; Fri, 1 Dec 2023 09:56:47 +0000 (GMT) Received: from AMDC4515.eu.corp.samsungelectronics.net (unknown [106.120.51.28]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20231201095646eusmtip257beac659cec1845189c7e85b2a3ec17~crKpEpHYz0964909649eusmtip2f; Fri, 1 Dec 2023 09:56:46 +0000 (GMT) From: Mateusz Majewski To: linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Mateusz Majewski , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Alim Akhtar , Liam Girdwood , Mark Brown , Marek Szyprowski , Lukasz Luba , Dan Carpenter Subject: [PATCH v6 8/9] thermal: exynos: use BIT wherever possible Date: Fri, 1 Dec 2023 10:56:24 +0100 Message-ID: <20231201095625.301884-9-m.majewski2@samsung.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231201095625.301884-1-m.majewski2@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDKsWRmVeSWpSXmKPExsWy7djP87r312amGlz6Y2LxYN42NovD8yss pj58wmbxfct1JosP81rZLeZ9lrXY+3oru8W3Kx1MFpseX2O1uLxrDpvF594jjBYzzu9jsljY 1MJuMfHYZGaLtUfuslvM/TKV2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mOUgMAAA== X-CMS-MailID: 20231201095647eucas1p25f6068381aa2b5f00ed7a8c093fe7a7b X-Msg-Generator: CA X-RootMTR: 20231201095647eucas1p25f6068381aa2b5f00ed7a8c093fe7a7b X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20231201095647eucas1p25f6068381aa2b5f00ed7a8c093fe7a7b References: <20231201095625.301884-1-m.majewski2@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231201_015650_162668_1CA70774 X-CRM114-Status: GOOD ( 12.71 ) 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 The original driver did not use that macro and it allows us to make our intentions slightly clearer. Reviewed-by: Lukasz Luba Signed-off-by: Mateusz Majewski --- drivers/thermal/samsung/exynos_tmu.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 970bada90f2f..ca1b1cec0300 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -388,7 +388,7 @@ static void exynos4412_tmu_set_trip_temp(struct exynos_tmu_data *data, if (trip == 3) { con = readl(data->base + EXYNOS_TMU_REG_CONTROL); - con |= (1 << EXYNOS_TMU_THERM_TRIP_EN_SHIFT); + con |= BIT(EXYNOS_TMU_THERM_TRIP_EN_SHIFT); writel(con, data->base + EXYNOS_TMU_REG_CONTROL); } } @@ -559,16 +559,16 @@ static void exynos4210_tmu_control(struct platform_device *pdev, bool on) continue; interrupt_en |= - (1 << (EXYNOS_TMU_INTEN_RISE0_SHIFT + i * 4)); + BIT(EXYNOS_TMU_INTEN_RISE0_SHIFT + i * 4); } if (data->soc != SOC_ARCH_EXYNOS4210) interrupt_en |= interrupt_en << EXYNOS_TMU_INTEN_FALL0_SHIFT; - con |= (1 << EXYNOS_TMU_CORE_EN_SHIFT); + con |= BIT(EXYNOS_TMU_CORE_EN_SHIFT); } else { - con &= ~(1 << EXYNOS_TMU_CORE_EN_SHIFT); + con &= ~BIT(EXYNOS_TMU_CORE_EN_SHIFT); } writel(interrupt_en, data->base + EXYNOS_TMU_REG_INTEN); @@ -590,15 +590,15 @@ static void exynos5433_tmu_control(struct platform_device *pdev, bool on) continue; interrupt_en |= - (1 << (EXYNOS7_TMU_INTEN_RISE0_SHIFT + i)); + BIT(EXYNOS7_TMU_INTEN_RISE0_SHIFT + i); } interrupt_en |= interrupt_en << EXYNOS_TMU_INTEN_FALL0_SHIFT; - con |= (1 << EXYNOS_TMU_CORE_EN_SHIFT); + con |= BIT(EXYNOS_TMU_CORE_EN_SHIFT); } else - con &= ~(1 << EXYNOS_TMU_CORE_EN_SHIFT); + con &= ~BIT(EXYNOS_TMU_CORE_EN_SHIFT); pd_det_en = on ? EXYNOS5433_PD_DET_EN : 0; @@ -622,17 +622,17 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on) continue; interrupt_en |= - (1 << (EXYNOS7_TMU_INTEN_RISE0_SHIFT + i)); + BIT(EXYNOS7_TMU_INTEN_RISE0_SHIFT + i); } interrupt_en |= interrupt_en << EXYNOS_TMU_INTEN_FALL0_SHIFT; - con |= (1 << EXYNOS_TMU_CORE_EN_SHIFT); - con |= (1 << EXYNOS7_PD_DET_EN_SHIFT); + con |= BIT(EXYNOS_TMU_CORE_EN_SHIFT); + con |= BIT(EXYNOS7_PD_DET_EN_SHIFT); } else { - con &= ~(1 << EXYNOS_TMU_CORE_EN_SHIFT); - con &= ~(1 << EXYNOS7_PD_DET_EN_SHIFT); + con &= ~BIT(EXYNOS_TMU_CORE_EN_SHIFT); + con &= ~BIT(EXYNOS7_PD_DET_EN_SHIFT); } writel(interrupt_en, data->base + EXYNOS7_TMU_REG_INTEN);