driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] staging: wlang-ng: coding style changes/cleanups
@ 2019-10-25  8:41 Tim Collier
  2019-10-25  8:41 ` [PATCH 1/5] staging: wlan-ng: remove unnecessary casts from prism2usb.c Tim Collier
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Tim Collier @ 2019-10-25  8:41 UTC (permalink / raw)
  To: gregkh, devel

Remove unnecessary casts from void* to structure pointer.

Fix compilation with DEBUG_USB macro defined.

Remove unused field from usb ctlx structure.

Formatting changes suggested by checkpatch.

Tim Collier (5):
  staging: wlan-ng: remove unnecessary casts from prism2usb.c
  staging: wlan-ng: shorten lines over 80 characters in hfa384x.h
  staging: wlan-ng: correct parameter alignment in hfa384x.h
  staging: wlan-ng: fix compilation for USB debugging
  staging: wlan-ng: remove unused field from struct hfa384x_usbctlx

 drivers/staging/wlan-ng/hfa384x.h     | 18 +++++++++++-------
 drivers/staging/wlan-ng/hfa384x_usb.c |  2 --
 drivers/staging/wlan-ng/prism2usb.c   |  6 +++---
 3 files changed, 14 insertions(+), 12 deletions(-)

-- 
2.21.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 1/5] staging: wlan-ng: remove unnecessary casts from prism2usb.c
  2019-10-25  8:41 [PATCH 0/5] staging: wlang-ng: coding style changes/cleanups Tim Collier
@ 2019-10-25  8:41 ` Tim Collier
  2019-10-25  8:41 ` [PATCH 2/5] staging: wlan-ng: shorten lines over 80 characters in hfa384x.h Tim Collier
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Tim Collier @ 2019-10-25  8:41 UTC (permalink / raw)
  To: gregkh, devel

usb_get_intfdata returns a void pointer. It is not necessary to
explicitly cast to the desired type and removing the casts is
consistent with most use of usb_get_intfdata.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
---
 drivers/staging/wlan-ng/prism2usb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wlan-ng/prism2usb.c b/drivers/staging/wlan-ng/prism2usb.c
index b5ba176004c1..352556f6870a 100644
--- a/drivers/staging/wlan-ng/prism2usb.c
+++ b/drivers/staging/wlan-ng/prism2usb.c
@@ -137,7 +137,7 @@ static void prism2sta_disconnect_usb(struct usb_interface *interface)
 {
 	struct wlandevice *wlandev;
 
-	wlandev = (struct wlandevice *)usb_get_intfdata(interface);
+	wlandev = usb_get_intfdata(interface);
 	if (wlandev) {
 		LIST_HEAD(cleanlist);
 		struct hfa384x_usbctlx *ctlx, *temp;
@@ -222,7 +222,7 @@ static int prism2sta_suspend(struct usb_interface *interface,
 	struct hfa384x *hw = NULL;
 	struct wlandevice *wlandev;
 
-	wlandev = (struct wlandevice *)usb_get_intfdata(interface);
+	wlandev = usb_get_intfdata(interface);
 	if (!wlandev)
 		return -ENODEV;
 
@@ -245,7 +245,7 @@ static int prism2sta_resume(struct usb_interface *interface)
 	struct hfa384x *hw = NULL;
 	struct wlandevice *wlandev;
 
-	wlandev = (struct wlandevice *)usb_get_intfdata(interface);
+	wlandev = usb_get_intfdata(interface);
 	if (!wlandev)
 		return -ENODEV;
 
-- 
2.21.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 2/5] staging: wlan-ng: shorten lines over 80 characters in hfa384x.h
  2019-10-25  8:41 [PATCH 0/5] staging: wlang-ng: coding style changes/cleanups Tim Collier
  2019-10-25  8:41 ` [PATCH 1/5] staging: wlan-ng: remove unnecessary casts from prism2usb.c Tim Collier
@ 2019-10-25  8:41 ` Tim Collier
  2019-10-25  8:41 ` [PATCH 3/5] staging: wlan-ng: correct parameter alignment " Tim Collier
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Tim Collier @ 2019-10-25  8:41 UTC (permalink / raw)
  To: gregkh, devel

Shorten several lines reported as over 80 characters by checkpatch.pl.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
---
 drivers/staging/wlan-ng/hfa384x.h | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index 5ff740a8837d..2d3d8b1e2c1b 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -1337,7 +1337,9 @@ struct hfa384x {
 						  * interface
 						  */
 
-	struct hfa384x_caplevel cap_act_sta_mfi; /* sta f/w to modem interface */
+	struct hfa384x_caplevel cap_act_sta_mfi; /*
+						  * sta f/w to modem interface
+						  */
 
 	struct hfa384x_caplevel cap_act_ap_cfi;	/*
 						 * ap f/w to controller
@@ -1359,7 +1361,9 @@ struct hfa384x {
 
 	struct hfa384x_inf_frame *scanresults;
 
-	struct prism2sta_authlist authlist;	/* Authenticated station list. */
+	struct prism2sta_authlist authlist;	/*
+						 * Authenticated station list.
+						 */
 	unsigned int accessmode;		/* Access mode. */
 	struct prism2sta_accesslist allow;	/* Allowed station list. */
 	struct prism2sta_accesslist deny;	/* Denied station list. */
@@ -1375,7 +1379,8 @@ int hfa384x_drvr_disable(struct hfa384x *hw, u16 macport);
 int hfa384x_drvr_enable(struct hfa384x *hw, u16 macport);
 int hfa384x_drvr_flashdl_enable(struct hfa384x *hw);
 int hfa384x_drvr_flashdl_disable(struct hfa384x *hw);
-int hfa384x_drvr_flashdl_write(struct hfa384x *hw, u32 daddr, void *buf, u32 len);
+int hfa384x_drvr_flashdl_write(struct hfa384x *hw, u32 daddr, void *buf,
+			       u32 len);
 int hfa384x_drvr_getconfig(struct hfa384x *hw, u16 rid, void *buf, u16 len);
 int hfa384x_drvr_ramdl_enable(struct hfa384x *hw, u32 exeaddr);
 int hfa384x_drvr_ramdl_disable(struct hfa384x *hw);
@@ -1383,7 +1388,8 @@ int hfa384x_drvr_ramdl_write(struct hfa384x *hw, u32 daddr, void *buf, u32 len);
 int hfa384x_drvr_readpda(struct hfa384x *hw, void *buf, unsigned int len);
 int hfa384x_drvr_setconfig(struct hfa384x *hw, u16 rid, void *buf, u16 len);
 
-static inline int hfa384x_drvr_getconfig16(struct hfa384x *hw, u16 rid, void *val)
+static inline int
+hfa384x_drvr_getconfig16(struct hfa384x *hw, u16 rid, void *val)
 {
 	int result = 0;
 
-- 
2.21.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 3/5] staging: wlan-ng: correct parameter alignment in hfa384x.h
  2019-10-25  8:41 [PATCH 0/5] staging: wlang-ng: coding style changes/cleanups Tim Collier
  2019-10-25  8:41 ` [PATCH 1/5] staging: wlan-ng: remove unnecessary casts from prism2usb.c Tim Collier
  2019-10-25  8:41 ` [PATCH 2/5] staging: wlan-ng: shorten lines over 80 characters in hfa384x.h Tim Collier
@ 2019-10-25  8:41 ` Tim Collier
  2019-10-25  8:41 ` [PATCH 4/5] staging: wlan-ng: fix compilation for USB debugging Tim Collier
  2019-10-25  8:41 ` [PATCH 5/5] staging: wlan-ng: remove unused field from struct hfa384x_usbctlx Tim Collier
  4 siblings, 0 replies; 6+ messages in thread
From: Tim Collier @ 2019-10-25  8:41 UTC (permalink / raw)
  To: gregkh, devel

Realign parameter in function declaration to fix checkpatch.pl warning
that parameter needed to be aligned with the opening parenthesis of
the declaration.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
---
 drivers/staging/wlan-ng/hfa384x.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index 2d3d8b1e2c1b..86fd3fcd8a36 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -1374,7 +1374,7 @@ void hfa384x_create(struct hfa384x *hw, struct usb_device *usb);
 void hfa384x_destroy(struct hfa384x *hw);
 
 int hfa384x_corereset(struct hfa384x *hw, int holdtime, int settletime,
-		       int genesis);
+		      int genesis);
 int hfa384x_drvr_disable(struct hfa384x *hw, u16 macport);
 int hfa384x_drvr_enable(struct hfa384x *hw, u16 macport);
 int hfa384x_drvr_flashdl_enable(struct hfa384x *hw);
-- 
2.21.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 4/5] staging: wlan-ng: fix compilation for USB debugging
  2019-10-25  8:41 [PATCH 0/5] staging: wlang-ng: coding style changes/cleanups Tim Collier
                   ` (2 preceding siblings ...)
  2019-10-25  8:41 ` [PATCH 3/5] staging: wlan-ng: correct parameter alignment " Tim Collier
@ 2019-10-25  8:41 ` Tim Collier
  2019-10-25  8:41 ` [PATCH 5/5] staging: wlan-ng: remove unused field from struct hfa384x_usbctlx Tim Collier
  4 siblings, 0 replies; 6+ messages in thread
From: Tim Collier @ 2019-10-25  8:41 UTC (permalink / raw)
  To: gregkh, devel

Fix compilation errors (remove references to 2 undefined fields in the
URB struct) when DEBUG_USB is defined for the wlan-ng driver.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
---
 drivers/staging/wlan-ng/hfa384x_usb.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index 28d372a0663a..b71756ab0394 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -293,13 +293,11 @@ void dbprint_urb(struct urb *urb)
 	pr_debug("urb->transfer_buffer_length=0x%08x\n",
 		 urb->transfer_buffer_length);
 	pr_debug("urb->actual_length=0x%08x\n", urb->actual_length);
-	pr_debug("urb->bandwidth=0x%08x\n", urb->bandwidth);
 	pr_debug("urb->setup_packet(ctl)=0x%08x\n",
 		 (unsigned int)urb->setup_packet);
 	pr_debug("urb->start_frame(iso/irq)=0x%08x\n", urb->start_frame);
 	pr_debug("urb->interval(irq)=0x%08x\n", urb->interval);
 	pr_debug("urb->error_count(iso)=0x%08x\n", urb->error_count);
-	pr_debug("urb->timeout=0x%08x\n", urb->timeout);
 	pr_debug("urb->context=0x%08x\n", (unsigned int)urb->context);
 	pr_debug("urb->complete=0x%08x\n", (unsigned int)urb->complete);
 }
-- 
2.21.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 5/5] staging: wlan-ng: remove unused field from struct hfa384x_usbctlx
  2019-10-25  8:41 [PATCH 0/5] staging: wlang-ng: coding style changes/cleanups Tim Collier
                   ` (3 preceding siblings ...)
  2019-10-25  8:41 ` [PATCH 4/5] staging: wlan-ng: fix compilation for USB debugging Tim Collier
@ 2019-10-25  8:41 ` Tim Collier
  4 siblings, 0 replies; 6+ messages in thread
From: Tim Collier @ 2019-10-25  8:41 UTC (permalink / raw)
  To: gregkh, devel

The variant field in struct hfa384x_usbctlx is not referenced anywhere
in the driver, so remove it.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
---
 drivers/staging/wlan-ng/hfa384x.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index 86fd3fcd8a36..bdd7f414fdbb 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -1181,8 +1181,6 @@ struct hfa384x_usbctlx {
 	ctlx_cmdcb_t cmdcb;	/* Async command callback */
 	ctlx_usercb_t usercb;	/* Async user callback, */
 	void *usercb_data;	/*  at CTLX completion  */
-
-	int variant;		/* Identifies cmd variant */
 };
 
 struct hfa384x_usbctlxq {
-- 
2.21.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2019-10-25  8:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-25  8:41 [PATCH 0/5] staging: wlang-ng: coding style changes/cleanups Tim Collier
2019-10-25  8:41 ` [PATCH 1/5] staging: wlan-ng: remove unnecessary casts from prism2usb.c Tim Collier
2019-10-25  8:41 ` [PATCH 2/5] staging: wlan-ng: shorten lines over 80 characters in hfa384x.h Tim Collier
2019-10-25  8:41 ` [PATCH 3/5] staging: wlan-ng: correct parameter alignment " Tim Collier
2019-10-25  8:41 ` [PATCH 4/5] staging: wlan-ng: fix compilation for USB debugging Tim Collier
2019-10-25  8:41 ` [PATCH 5/5] staging: wlan-ng: remove unused field from struct hfa384x_usbctlx Tim Collier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).