From: Edward Cree <ecree.xilinx@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>, Arnd Bergmann <arnd@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Nathan Chancellor <nathan@kernel.org>,
Jeff Garzik <jgarzik@redhat.com>,
Ben Hutchings <bhutchings@solarflare.com>
Cc: Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
Brett Creeley <brett.creeley@amd.com>,
Breno Leitao <leitao@debian.org>, Kees Cook <kees@kernel.org>,
Netdev <netdev@vger.kernel.org>,
linux-net-drivers@amd.com, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH] net: sfc: avoid format string warning
Date: Wed, 25 Mar 2026 00:22:32 +0000 [thread overview]
Message-ID: <9763c19d-131c-45ca-8976-a6473539240a@gmail.com> (raw)
In-Reply-To: <61de3aea-26b3-4c00-8598-3a137ebef1bc@app.fastmail.com>
On 20/03/2026 20:48, Arnd Bergmann wrote:
> Right, I took a bit of a shortcut there. How about changing it
> so the other format string is just a name that gets joined with the
> number?
That would work, but all those -1s are a bit unsightly. Like I said,
I'd rather have two different efx_fill_test() functions, one which
takes a unit_id and one which doesn't.
(Also you need to change the kdoc description of unit_name.)
> There are not a lot of good options here, and splitting the line seems
> better than an overlong line to me. I don't really have a strong opinion
> on where the __printf attribute should go either, but I do see that
> after the return type is probably the least common, so I'll change
> that. How about having the specifiers on one line and
> the type in front of the name? that seems faily common.
>
> static __printf(7, 8)
> void ef4_fill_test(unsigned int test_index, u8 *strings, u64 *data,
I'd rather just have
static void __printf(7, 8) ef4_fill_test(unsigned int test_index,
Admittedly that puts the ( further over so fewer params fit on each
line, but I definitely feel the function name should always appear
on the first line of the definition.
-ed
next prev parent reply other threads:[~2026-03-25 0:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 15:19 [PATCH] net: sfc: avoid format string warning Arnd Bergmann
2026-03-20 18:00 ` Kees Cook
2026-03-20 19:04 ` Edward Cree
2026-03-20 20:48 ` Arnd Bergmann
2026-03-25 0:22 ` Edward Cree [this message]
2026-03-25 13:48 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9763c19d-131c-45ca-8976-a6473539240a@gmail.com \
--to=ecree.xilinx@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=bhutchings@solarflare.com \
--cc=brett.creeley@amd.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jgarzik@redhat.com \
--cc=justinstitt@google.com \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net-drivers@amd.com \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.