* Re: [linux-next:master] BUILD REGRESSION 6cc11d2a1759275b856e464265823d94aabd5eaf
[not found] <62be3696.+PAAAVlbtWK6G2hk%lkp@intel.com>
@ 2022-07-02 1:03 ` Roman Gushchin
0 siblings, 0 replies; only message in thread
From: Roman Gushchin @ 2022-07-02 1:03 UTC (permalink / raw)
To: Andrew Morton, kernel test robot
Cc: virtualization, usbb2k-api-dev, tipc-discussion, target-devel,
sound-open-firmware, samba-technical, rds-devel, patches,
osmocom-net-gprs, openipmi-developer, nvdimm, ntb,
netfilter-devel, netdev, mjpeg-users, megaraidlinux.pdl,
linuxppc-dev, linux1394-devel, linux-x25, linux-wpan,
linux-wireless, linux-watchdog, linux-usb, linux-unionfs,
linux-tegra, linux-stm32, linux-staging, linux-serial,
linux-sctp, linux-scsi, linux-samsung-soc, linux-rockchip,
linux-renesas-soc, linux-rdma, linux-raid, linux-pm, linux-phy,
linux-perf-users, linux-pci, linux-parport, linux-parisc,
linux-omap, linux-nfc, linux-mtd, linux-mmc, linux-mm,
linux-mediatek, linux-media, linux-leds, linux-integrity,
linux-input, linux-iio, linux-ide, linux-hwmon, linux-fsdevel,
linux-fpga, linux-fbdev, linux-ext4, linux-efi, linux-cxl,
linux-crypto, linux-clk, linux-cifs, linux-btrfs,
linux-bluetooth, linux-block, linux-bcache, linux-arm-msm,
linux-arm-kernel, linux-amlogic, linaro-mm-sig, legousb-devel,
kvm, keyrings, isdn4linux, iommu, iommu, intel-wired-lan,
dri-devel, dm-devel, devicetree, dev, dccp, damon, coreteam,
cgroups, ceph-devel, apparmor, amd-gfx, alsa-devel,
accessrunner-general
esOn Fri, Jul 01, 2022 at 07:49:42AM +0800, kbuild test robot wrote:
> tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> branch HEAD: 6cc11d2a1759275b856e464265823d94aabd5eaf Add linux-next specific files for 20220630
>
> Error/Warning reports:
>
> https://lore.kernel.org/linux-mm/202206301859.UodBCrva-lkp@intel.com
>
> Error/Warning: (recently discovered and may have been fixed)
>
> arch/powerpc/kernel/interrupt.c:542:55: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
> arch/powerpc/kernel/interrupt.c:542:55: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
> drivers/pci/endpoint/functions/pci-epf-vntb.c:975:5: warning: no previous prototype for 'pci_read' [-Wmissing-prototypes]
> drivers/pci/endpoint/functions/pci-epf-vntb.c:984:5: warning: no previous prototype for 'pci_write' [-Wmissing-prototypes]
> mm/shrinker_debug.c:143:9: warning: function 'shrinker_debugfs_rename' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
> mm/shrinker_debug.c:217:9: warning: function 'shrinker_debugfs_rename' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
> mm/vmscan.c:637:9: warning: function 'prealloc_shrinker' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
> mm/vmscan.c:642:9: warning: function 'prealloc_shrinker' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
> mm/vmscan.c:697:9: warning: function 'register_shrinker' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
> mm/vmscan.c:702:9: warning: function 'register_shrinker' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
Shrinker-related warnings should be fixed by the following patch.
Thanks!
--
From c399aff65c7745a209397a531c5b28fd404d83c2 Mon Sep 17 00:00:00 2001
From: Roman Gushchin <roman.gushchin@linux.dev>
Date: Fri, 1 Jul 2022 17:38:31 -0700
Subject: [PATCH] mm:shrinkers: fix build warnings
Add __printf(a, b) attributes to shrinker functions taking shrinker
name as an argument to avoid compiler warnings like:
mm/shrinker_debug.c:143:9: warning: function 'shrinker_debugfs_rename'
might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
mm/shrinker_debug.c:217:9: warning: function 'shrinker_debugfs_rename'
might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
mm/vmscan.c:637:9: warning: function 'prealloc_shrinker' might be a
candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
mm/vmscan.c:642:9: warning: function 'prealloc_shrinker' might be a
candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
mm/vmscan.c:697:9: warning: function 'register_shrinker' might be a
candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
mm/vmscan.c:702:9: warning: function 'register_shrinker' might be a
candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
---
include/linux/shrinker.h | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/include/linux/shrinker.h b/include/linux/shrinker.h
index 64416f3e0a1f..08e6054e061f 100644
--- a/include/linux/shrinker.h
+++ b/include/linux/shrinker.h
@@ -93,9 +93,11 @@ struct shrinker {
*/
#define SHRINKER_NONSLAB (1 << 3)
-extern int prealloc_shrinker(struct shrinker *shrinker, const char *fmt, ...);
+extern int __printf(2, 3) prealloc_shrinker(struct shrinker *shrinker,
+ const char *fmt, ...);
extern void register_shrinker_prepared(struct shrinker *shrinker);
-extern int register_shrinker(struct shrinker *shrinker, const char *fmt, ...);
+extern int __printf(2, 3) register_shrinker(struct shrinker *shrinker,
+ const char *fmt, ...);
extern void unregister_shrinker(struct shrinker *shrinker);
extern void free_prealloced_shrinker(struct shrinker *shrinker);
extern void synchronize_shrinkers(void);
@@ -103,8 +105,8 @@ extern void synchronize_shrinkers(void);
#ifdef CONFIG_SHRINKER_DEBUG
extern int shrinker_debugfs_add(struct shrinker *shrinker);
extern void shrinker_debugfs_remove(struct shrinker *shrinker);
-extern int shrinker_debugfs_rename(struct shrinker *shrinker,
- const char *fmt, ...);
+extern int __printf(2, 3) shrinker_debugfs_rename(struct shrinker *shrinker,
+ const char *fmt, ...);
#else /* CONFIG_SHRINKER_DEBUG */
static inline int shrinker_debugfs_add(struct shrinker *shrinker)
{
@@ -113,8 +115,8 @@ static inline int shrinker_debugfs_add(struct shrinker *shrinker)
static inline void shrinker_debugfs_remove(struct shrinker *shrinker)
{
}
-static inline int shrinker_debugfs_rename(struct shrinker *shrinker,
- const char *fmt, ...)
+static inline __printf(2, 3)
+int shrinker_debugfs_rename(struct shrinker *shrinker, const char *fmt, ...)
{
return 0;
}
--
2.36.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-02 1:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <62be3696.+PAAAVlbtWK6G2hk%lkp@intel.com>
2022-07-02 1:03 ` [linux-next:master] BUILD REGRESSION 6cc11d2a1759275b856e464265823d94aabd5eaf Roman Gushchin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).