All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/9] s390/qeth: updates 2021-10-25
@ 2021-10-25  9:56 Julian Wiedmann
  2021-10-25  9:56 ` [PATCH net-next 1/9] s390/qeth: improve trace entries for MAC address (un)registration Julian Wiedmann
                   ` (9 more replies)
  0 siblings, 10 replies; 14+ messages in thread
From: Julian Wiedmann @ 2021-10-25  9:56 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski
  Cc: linux-netdev, linux-s390, Heiko Carstens, Karsten Graul, Julian Wiedmann

Hi Dave & Jakub,

please apply the following patch series for qeth to netdev's net-next tree.

This brings some minor maintenance improvements, and a bunch of cleanups
so that the W=1 build passes without warning.

Thanks,
Julian

Heiko Carstens (3):
  s390/qeth: fix various format strings
  s390/qeth: add __printf format attribute to qeth_dbf_longtext
  s390/qeth: fix kernel doc comments

Julian Wiedmann (6):
  s390/qeth: improve trace entries for MAC address (un)registration
  s390/qeth: remove .do_ioctl() callback from driver discipline
  s390/qeth: move qdio's QAOB cache into qeth
  s390/qeth: clarify remaining dev_kfree_skb_any() users
  s390/qeth: don't keep track of Input Queue count
  s390/qeth: update kerneldoc for qeth_add_hw_header()

 arch/s390/include/asm/qdio.h      |  2 --
 drivers/s390/cio/qdio_setup.c     | 34 ++----------------
 drivers/s390/net/qeth_core.h      |  4 +--
 drivers/s390/net/qeth_core_main.c | 59 ++++++++++++++++++-------------
 drivers/s390/net/qeth_l2_main.c   | 27 +++++++-------
 drivers/s390/net/qeth_l3_main.c   | 12 +++----
 6 files changed, 57 insertions(+), 81 deletions(-)

-- 
2.25.1


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

* [PATCH net-next 1/9] s390/qeth: improve trace entries for MAC address (un)registration
  2021-10-25  9:56 [PATCH net-next 0/9] s390/qeth: updates 2021-10-25 Julian Wiedmann
@ 2021-10-25  9:56 ` Julian Wiedmann
  2021-10-25  9:56 ` [PATCH net-next 2/9] s390/qeth: remove .do_ioctl() callback from driver discipline Julian Wiedmann
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Julian Wiedmann @ 2021-10-25  9:56 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski
  Cc: linux-netdev, linux-s390, Heiko Carstens, Karsten Graul,
	Julian Wiedmann, Alexandra Winter

Add the failed MAC address into the trace message. Also fix up one
format string to use %x instead of %u for the CARD_DEVID.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
---
 drivers/s390/net/qeth_l2_main.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 5b6187f2d9d6..07104fe63df4 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -121,11 +121,11 @@ static int qeth_l2_write_mac(struct qeth_card *card, u8 *mac)
 	QETH_CARD_TEXT(card, 2, "L2Wmac");
 	rc = qeth_l2_send_setdelmac(card, mac, cmd);
 	if (rc == -EADDRINUSE)
-		QETH_DBF_MESSAGE(2, "MAC already registered on device %x\n",
-				 CARD_DEVID(card));
+		QETH_DBF_MESSAGE(2, "MAC address %012llx is already registered on device %x\n",
+				 ether_addr_to_u64(mac), CARD_DEVID(card));
 	else if (rc)
-		QETH_DBF_MESSAGE(2, "Failed to register MAC on device %x: %d\n",
-				 CARD_DEVID(card), rc);
+		QETH_DBF_MESSAGE(2, "Failed to register MAC address %012llx on device %x: %d\n",
+				 ether_addr_to_u64(mac), CARD_DEVID(card), rc);
 	return rc;
 }
 
@@ -138,8 +138,8 @@ static int qeth_l2_remove_mac(struct qeth_card *card, u8 *mac)
 	QETH_CARD_TEXT(card, 2, "L2Rmac");
 	rc = qeth_l2_send_setdelmac(card, mac, cmd);
 	if (rc)
-		QETH_DBF_MESSAGE(2, "Failed to delete MAC on device %u: %d\n",
-				 CARD_DEVID(card), rc);
+		QETH_DBF_MESSAGE(2, "Failed to delete MAC address %012llx on device %x: %d\n",
+				 ether_addr_to_u64(mac), CARD_DEVID(card), rc);
 	return rc;
 }
 
-- 
2.25.1


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

* [PATCH net-next 2/9] s390/qeth: remove .do_ioctl() callback from driver discipline
  2021-10-25  9:56 [PATCH net-next 0/9] s390/qeth: updates 2021-10-25 Julian Wiedmann
  2021-10-25  9:56 ` [PATCH net-next 1/9] s390/qeth: improve trace entries for MAC address (un)registration Julian Wiedmann
@ 2021-10-25  9:56 ` Julian Wiedmann
  2021-10-25  9:56 ` [PATCH net-next 3/9] s390/qeth: move qdio's QAOB cache into qeth Julian Wiedmann
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Julian Wiedmann @ 2021-10-25  9:56 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski
  Cc: linux-netdev, linux-s390, Heiko Carstens, Karsten Graul, Julian Wiedmann

With commit 18787eeebd71 ("qeth: use ndo_siocdevprivate") this callback
is now actually used to handle transport mode-specific _private_ ioctls.

We only have such ioctls for L3 devices. So wire up a L3-specific
.ndo_siocdevprivate() callback that handles those ioctls, and defers to
the core qeth_siocdevprivate() for all other private ioctls.

This takes the discipline one step closer to its original purpose of
providing an internal extension for the qeth_core_ccwgroup_driver.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
 drivers/s390/net/qeth_core.h      |  2 --
 drivers/s390/net/qeth_core_main.c |  5 +----
 drivers/s390/net/qeth_l2_main.c   |  1 -
 drivers/s390/net/qeth_l3_main.c   | 10 +++++-----
 4 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index a5aa0bdc61d6..0dc62b288480 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -771,8 +771,6 @@ struct qeth_discipline {
 	void (*remove) (struct ccwgroup_device *);
 	int (*set_online)(struct qeth_card *card, bool carrier_ok);
 	void (*set_offline)(struct qeth_card *card);
-	int (*do_ioctl)(struct net_device *dev, struct ifreq *rq,
-			void __user *data, int cmd);
 	int (*control_event_handler)(struct qeth_card *card,
 					struct qeth_ipa_cmd *cmd);
 };
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 15999a816054..4149ea253fa0 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -6600,10 +6600,7 @@ int qeth_siocdevprivate(struct net_device *dev, struct ifreq *rq, void __user *d
 		rc = qeth_query_oat_command(card, data);
 		break;
 	default:
-		if (card->discipline->do_ioctl)
-			rc = card->discipline->do_ioctl(dev, rq, data, cmd);
-		else
-			rc = -EOPNOTSUPP;
+		rc = -EOPNOTSUPP;
 	}
 	if (rc)
 		QETH_CARD_TEXT_(card, 2, "ioce%x", rc);
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 07104fe63df4..adba52da9cab 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -2430,7 +2430,6 @@ const struct qeth_discipline qeth_l2_discipline = {
 	.remove = qeth_l2_remove_device,
 	.set_online = qeth_l2_set_online,
 	.set_offline = qeth_l2_set_offline,
-	.do_ioctl = NULL,
 	.control_event_handler = qeth_l2_control_event,
 };
 EXPORT_SYMBOL_GPL(qeth_l2_discipline);
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index e6e921310211..b68942e86666 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -1511,7 +1511,8 @@ static int qeth_l3_arp_flush_cache(struct qeth_card *card)
 	return rc;
 }
 
-static int qeth_l3_do_ioctl(struct net_device *dev, struct ifreq *rq, void __user *data, int cmd)
+static int qeth_l3_ndo_siocdevprivate(struct net_device *dev, struct ifreq *rq,
+				      void __user *data, int cmd)
 {
 	struct qeth_card *card = dev->ml_priv;
 	struct qeth_arp_cache_entry arp_entry;
@@ -1552,7 +1553,7 @@ static int qeth_l3_do_ioctl(struct net_device *dev, struct ifreq *rq, void __use
 		rc = qeth_l3_arp_flush_cache(card);
 		break;
 	default:
-		rc = -EOPNOTSUPP;
+		rc = qeth_siocdevprivate(dev, rq, data, cmd);
 	}
 	return rc;
 }
@@ -1841,7 +1842,7 @@ static const struct net_device_ops qeth_l3_netdev_ops = {
 	.ndo_validate_addr	= eth_validate_addr,
 	.ndo_set_rx_mode	= qeth_l3_set_rx_mode,
 	.ndo_eth_ioctl		= qeth_do_ioctl,
-	.ndo_siocdevprivate	= qeth_siocdevprivate,
+	.ndo_siocdevprivate	= qeth_l3_ndo_siocdevprivate,
 	.ndo_fix_features	= qeth_fix_features,
 	.ndo_set_features	= qeth_set_features,
 	.ndo_tx_timeout		= qeth_tx_timeout,
@@ -1857,7 +1858,7 @@ static const struct net_device_ops qeth_l3_osa_netdev_ops = {
 	.ndo_validate_addr	= eth_validate_addr,
 	.ndo_set_rx_mode	= qeth_l3_set_rx_mode,
 	.ndo_eth_ioctl		= qeth_do_ioctl,
-	.ndo_siocdevprivate	= qeth_siocdevprivate,
+	.ndo_siocdevprivate	= qeth_l3_ndo_siocdevprivate,
 	.ndo_fix_features	= qeth_fix_features,
 	.ndo_set_features	= qeth_set_features,
 	.ndo_tx_timeout		= qeth_tx_timeout,
@@ -2071,7 +2072,6 @@ const struct qeth_discipline qeth_l3_discipline = {
 	.remove = qeth_l3_remove_device,
 	.set_online = qeth_l3_set_online,
 	.set_offline = qeth_l3_set_offline,
-	.do_ioctl = qeth_l3_do_ioctl,
 	.control_event_handler = qeth_l3_control_event,
 };
 EXPORT_SYMBOL_GPL(qeth_l3_discipline);
-- 
2.25.1


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

* [PATCH net-next 3/9] s390/qeth: move qdio's QAOB cache into qeth
  2021-10-25  9:56 [PATCH net-next 0/9] s390/qeth: updates 2021-10-25 Julian Wiedmann
  2021-10-25  9:56 ` [PATCH net-next 1/9] s390/qeth: improve trace entries for MAC address (un)registration Julian Wiedmann
  2021-10-25  9:56 ` [PATCH net-next 2/9] s390/qeth: remove .do_ioctl() callback from driver discipline Julian Wiedmann
@ 2021-10-25  9:56 ` Julian Wiedmann
  2021-10-25  9:56 ` [PATCH net-next 4/9] s390/qeth: clarify remaining dev_kfree_skb_any() users Julian Wiedmann
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Julian Wiedmann @ 2021-10-25  9:56 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski
  Cc: linux-netdev, linux-s390, Heiko Carstens, Karsten Graul,
	Julian Wiedmann, Benjamin Block

qdio.ko no longer needs to care about how the QAOBs are allocated,
from its perspective they are merely another parameter to do_QDIO().

So for a start, shift the cache into the only qdio driver that uses
QAOBs (ie. qeth). Here there's further opportunity to optimize its
usage in the future - eg. make it per-{device, TX queue}, or only
compile it when the driver is built with CQ/QAOB support.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
---
 arch/s390/include/asm/qdio.h      |  2 --
 drivers/s390/cio/qdio_setup.c     | 34 ++-----------------------------
 drivers/s390/net/qeth_core_main.c | 19 +++++++++++++++--
 3 files changed, 19 insertions(+), 36 deletions(-)

diff --git a/arch/s390/include/asm/qdio.h b/arch/s390/include/asm/qdio.h
index 25b5dc34db75..4b9b14b20984 100644
--- a/arch/s390/include/asm/qdio.h
+++ b/arch/s390/include/asm/qdio.h
@@ -349,8 +349,6 @@ extern int qdio_allocate(struct ccw_device *cdev, unsigned int no_input_qs,
 extern int qdio_establish(struct ccw_device *cdev,
 			  struct qdio_initialize *init_data);
 extern int qdio_activate(struct ccw_device *);
-extern struct qaob *qdio_allocate_aob(void);
-extern void qdio_release_aob(struct qaob *);
 extern int do_QDIO(struct ccw_device *cdev, unsigned int callflags, int q_nr,
 		   unsigned int bufnr, unsigned int count, struct qaob *aob);
 extern int qdio_start_irq(struct ccw_device *cdev);
diff --git a/drivers/s390/cio/qdio_setup.c b/drivers/s390/cio/qdio_setup.c
index 20efafe47897..efbb5e5eca05 100644
--- a/drivers/s390/cio/qdio_setup.c
+++ b/drivers/s390/cio/qdio_setup.c
@@ -24,19 +24,6 @@
 #define QBUFF_PER_PAGE (PAGE_SIZE / sizeof(struct qdio_buffer))
 
 static struct kmem_cache *qdio_q_cache;
-static struct kmem_cache *qdio_aob_cache;
-
-struct qaob *qdio_allocate_aob(void)
-{
-	return kmem_cache_zalloc(qdio_aob_cache, GFP_ATOMIC);
-}
-EXPORT_SYMBOL_GPL(qdio_allocate_aob);
-
-void qdio_release_aob(struct qaob *aob)
-{
-	kmem_cache_free(qdio_aob_cache, aob);
-}
-EXPORT_SYMBOL_GPL(qdio_release_aob);
 
 /**
  * qdio_free_buffers() - free qdio buffers
@@ -447,39 +434,22 @@ void qdio_print_subchannel_info(struct qdio_irq *irq_ptr)
 
 int __init qdio_setup_init(void)
 {
-	int rc;
-
 	qdio_q_cache = kmem_cache_create("qdio_q", sizeof(struct qdio_q),
 					 256, 0, NULL);
 	if (!qdio_q_cache)
 		return -ENOMEM;
 
-	qdio_aob_cache = kmem_cache_create("qdio_aob",
-					sizeof(struct qaob),
-					sizeof(struct qaob),
-					0,
-					NULL);
-	if (!qdio_aob_cache) {
-		rc = -ENOMEM;
-		goto free_qdio_q_cache;
-	}
-
 	/* Check for OSA/FCP thin interrupts (bit 67). */
 	DBF_EVENT("thinint:%1d",
 		  (css_general_characteristics.aif_osa) ? 1 : 0);
 
 	/* Check for QEBSM support in general (bit 58). */
 	DBF_EVENT("cssQEBSM:%1d", css_general_characteristics.qebsm);
-	rc = 0;
-out:
-	return rc;
-free_qdio_q_cache:
-	kmem_cache_destroy(qdio_q_cache);
-	goto out;
+
+	return 0;
 }
 
 void qdio_setup_exit(void)
 {
-	kmem_cache_destroy(qdio_aob_cache);
 	kmem_cache_destroy(qdio_q_cache);
 }
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 4149ea253fa0..48dea62bdaa4 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -59,6 +59,7 @@ EXPORT_SYMBOL_GPL(qeth_dbf);
 
 static struct kmem_cache *qeth_core_header_cache;
 static struct kmem_cache *qeth_qdio_outbuf_cache;
+static struct kmem_cache *qeth_qaob_cache;
 
 static struct device *qeth_core_root_dev;
 static struct dentry *qeth_debugfs_root;
@@ -1338,7 +1339,7 @@ static void qeth_clear_output_buffer(struct qeth_qdio_out_q *queue,
 static void qeth_free_out_buf(struct qeth_qdio_out_buffer *buf)
 {
 	if (buf->aob)
-		qdio_release_aob(buf->aob);
+		kmem_cache_free(qeth_qaob_cache, buf->aob);
 	kmem_cache_free(qeth_qdio_outbuf_cache, buf);
 }
 
@@ -3554,7 +3555,8 @@ static void qeth_flush_buffers(struct qeth_qdio_out_q *queue, int index,
 		    !qeth_iqd_is_mcast_queue(card, queue) &&
 		    count == 1) {
 			if (!buf->aob)
-				buf->aob = qdio_allocate_aob();
+				buf->aob = kmem_cache_zalloc(qeth_qaob_cache,
+							     GFP_ATOMIC);
 			if (buf->aob) {
 				struct qeth_qaob_priv1 *priv;
 
@@ -7174,6 +7176,16 @@ static int __init qeth_core_init(void)
 		rc = -ENOMEM;
 		goto cqslab_err;
 	}
+
+	qeth_qaob_cache = kmem_cache_create("qeth_qaob",
+					    sizeof(struct qaob),
+					    sizeof(struct qaob),
+					    0, NULL);
+	if (!qeth_qaob_cache) {
+		rc = -ENOMEM;
+		goto qaob_err;
+	}
+
 	rc = ccw_driver_register(&qeth_ccw_driver);
 	if (rc)
 		goto ccw_err;
@@ -7186,6 +7198,8 @@ static int __init qeth_core_init(void)
 ccwgroup_err:
 	ccw_driver_unregister(&qeth_ccw_driver);
 ccw_err:
+	kmem_cache_destroy(qeth_qaob_cache);
+qaob_err:
 	kmem_cache_destroy(qeth_qdio_outbuf_cache);
 cqslab_err:
 	kmem_cache_destroy(qeth_core_header_cache);
@@ -7204,6 +7218,7 @@ static void __exit qeth_core_exit(void)
 	qeth_clear_dbf_list();
 	ccwgroup_driver_unregister(&qeth_core_ccwgroup_driver);
 	ccw_driver_unregister(&qeth_ccw_driver);
+	kmem_cache_destroy(qeth_qaob_cache);
 	kmem_cache_destroy(qeth_qdio_outbuf_cache);
 	kmem_cache_destroy(qeth_core_header_cache);
 	root_device_unregister(qeth_core_root_dev);
-- 
2.25.1


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

* [PATCH net-next 4/9] s390/qeth: clarify remaining dev_kfree_skb_any() users
  2021-10-25  9:56 [PATCH net-next 0/9] s390/qeth: updates 2021-10-25 Julian Wiedmann
                   ` (2 preceding siblings ...)
  2021-10-25  9:56 ` [PATCH net-next 3/9] s390/qeth: move qdio's QAOB cache into qeth Julian Wiedmann
@ 2021-10-25  9:56 ` Julian Wiedmann
  2021-10-25  9:56 ` [PATCH net-next 5/9] s390/qeth: don't keep track of Input Queue count Julian Wiedmann
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Julian Wiedmann @ 2021-10-25  9:56 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski
  Cc: linux-netdev, linux-s390, Heiko Carstens, Karsten Graul, Julian Wiedmann

For none of the users we are under risk of running in HW IRQ context or
or with IRQs disabled. Thus we always end up in consume_skb().

But the two occurences in the RX path should really report the dropped
packet to dropmon, so have them use kfree_skb() instead. That's also
consistent with what napi_free_frags() does internally.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
 drivers/s390/net/qeth_core_main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 48dea62bdaa4..d6230e4e8b1c 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -2630,7 +2630,7 @@ static void qeth_free_qdio_queues(struct qeth_card *card)
 	qeth_free_cq(card);
 	for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j) {
 		if (card->qdio.in_q->bufs[j].rx_skb)
-			dev_kfree_skb_any(card->qdio.in_q->bufs[j].rx_skb);
+			consume_skb(card->qdio.in_q->bufs[j].rx_skb);
 	}
 	qeth_free_qdio_queue(card->qdio.in_q);
 	card->qdio.in_q = NULL;
@@ -5606,7 +5606,7 @@ static void qeth_receive_skb(struct qeth_card *card, struct sk_buff *skb,
 		if (uses_frags)
 			napi_free_frags(napi);
 		else
-			dev_kfree_skb_any(skb);
+			kfree_skb(skb);
 		return;
 	}
 
@@ -5797,7 +5797,7 @@ static int qeth_extract_skb(struct qeth_card *card,
 					if (uses_frags)
 						napi_free_frags(napi);
 					else
-						dev_kfree_skb_any(skb);
+						kfree_skb(skb);
 					QETH_CARD_STAT_INC(card,
 							   rx_length_errors);
 				}
-- 
2.25.1


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

* [PATCH net-next 5/9] s390/qeth: don't keep track of Input Queue count
  2021-10-25  9:56 [PATCH net-next 0/9] s390/qeth: updates 2021-10-25 Julian Wiedmann
                   ` (3 preceding siblings ...)
  2021-10-25  9:56 ` [PATCH net-next 4/9] s390/qeth: clarify remaining dev_kfree_skb_any() users Julian Wiedmann
@ 2021-10-25  9:56 ` Julian Wiedmann
  2021-10-25  9:56 ` [PATCH net-next 6/9] s390/qeth: fix various format strings Julian Wiedmann
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Julian Wiedmann @ 2021-10-25  9:56 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski
  Cc: linux-netdev, linux-s390, Heiko Carstens, Karsten Graul, Julian Wiedmann

The only actual user of qdio.no_input_queues is qeth_qdio_establish(),
and there we already have full awareness of the current Input Queue
configuration (1 RX queue, plus potentially 1 TX Completion queue).

So avoid this state tracking, and the ambiguity it brings with it.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
 drivers/s390/net/qeth_core.h      |  1 -
 drivers/s390/net/qeth_core_main.c | 17 +++++++----------
 2 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index 0dc62b288480..09e1d2da3e48 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -545,7 +545,6 @@ static inline bool qeth_out_queue_is_empty(struct qeth_qdio_out_q *queue)
 struct qeth_qdio_info {
 	atomic_t state;
 	/* input */
-	int no_in_queues;
 	struct qeth_qdio_q *in_q;
 	struct qeth_qdio_q *c_q;
 	struct qeth_qdio_buffer_pool in_buf_pool;
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index d6230e4e8b1c..df0b96a3943c 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -355,8 +355,8 @@ static int qeth_cq_init(struct qeth_card *card)
 		qdio_reset_buffers(card->qdio.c_q->qdio_bufs,
 				   QDIO_MAX_BUFFERS_PER_Q);
 		card->qdio.c_q->next_buf_to_init = 127;
-		rc = do_QDIO(CARD_DDEV(card), QDIO_FLAG_SYNC_INPUT,
-			     card->qdio.no_in_queues - 1, 0, 127, NULL);
+		rc = do_QDIO(CARD_DDEV(card), QDIO_FLAG_SYNC_INPUT, 1, 0, 127,
+			     NULL);
 		if (rc) {
 			QETH_CARD_TEXT_(card, 2, "1err%d", rc);
 			goto out;
@@ -376,21 +376,16 @@ static int qeth_alloc_cq(struct qeth_card *card)
 			dev_err(&card->gdev->dev, "Failed to create completion queue\n");
 			return -ENOMEM;
 		}
-
-		card->qdio.no_in_queues = 2;
 	} else {
 		QETH_CARD_TEXT(card, 2, "nocq");
 		card->qdio.c_q = NULL;
-		card->qdio.no_in_queues = 1;
 	}
-	QETH_CARD_TEXT_(card, 2, "iqc%d", card->qdio.no_in_queues);
 	return 0;
 }
 
 static void qeth_free_cq(struct qeth_card *card)
 {
 	if (card->qdio.c_q) {
-		--card->qdio.no_in_queues;
 		qeth_free_qdio_queue(card->qdio.c_q);
 		card->qdio.c_q = NULL;
 	}
@@ -1459,7 +1454,6 @@ static void qeth_init_qdio_info(struct qeth_card *card)
 	card->qdio.default_out_queue = QETH_DEFAULT_QUEUE;
 
 	/* inbound */
-	card->qdio.no_in_queues = 1;
 	card->qdio.in_buf_size = QETH_IN_BUF_SIZE_DEFAULT;
 	if (IS_IQD(card))
 		card->qdio.init_pool.buf_count = QETH_IN_BUF_COUNT_HSDEFAULT;
@@ -5141,6 +5135,7 @@ static int qeth_qdio_establish(struct qeth_card *card)
 	struct qdio_buffer **in_sbal_ptrs[QETH_MAX_IN_QUEUES];
 	struct qeth_qib_parms *qib_parms = NULL;
 	struct qdio_initialize init_data;
+	unsigned int no_input_qs = 1;
 	unsigned int i;
 	int rc = 0;
 
@@ -5155,8 +5150,10 @@ static int qeth_qdio_establish(struct qeth_card *card)
 	}
 
 	in_sbal_ptrs[0] = card->qdio.in_q->qdio_bufs;
-	if (card->options.cq == QETH_CQ_ENABLED)
+	if (card->options.cq == QETH_CQ_ENABLED) {
 		in_sbal_ptrs[1] = card->qdio.c_q->qdio_bufs;
+		no_input_qs++;
+	}
 
 	for (i = 0; i < card->qdio.no_out_queues; i++)
 		out_sbal_ptrs[i] = card->qdio.out_qs[i]->qdio_bufs;
@@ -5166,7 +5163,7 @@ static int qeth_qdio_establish(struct qeth_card *card)
 							  QDIO_QETH_QFMT;
 	init_data.qib_param_field_format = 0;
 	init_data.qib_param_field	 = (void *)qib_parms;
-	init_data.no_input_qs            = card->qdio.no_in_queues;
+	init_data.no_input_qs		 = no_input_qs;
 	init_data.no_output_qs           = card->qdio.no_out_queues;
 	init_data.input_handler		 = qeth_qdio_input_handler;
 	init_data.output_handler	 = qeth_qdio_output_handler;
-- 
2.25.1


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

* [PATCH net-next 6/9] s390/qeth: fix various format strings
  2021-10-25  9:56 [PATCH net-next 0/9] s390/qeth: updates 2021-10-25 Julian Wiedmann
                   ` (4 preceding siblings ...)
  2021-10-25  9:56 ` [PATCH net-next 5/9] s390/qeth: don't keep track of Input Queue count Julian Wiedmann
@ 2021-10-25  9:56 ` Julian Wiedmann
  2021-10-25 13:22   ` Vladimir Oltean
  2021-10-25  9:56 ` [PATCH net-next 7/9] s390/qeth: add __printf format attribute to qeth_dbf_longtext Julian Wiedmann
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 14+ messages in thread
From: Julian Wiedmann @ 2021-10-25  9:56 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski
  Cc: linux-netdev, linux-s390, Heiko Carstens, Karsten Graul, Julian Wiedmann

From: Heiko Carstens <hca@linux.ibm.com>

Various format strings don't match with types of parameters.
Fix all of them.

Acked-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
 drivers/s390/net/qeth_l2_main.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index adba52da9cab..0347fc184786 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -661,13 +661,13 @@ static void qeth_l2_dev2br_fdb_notify(struct qeth_card *card, u8 code,
 					 card->dev, &info.info, NULL);
 		QETH_CARD_TEXT(card, 4, "andelmac");
 		QETH_CARD_TEXT_(card, 4,
-				"mc%012lx", ether_addr_to_u64(ntfy_mac));
+				"mc%012llx", ether_addr_to_u64(ntfy_mac));
 	} else {
 		call_switchdev_notifiers(SWITCHDEV_FDB_ADD_TO_BRIDGE,
 					 card->dev, &info.info, NULL);
 		QETH_CARD_TEXT(card, 4, "anaddmac");
 		QETH_CARD_TEXT_(card, 4,
-				"mc%012lx", ether_addr_to_u64(ntfy_mac));
+				"mc%012llx", ether_addr_to_u64(ntfy_mac));
 	}
 }
 
@@ -765,8 +765,8 @@ static void qeth_l2_br2dev_worker(struct work_struct *work)
 	int err = 0;
 
 	kfree(br2dev_event_work);
-	QETH_CARD_TEXT_(card, 4, "b2dw%04x", event);
-	QETH_CARD_TEXT_(card, 4, "ma%012lx", ether_addr_to_u64(addr));
+	QETH_CARD_TEXT_(card, 4, "b2dw%04lx", event);
+	QETH_CARD_TEXT_(card, 4, "ma%012llx", ether_addr_to_u64(addr));
 
 	rcu_read_lock();
 	/* Verify preconditions are still valid: */
@@ -795,7 +795,7 @@ static void qeth_l2_br2dev_worker(struct work_struct *work)
 				if (err) {
 					QETH_CARD_TEXT(card, 2, "b2derris");
 					QETH_CARD_TEXT_(card, 2,
-							"err%02x%03d", event,
+							"err%02lx%03d", event,
 							lowerdev->ifindex);
 				}
 			}
@@ -813,7 +813,7 @@ static void qeth_l2_br2dev_worker(struct work_struct *work)
 			break;
 		}
 		if (err)
-			QETH_CARD_TEXT_(card, 2, "b2derr%02x", event);
+			QETH_CARD_TEXT_(card, 2, "b2derr%02lx", event);
 	}
 
 unlock:
@@ -878,7 +878,7 @@ static int qeth_l2_switchdev_event(struct notifier_block *unused,
 	while (lowerdev) {
 		if (qeth_l2_must_learn(lowerdev, dstdev)) {
 			card = lowerdev->ml_priv;
-			QETH_CARD_TEXT_(card, 4, "b2dqw%03x", event);
+			QETH_CARD_TEXT_(card, 4, "b2dqw%03lx", event);
 			rc = qeth_l2_br2dev_queue_work(brdev, lowerdev,
 						       dstdev, event,
 						       fdb_info->addr);
-- 
2.25.1


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

* [PATCH net-next 7/9] s390/qeth: add __printf format attribute to qeth_dbf_longtext
  2021-10-25  9:56 [PATCH net-next 0/9] s390/qeth: updates 2021-10-25 Julian Wiedmann
                   ` (5 preceding siblings ...)
  2021-10-25  9:56 ` [PATCH net-next 6/9] s390/qeth: fix various format strings Julian Wiedmann
@ 2021-10-25  9:56 ` Julian Wiedmann
  2021-10-25  9:56 ` [PATCH net-next 8/9] s390/qeth: fix kernel doc comments Julian Wiedmann
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Julian Wiedmann @ 2021-10-25  9:56 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski
  Cc: linux-netdev, linux-s390, Heiko Carstens, Karsten Graul, Julian Wiedmann

From: Heiko Carstens <hca@linux.ibm.com>

Allow the compiler to recognize and check format strings and parameters.

As reported with allmodconfig and W=1:

drivers/s390/net/qeth_core_main.c: In function ‘qeth_dbf_longtext’:
drivers/s390/net/qeth_core_main.c:6190:9: error: function ‘qeth_dbf_longtext’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]
 6190 |         vsnprintf(dbf_txt_buf, sizeof(dbf_txt_buf), fmt, args);
      |         ^~~~~~~~~

Acked-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
 drivers/s390/net/qeth_core.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index 09e1d2da3e48..20dca4c0384a 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -1084,6 +1084,7 @@ int qeth_setadpparms_set_access_ctrl(struct qeth_card *card,
 int qeth_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
 int qeth_siocdevprivate(struct net_device *dev, struct ifreq *rq,
 			void __user *data, int cmd);
+__printf(3, 4)
 void qeth_dbf_longtext(debug_info_t *id, int level, char *text, ...);
 int qeth_configure_cq(struct qeth_card *, enum qeth_cq);
 int qeth_hw_trap(struct qeth_card *, enum qeth_diags_trap_action);
-- 
2.25.1


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

* [PATCH net-next 8/9] s390/qeth: fix kernel doc comments
  2021-10-25  9:56 [PATCH net-next 0/9] s390/qeth: updates 2021-10-25 Julian Wiedmann
                   ` (6 preceding siblings ...)
  2021-10-25  9:56 ` [PATCH net-next 7/9] s390/qeth: add __printf format attribute to qeth_dbf_longtext Julian Wiedmann
@ 2021-10-25  9:56 ` Julian Wiedmann
  2021-10-25  9:56 ` [PATCH net-next 9/9] s390/qeth: update kerneldoc for qeth_add_hw_header() Julian Wiedmann
  2021-10-25 13:00 ` [PATCH net-next 0/9] s390/qeth: updates 2021-10-25 patchwork-bot+netdevbpf
  9 siblings, 0 replies; 14+ messages in thread
From: Julian Wiedmann @ 2021-10-25  9:56 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski
  Cc: linux-netdev, linux-s390, Heiko Carstens, Karsten Graul, Julian Wiedmann

From: Heiko Carstens <hca@linux.ibm.com>

Fix kernel doc comments and remove incorrect kernel doc indicators.

Acked-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
 drivers/s390/net/qeth_core_main.c | 10 +++++-----
 drivers/s390/net/qeth_l3_main.c   |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index df0b96a3943c..6e410497826a 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -1925,9 +1925,9 @@ static struct qeth_cmd_buffer *qeth_mpc_alloc_cmd(struct qeth_card *card,
  * @card:			qeth_card structure pointer
  * @iob:			qeth_cmd_buffer pointer
  * @reply_cb:			callback function pointer
- * @cb_card:			pointer to the qeth_card structure
- * @cb_reply:			pointer to the qeth_reply structure
- * @cb_cmd:			pointer to the original iob for non-IPA
+ *  cb_card:			pointer to the qeth_card structure
+ *  cb_reply:			pointer to the qeth_reply structure
+ *  cb_cmd:			pointer to the original iob for non-IPA
  *				commands, or to the qeth_ipa_cmd structure
  *				for the IPA commands.
  * @reply_param:		private pointer passed to the callback
@@ -3034,7 +3034,7 @@ static int qeth_send_ipa_cmd_cb(struct qeth_card *card,
 	return (cmd->hdr.return_code) ? -EIO : 0;
 }
 
-/**
+/*
  * qeth_send_ipa_cmd() - send an IPA command
  *
  * See qeth_send_control_data() for explanation of the arguments.
@@ -3776,7 +3776,7 @@ static void qeth_qdio_output_handler(struct ccw_device *ccwdev,
 	qeth_schedule_recovery(card);
 }
 
-/**
+/*
  * Note: Function assumes that we have 4 outbound queues.
  */
 int qeth_get_priority_queue(struct qeth_card *card, struct sk_buff *skb)
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index b68942e86666..48a886f7af62 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -492,7 +492,7 @@ int qeth_l3_setrouting_v6(struct qeth_card *card)
  * IP address takeover related functions
  */
 
-/**
+/*
  * qeth_l3_update_ipato() - Update 'takeover' property, for all NORMAL IPs.
  *
  * Caller must hold ip_lock.
-- 
2.25.1


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

* [PATCH net-next 9/9] s390/qeth: update kerneldoc for qeth_add_hw_header()
  2021-10-25  9:56 [PATCH net-next 0/9] s390/qeth: updates 2021-10-25 Julian Wiedmann
                   ` (7 preceding siblings ...)
  2021-10-25  9:56 ` [PATCH net-next 8/9] s390/qeth: fix kernel doc comments Julian Wiedmann
@ 2021-10-25  9:56 ` Julian Wiedmann
  2021-10-25 13:00 ` [PATCH net-next 0/9] s390/qeth: updates 2021-10-25 patchwork-bot+netdevbpf
  9 siblings, 0 replies; 14+ messages in thread
From: Julian Wiedmann @ 2021-10-25  9:56 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski
  Cc: linux-netdev, linux-s390, Heiko Carstens, Karsten Graul, Julian Wiedmann

qeth_add_hw_header() is missing documentation for some of its
parameters, fix that up.

Reported-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
 drivers/s390/net/qeth_core_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 6e410497826a..26c55f67289f 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -3873,12 +3873,14 @@ static unsigned int qeth_count_elements(struct sk_buff *skb,
 
 /**
  * qeth_add_hw_header() - add a HW header to an skb.
+ * @queue: TX queue that the skb will be placed on.
  * @skb: skb that the HW header should be added to.
  * @hdr: double pointer to a qeth_hdr. When returning with >= 0,
  *	 it contains a valid pointer to a qeth_hdr.
  * @hdr_len: length of the HW header.
  * @proto_len: length of protocol headers that need to be in same page as the
  *	       HW header.
+ * @elements: returns the required number of buffer elements for this skb.
  *
  * Returns the pushed length. If the header can't be pushed on
  * (eg. because it would cross a page boundary), it is allocated from
-- 
2.25.1


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

* Re: [PATCH net-next 0/9] s390/qeth: updates 2021-10-25
  2021-10-25  9:56 [PATCH net-next 0/9] s390/qeth: updates 2021-10-25 Julian Wiedmann
                   ` (8 preceding siblings ...)
  2021-10-25  9:56 ` [PATCH net-next 9/9] s390/qeth: update kerneldoc for qeth_add_hw_header() Julian Wiedmann
@ 2021-10-25 13:00 ` patchwork-bot+netdevbpf
  9 siblings, 0 replies; 14+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-25 13:00 UTC (permalink / raw)
  To: Julian Wiedmann; +Cc: davem, kuba, netdev, linux-s390, hca, kgraul

Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Mon, 25 Oct 2021 11:56:49 +0200 you wrote:
> Hi Dave & Jakub,
> 
> please apply the following patch series for qeth to netdev's net-next tree.
> 
> This brings some minor maintenance improvements, and a bunch of cleanups
> so that the W=1 build passes without warning.
> 
> [...]

Here is the summary with links:
  - [net-next,1/9] s390/qeth: improve trace entries for MAC address (un)registration
    https://git.kernel.org/netdev/net-next/c/0969becb5f76
  - [net-next,2/9] s390/qeth: remove .do_ioctl() callback from driver discipline
    https://git.kernel.org/netdev/net-next/c/2decb0b7ba2d
  - [net-next,3/9] s390/qeth: move qdio's QAOB cache into qeth
    https://git.kernel.org/netdev/net-next/c/a18c28f0aeeb
  - [net-next,4/9] s390/qeth: clarify remaining dev_kfree_skb_any() users
    https://git.kernel.org/netdev/net-next/c/fdd3c5f076b6
  - [net-next,5/9] s390/qeth: don't keep track of Input Queue count
    https://git.kernel.org/netdev/net-next/c/dc15012bb083
  - [net-next,6/9] s390/qeth: fix various format strings
    https://git.kernel.org/netdev/net-next/c/22e2b5cdb0b9
  - [net-next,7/9] s390/qeth: add __printf format attribute to qeth_dbf_longtext
    https://git.kernel.org/netdev/net-next/c/79140e22d245
  - [net-next,8/9] s390/qeth: fix kernel doc comments
    https://git.kernel.org/netdev/net-next/c/7ffaef824c9a
  - [net-next,9/9] s390/qeth: update kerneldoc for qeth_add_hw_header()
    https://git.kernel.org/netdev/net-next/c/56c5af2566a7

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

* Re: [PATCH net-next 6/9] s390/qeth: fix various format strings
  2021-10-25  9:56 ` [PATCH net-next 6/9] s390/qeth: fix various format strings Julian Wiedmann
@ 2021-10-25 13:22   ` Vladimir Oltean
  2021-10-25 13:35     ` Julian Wiedmann
  0 siblings, 1 reply; 14+ messages in thread
From: Vladimir Oltean @ 2021-10-25 13:22 UTC (permalink / raw)
  To: Julian Wiedmann
  Cc: David Miller, Jakub Kicinski, linux-netdev, linux-s390,
	Heiko Carstens, Karsten Graul

On Mon, Oct 25, 2021 at 11:56:55AM +0200, Julian Wiedmann wrote:
> From: Heiko Carstens <hca@linux.ibm.com>
> 
> Various format strings don't match with types of parameters.
> Fix all of them.
> 
> Acked-by: Julian Wiedmann <jwi@linux.ibm.com>
> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
> Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
> ---
>  drivers/s390/net/qeth_l2_main.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
> index adba52da9cab..0347fc184786 100644
> --- a/drivers/s390/net/qeth_l2_main.c
> +++ b/drivers/s390/net/qeth_l2_main.c
> @@ -661,13 +661,13 @@ static void qeth_l2_dev2br_fdb_notify(struct qeth_card *card, u8 code,
>  					 card->dev, &info.info, NULL);
>  		QETH_CARD_TEXT(card, 4, "andelmac");
>  		QETH_CARD_TEXT_(card, 4,
> -				"mc%012lx", ether_addr_to_u64(ntfy_mac));
> +				"mc%012llx", ether_addr_to_u64(ntfy_mac));
>  	} else {
>  		call_switchdev_notifiers(SWITCHDEV_FDB_ADD_TO_BRIDGE,
>  					 card->dev, &info.info, NULL);
>  		QETH_CARD_TEXT(card, 4, "anaddmac");
>  		QETH_CARD_TEXT_(card, 4,
> -				"mc%012lx", ether_addr_to_u64(ntfy_mac));
> +				"mc%012llx", ether_addr_to_u64(ntfy_mac));

You can print MAC addresses using the "%pM" printf format specifier, and
the ntfy_mac as argument.

>  	}
>  }
>  
> @@ -765,8 +765,8 @@ static void qeth_l2_br2dev_worker(struct work_struct *work)
>  	int err = 0;
>  
>  	kfree(br2dev_event_work);
> -	QETH_CARD_TEXT_(card, 4, "b2dw%04x", event);
> -	QETH_CARD_TEXT_(card, 4, "ma%012lx", ether_addr_to_u64(addr));
> +	QETH_CARD_TEXT_(card, 4, "b2dw%04lx", event);
> +	QETH_CARD_TEXT_(card, 4, "ma%012llx", ether_addr_to_u64(addr));
>  
>  	rcu_read_lock();
>  	/* Verify preconditions are still valid: */
> @@ -795,7 +795,7 @@ static void qeth_l2_br2dev_worker(struct work_struct *work)
>  				if (err) {
>  					QETH_CARD_TEXT(card, 2, "b2derris");
>  					QETH_CARD_TEXT_(card, 2,
> -							"err%02x%03d", event,
> +							"err%02lx%03d", event,
>  							lowerdev->ifindex);
>  				}
>  			}
> @@ -813,7 +813,7 @@ static void qeth_l2_br2dev_worker(struct work_struct *work)
>  			break;
>  		}
>  		if (err)
> -			QETH_CARD_TEXT_(card, 2, "b2derr%02x", event);
> +			QETH_CARD_TEXT_(card, 2, "b2derr%02lx", event);
>  	}
>  
>  unlock:
> @@ -878,7 +878,7 @@ static int qeth_l2_switchdev_event(struct notifier_block *unused,
>  	while (lowerdev) {
>  		if (qeth_l2_must_learn(lowerdev, dstdev)) {
>  			card = lowerdev->ml_priv;
> -			QETH_CARD_TEXT_(card, 4, "b2dqw%03x", event);
> +			QETH_CARD_TEXT_(card, 4, "b2dqw%03lx", event);
>  			rc = qeth_l2_br2dev_queue_work(brdev, lowerdev,
>  						       dstdev, event,
>  						       fdb_info->addr);
> -- 
> 2.25.1
> 

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

* Re: [PATCH net-next 6/9] s390/qeth: fix various format strings
  2021-10-25 13:22   ` Vladimir Oltean
@ 2021-10-25 13:35     ` Julian Wiedmann
  2021-10-25 14:32       ` Vladimir Oltean
  0 siblings, 1 reply; 14+ messages in thread
From: Julian Wiedmann @ 2021-10-25 13:35 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: David Miller, Jakub Kicinski, linux-netdev, linux-s390,
	Heiko Carstens, Karsten Graul

On 25.10.21 15:22, Vladimir Oltean wrote:
> On Mon, Oct 25, 2021 at 11:56:55AM +0200, Julian Wiedmann wrote:
>> From: Heiko Carstens <hca@linux.ibm.com>
>>
>> Various format strings don't match with types of parameters.
>> Fix all of them.
>>
>> Acked-by: Julian Wiedmann <jwi@linux.ibm.com>
>> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
>> Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
>> ---
>>  drivers/s390/net/qeth_l2_main.c | 14 +++++++-------
>>  1 file changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
>> index adba52da9cab..0347fc184786 100644
>> --- a/drivers/s390/net/qeth_l2_main.c
>> +++ b/drivers/s390/net/qeth_l2_main.c
>> @@ -661,13 +661,13 @@ static void qeth_l2_dev2br_fdb_notify(struct qeth_card *card, u8 code,
>>  					 card->dev, &info.info, NULL);
>>  		QETH_CARD_TEXT(card, 4, "andelmac");
>>  		QETH_CARD_TEXT_(card, 4,
>> -				"mc%012lx", ether_addr_to_u64(ntfy_mac));
>> +				"mc%012llx", ether_addr_to_u64(ntfy_mac));
>>  	} else {
>>  		call_switchdev_notifiers(SWITCHDEV_FDB_ADD_TO_BRIDGE,
>>  					 card->dev, &info.info, NULL);
>>  		QETH_CARD_TEXT(card, 4, "anaddmac");
>>  		QETH_CARD_TEXT_(card, 4,
>> -				"mc%012lx", ether_addr_to_u64(ntfy_mac));
>> +				"mc%012llx", ether_addr_to_u64(ntfy_mac));
> 
> You can print MAC addresses using the "%pM" printf format specifier, and
> the ntfy_mac as argument.
> 

Unfortunately not - no pointers allowed in such s390 dbf trace entries. See
e19e5be8b4ca ("s390/qeth: sanitize strings in debug messages").

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

* Re: [PATCH net-next 6/9] s390/qeth: fix various format strings
  2021-10-25 13:35     ` Julian Wiedmann
@ 2021-10-25 14:32       ` Vladimir Oltean
  0 siblings, 0 replies; 14+ messages in thread
From: Vladimir Oltean @ 2021-10-25 14:32 UTC (permalink / raw)
  To: Julian Wiedmann
  Cc: David Miller, Jakub Kicinski, linux-netdev, linux-s390,
	Heiko Carstens, Karsten Graul

On Mon, Oct 25, 2021 at 03:35:25PM +0200, Julian Wiedmann wrote:
> On 25.10.21 15:22, Vladimir Oltean wrote:
> > On Mon, Oct 25, 2021 at 11:56:55AM +0200, Julian Wiedmann wrote:
> >> From: Heiko Carstens <hca@linux.ibm.com>
> >>
> >> Various format strings don't match with types of parameters.
> >> Fix all of them.
> >>
> >> Acked-by: Julian Wiedmann <jwi@linux.ibm.com>
> >> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
> >> Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
> >> ---
> >>  drivers/s390/net/qeth_l2_main.c | 14 +++++++-------
> >>  1 file changed, 7 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
> >> index adba52da9cab..0347fc184786 100644
> >> --- a/drivers/s390/net/qeth_l2_main.c
> >> +++ b/drivers/s390/net/qeth_l2_main.c
> >> @@ -661,13 +661,13 @@ static void qeth_l2_dev2br_fdb_notify(struct qeth_card *card, u8 code,
> >>  					 card->dev, &info.info, NULL);
> >>  		QETH_CARD_TEXT(card, 4, "andelmac");
> >>  		QETH_CARD_TEXT_(card, 4,
> >> -				"mc%012lx", ether_addr_to_u64(ntfy_mac));
> >> +				"mc%012llx", ether_addr_to_u64(ntfy_mac));
> >>  	} else {
> >>  		call_switchdev_notifiers(SWITCHDEV_FDB_ADD_TO_BRIDGE,
> >>  					 card->dev, &info.info, NULL);
> >>  		QETH_CARD_TEXT(card, 4, "anaddmac");
> >>  		QETH_CARD_TEXT_(card, 4,
> >> -				"mc%012lx", ether_addr_to_u64(ntfy_mac));
> >> +				"mc%012llx", ether_addr_to_u64(ntfy_mac));
> > 
> > You can print MAC addresses using the "%pM" printf format specifier, and
> > the ntfy_mac as argument.
> > 
> 
> Unfortunately not - no pointers allowed in such s390 dbf trace entries. See
> e19e5be8b4ca ("s390/qeth: sanitize strings in debug messages").

Is this because __debug_sprintf_event() saves just the printf-formatted
string and evaluates it only when the trace buffer is shown? Sorry for
my ignorance.

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

end of thread, other threads:[~2021-10-25 14:32 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25  9:56 [PATCH net-next 0/9] s390/qeth: updates 2021-10-25 Julian Wiedmann
2021-10-25  9:56 ` [PATCH net-next 1/9] s390/qeth: improve trace entries for MAC address (un)registration Julian Wiedmann
2021-10-25  9:56 ` [PATCH net-next 2/9] s390/qeth: remove .do_ioctl() callback from driver discipline Julian Wiedmann
2021-10-25  9:56 ` [PATCH net-next 3/9] s390/qeth: move qdio's QAOB cache into qeth Julian Wiedmann
2021-10-25  9:56 ` [PATCH net-next 4/9] s390/qeth: clarify remaining dev_kfree_skb_any() users Julian Wiedmann
2021-10-25  9:56 ` [PATCH net-next 5/9] s390/qeth: don't keep track of Input Queue count Julian Wiedmann
2021-10-25  9:56 ` [PATCH net-next 6/9] s390/qeth: fix various format strings Julian Wiedmann
2021-10-25 13:22   ` Vladimir Oltean
2021-10-25 13:35     ` Julian Wiedmann
2021-10-25 14:32       ` Vladimir Oltean
2021-10-25  9:56 ` [PATCH net-next 7/9] s390/qeth: add __printf format attribute to qeth_dbf_longtext Julian Wiedmann
2021-10-25  9:56 ` [PATCH net-next 8/9] s390/qeth: fix kernel doc comments Julian Wiedmann
2021-10-25  9:56 ` [PATCH net-next 9/9] s390/qeth: update kerneldoc for qeth_add_hw_header() Julian Wiedmann
2021-10-25 13:00 ` [PATCH net-next 0/9] s390/qeth: updates 2021-10-25 patchwork-bot+netdevbpf

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.