Skip to contentSkip to conversation

staging: rtl8723bs: fix line length checkpatch warning

PATCH In review Devansh Soni 3 participants 3 messages Jun 15 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs: fix line length checkpatch warning

Wrap a long pointer arithmetic line to resolve a checkpatch.pl line length warning.

---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +2 -1
index c1185c25e..d727a00f2 100644
@@ -184,7 +184,8 @@ int rtw_init_cmd_priv(struct	cmd_priv *pcmdpriv)
 		return -ENOMEM;
 	}
 
-	pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 - ((SIZE_PTR)(pcmdpriv->rsp_allocated_buf) & 3);
+	pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 -
+			    ((SIZE_PTR)(pcmdpriv->rsp_allocated_buf) & 3);
 
 	pcmdpriv->cmd_issued_cnt = 0;
 	pcmdpriv->cmd_done_cnt = 0;
Signature · 1 line
2.54.0
maintainer
#1 lore raw
Quoted 1 line · Devansh Soni

Wrap a long pointer arithmetic line to resolve a checkpatch.pl line length warning.

Ironically, this text is too wide :(

Didn't checkpatch complain about that?

thanks,

greg k-h

#2 lore raw
In reply to Devansh Soni
Quoted 12 lines · Devansh Soni

Wrap a long pointer arithmetic line to resolve a checkpatch.pl line length warning.

---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +0 -0
index c1185c25e..d727a00f2 100644

drivers/staging/rtl8723bs/core/rtw_cmd.c int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) · line 188

Quoted 6 lines
drivers/staging/rtl8723bs/core/rtw_cmd.c +2 -1
@@ -184,7 +184,8 @@ int rtw_init_cmd_priv(struct	cmd_priv *pcmdpriv)
 		return -ENOMEM;
 	}
 
-	pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 - ((SIZE_PTR)(pcmdpriv->rsp_allocated_buf) & 3);
+	pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 -
+			    ((SIZE_PTR)(pcmdpriv->rsp_allocated_buf) & 3);

This code is ALIGN() the pointer to the 4 byte boundary. We have a macro for that. But also I bet that the pointer is already aligned to start with. Also check that we allocated enough space to align it. (I have not looked at this code outside of what I can see in this email).

regards,
dan carpenter