All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: rtl8712: replace __constant_cpu_to_le16
@ 2015-02-20 23:44 Katie Dunne
  2015-02-23 22:25 ` [Outreachy kernel] " Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Katie Dunne @ 2015-02-20 23:44 UTC (permalink / raw)
  To: outreachy-kernel

Addresses checkpatch.pl warning:
WARNING: __constant_cpu_to_le16 should be cpu_to_le16
by making the suggested replacement

Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
---
 drivers/staging/rtl8712/wifi.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8712/wifi.h b/drivers/staging/rtl8712/wifi.h
index 73d7cd2..5ba7e71 100644
--- a/drivers/staging/rtl8712/wifi.h
+++ b/drivers/staging/rtl8712/wifi.h
@@ -248,9 +248,9 @@ enum WIFI_REG_DOMAIN {
 
 #define SetFrameType(pbuf, type)	\
 	do {	\
-		*(unsigned short *)(pbuf) &= __constant_cpu_to_le16(~(BIT(3) | \
+		*(unsigned short *)(pbuf) &= cpu_to_le16(~(BIT(3) | \
 		BIT(2))); \
-		*(unsigned short *)(pbuf) |= __constant_cpu_to_le16(type); \
+		*(unsigned short *)(pbuf) |= cpu_to_le16(type); \
 	} while (0)
 
 #define GetFrameSubType(pbuf)	(cpu_to_le16(*(unsigned short *)(pbuf)) & \
-- 
1.9.1



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

* Re: [Outreachy kernel] [PATCH] Staging: rtl8712: replace __constant_cpu_to_le16
  2015-02-20 23:44 [PATCH] Staging: rtl8712: replace __constant_cpu_to_le16 Katie Dunne
@ 2015-02-23 22:25 ` Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2015-02-23 22:25 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Katie Dunne

On Friday 20 February 2015 15:44:01 Katie Dunne wrote:
> 
>  #define SetFrameType(pbuf, type)       \
>         do {    \
> -               *(unsigned short *)(pbuf) &= __constant_cpu_to_le16(~(BIT(3) | \
> +               *(unsigned short *)(pbuf) &= cpu_to_le16(~(BIT(3) | \
>                 BIT(2))); \
> -               *(unsigned short *)(pbuf) |= __constant_cpu_to_le16(type); \
> +               *(unsigned short *)(pbuf) |= cpu_to_le16(type); \
>         } while (0)
> 

You could fix the indentation at the same time, and clean up both
copies of the function if you see code like this.

However, a better fix would be to just remove the macro entirely,
as it is not used anywhere.

	Arnd


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

end of thread, other threads:[~2015-02-23 22:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-20 23:44 [PATCH] Staging: rtl8712: replace __constant_cpu_to_le16 Katie Dunne
2015-02-23 22:25 ` [Outreachy kernel] " Arnd Bergmann

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.