All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivy Lopez <skunkolee@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	error27@gmail.com, Ivy Lopez <skunkolee@gmail.com>
Subject: [PATCH v3] staging: rtl8723bs: define EEPROM_DEFAULT_DIFF as -2 directly
Date: Tue,  1 Sep 2026 19:48:32 -0600	[thread overview]
Message-ID: <20260902014832.17625-1-skunkolee@gmail.com> (raw)
In-Reply-To: <20260817210507.26168-1-skunkolee@gmail.com>

EEPROM_DEFAULT_DIFF is defined as the bare integer literal 0xFE
(254) but is only ever assigned into s8 (signed char) fields used
to store signed TX power calibration offsets. The value -2 is the
intended default offset; expressing it as -2 directly instead of
0xFE avoids relying on implicit truncation of an unsigned-looking
hex literal into a signed field.

No functional change.

Signed-off-by: Ivy Lopez <skunkolee@gmail.com>
---
v2: express the value as -2 directly instead of casting 0xFE to s8,
    per Dan Carpenter's suggestion
v3: rebase against staging-testing
---
 drivers/staging/rtl8723bs/include/hal_pg.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/include/hal_pg.h b/drivers/staging/rtl8723bs/include/hal_pg.h
index 32e66fe451b0..6f8c8307eaa7 100644
--- a/drivers/staging/rtl8723bs/include/hal_pg.h
+++ b/drivers/staging/rtl8723bs/include/hal_pg.h
@@ -38,7 +38,7 @@
 
 #define	EEPROM_RF_BOARD_OPTION_8723B		0xC1
 #define	EEPROM_RF_BT_SETTING_8723B		0xC3
-#define EEPROM_DEFAULT_DIFF			0XFE
+#define EEPROM_DEFAULT_DIFF			-2
 
 /* RTL8723BS */
 #define	EEPROM_MAC_ADDR_8723BS			0x11A
-- 
2.55.0


      parent reply	other threads:[~2026-09-02  1:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-15 19:10 [PATCH] staging: rtl8723bs: cast EEPROM_DEFAULT_DIFF to s8 Ivy Lopez
2026-08-17  7:49 ` Dan Carpenter
2026-08-17 21:05 ` [PATCH v2] staging: rtl8723bs: define EEPROM_DEFAULT_DIFF as -2 directly Ivy Lopez
2026-09-01 10:03   ` Greg Kroah-Hartman
2026-09-02  1:48   ` Ivy Lopez [this message]

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=20260902014832.17625-1-skunkolee@gmail.com \
    --to=skunkolee@gmail.com \
    --cc=error27@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.