public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Edward Cree" <ecree.xilinx@gmail.com>,
	"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 14:48:52 +0100	[thread overview]
Message-ID: <eac3d942-6378-454f-81e7-0d5936a3f6d0@app.fastmail.com> (raw)
In-Reply-To: <9763c19d-131c-45ca-8976-a6473539240a@gmail.com>

On Wed, Mar 25, 2026, at 01:22, Edward Cree wrote:
> On 20/03/2026 20:48, Arnd Bergmann wrote:
>
> 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.)

I sent a new version now, tried your suggestion but ended up with
yet another variation where I preformat the string in the two
cases (per driver) that actually use a nontrivial format. This
ended up simpler both four the source and compiled form.

>> 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,

Done.

      Arnd

      reply	other threads:[~2026-03-25 13:49 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
2026-03-25 13:48       ` Arnd Bergmann [this message]

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=eac3d942-6378-454f-81e7-0d5936a3f6d0@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=andrew+netdev@lunn.ch \
    --cc=arnd@kernel.org \
    --cc=bhutchings@solarflare.com \
    --cc=brett.creeley@amd.com \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox