Thread (14 messages) flat view 14 messages, 3 authors, 2021-10-25

Re: [PATCH net-next 6/9] s390/qeth: fix various format strings

From: Vladimir Oltean <olteanv@gmail.com>
Date: 2021-10-25 14:32:40
Also in: linux-s390

On Mon, Oct 25, 2021 at 03:35:25PM +0200, Julian Wiedmann wrote:
On 25.10.21 15:22, Vladimir Oltean wrote:
quoted
On Mon, Oct 25, 2021 at 11:56:55AM +0200, Julian Wiedmann wrote:
quoted
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 <redacted>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Julian Wiedmann <redacted>
---
 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help