Skip to contentSkip to conversation

FDDI: defza: Fix a bunch of small issues

PATCH In review Maciej W. Rozycki 2 participants 6 messages Nov 7, 2018 – Nov 8, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover FDDI: defza: Fix a bunch of small issues

Hi,

Here is a bunch of small fixes addressing issues that I missed in my
final round of testing. None of these affect run-time behaviour. One was actually found by the kbuild bot, which turned out to be more pedantic than my compiler. See individual change descriptions for details.

Please apply.

Maciej

#1 lore raw

PATCH 1/4 FDDI: defza: Fix SPDX annotation

The SPDX annotation for this driver does not match the license text, which specifies GNU GPL 2 or later. Make the two match by correcting the SPDX tag.

---
 drivers/net/fddi/defza.c |    2 +-
 drivers/net/fddi/defza.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

linux-defza-spdx-fix.diff

drivers/net/fddi/defza.c +1 -1
Index: linux-20181104-4maxp64/drivers/net/fddi/defza.c
===================================================================
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0+
 /*	FDDI network adapter driver for DEC FDDIcontroller 700/700-C devices.
  *
  *	Copyright (c) 2018  Maciej W. Rozycki
drivers/net/fddi/defza.h +1 -1
Index: linux-20181104-4maxp64/drivers/net/fddi/defza.h
===================================================================
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*	FDDI network adapter driver for DEC FDDIcontroller 700/700-C devices.
  *
  *	Copyright (c) 2018  Maciej W. Rozycki
#2 lore raw

PATCH 2/4 FDDI: defza: Add missing comment closing

In reply to Maciej W. Rozycki

Fix:

drivers/net/fddi/defza.h:238:1: warning: "/*" within comment [-Wcomment]

by adding a missing comment closing.

---
 drivers/net/fddi/defza.h |    1 +
 1 file changed, 1 insertion(+)

linux-defza-cmd-size-comment-fix.diff

drivers/net/fddi/defza.h +1 -0
Index: linux-20181104-4maxp64/drivers/net/fddi/defza.h
===================================================================
@@ -235,6 +235,7 @@ struct fza_ring_cmd {
 #define FZA_RING_CMD		0x200400	/* command ring address */
 #define FZA_RING_CMD_SIZE	0x40		/* command descriptor ring
 						 * size
+						 */
 /* Command constants. */
 #define FZA_RING_CMD_MASK	0x7fffffff
 #define FZA_RING_CMD_NOP	0x00000000	/* nop */
#3 lore raw

PATCH 3/4 FDDI: defza: Move SMT Tx data buffer declaration next to its skb

In reply to Maciej W. Rozycki

Move the temporary data buffer used when tapping into the SMT Tx queue from the outer function level into the conditional block it's actually used in and its containing skb is also declared, making the structure of code better.

---
Hi,

This was also present, though not further complained about in kbuild bot
output:

drivers/net/fddi/defza.c:787:45: warning: unused variable 'skb_data_ptr' [-Wunused-variable]

because it ran on a tree revision as at commit 61414f5ec983 ("FDDI: defza:
Add support for DEC FDDIcontroller 700 TURBOchannel adapter") and therefore without commit 9f9a742db40f ("FDDI: defza: Support capturing outgoing SMT traffic"), indicating that the buffer should have been declared in the containing block rather than at the function level, especially as the skb it comes from is also declared within that block.

Maciej

---
 drivers/net/fddi/defza.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

linux-defza-skb-data-ptr-fix.diff

drivers/net/fddi/defza.c +2 -1
Index: linux-20181104-4maxp64/drivers/net/fddi/defza.c
===================================================================
@@ -784,7 +784,7 @@ static void fza_rx(struct net_device *de
 static void fza_tx_smt(struct net_device *dev)
 {
 	struct fza_private *fp = netdev_priv(dev);
-	struct fza_buffer_tx __iomem *smt_tx_ptr, *skb_data_ptr;
+	struct fza_buffer_tx __iomem *smt_tx_ptr;
 	int i, len;
 	u32 own;
 
@@ -799,6 +799,7 @@ static void fza_tx_smt(struct net_device
 
 		if (!netif_queue_stopped(dev)) {
 			if (dev_nit_active(dev)) {
+				struct fza_buffer_tx *skb_data_ptr;
 				struct sk_buff *skb;
 
 				/* Length must be a multiple of 4 as only word
#4 lore raw

PATCH 4/4 FDDI: defza: Make the driver version string constant

In reply to Maciej W. Rozycki

The driver version string is obviously not meant to be changed at run time, so mark it `const'.

---
 drivers/net/fddi/defza.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

linux-defza-version-static-fix.patch

drivers/net/fddi/defza.c +1 -1
Index: linux-20181104-4maxp64/drivers/net/fddi/defza.c
===================================================================
@@ -56,7 +56,7 @@
 #define DRV_VERSION "v.1.1.4"
 #define DRV_RELDATE "Oct  6 2018"
 
-static char version[] =
+static const char version[] =
 	DRV_NAME ": " DRV_VERSION "  " DRV_RELDATE "  Maciej W. Rozycki\n";
 
 MODULE_AUTHOR("Maciej W. Rozycki <[email protected]>");
maintainer
#5 lore raw
In reply to Maciej W. Rozycki

From: "Maciej W. Rozycki" <[email protected]>
Date: Wed, 7 Nov 2018 12:06:46 +0000 (GMT)

Quoted 6 lines

Here is a bunch of small fixes addressing issues that I missed in my
final round of testing. None of these affect run-time behaviour. One was actually found by the kbuild bot, which turned out to be more pedantic than my compiler. See individual change descriptions for details.

Please apply.

Series applied.