[PATCH 2/3] staging/ozwpan: coding style __constant_

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This fixes the following issues detected by checkpatch.pl:

 WARNING: __constant_cpu_to_le16 should be cpu_to_le16
 #1991: FILE: drivers/staging/ozwpan/ozhcd.c:1991:
 +                      __constant_cpu_to_le16(0x0001);

 WARNING: __constant_cpu_to_le32 should be cpu_to_le32
 #2185: FILE: drivers/staging/ozwpan/ozhcd.c:2185:
 +              put_unaligned(__constant_cpu_to_le32(0), (__le32 *)buf);

 WARNING: __constant_htons should be htons
 #675: FILE: drivers/staging/ozwpan/ozproto.c:675:
 +      binding->ptype.type = __constant_htons(OZ_ETHERTYPE);

Signed-off-by: Jerome Pinot <ngc891@xxxxxxxxx>
---
 drivers/staging/ozwpan/ozhcd.c   | 5 ++---
 drivers/staging/ozwpan/ozproto.c | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c
index e7901aa..b3d401a 100644
--- a/drivers/staging/ozwpan/ozhcd.c
+++ b/drivers/staging/ozwpan/ozhcd.c
@@ -1987,8 +1987,7 @@ static void oz_get_hub_descriptor(struct usb_hcd *hcd,
 	memset(desc, 0, sizeof(*desc));
 	desc->bDescriptorType = 0x29;
 	desc->bDescLength = 9;
-	desc->wHubCharacteristics = (__force __u16)
-			__constant_cpu_to_le16(0x0001);
+	desc->wHubCharacteristics = (__force __u16)cpu_to_le16(0x0001);
 	desc->bNbrPorts = OZ_NB_PORTS;
 }
 
@@ -2182,7 +2181,7 @@ static int oz_hcd_hub_control(struct usb_hcd *hcd, u16 req_type, u16 wvalue,
 		break;
 	case GetHubStatus:
 		oz_dbg(HUB, "GetHubStatus: req_type = 0x%x\n", req_type);
-		put_unaligned(__constant_cpu_to_le32(0), (__le32 *)buf);
+		put_unaligned(cpu_to_le32(0), (__le32 *)buf);
 		break;
 	case GetPortStatus:
 		err = oz_get_port_status(hcd, windex, buf);
diff --git a/drivers/staging/ozwpan/ozproto.c b/drivers/staging/ozwpan/ozproto.c
index c1325a6..f09acd0 100644
--- a/drivers/staging/ozwpan/ozproto.c
+++ b/drivers/staging/ozwpan/ozproto.c
@@ -672,7 +672,7 @@ void oz_binding_add(const char *net_dev)
 	if (!binding)
 		return;
 
-	binding->ptype.type = __constant_htons(OZ_ETHERTYPE);
+	binding->ptype.type = htons(OZ_ETHERTYPE);
 	binding->ptype.func = oz_pkt_recv;
 	if (net_dev && *net_dev) {
 		memcpy(binding->name, net_dev, OZ_MAX_BINDING_LEN);
-- 
1.8.4

-- 
Jérôme Pinot
http://ngc891.blogdns.net/
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel





[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux