[PATCH] nvme: work around -Wformat-security warning
Keith Busch
kbusch at kernel.org
Thu Sep 17 12:51:32 PDT 2026
On Wed, Sep 16, 2026 at 01:44:51PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd at arndb.de>
>
> Passing a string variable into dev_set_name() causes a warning
> when building with -Wformat-security enabled:
>
> drivers/nvme/host/core.c: In function 'nvme_cdev_add':
> drivers/nvme/host/core.c:3911:9: error: format not a string literal and no format arguments [-Werror=format-security]
> 3911 | ret = dev_set_name(cdev_device, name);
>
> Remove the temporary strings and let dev_set_name() do the
> same thing internally.
Thanks, applied to nvme-7.3.
More information about the Linux-nvme
mailing list