lkml.org 
[lkml]   [2021]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 01/10] units: Change from 'L' to 'UL'
Date
The users of the macros are safe to be assigned with an unsigned
instead of signed as the variables using them are themselves unsigned.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
include/linux/units.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/units.h b/include/linux/units.h
index dcc30a53fa93..ff51d3cfc6a0 100644
--- a/include/linux/units.h
+++ b/include/linux/units.h
@@ -4,9 +4,9 @@

#include <linux/math.h>

-#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

--
2.25.1
\
 
 \ /
  Last update: 2021-08-16 13:48    [W:0.401 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site