public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v3] staging: rtl8723bs: fix code style issues in rtl8723b_hal.h
@ 2026-03-18 15:01 Hüseyin Can Erdem
  2026-03-18 15:12 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Hüseyin Can Erdem @ 2026-03-18 15:01 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, Hüseyin Can Erdem

Replace __attribute__((__packed__)) with the preferred __packed macro.
Add parentheses around macro arguments to avoid potential operator
precedence issues.

Signed-off-by: Hüseyin Can Erdem <erdemhuseyincan09@gmail.com>
---
 drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
index 7ec84304a..cd3b49338 100644
--- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
+++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
@@ -28,7 +28,7 @@
 #define FW_8723B_END_ADDRESS   0x1FFF /* 0x5FFF */
 
 #define IS_FW_HEADER_EXIST_8723B(fw_hdr) \
-	((le16_to_cpu(fw_hdr->signature) & 0xFFF0) == 0x5300)
+	((le16_to_cpu((fw_hdr)->signature) & 0xFFF0) == 0x5300)
 
 struct rt_firmware {
 	u32 fw_length;
@@ -133,7 +133,7 @@ struct rt_firmware_hdr {
 #define EFUSE_IC_ID_OFFSET 506 /* For some inferiority IC purpose.
 				* Added by Roger, 2009.09.02.
 				*/
-#define AVAILABLE_EFUSE_ADDR(addr) (addr < EFUSE_REAL_CONTENT_LEN_8723B)
+#define AVAILABLE_EFUSE_ADDR(addr) ((addr) < EFUSE_REAL_CONTENT_LEN_8723B)
 
 #define EFUSE_ACCESS_ON  0x69 /* For RTL8723 only. */
 #define EFUSE_ACCESS_OFF 0x00 /* For RTL8723 only. */
@@ -171,7 +171,7 @@ struct c2h_evt_hdr_t {
 	u8 CmdID;
 	u8 CmdLen;
 	u8 CmdSeq;
-} __attribute__((__packed__));
+} __packed;
 
 enum { /* tag_Package_Definition */
 	PACKAGE_DEFAULT,
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] staging: rtl8723bs: fix code style issues in rtl8723b_hal.h
  2026-03-18 15:01 [PATCH v3] staging: rtl8723bs: fix code style issues in rtl8723b_hal.h Hüseyin Can Erdem
@ 2026-03-18 15:12 ` Greg KH
  2026-03-18 15:35   ` [PATCH 1/2] staging: rtl8723bs: replace __attribute__((__packed__)) with __packed Hüseyin Can Erdem
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2026-03-18 15:12 UTC (permalink / raw)
  To: Hüseyin Can Erdem; +Cc: linux-staging, linux-kernel

On Wed, Mar 18, 2026 at 06:01:46PM +0300, Hüseyin Can Erdem wrote:
> Replace __attribute__((__packed__)) with the preferred __packed macro.
> Add parentheses around macro arguments to avoid potential operator
> precedence issues.
> 
> Signed-off-by: Hüseyin Can Erdem <erdemhuseyincan09@gmail.com>

Please do not ignore what my bot told you was wrong with a previous
patch version :(

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] staging: rtl8723bs: replace __attribute__((__packed__)) with __packed
  2026-03-18 15:12 ` Greg KH
@ 2026-03-18 15:35   ` Hüseyin Can Erdem
  2026-03-18 15:35     ` [PATCH 2/2] staging: rtl8723bs: add parentheses around macro arguments Hüseyin Can Erdem
  0 siblings, 1 reply; 5+ messages in thread
From: Hüseyin Can Erdem @ 2026-03-18 15:35 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, Hüseyin Can Erdem

Replace __attribute__((__packed__)) with the preferred __packed macro
for consistency with kernel coding style.

Signed-off-by: Hüseyin Can Erdem <erdemhuseyincan09@gmail.com>
---
 drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
index 7ec84304a..32a93653b 100644
--- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
+++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
@@ -171,7 +171,7 @@ struct c2h_evt_hdr_t {
 	u8 CmdID;
 	u8 CmdLen;
 	u8 CmdSeq;
-} __attribute__((__packed__));
+} __packed;
 
 enum { /* tag_Package_Definition */
 	PACKAGE_DEFAULT,
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] staging: rtl8723bs: add parentheses around macro arguments
  2026-03-18 15:35   ` [PATCH 1/2] staging: rtl8723bs: replace __attribute__((__packed__)) with __packed Hüseyin Can Erdem
@ 2026-03-18 15:35     ` Hüseyin Can Erdem
  2026-03-18 15:59       ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Hüseyin Can Erdem @ 2026-03-18 15:35 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, Hüseyin Can Erdem

Add parentheses around macro arguments in IS_FW_HEADER_EXIST_8723B
and AVAILABLE_EFUSE_ADDR to avoid potential operator precedence issues.

Signed-off-by: Hüseyin Can Erdem <erdemhuseyincan09@gmail.com>
---
 drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
index 32a93653b..cd3b49338 100644
--- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
+++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
@@ -28,7 +28,7 @@
 #define FW_8723B_END_ADDRESS   0x1FFF /* 0x5FFF */
 
 #define IS_FW_HEADER_EXIST_8723B(fw_hdr) \
-	((le16_to_cpu(fw_hdr->signature) & 0xFFF0) == 0x5300)
+	((le16_to_cpu((fw_hdr)->signature) & 0xFFF0) == 0x5300)
 
 struct rt_firmware {
 	u32 fw_length;
@@ -133,7 +133,7 @@ struct rt_firmware_hdr {
 #define EFUSE_IC_ID_OFFSET 506 /* For some inferiority IC purpose.
 				* Added by Roger, 2009.09.02.
 				*/
-#define AVAILABLE_EFUSE_ADDR(addr) (addr < EFUSE_REAL_CONTENT_LEN_8723B)
+#define AVAILABLE_EFUSE_ADDR(addr) ((addr) < EFUSE_REAL_CONTENT_LEN_8723B)
 
 #define EFUSE_ACCESS_ON  0x69 /* For RTL8723 only. */
 #define EFUSE_ACCESS_OFF 0x00 /* For RTL8723 only. */
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] staging: rtl8723bs: add parentheses around macro arguments
  2026-03-18 15:35     ` [PATCH 2/2] staging: rtl8723bs: add parentheses around macro arguments Hüseyin Can Erdem
@ 2026-03-18 15:59       ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2026-03-18 15:59 UTC (permalink / raw)
  To: Hüseyin Can Erdem; +Cc: linux-staging, linux-kernel

On Wed, Mar 18, 2026 at 06:35:15PM +0300, Hüseyin Can Erdem wrote:
> Add parentheses around macro arguments in IS_FW_HEADER_EXIST_8723B
> and AVAILABLE_EFUSE_ADDR to avoid potential operator precedence issues.
> 
> Signed-off-by: Hüseyin Can Erdem <erdemhuseyincan09@gmail.com>
> ---
>  drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
> index 32a93653b..cd3b49338 100644
> --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
> +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
> @@ -28,7 +28,7 @@
>  #define FW_8723B_END_ADDRESS   0x1FFF /* 0x5FFF */
>  
>  #define IS_FW_HEADER_EXIST_8723B(fw_hdr) \
> -	((le16_to_cpu(fw_hdr->signature) & 0xFFF0) == 0x5300)
> +	((le16_to_cpu((fw_hdr)->signature) & 0xFFF0) == 0x5300)
>  
>  struct rt_firmware {
>  	u32 fw_length;
> @@ -133,7 +133,7 @@ struct rt_firmware_hdr {
>  #define EFUSE_IC_ID_OFFSET 506 /* For some inferiority IC purpose.
>  				* Added by Roger, 2009.09.02.
>  				*/
> -#define AVAILABLE_EFUSE_ADDR(addr) (addr < EFUSE_REAL_CONTENT_LEN_8723B)
> +#define AVAILABLE_EFUSE_ADDR(addr) ((addr) < EFUSE_REAL_CONTENT_LEN_8723B)
>  
>  #define EFUSE_ACCESS_ON  0x69 /* For RTL8723 only. */
>  #define EFUSE_ACCESS_OFF 0x00 /* For RTL8723 only. */
> -- 
> 2.47.3
> 
> 

Please slow down, there is no rush here.  Take at least a day before
sending a new version of a patch.

Also, why was this not marked as a "v2" or "v3" or whatever it really
is?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-18 15:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18 15:01 [PATCH v3] staging: rtl8723bs: fix code style issues in rtl8723b_hal.h Hüseyin Can Erdem
2026-03-18 15:12 ` Greg KH
2026-03-18 15:35   ` [PATCH 1/2] staging: rtl8723bs: replace __attribute__((__packed__)) with __packed Hüseyin Can Erdem
2026-03-18 15:35     ` [PATCH 2/2] staging: rtl8723bs: add parentheses around macro arguments Hüseyin Can Erdem
2026-03-18 15:59       ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox