Linux USB
 help / color / mirror / Atom feed
* [PATCH 0/3] [Outreachy kernel] staging: qlge: qlge.h: cleanup suggested by checkpatch
@ 2020-03-09 13:13 Payal Kshirsagar
  2020-03-09 13:13 ` [PATCH 1/3] [Outreachy kernel] staging: qlge: remove spaces before tabs and align code Payal Kshirsagar
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Payal Kshirsagar @ 2020-03-09 13:13 UTC (permalink / raw)
  To: manishc, GR-Linux-NIC-Dev, gregkh, outreachy-kernel
  Cc: Payal Kshirsagar, linux-usb

Cleanup suggested by checkpatch for the file drivers/staging/qlge/qlge.h.

Payal Kshirsagar (3):
  [Outreachy kernel] staging: qlge: remove spaces before tabs and align
    code
  [Outreachy kernel] staging: qlge: qlge.h: add spaces around operators
  [Outreachy kernel] staging: qlge: qlge.h: remove excess newlines

 drivers/staging/qlge/qlge.h | 69 ++++++++++++++++++-------------------
 1 file changed, 33 insertions(+), 36 deletions(-)

-- 
2.17.1


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

* [PATCH 1/3] [Outreachy kernel] staging: qlge: remove spaces before tabs and align code
  2020-03-09 13:13 [PATCH 0/3] [Outreachy kernel] staging: qlge: qlge.h: cleanup suggested by checkpatch Payal Kshirsagar
@ 2020-03-09 13:13 ` Payal Kshirsagar
  2020-03-09 13:13 ` [PATCH 2/3] [Outreachy kernel] staging: qlge: qlge.h: add spaces around operators Payal Kshirsagar
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Payal Kshirsagar @ 2020-03-09 13:13 UTC (permalink / raw)
  To: manishc, GR-Linux-NIC-Dev, gregkh, outreachy-kernel
  Cc: Payal Kshirsagar, linux-usb

Remove white spaces before tabs and align code properly for readability.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
---
 drivers/staging/qlge/qlge.h | 60 ++++++++++++++++++-------------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/qlge/qlge.h b/drivers/staging/qlge/qlge.h
index 4bc5d5fce9bf..66641edff6b5 100644
--- a/drivers/staging/qlge/qlge.h
+++ b/drivers/staging/qlge/qlge.h
@@ -16,8 +16,8 @@
 /*
  * General definitions...
  */
-#define DRV_NAME  	"qlge"
-#define DRV_STRING 	"QLogic 10 Gigabit PCI-E Ethernet Driver "
+#define DRV_NAME	"qlge"
+#define DRV_STRING	"QLogic 10 Gigabit PCI-E Ethernet Driver "
 #define DRV_VERSION	"1.00.00.35"
 
 #define WQ_ADDR_ALIGN	0x3	/* 4 byte alignment */
@@ -1077,11 +1077,11 @@ struct tx_buf_desc {
  * IOCB Definitions...
  */
 
-#define OPCODE_OB_MAC_IOCB 			0x01
+#define OPCODE_OB_MAC_IOCB		0x01
 #define OPCODE_OB_MAC_TSO_IOCB		0x02
-#define OPCODE_IB_MAC_IOCB			0x20
-#define OPCODE_IB_MPI_IOCB			0x21
-#define OPCODE_IB_AE_IOCB			0x3f
+#define OPCODE_IB_MAC_IOCB		0x20
+#define OPCODE_IB_MPI_IOCB		0x21
+#define OPCODE_IB_AE_IOCB		0x3f
 
 struct ob_mac_iocb_req {
 	u8 opcode;
@@ -1173,15 +1173,15 @@ struct ib_mac_iocb_rsp {
 	u8 flags1;
 #define IB_MAC_IOCB_RSP_OI	0x01	/* Override intr delay */
 #define IB_MAC_IOCB_RSP_I	0x02	/* Disable Intr Generation */
-#define IB_MAC_CSUM_ERR_MASK 0x1c	/* A mask to use for csum errs */
+#define IB_MAC_CSUM_ERR_MASK	0x1c	/* A mask to use for csum errs */
 #define IB_MAC_IOCB_RSP_TE	0x04	/* Checksum error */
 #define IB_MAC_IOCB_RSP_NU	0x08	/* No checksum rcvd */
 #define IB_MAC_IOCB_RSP_IE	0x10	/* IPv4 checksum error */
 #define IB_MAC_IOCB_RSP_M_MASK	0x60	/* Multicast info */
 #define IB_MAC_IOCB_RSP_M_NONE	0x00	/* Not mcast frame */
 #define IB_MAC_IOCB_RSP_M_HASH	0x20	/* HASH mcast frame */
-#define IB_MAC_IOCB_RSP_M_REG 	0x40	/* Registered mcast frame */
-#define IB_MAC_IOCB_RSP_M_PROM 	0x60	/* Promiscuous mcast frame */
+#define IB_MAC_IOCB_RSP_M_REG	0x40	/* Registered mcast frame */
+#define IB_MAC_IOCB_RSP_M_PROM	0x60	/* Promiscuous mcast frame */
 #define IB_MAC_IOCB_RSP_B	0x80	/* Broadcast frame */
 	u8 flags2;
 #define IB_MAC_IOCB_RSP_P	0x01	/* Promiscuous frame */
@@ -1198,16 +1198,16 @@ struct ib_mac_iocb_rsp {
 #define IB_MAC_IOCB_RSP_FO	0x80	/* Failover port */
 	u8 flags3;
 #define IB_MAC_IOCB_RSP_RSS_MASK	0x07	/* RSS mask */
-#define IB_MAC_IOCB_RSP_M_NONE	0x00	/* No RSS match */
-#define IB_MAC_IOCB_RSP_M_IPV4	0x04	/* IPv4 RSS match */
-#define IB_MAC_IOCB_RSP_M_IPV6	0x02	/* IPv6 RSS match */
-#define IB_MAC_IOCB_RSP_M_TCP_V4 	0x05	/* TCP with IPv4 */
-#define IB_MAC_IOCB_RSP_M_TCP_V6 	0x03	/* TCP with IPv6 */
-#define IB_MAC_IOCB_RSP_V4	0x08	/* IPV4 */
-#define IB_MAC_IOCB_RSP_V6	0x10	/* IPV6 */
-#define IB_MAC_IOCB_RSP_IH	0x20	/* Split after IP header */
-#define IB_MAC_IOCB_RSP_DS	0x40	/* data is in small buffer */
-#define IB_MAC_IOCB_RSP_DL	0x80	/* data is in large buffer */
+#define IB_MAC_IOCB_RSP_M_NONE		0x00	/* No RSS match */
+#define IB_MAC_IOCB_RSP_M_IPV4		0x04	/* IPv4 RSS match */
+#define IB_MAC_IOCB_RSP_M_IPV6		0x02	/* IPv6 RSS match */
+#define IB_MAC_IOCB_RSP_M_TCP_V4	0x05	/* TCP with IPv4 */
+#define IB_MAC_IOCB_RSP_M_TCP_V6	0x03	/* TCP with IPv6 */
+#define IB_MAC_IOCB_RSP_V4		0x08	/* IPV4 */
+#define IB_MAC_IOCB_RSP_V6		0x10	/* IPV6 */
+#define IB_MAC_IOCB_RSP_IH		0x20	/* Split after IP header */
+#define IB_MAC_IOCB_RSP_DS		0x40	/* data is in small buffer */
+#define IB_MAC_IOCB_RSP_DL		0x80	/* data is in large buffer */
 	__le32 data_len;	/* */
 	__le64 data_addr;	/* */
 	__le32 rss;		/* */
@@ -1233,17 +1233,17 @@ struct ib_ae_iocb_rsp {
 #define IB_AE_IOCB_RSP_OI		0x01
 #define IB_AE_IOCB_RSP_I		0x02
 	u8 event;
-#define LINK_UP_EVENT              0x00
-#define LINK_DOWN_EVENT            0x01
-#define CAM_LOOKUP_ERR_EVENT       0x06
-#define SOFT_ECC_ERROR_EVENT       0x07
-#define MGMT_ERR_EVENT             0x08
-#define TEN_GIG_MAC_EVENT          0x09
-#define GPI0_H2L_EVENT       	0x10
-#define GPI0_L2H_EVENT       	0x20
-#define GPI1_H2L_EVENT       	0x11
-#define GPI1_L2H_EVENT       	0x21
-#define PCI_ERR_ANON_BUF_RD        0x40
+#define LINK_UP_EVENT			0x00
+#define LINK_DOWN_EVENT			0x01
+#define CAM_LOOKUP_ERR_EVENT		0x06
+#define SOFT_ECC_ERROR_EVENT		0x07
+#define MGMT_ERR_EVENT			0x08
+#define TEN_GIG_MAC_EVENT		0x09
+#define GPI0_H2L_EVENT			0x10
+#define GPI0_L2H_EVENT			0x20
+#define GPI1_H2L_EVENT			0x11
+#define GPI1_L2H_EVENT			0x21
+#define PCI_ERR_ANON_BUF_RD		0x40
 	u8 q_id;
 	__le32 reserved[15];
 } __packed;
-- 
2.17.1


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

* [PATCH 2/3] [Outreachy kernel] staging: qlge: qlge.h: add spaces around operators
  2020-03-09 13:13 [PATCH 0/3] [Outreachy kernel] staging: qlge: qlge.h: cleanup suggested by checkpatch Payal Kshirsagar
  2020-03-09 13:13 ` [PATCH 1/3] [Outreachy kernel] staging: qlge: remove spaces before tabs and align code Payal Kshirsagar
@ 2020-03-09 13:13 ` Payal Kshirsagar
  2020-03-09 13:24   ` Julia Lawall
  2020-03-09 13:13 ` [PATCH 3/3] [Outreachy kernel] staging: qlge: qlge.h: remove excess newlines Payal Kshirsagar
  2020-03-09 13:18 ` [PATCH 0/3] [Outreachy kernel] staging: qlge: qlge.h: cleanup suggested by checkpatch Julia Lawall
  3 siblings, 1 reply; 7+ messages in thread
From: Payal Kshirsagar @ 2020-03-09 13:13 UTC (permalink / raw)
  To: manishc, GR-Linux-NIC-Dev, gregkh, outreachy-kernel
  Cc: Payal Kshirsagar, linux-usb

Add spaces around operators cleanup reported by checkpatch.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
---
 drivers/staging/qlge/qlge.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/qlge/qlge.h b/drivers/staging/qlge/qlge.h
index 66641edff6b5..4ef8dae3d7a0 100644
--- a/drivers/staging/qlge/qlge.h
+++ b/drivers/staging/qlge/qlge.h
@@ -59,7 +59,7 @@
 #define MAX_CQ 128
 #define DFLT_COALESCE_WAIT 100	/* 100 usec wait for coalescing */
 #define MAX_INTER_FRAME_WAIT 10	/* 10 usec max interframe-wait for coalescing */
-#define DFLT_INTER_FRAME_WAIT (MAX_INTER_FRAME_WAIT/2)
+#define DFLT_INTER_FRAME_WAIT (MAX_INTER_FRAME_WAIT / 2)
 #define UDELAY_COUNT 3
 #define UDELAY_DELAY 100
 
@@ -1367,7 +1367,7 @@ struct tx_ring_desc {
 	struct tx_ring_desc *next;
 };
 
-#define QL_TXQ_IDX(qdev, skb) (smp_processor_id()%(qdev->tx_ring_count))
+#define QL_TXQ_IDX(qdev, skb) (smp_processor_id() % (qdev->tx_ring_count))
 
 struct tx_ring {
 	/*
@@ -1792,7 +1792,7 @@ struct ql_reg_dump {
 
 	/* segment 34 */
 	struct mpi_coredump_segment_header ets_seg_hdr;
-	u32 ets[8+2];
+	u32 ets[8 + 2];
 };
 
 struct ql_mpi_coredump {
-- 
2.17.1


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

* [PATCH 3/3] [Outreachy kernel] staging: qlge: qlge.h: remove excess newlines
  2020-03-09 13:13 [PATCH 0/3] [Outreachy kernel] staging: qlge: qlge.h: cleanup suggested by checkpatch Payal Kshirsagar
  2020-03-09 13:13 ` [PATCH 1/3] [Outreachy kernel] staging: qlge: remove spaces before tabs and align code Payal Kshirsagar
  2020-03-09 13:13 ` [PATCH 2/3] [Outreachy kernel] staging: qlge: qlge.h: add spaces around operators Payal Kshirsagar
@ 2020-03-09 13:13 ` Payal Kshirsagar
  2020-03-09 13:18 ` [PATCH 0/3] [Outreachy kernel] staging: qlge: qlge.h: cleanup suggested by checkpatch Julia Lawall
  3 siblings, 0 replies; 7+ messages in thread
From: Payal Kshirsagar @ 2020-03-09 13:13 UTC (permalink / raw)
  To: manishc, GR-Linux-NIC-Dev, gregkh, outreachy-kernel
  Cc: Payal Kshirsagar, linux-usb

Blank lines aren't necessary after an open brace '{'.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
---
 drivers/staging/qlge/qlge.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/qlge/qlge.h b/drivers/staging/qlge/qlge.h
index 4ef8dae3d7a0..fc8c5ca8935d 100644
--- a/drivers/staging/qlge/qlge.h
+++ b/drivers/staging/qlge/qlge.h
@@ -119,7 +119,6 @@ enum {
  * Processor Address Register (PROC_ADDR) bit definitions.
  */
 enum {
-
 	/* Misc. stuff */
 	MAILBOX_COUNT = 16,
 	MAILBOX_TIMEOUT = 5,
@@ -1762,7 +1761,6 @@ struct ql_nic_misc {
 };
 
 struct ql_reg_dump {
-
 	/* segment 0 */
 	struct mpi_coredump_global_header mpi_global_header;
 
@@ -2059,7 +2057,6 @@ enum {
 };
 
 struct nic_operations {
-
 	int (*get_flash) (struct ql_adapter *);
 	int (*port_initialize) (struct ql_adapter *);
 };
-- 
2.17.1


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

* Re: [PATCH 0/3] [Outreachy kernel] staging: qlge: qlge.h: cleanup suggested by checkpatch
  2020-03-09 13:13 [PATCH 0/3] [Outreachy kernel] staging: qlge: qlge.h: cleanup suggested by checkpatch Payal Kshirsagar
                   ` (2 preceding siblings ...)
  2020-03-09 13:13 ` [PATCH 3/3] [Outreachy kernel] staging: qlge: qlge.h: remove excess newlines Payal Kshirsagar
@ 2020-03-09 13:18 ` Julia Lawall
       [not found]   ` <CAJyzNhno1e9enuSdAstwa_i03Xb5Sz4sQiadUukaADruQ2dGxw@mail.gmail.com>
  3 siblings, 1 reply; 7+ messages in thread
From: Julia Lawall @ 2020-03-09 13:18 UTC (permalink / raw)
  To: Payal Kshirsagar
  Cc: manishc, GR-Linux-NIC-Dev, gregkh, outreachy-kernel, linux-usb



On Mon, 9 Mar 2020, Payal Kshirsagar wrote:

> Cleanup suggested by checkpatch for the file drivers/staging/qlge/qlge.h.
>
> Payal Kshirsagar (3):
>   [Outreachy kernel] staging: qlge: remove spaces before tabs and align
>     code
>   [Outreachy kernel] staging: qlge: qlge.h: add spaces around operators
>   [Outreachy kernel] staging: qlge: qlge.h: remove excess newlines

It's strange that the information about the location is different in the
first case than in the other two cases, if they are all touching the same
file?

julia

>
>  drivers/staging/qlge/qlge.h | 69 ++++++++++++++++++-------------------
>  1 file changed, 33 insertions(+), 36 deletions(-)
>
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1583759118.git.payalskshirsagar1234%40gmail.com.
>

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

* Re: [PATCH 2/3] [Outreachy kernel] staging: qlge: qlge.h: add spaces around operators
  2020-03-09 13:13 ` [PATCH 2/3] [Outreachy kernel] staging: qlge: qlge.h: add spaces around operators Payal Kshirsagar
@ 2020-03-09 13:24   ` Julia Lawall
  0 siblings, 0 replies; 7+ messages in thread
From: Julia Lawall @ 2020-03-09 13:24 UTC (permalink / raw)
  To: Payal Kshirsagar
  Cc: manishc, GR-Linux-NIC-Dev, gregkh, outreachy-kernel, linux-usb



On Mon, 9 Mar 2020, Payal Kshirsagar wrote:

> Add spaces around operators cleanup reported by checkpatch.

This is too much for one sentence.

Add spaces around operators.  Cleanup suggested by checkpatch.

julia

>
> Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
> ---
>  drivers/staging/qlge/qlge.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/qlge/qlge.h b/drivers/staging/qlge/qlge.h
> index 66641edff6b5..4ef8dae3d7a0 100644
> --- a/drivers/staging/qlge/qlge.h
> +++ b/drivers/staging/qlge/qlge.h
> @@ -59,7 +59,7 @@
>  #define MAX_CQ 128
>  #define DFLT_COALESCE_WAIT 100	/* 100 usec wait for coalescing */
>  #define MAX_INTER_FRAME_WAIT 10	/* 10 usec max interframe-wait for coalescing */
> -#define DFLT_INTER_FRAME_WAIT (MAX_INTER_FRAME_WAIT/2)
> +#define DFLT_INTER_FRAME_WAIT (MAX_INTER_FRAME_WAIT / 2)
>  #define UDELAY_COUNT 3
>  #define UDELAY_DELAY 100
>
> @@ -1367,7 +1367,7 @@ struct tx_ring_desc {
>  	struct tx_ring_desc *next;
>  };
>
> -#define QL_TXQ_IDX(qdev, skb) (smp_processor_id()%(qdev->tx_ring_count))
> +#define QL_TXQ_IDX(qdev, skb) (smp_processor_id() % (qdev->tx_ring_count))
>
>  struct tx_ring {
>  	/*
> @@ -1792,7 +1792,7 @@ struct ql_reg_dump {
>
>  	/* segment 34 */
>  	struct mpi_coredump_segment_header ets_seg_hdr;
> -	u32 ets[8+2];
> +	u32 ets[8 + 2];
>  };
>
>  struct ql_mpi_coredump {
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/3a471ee901679659280d420549610b12e9efcdf6.1583759118.git.payalskshirsagar1234%40gmail.com.
>

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

* Re: [PATCH 0/3] [Outreachy kernel] staging: qlge: qlge.h: cleanup suggested by checkpatch
       [not found]   ` <CAJyzNhno1e9enuSdAstwa_i03Xb5Sz4sQiadUukaADruQ2dGxw@mail.gmail.com>
@ 2020-03-09 14:46     ` Julia Lawall
  0 siblings, 0 replies; 7+ messages in thread
From: Julia Lawall @ 2020-03-09 14:46 UTC (permalink / raw)
  To: Payal Kshirsagar
  Cc: manishc, GR-Linux-NIC-Dev, gregkh, outreachy-kernel, linux-usb

[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]



On Mon, 9 Mar 2020, Payal Kshirsagar wrote:

>
>
> On Mon, Mar 9, 2020, 6:48 PM Julia Lawall <julia.lawall@inria.fr> wrote:
>
>
>       On Mon, 9 Mar 2020, Payal Kshirsagar wrote:
>
>       > Cleanup suggested by checkpatch for the file
>       drivers/staging/qlge/qlge.h.
>       >
>       > Payal Kshirsagar (3):
>       >   [Outreachy kernel] staging: qlge: remove spaces before tabs
>       and align
>       >     code
>       >   [Outreachy kernel] staging: qlge: qlge.h: add spaces around
>       operators
>       >   [Outreachy kernel] staging: qlge: qlge.h: remove excess
>       newlines
>
>       It's strange that the information about the location is
>       different in the
>       first case than in the other two cases, if they are all touching
>       the same
>       file?
>
>
> Yes, all the patches of this series cleaning a same file, the subject line
> in first patch of this series was my mistake.
> What I supposed to do now ?

Resend the series.  Explain under the --- what you changed in the patch
that you changed.  For the other two, say under the --- that nothing has
changed.

julia

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

end of thread, other threads:[~2020-03-09 14:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-09 13:13 [PATCH 0/3] [Outreachy kernel] staging: qlge: qlge.h: cleanup suggested by checkpatch Payal Kshirsagar
2020-03-09 13:13 ` [PATCH 1/3] [Outreachy kernel] staging: qlge: remove spaces before tabs and align code Payal Kshirsagar
2020-03-09 13:13 ` [PATCH 2/3] [Outreachy kernel] staging: qlge: qlge.h: add spaces around operators Payal Kshirsagar
2020-03-09 13:24   ` Julia Lawall
2020-03-09 13:13 ` [PATCH 3/3] [Outreachy kernel] staging: qlge: qlge.h: remove excess newlines Payal Kshirsagar
2020-03-09 13:18 ` [PATCH 0/3] [Outreachy kernel] staging: qlge: qlge.h: cleanup suggested by checkpatch Julia Lawall
     [not found]   ` <CAJyzNhno1e9enuSdAstwa_i03Xb5Sz4sQiadUukaADruQ2dGxw@mail.gmail.com>
2020-03-09 14:46     ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox