From: Ninad Naik <ninadnaik07@gmail.com>
To: linux@roeck-us.net
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
skhan@linuxfoundation.org, me@brighamcampbell.com,
linux-kernel-mentees@lists.linux.dev,
Ninad Naik <ninadnaik07@gmail.com>
Subject: [PATCH 2/3] hwmon: lm93: Change unsigned to unsigned int for clarity
Date: Thu, 7 May 2026 15:41:42 +0530 [thread overview]
Message-ID: <20260507101143.559475-3-ninadnaik07@gmail.com> (raw)
In-Reply-To: <20260507101143.559475-1-ninadnaik07@gmail.com>
Fix checkpatch.pl warning by changing unsigned to unsigned int
for clarity and to follow latest kernel code style.
No functional changes are made.
Signed-off-by: Ninad Naik <ninadnaik07@gmail.com>
---
drivers/hwmon/lm93.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/hwmon/lm93.c b/drivers/hwmon/lm93.c
index c15e2a02dd86..1a3b5da924b2 100644
--- a/drivers/hwmon/lm93.c
+++ b/drivers/hwmon/lm93.c
@@ -339,7 +339,7 @@ static const unsigned long lm93_vin_val_max[16] = {
* };
*/
-static unsigned LM93_IN_FROM_REG(int nr, u8 reg)
+static unsigned int LM93_IN_FROM_REG(int nr, u8 reg)
{
const long uv_max = lm93_vin_val_max[nr] * 1000;
const long uv_min = lm93_vin_val_min[nr] * 1000;
@@ -355,7 +355,7 @@ static unsigned LM93_IN_FROM_REG(int nr, u8 reg)
* IN: mV, limits determined by channel nr
* REG: scaling determined by channel nr
*/
-static u8 LM93_IN_TO_REG(int nr, unsigned val)
+static u8 LM93_IN_TO_REG(int nr, unsigned int val)
{
/* range limit */
const long mv = clamp_val(val,
@@ -379,7 +379,7 @@ static u8 LM93_IN_TO_REG(int nr, unsigned val)
}
/* vid in mV, upper == 0 indicates low limit, otherwise upper limit */
-static unsigned LM93_IN_REL_FROM_REG(u8 reg, int upper, int vid)
+static unsigned int LM93_IN_REL_FROM_REG(u8 reg, int upper, int vid)
{
const long uv_offset = upper ? (((reg >> 4 & 0x0f) + 1) * 12500) :
(((reg >> 0 & 0x0f) + 1) * -25000);
@@ -396,7 +396,7 @@ static unsigned LM93_IN_REL_FROM_REG(u8 reg, int upper, int vid)
* upper also determines which nibble of the register is returned
* (the other nibble will be 0x0)
*/
-static u8 LM93_IN_REL_TO_REG(unsigned val, int upper, int vid)
+static u8 LM93_IN_REL_TO_REG(unsigned int val, int upper, int vid)
{
long uv_offset = vid * 1000 - val * 10000;
@@ -730,7 +730,7 @@ static u8 LM93_INTERVAL_TO_REG(long interval)
* GPIO: 0-255, GPIO0 is LSB
* REG: inverted
*/
-static unsigned LM93_GPI_FROM_REG(u8 reg)
+static unsigned int LM93_GPI_FROM_REG(u8 reg)
{
return ~reg & 0xff;
}
@@ -777,9 +777,9 @@ static unsigned LM93_GPI_FROM_REG(u8 reg)
#define LM93_ALARM_TEMP2 0x20000000
#define LM93_ALARM_TEMP3 0x40000000
-static unsigned LM93_ALARMS_FROM_REG(struct block1_t b1)
+static unsigned int LM93_ALARMS_FROM_REG(struct block1_t b1)
{
- unsigned result;
+ unsigned int result;
result = b1.host_status_2 & 0x3f;
--
2.54.0
next prev parent reply other threads:[~2026-05-07 10:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 10:11 [PATCH 0/3] hwmon: lm93: clean up coding style issues Ninad Naik
2026-05-07 10:11 ` [PATCH 1/3] hwmon: lm93: Add missing blank lines after declarations Ninad Naik
2026-05-07 10:11 ` Ninad Naik [this message]
2026-05-07 10:11 ` [PATCH 3/3] hwmon: lm93: Remove else blocks after break or return for consistency Ninad Naik
2026-05-08 16:27 ` [PATCH 0/3] hwmon: lm93: clean up coding style issues Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260507101143.559475-3-ninadnaik07@gmail.com \
--to=ninadnaik07@gmail.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=me@brighamcampbell.com \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox