DriverDev-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/5] staging/qlge: remove initialising of static local variable
@ 2019-11-27 12:30 Dorothea Ehrl
  2019-11-27 12:30 ` [PATCH 2/5] staging/qlge: add blank lines after declarations Dorothea Ehrl
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Dorothea Ehrl @ 2019-11-27 12:30 UTC (permalink / raw)
  To: manishc, GR-Linux-NIC-Dev, gregkh, netdev, devel, linux-kernel
  Cc: Vanessa Hack, Dorothea Ehrl, linux-kernel

This patch fixes "ERROR: do not initialise statics to 0" by checkpatch.pl.

Signed-off-by: Dorothea Ehrl <dorothea.ehrl@fau.de>
Co-developed-by: Vanessa Hack <vanessa.hack@fau.de>
Signed-off-by: Vanessa Hack <vanessa.hack@fau.de>
---
 drivers/staging/qlge/qlge_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
index 6ad4515311f7..587102aa7fbf 100644
--- a/drivers/staging/qlge/qlge_main.c
+++ b/drivers/staging/qlge/qlge_main.c
@@ -4578,7 +4578,7 @@ static int qlge_probe(struct pci_dev *pdev,
 {
 	struct net_device *ndev = NULL;
 	struct ql_adapter *qdev = NULL;
-	static int cards_found = 0;
+	static int cards_found;
 	int err = 0;

 	ndev = alloc_etherdev_mq(sizeof(struct ql_adapter),
--
2.20.1

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

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

* [PATCH 2/5] staging/qlge: add blank lines after declarations
  2019-11-27 12:30 [PATCH 1/5] staging/qlge: remove initialising of static local variable Dorothea Ehrl
@ 2019-11-27 12:30 ` Dorothea Ehrl
  2019-11-27 12:30 ` [PATCH 3/5] staging/qlge: add braces to conditional statement Dorothea Ehrl
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Dorothea Ehrl @ 2019-11-27 12:30 UTC (permalink / raw)
  To: manishc, GR-Linux-NIC-Dev, gregkh, netdev, devel, linux-kernel
  Cc: Vanessa Hack, Dorothea Ehrl, linux-kernel

This patch fixes "WARNING: Missing a blank line after declarations" by
checkpatch.pl.

Signed-off-by: Dorothea Ehrl <dorothea.ehrl@fau.de>
Co-developed-by: Vanessa Hack <vanessa.hack@fau.de>
Signed-off-by: Vanessa Hack <vanessa.hack@fau.de>
---
 drivers/staging/qlge/qlge_ethtool.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/staging/qlge/qlge_ethtool.c b/drivers/staging/qlge/qlge_ethtool.c
index 0c3f8eb34094..c03153b95844 100644
--- a/drivers/staging/qlge/qlge_ethtool.c
+++ b/drivers/staging/qlge/qlge_ethtool.c
@@ -332,6 +332,7 @@ static void ql_update_stats(struct ql_adapter *qdev)
 static void ql_get_strings(struct net_device *dev, u32 stringset, u8 *buf)
 {
 	int index;
+
 	switch (stringset) {
 	case ETH_SS_TEST:
 		memcpy(buf, *ql_gstrings_test, QLGE_TEST_LEN * ETH_GSTRING_LEN);
@@ -412,6 +413,7 @@ static void ql_get_drvinfo(struct net_device *ndev,
 			   struct ethtool_drvinfo *drvinfo)
 {
 	struct ql_adapter *qdev = netdev_priv(ndev);
+
 	strlcpy(drvinfo->driver, qlge_driver_name, sizeof(drvinfo->driver));
 	strlcpy(drvinfo->version, qlge_driver_version,
 		sizeof(drvinfo->version));
@@ -703,12 +705,14 @@ static int ql_set_pauseparam(struct net_device *netdev,
 static u32 ql_get_msglevel(struct net_device *ndev)
 {
 	struct ql_adapter *qdev = netdev_priv(ndev);
+
 	return qdev->msg_enable;
 }

 static void ql_set_msglevel(struct net_device *ndev, u32 value)
 {
 	struct ql_adapter *qdev = netdev_priv(ndev);
+
 	qdev->msg_enable = value;
 }

--
2.20.1

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

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

* [PATCH 3/5] staging/qlge: add braces to conditional statement
  2019-11-27 12:30 [PATCH 1/5] staging/qlge: remove initialising of static local variable Dorothea Ehrl
  2019-11-27 12:30 ` [PATCH 2/5] staging/qlge: add blank lines after declarations Dorothea Ehrl
@ 2019-11-27 12:30 ` Dorothea Ehrl
  2019-11-27 12:30 ` [PATCH 4/5] staging/qlge: remove braces in " Dorothea Ehrl
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Dorothea Ehrl @ 2019-11-27 12:30 UTC (permalink / raw)
  To: manishc, GR-Linux-NIC-Dev, gregkh, netdev, devel, linux-kernel
  Cc: Vanessa Hack, Dorothea Ehrl, linux-kernel

This patch fixes "CHECK: braces {} should be used on all arms of this
statement" by checkpatch.pl.

Signed-off-by: Dorothea Ehrl <dorothea.ehrl@fau.de>
Co-developed-by: Vanessa Hack <vanessa.hack@fau.de>
Signed-off-by: Vanessa Hack <vanessa.hack@fau.de>
---
 drivers/staging/qlge/qlge_main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
index 587102aa7fbf..f5ab6cc7050a 100644
--- a/drivers/staging/qlge/qlge_main.c
+++ b/drivers/staging/qlge/qlge_main.c
@@ -178,8 +178,9 @@ int ql_wait_reg_rdy(struct ql_adapter *qdev, u32 reg, u32 bit, u32 err_bit)
 				    "register 0x%.08x access error, value = 0x%.08x!.\n",
 				    reg, temp);
 			return -EIO;
-		} else if (temp & bit)
+		} else if (temp & bit) {
 			return 0;
+		}
 		udelay(UDELAY_DELAY);
 	}
 	netif_alert(qdev, probe, qdev->ndev,
@@ -3731,8 +3732,9 @@ static int ql_adapter_reset(struct ql_adapter *qdev)

 		/* Wait for the NIC and MGMNT FIFOs to empty. */
 		ql_wait_fifo_empty(qdev);
-	} else
+	} else {
 		clear_bit(QL_ASIC_RECOVERY, &qdev->flags);
+	}

 	ql_write32(qdev, RST_FO, (RST_FO_FR << 16) | RST_FO_FR);

--
2.20.1

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

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

* [PATCH 4/5] staging/qlge: remove braces in conditional statement
  2019-11-27 12:30 [PATCH 1/5] staging/qlge: remove initialising of static local variable Dorothea Ehrl
  2019-11-27 12:30 ` [PATCH 2/5] staging/qlge: add blank lines after declarations Dorothea Ehrl
  2019-11-27 12:30 ` [PATCH 3/5] staging/qlge: add braces to conditional statement Dorothea Ehrl
@ 2019-11-27 12:30 ` " Dorothea Ehrl
  2019-11-27 12:30 ` [PATCH 5/5] staging/qlge: fix block comment coding style Dorothea Ehrl
  2019-11-29  7:17 ` [i4passt] [PATCH 1/5] staging/qlge: remove initialising of static local variable Tobias Langer
  4 siblings, 0 replies; 6+ messages in thread
From: Dorothea Ehrl @ 2019-11-27 12:30 UTC (permalink / raw)
  To: manishc, GR-Linux-NIC-Dev, gregkh, netdev, devel, linux-kernel
  Cc: Vanessa Hack, Dorothea Ehrl, linux-kernel

This patch fixes "WARNING: braces {} are not necessary for single
statement blocks" and "WARNING: braces {} are not necessary for any arm
of this statement" by checkpatch.pl.

Signed-off-by: Dorothea Ehrl <dorothea.ehrl@fau.de>
Co-developed-by: Vanessa Hack <vanessa.hack@fau.de>
Signed-off-by: Vanessa Hack <vanessa.hack@fau.de>
---
 drivers/staging/qlge/qlge_main.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
index f5ab6cc7050a..d19709bcdc20 100644
--- a/drivers/staging/qlge/qlge_main.c
+++ b/drivers/staging/qlge/qlge_main.c
@@ -4101,11 +4101,11 @@ static int qlge_change_mtu(struct net_device *ndev, int new_mtu)
 	struct ql_adapter *qdev = netdev_priv(ndev);
 	int status;

-	if (ndev->mtu == 1500 && new_mtu == 9000) {
+	if (ndev->mtu == 1500 && new_mtu == 9000)
 		netif_err(qdev, ifup, qdev->ndev, "Changing to jumbo MTU.\n");
-	} else if (ndev->mtu == 9000 && new_mtu == 1500) {
+	else if (ndev->mtu == 9000 && new_mtu == 1500)
 		netif_err(qdev, ifup, qdev->ndev, "Changing to normal MTU.\n");
-	} else
+	else
 		return -EINVAL;

 	queue_delayed_work(qdev->workqueue,
@@ -4113,9 +4113,8 @@ static int qlge_change_mtu(struct net_device *ndev, int new_mtu)

 	ndev->mtu = new_mtu;

-	if (!netif_running(qdev->ndev)) {
+	if (!netif_running(qdev->ndev))
 		return 0;
-	}

 	status = ql_change_rx_buffers(qdev);
 	if (status) {
--
2.20.1

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

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

* [PATCH 5/5] staging/qlge: fix block comment coding style
  2019-11-27 12:30 [PATCH 1/5] staging/qlge: remove initialising of static local variable Dorothea Ehrl
                   ` (2 preceding siblings ...)
  2019-11-27 12:30 ` [PATCH 4/5] staging/qlge: remove braces in " Dorothea Ehrl
@ 2019-11-27 12:30 ` Dorothea Ehrl
  2019-11-29  7:17 ` [i4passt] [PATCH 1/5] staging/qlge: remove initialising of static local variable Tobias Langer
  4 siblings, 0 replies; 6+ messages in thread
From: Dorothea Ehrl @ 2019-11-27 12:30 UTC (permalink / raw)
  To: manishc, GR-Linux-NIC-Dev, gregkh, netdev, devel, linux-kernel
  Cc: Vanessa Hack, Dorothea Ehrl, linux-kernel

This patch fixes:
"WARNING: block comment use * on subsequent lines"
"WARNING: block comments should align the * on each line"
"WARNING: block comments use a trailing */ on a separate line"
by checkpatch.pl.

Signed-off-by: Dorothea Ehrl <dorothea.ehrl@fau.de>
Co-developed-by: Vanessa Hack <vanessa.hack@fau.de>
Signed-off-by: Vanessa Hack <vanessa.hack@fau.de>
---
 drivers/staging/qlge/qlge_main.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
index d19709bcdc20..29861f01ca26 100644
--- a/drivers/staging/qlge/qlge_main.c
+++ b/drivers/staging/qlge/qlge_main.c
@@ -402,8 +402,8 @@ static int ql_set_mac_addr_reg(struct ql_adapter *qdev, u8 *addr, u32 type,
 				   (index << MAC_ADDR_IDX_SHIFT) |	/* index */
 				   type);	/* type */
 			/* This field should also include the queue id
-			   and possibly the function id.  Right now we hardcode
-			   the route field to NIC core.
+			 * and possibly the function id.  Right now we hardcode
+			 * the route field to NIC core.
 			 */
 			cam_output = (CAM_OUT_ROUTE_NIC |
 				      (qdev->
@@ -683,7 +683,7 @@ static int ql_read_flash_word(struct ql_adapter *qdev, int offset, __le32 *data)
 			FLASH_ADDR, FLASH_ADDR_RDY, FLASH_ADDR_ERR);
 	if (status)
 		goto exit;
-	 /* This data is stored on flash as an array of
+	/* This data is stored on flash as an array of
 	 * __le32.  Since ql_read32() returns cpu endian
 	 * we need to swap it back.
 	 */
@@ -2223,7 +2223,8 @@ static int ql_napi_poll_msix(struct napi_struct *napi, int budget)
 		     "Enter, NAPI POLL cq_id = %d.\n", rx_ring->cq_id);

 	/* Service the TX rings first.  They start
-	 * right after the RSS rings. */
+	 * right after the RSS rings.
+	 */
 	for (i = qdev->rss_ring_count; i < qdev->rx_ring_count; i++) {
 		trx_ring = &qdev->rx_ring[i];
 		/* If this TX completion ring belongs to this vector and
@@ -2888,7 +2889,8 @@ static void ql_free_rx_resources(struct ql_adapter *qdev,
 }

 /* Allocate queues and buffers for this completions queue based
- * on the values in the parameter structure. */
+ * on the values in the parameter structure.
+ */
 static int ql_alloc_rx_resources(struct ql_adapter *qdev,
 				 struct rx_ring *rx_ring)
 {
--
2.20.1

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

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

* Re: [i4passt] [PATCH 1/5] staging/qlge: remove initialising of static local variable
  2019-11-27 12:30 [PATCH 1/5] staging/qlge: remove initialising of static local variable Dorothea Ehrl
                   ` (3 preceding siblings ...)
  2019-11-27 12:30 ` [PATCH 5/5] staging/qlge: fix block comment coding style Dorothea Ehrl
@ 2019-11-29  7:17 ` Tobias Langer
  4 siblings, 0 replies; 6+ messages in thread
From: Tobias Langer @ 2019-11-29  7:17 UTC (permalink / raw)
  To: Dorothea Ehrl, manishc, GR-Linux-NIC-Dev, gregkh, netdev, devel,
	linux-kernel
  Cc: Vanessa Hack, linux-kernel

[-- Attachment #1.1: Type: text/plain, Size: 1036 bytes --]

Hi,

the patch series looks fine to me, I think you can go ahead and send it
to the kernel.

Kind regards
Tobias

On 27.11.19 13:30, Dorothea Ehrl wrote:
> This patch fixes "ERROR: do not initialise statics to 0" by checkpatch.pl.
> 
> Signed-off-by: Dorothea Ehrl <dorothea.ehrl@fau.de>
> Co-developed-by: Vanessa Hack <vanessa.hack@fau.de>
> Signed-off-by: Vanessa Hack <vanessa.hack@fau.de>
> ---
>  drivers/staging/qlge/qlge_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
> index 6ad4515311f7..587102aa7fbf 100644
> --- a/drivers/staging/qlge/qlge_main.c
> +++ b/drivers/staging/qlge/qlge_main.c
> @@ -4578,7 +4578,7 @@ static int qlge_probe(struct pci_dev *pdev,
>  {
>  	struct net_device *ndev = NULL;
>  	struct ql_adapter *qdev = NULL;
> -	static int cards_found = 0;
> +	static int cards_found;
>  	int err = 0;
> 
>  	ndev = alloc_etherdev_mq(sizeof(struct ql_adapter),
> --
> 2.20.1
> 


[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5942 bytes --]

[-- Attachment #2: Type: text/plain, Size: 169 bytes --]

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

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

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-27 12:30 [PATCH 1/5] staging/qlge: remove initialising of static local variable Dorothea Ehrl
2019-11-27 12:30 ` [PATCH 2/5] staging/qlge: add blank lines after declarations Dorothea Ehrl
2019-11-27 12:30 ` [PATCH 3/5] staging/qlge: add braces to conditional statement Dorothea Ehrl
2019-11-27 12:30 ` [PATCH 4/5] staging/qlge: remove braces in " Dorothea Ehrl
2019-11-27 12:30 ` [PATCH 5/5] staging/qlge: fix block comment coding style Dorothea Ehrl
2019-11-29  7:17 ` [i4passt] [PATCH 1/5] staging/qlge: remove initialising of static local variable Tobias Langer

DriverDev-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/driverdev-devel/0 driverdev-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 driverdev-devel driverdev-devel/ https://lore.kernel.org/driverdev-devel \
		driverdev-devel@linuxdriverproject.org devel@driverdev.osuosl.org
	public-inbox-index driverdev-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linuxdriverproject.driverdev-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git