From patchwork Wed Sep 8 02:57:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12479957 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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 B55D3C433F5 for ; Wed, 8 Sep 2021 02:57:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 69D6C61153 for ; Wed, 8 Sep 2021 02:57:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 69D6C61153 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 153DF94002A; Tue, 7 Sep 2021 22:57:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 10463900003; Tue, 7 Sep 2021 22:57:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F35E394002A; Tue, 7 Sep 2021 22:57:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0147.hostedemail.com [216.40.44.147]) by kanga.kvack.org (Postfix) with ESMTP id E07FD900003 for ; Tue, 7 Sep 2021 22:57:46 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A53E2181DB368 for ; Wed, 8 Sep 2021 02:57:46 +0000 (UTC) X-FDA: 78562896132.13.0C32473 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf06.hostedemail.com (Postfix) with ESMTP id 62F1C801A8A0 for ; Wed, 8 Sep 2021 02:57:46 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 24B606113C; Wed, 8 Sep 2021 02:57:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1631069865; bh=Y7wqP9Db0Yl6TGwjg4MxxuXEgYY6S3Wn0qK9QjkNEOI=; h=Date:From:To:Subject:In-Reply-To:From; b=Ww+79m1vvi0/rLx0Trd32Uoj97dFZqmMvWI1qUvwmsM6qpOUPU4HmdsN3PA9//Lcw e/dhZW1U6xHqvAhjtZ2rllg8ucXxDul5ycNKJO36tWboWkgai48s3tQXuSlel7yIRm pubi7+kUVZuq0P4b/A5myrPzKyokFSap8Q2ts3ng= Date: Tue, 07 Sep 2021 19:57:44 -0700 From: Andrew Morton To: akpm@linux-foundation.org, andriy.shevchenko@linux.intel.com, ceggers@arri.de, cw00.choi@samsung.com, daniel.lezcano@linaro.org, jic23@kernel.org, Jonathan.Cameron@huawei.com, kyungmin.park@samsung.com, lars@metafoo.de, linux-mm@kvack.org, linux@roeck-us.net, lukasz.luba@arm.com, mcoquelin.stm32@gmail.com, miquel.raynal@bootlin.com, mm-commits@vger.kernel.org, myungjoo.ham@samsung.com, pmeerw@pmeerw.net, rafael@kernel.org, rui.zhang@intel.com, torvalds@linux-foundation.org Subject: [patch 084/147] units: change from 'L' to 'UL' Message-ID: <20210908025744.2ZyJFN1S9%akpm@linux-foundation.org> In-Reply-To: <20210907195226.14b1d22a07c085b22968b933@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=Ww+79m1v; spf=pass (imf06.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 62F1C801A8A0 X-Stat-Signature: 3od79qm63x4xccsz3xpsgaz17oskgsia X-HE-Tag: 1631069866-198281 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Daniel Lezcano Subject: units: change from 'L' to 'UL' Patch series "Add Hz macros", v3. There are multiple definitions of the HZ_PER_MHZ or HZ_PER_KHZ in the different drivers. Instead of duplicating this definition again and again, add one in the units.h header to be reused in all the place the redefiniton occurs. At the same time, change the type of the Watts, as they can not be negative. This patch (of 10): The users of the macros are safe to be assigned with an unsigned instead of signed as the variables using them are themselves unsigned. Link: https://lkml.kernel.org/r/20210816114732.1834145-1-daniel.lezcano@linaro.org Link: https://lkml.kernel.org/r/20210816114732.1834145-2-daniel.lezcano@linaro.org Signed-off-by: Daniel Lezcano Cc: Andy Shevchenko Cc: Jonathan Cameron Cc: Christian Eggers Cc: Lukasz Luba Cc: MyungJoo Ham Cc: Kyungmin Park Cc: Lars-Peter Clausen Cc: Peter Meerwald Cc: Zhang Rui Cc: Guenter Roeck Cc: Miquel Raynal Cc: Maxime Coquelin Cc: "Rafael J. Wysocki" Cc: Daniel Lezcano Cc: Chanwoo Choi Cc: Jonathan Cameron Signed-off-by: Andrew Morton --- include/linux/units.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/include/linux/units.h~units-change-from-l-to-ul +++ a/include/linux/units.h @@ -4,9 +4,9 @@ #include -#define MILLIWATT_PER_WATT 1000L -#define MICROWATT_PER_MILLIWATT 1000L -#define MICROWATT_PER_WATT 1000000L +#define MILLIWATT_PER_WATT 1000UL +#define MICROWATT_PER_MILLIWATT 1000UL +#define MICROWATT_PER_WATT 1000000UL #define ABSOLUTE_ZERO_MILLICELSIUS -273150