platform/x86/intel/pmt/discovery: fix format string warning
Subsystems (2)
PATCH 1/1 platform/x86/intel/pmt/discovery: fix format string warning
From: Arnd Bergmann <[email protected]>
When -Wformat-security is enabled, this new code triggers it:
drivers/platform/x86/intel/pmt/discovery.c: In function 'pmt_features_discovery':drivers/platform/x86/intel/pmt/discovery.c:505:36: error: format not a string literal and no format arguments [-Werror=format-security]
505 | pmt_feature_names[feature->id]);
--- drivers/platform/x86/intel/pmt/discovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel/pmt/discovery.c +1 -1
@@ -502,7 +502,7 @@ static int pmt_features_discovery(struct pmt_features_priv *priv, } ret =kobject_init_and_add (&feature->kobj, ktype, &priv->dev->kobj, - pmt_feature_names[feature->id]); +"%s" , pmt_feature_names[feature->id]);if (ret)return ret;
Signature · 1 line
2.39.5
Ilpo Järvinen
maintainerQuoted 8 lines · Arnd Bergmann
When -Wformat-security is enabled, this new code triggers it:
drivers/platform/x86/intel/pmt/discovery.c: In function 'pmt_features_discovery':drivers/platform/x86/intel/pmt/discovery.c:505:36: error: format not a string literal and no format arguments [-Werror=format-security]
505 | pmt_feature_names[feature->id]);[...]
Thank you for your contribution, it has been applied to my local review-ilpo-next branch. Note it will show up in the public platform-drivers-x86/review-ilpo-next branch only once I've pushed my local branch there, which might take a while.
The list of commits applied:
[1/1] platform/x86/intel/pmt/discovery: fix format string warning
commit: 6382c27389c266e90b31151a79d81fa6e122d2d6
--
i.