All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: wlan-ng: line over 80 character limit
@ 2019-03-13 21:48 Branden Bonaby
  2019-03-13 22:09 ` [Outreachy kernel] " Julia Lawall
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Branden Bonaby @ 2019-03-13 21:48 UTC (permalink / raw)
  To: gregkh; +Cc: Branden Bonaby, outreachy-kernel

Align Macro and function to prevent them from going over
the 80 character a line limit for readability.
WARNING: line over 80 characters

Signed-off-by: Branden Bonaby <brandonbonaby94@gmail.com>
---
 drivers/staging/wlan-ng/hfa384x.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index 992ebaa1071f..7a36e82bef57 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -517,7 +517,7 @@ struct hfa384x_tx_frame {
 	HFA384x_TXSTATUS_DISCON | HFA384x_TXSTATUS_AGEDERR | \
 	HFA384x_TXSTATUS_RETRYERR))
 
-#define	HFA384x_TX_SET(v, m, s)		((((u16)(v)) << ((u16)(s))) & ((u16)(m)))
+#define	HFA384x_TX_SET(v, m, s)        ((((u16)(v)) << ((u16)(s))) & ((u16)(m)))
 
 #define	HFA384x_TX_MACPORT_SET(v)	HFA384x_TX_SET(v, HFA384x_TX_MACPORT, 8)
 #define	HFA384x_TX_STRUCTYPE_SET(v)	HFA384x_TX_SET(v, \
@@ -1369,8 +1369,8 @@ struct hfa384x {
 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 hfa384x_corereset(struct hfa384x *hw, int holdtime, int settletime,
+		       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.17.1



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

* Re: [Outreachy kernel] [PATCH] staging: wlan-ng: line over 80 character limit
  2019-03-13 21:48 [PATCH] staging: wlan-ng: line over 80 character limit Branden Bonaby
@ 2019-03-13 22:09 ` Julia Lawall
  2019-03-14 20:16 ` [PATCH v2] " Branden Bonaby
  2019-03-18 17:14 ` [PATCH v3 0/2] staging: wlan-ng: realign function and macros Branden Bonaby
  2 siblings, 0 replies; 5+ messages in thread
From: Julia Lawall @ 2019-03-13 22:09 UTC (permalink / raw)
  To: Branden Bonaby; +Cc: gregkh, outreachy-kernel



On Wed, 13 Mar 2019, Branden Bonaby wrote:

> Align Macro and function to prevent them from going over
> the 80 character a line limit for readability.
> WARNING: line over 80 characters

I'm not sure why the word macro is capitalized.

It looks like the #define still goes over 80 characters.  I think that a
lot of whitespace could be dropped.  Usually #define and the macro name
are right next to each other, for example.

julia

>
> Signed-off-by: Branden Bonaby <brandonbonaby94@gmail.com>
> ---
>  drivers/staging/wlan-ng/hfa384x.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
> index 992ebaa1071f..7a36e82bef57 100644
> --- a/drivers/staging/wlan-ng/hfa384x.h
> +++ b/drivers/staging/wlan-ng/hfa384x.h
> @@ -517,7 +517,7 @@ struct hfa384x_tx_frame {
>  	HFA384x_TXSTATUS_DISCON | HFA384x_TXSTATUS_AGEDERR | \
>  	HFA384x_TXSTATUS_RETRYERR))
>
> -#define	HFA384x_TX_SET(v, m, s)		((((u16)(v)) << ((u16)(s))) & ((u16)(m)))
> +#define	HFA384x_TX_SET(v, m, s)        ((((u16)(v)) << ((u16)(s))) & ((u16)(m)))
>
>  #define	HFA384x_TX_MACPORT_SET(v)	HFA384x_TX_SET(v, HFA384x_TX_MACPORT, 8)
>  #define	HFA384x_TX_STRUCTYPE_SET(v)	HFA384x_TX_SET(v, \
> @@ -1369,8 +1369,8 @@ struct hfa384x {
>  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 hfa384x_corereset(struct hfa384x *hw, int holdtime, int settletime,
> +		       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.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190313214825.7089-1-brandonbonaby94%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


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

* [PATCH v2] staging: wlan-ng: line over 80 character limit
  2019-03-13 21:48 [PATCH] staging: wlan-ng: line over 80 character limit Branden Bonaby
  2019-03-13 22:09 ` [Outreachy kernel] " Julia Lawall
@ 2019-03-14 20:16 ` Branden Bonaby
  2019-03-17 10:45   ` Greg KH
  2019-03-18 17:14 ` [PATCH v3 0/2] staging: wlan-ng: realign function and macros Branden Bonaby
  2 siblings, 1 reply; 5+ messages in thread
From: Branden Bonaby @ 2019-03-14 20:16 UTC (permalink / raw)
  To: gregkh; +Cc: Branden Bonaby, outreachy-kernel

Align macros and function to prevent them from going over
the 80 character a line limit for readability. There should
not be tabspace between #define and the name.
WARNING: line over 80 characters

Signed-off-by: Branden Bonaby <brandonbonaby94@gmail.com>
---
Changes in v2:
	changed tab space to just one space between #define,
	the name and the parameters so the line does not go
	over the 80 character a line limit.

 drivers/staging/wlan-ng/hfa384x.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index 992ebaa1071f..2dc560c9c68d 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -517,13 +517,13 @@ struct hfa384x_tx_frame {
 	HFA384x_TXSTATUS_DISCON | HFA384x_TXSTATUS_AGEDERR | \
 	HFA384x_TXSTATUS_RETRYERR))
 
-#define	HFA384x_TX_SET(v, m, s)		((((u16)(v)) << ((u16)(s))) & ((u16)(m)))
+#define HFA384x_TX_SET(v, m, s) ((((u16)(v)) << ((u16)(s))) & ((u16)(m)))
 
-#define	HFA384x_TX_MACPORT_SET(v)	HFA384x_TX_SET(v, HFA384x_TX_MACPORT, 8)
-#define	HFA384x_TX_STRUCTYPE_SET(v)	HFA384x_TX_SET(v, \
+#define HFA384x_TX_MACPORT_SET(v) HFA384x_TX_SET(v, HFA384x_TX_MACPORT, 8)
+#define HFA384x_TX_STRUCTYPE_SET(v) HFA384x_TX_SET(v, \
 						HFA384x_TX_STRUCTYPE, 3)
-#define	HFA384x_TX_TXEX_SET(v)		HFA384x_TX_SET(v, HFA384x_TX_TXEX, 2)
-#define	HFA384x_TX_TXOK_SET(v)		HFA384x_TX_SET(v, HFA384x_TX_TXOK, 1)
+#define HFA384x_TX_TXEX_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXEX, 2)
+#define HFA384x_TX_TXOK_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXOK, 1)
 /*--------------------------------------------------------------------
  * Communication Frames: Receive Frames
  *--------------------------------------------------------------------
@@ -1369,8 +1369,8 @@ struct hfa384x {
 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 hfa384x_corereset(struct hfa384x *hw, int holdtime, int settletime,
+		       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.17.1



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

* Re: [PATCH v2] staging: wlan-ng: line over 80 character limit
  2019-03-14 20:16 ` [PATCH v2] " Branden Bonaby
@ 2019-03-17 10:45   ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2019-03-17 10:45 UTC (permalink / raw)
  To: Branden Bonaby; +Cc: outreachy-kernel

On Thu, Mar 14, 2019 at 04:16:51PM -0400, Branden Bonaby wrote:
> Align macros and function to prevent them from going over
> the 80 character a line limit for readability. There should
> not be tabspace between #define and the name.
> WARNING: line over 80 characters

That is a lot of different things happening in the same patch.  This
should be probably just 2 patches, one for the macro alignment and one
for the function prototype changing.

thanks,

greg k-h


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

* [PATCH v3 0/2] staging: wlan-ng: realign function and macros
  2019-03-13 21:48 [PATCH] staging: wlan-ng: line over 80 character limit Branden Bonaby
  2019-03-13 22:09 ` [Outreachy kernel] " Julia Lawall
  2019-03-14 20:16 ` [PATCH v2] " Branden Bonaby
@ 2019-03-18 17:14 ` Branden Bonaby
  2 siblings, 0 replies; 5+ messages in thread
From: Branden Bonaby @ 2019-03-18 17:14 UTC (permalink / raw)
  To: gregkh; +Cc: Branden Bonaby, outreachy-kernel

This patch set does the following:
1) Removes tabspaces in macro definition
2) Aligns function to prevent it from 
   going over 80 character limit.
3) splits previous patch into 2 patches.

Branden Bonaby (2):
  staging: wlan-ng: Tabspaces in macro definition
  staging: wlan-ng: line over 80 character limit

 drivers/staging/wlan-ng/hfa384x.h | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

-- 
2.17.1



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

end of thread, other threads:[~2019-03-18 17:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-13 21:48 [PATCH] staging: wlan-ng: line over 80 character limit Branden Bonaby
2019-03-13 22:09 ` [Outreachy kernel] " Julia Lawall
2019-03-14 20:16 ` [PATCH v2] " Branden Bonaby
2019-03-17 10:45   ` Greg KH
2019-03-18 17:14 ` [PATCH v3 0/2] staging: wlan-ng: realign function and macros Branden Bonaby

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.