Skip to content

Commit

Permalink
staging/ozwpan: coding style __constant_
Browse files Browse the repository at this point in the history
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@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jérôme Pinot authored and Greg Kroah-Hartman committed Mar 13, 2014
1 parent 9b6f0c4 commit c632824
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions drivers/staging/ozwpan/ozhcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1986,8 +1986,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;
}

Expand Down Expand Up @@ -2181,7 +2180,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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/ozwpan/ozproto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c632824

Please sign in to comment.