[alexshi:lrunext 27/27] include/linux/pageblock-flags.h:88:1: warning: non-void function does not return a value
by kernel test robot
tree: https://github.com/alexshi/linux.git lrunext
head: 48d2e577853193ef6e4fa1e714fe0d333a26fa38
commit: 48d2e577853193ef6e4fa1e714fe0d333a26fa38 [27/27] mm/compaction: skip compaction if any skip bit found in pageblock
config: powerpc-randconfig-r016-20200811 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 30c1633386e7cfb01c0a54b31ccf4c3a3873e71b)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
git checkout 48d2e577853193ef6e4fa1e714fe0d333a26fa38
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:15:
In file included from include/linux/radix-tree.h:18:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:18:
>> include/linux/pageblock-flags.h:88:1: warning: non-void function does not return a value [-Wreturn-type]
}
^
1 warning generated.
--
In file included from drivers/gpu/drm/drm_mm.c:47:
In file included from include/linux/seq_file.h:11:
In file included from include/linux/fs.h:15:
In file included from include/linux/radix-tree.h:18:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:18:
>> include/linux/pageblock-flags.h:88:1: warning: non-void function does not return a value [-Wreturn-type]
}
^
drivers/gpu/drm/drm_mm.c:155:1: warning: unused function 'drm_mm_interval_tree_insert' [-Wunused-function]
INTERVAL_TREE_DEFINE(struct drm_mm_node, rb,
^
include/linux/interval_tree_generic.h:38:15: note: expanded from macro 'INTERVAL_TREE_DEFINE'
ITSTATIC void ITPREFIX ## _insert(ITSTRUCT *node, \
^
<scratch space>:51:1: note: expanded from here
drm_mm_interval_tree_insert
^
drivers/gpu/drm/drm_mm.c:155:1: warning: unused function 'drm_mm_interval_tree_iter_next' [-Wunused-function]
include/linux/interval_tree_generic.h:151:33: note: expanded from macro 'INTERVAL_TREE_DEFINE'
ITSTATIC ITSTRUCT * \
^
<scratch space>:73:1: note: expanded from here
drm_mm_interval_tree_iter_next
^
drivers/gpu/drm/drm_mm.c:617:20: warning: function 'drm_mm_node_scanned_block' is not needed and will not be emitted [-Wunneeded-internal-declaration]
static inline bool drm_mm_node_scanned_block(const struct drm_mm_node *node)
^
4 warnings generated.
--
In file included from drivers/gpu/drm/radeon/radeon_device.c:30:
In file included from include/linux/efi.h:19:
In file included from include/linux/proc_fs.h:10:
In file included from include/linux/fs.h:15:
In file included from include/linux/radix-tree.h:18:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:18:
>> include/linux/pageblock-flags.h:88:1: warning: non-void function does not return a value [-Wreturn-type]
}
^
drivers/gpu/drm/radeon/radeon_device.c:637:6: warning: no previous prototype for function 'radeon_device_is_virtual' [-Wmissing-prototypes]
bool radeon_device_is_virtual(void)
^
drivers/gpu/drm/radeon/radeon_device.c:637:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool radeon_device_is_virtual(void)
^
static
2 warnings generated.
--
In file included from drivers/gpu/drm/radeon/radeon_kms.c:29:
In file included from include/linux/pci.h:35:
In file included from include/linux/kobject.h:20:
In file included from include/linux/sysfs.h:16:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/idr.h:15:
In file included from include/linux/radix-tree.h:18:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:18:
>> include/linux/pageblock-flags.h:88:1: warning: non-void function does not return a value [-Wreturn-type]
}
^
drivers/gpu/drm/radeon/radeon_kms.c:61:6: warning: no previous prototype for function 'radeon_driver_unload_kms' [-Wmissing-prototypes]
void radeon_driver_unload_kms(struct drm_device *dev)
^
drivers/gpu/drm/radeon/radeon_kms.c:61:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void radeon_driver_unload_kms(struct drm_device *dev)
^
static
drivers/gpu/drm/radeon/radeon_kms.c:104:5: warning: no previous prototype for function 'radeon_driver_load_kms' [-Wmissing-prototypes]
int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
^
drivers/gpu/drm/radeon/radeon_kms.c:104:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
^
static
drivers/gpu/drm/radeon/radeon_kms.c:618:6: warning: no previous prototype for function 'radeon_driver_lastclose_kms' [-Wmissing-prototypes]
void radeon_driver_lastclose_kms(struct drm_device *dev)
^
drivers/gpu/drm/radeon/radeon_kms.c:618:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void radeon_driver_lastclose_kms(struct drm_device *dev)
^
static
drivers/gpu/drm/radeon/radeon_kms.c:633:5: warning: no previous prototype for function 'radeon_driver_open_kms' [-Wmissing-prototypes]
int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
^
drivers/gpu/drm/radeon/radeon_kms.c:633:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
^
static
drivers/gpu/drm/radeon/radeon_kms.c:704:6: warning: no previous prototype for function 'radeon_driver_postclose_kms' [-Wmissing-prototypes]
void radeon_driver_postclose_kms(struct drm_device *dev,
^
drivers/gpu/drm/radeon/radeon_kms.c:704:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void radeon_driver_postclose_kms(struct drm_device *dev,
^
static
drivers/gpu/drm/radeon/radeon_kms.c:755:5: warning: no previous prototype for function 'radeon_get_vblank_counter_kms' [-Wmissing-prototypes]
u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc)
^
drivers/gpu/drm/radeon/radeon_kms.c:755:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc)
^
static
drivers/gpu/drm/radeon/radeon_kms.c:825:5: warning: no previous prototype for function 'radeon_enable_vblank_kms' [-Wmissing-prototypes]
int radeon_enable_vblank_kms(struct drm_crtc *crtc)
^
drivers/gpu/drm/radeon/radeon_kms.c:825:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int radeon_enable_vblank_kms(struct drm_crtc *crtc)
^
static
drivers/gpu/drm/radeon/radeon_kms.c:852:6: warning: no previous prototype for function 'radeon_disable_vblank_kms' [-Wmissing-prototypes]
void radeon_disable_vblank_kms(struct drm_crtc *crtc)
^
drivers/gpu/drm/radeon/radeon_kms.c:852:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void radeon_disable_vblank_kms(struct drm_crtc *crtc)
^
static
9 warnings generated.
--
In file included from drivers/gpu/drm/radeon/radeon_atombios.c:27:
In file included from include/linux/pci.h:35:
In file included from include/linux/kobject.h:20:
In file included from include/linux/sysfs.h:16:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/idr.h:15:
In file included from include/linux/radix-tree.h:18:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:18:
>> include/linux/pageblock-flags.h:88:1: warning: non-void function does not return a value [-Wreturn-type]
}
^
drivers/gpu/drm/radeon/radeon_atombios.c:1791:6: warning: no previous prototype for function 'radeon_atom_get_tv_timings' [-Wmissing-prototypes]
bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
^
drivers/gpu/drm/radeon/radeon_atombios.c:1791:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
^
static
2 warnings generated.
--
In file included from drivers/gpu/drm/radeon/radeon_ttm.c:33:
In file included from include/linux/dma-mapping.h:7:
In file included from include/linux/device.h:16:
In file included from include/linux/energy_model.h:7:
In file included from include/linux/kobject.h:20:
In file included from include/linux/sysfs.h:16:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/idr.h:15:
In file included from include/linux/radix-tree.h:18:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:18:
>> include/linux/pageblock-flags.h:88:1: warning: non-void function does not return a value [-Wreturn-type]
}
^
drivers/gpu/drm/radeon/radeon_ttm.c:773:5: warning: no previous prototype for function 'radeon_ttm_init' [-Wmissing-prototypes]
int radeon_ttm_init(struct radeon_device *rdev)
^
drivers/gpu/drm/radeon/radeon_ttm.c:773:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int radeon_ttm_init(struct radeon_device *rdev)
^
static
drivers/gpu/drm/radeon/radeon_ttm.c:831:6: warning: no previous prototype for function 'radeon_ttm_fini' [-Wmissing-prototypes]
void radeon_ttm_fini(struct radeon_device *rdev)
^
drivers/gpu/drm/radeon/radeon_ttm.c:831:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void radeon_ttm_fini(struct radeon_device *rdev)
^
static
drivers/gpu/drm/radeon/radeon_ttm.c:892:5: warning: no previous prototype for function 'radeon_mmap' [-Wmissing-prototypes]
int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
^
drivers/gpu/drm/radeon/radeon_ttm.c:892:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
^
static
4 warnings generated.
--
In file included from drivers/gpu/drm/radeon/radeon_legacy_encoders.c:27:
In file included from include/linux/backlight.h:12:
In file included from include/linux/device.h:16:
In file included from include/linux/energy_model.h:7:
In file included from include/linux/kobject.h:20:
In file included from include/linux/sysfs.h:16:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/idr.h:15:
In file included from include/linux/radix-tree.h:18:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:18:
>> include/linux/pageblock-flags.h:88:1: warning: non-void function does not return a value [-Wreturn-type]
}
^
drivers/gpu/drm/radeon/radeon_legacy_encoders.c:371:6: warning: no previous prototype for function 'radeon_legacy_backlight_init' [-Wmissing-prototypes]
void radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder,
^
drivers/gpu/drm/radeon/radeon_legacy_encoders.c:371:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder,
^
static
drivers/gpu/drm/radeon/radeon_legacy_encoders.c:1745:1: warning: no previous prototype for function 'radeon_add_legacy_encoder' [-Wmissing-prototypes]
radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum, uint32_t supported_device)
^
drivers/gpu/drm/radeon/radeon_legacy_encoders.c:1744:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void
^
static
3 warnings generated.
--
In file included from drivers/gpu/drm/radeon/radeon_gem.c:29:
In file included from include/linux/pci.h:35:
In file included from include/linux/kobject.h:20:
In file included from include/linux/sysfs.h:16:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/idr.h:15:
In file included from include/linux/radix-tree.h:18:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:18:
>> include/linux/pageblock-flags.h:88:1: warning: non-void function does not return a value [-Wreturn-type]
}
^
drivers/gpu/drm/radeon/radeon_gem.c:38:6: warning: no previous prototype for function 'radeon_gem_object_free' [-Wmissing-prototypes]
void radeon_gem_object_free(struct drm_gem_object *gobj)
^
drivers/gpu/drm/radeon/radeon_gem.c:38:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void radeon_gem_object_free(struct drm_gem_object *gobj)
^
static
drivers/gpu/drm/radeon/radeon_gem.c:149:5: warning: no previous prototype for function 'radeon_gem_object_open' [-Wmissing-prototypes]
int radeon_gem_object_open(struct drm_gem_object *obj, struct drm_file *file_priv)
^
drivers/gpu/drm/radeon/radeon_gem.c:149:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int radeon_gem_object_open(struct drm_gem_object *obj, struct drm_file *file_priv)
^
static
drivers/gpu/drm/radeon/radeon_gem.c:179:6: warning: no previous prototype for function 'radeon_gem_object_close' [-Wmissing-prototypes]
void radeon_gem_object_close(struct drm_gem_object *obj,
^
drivers/gpu/drm/radeon/radeon_gem.c:179:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void radeon_gem_object_close(struct drm_gem_object *obj,
^
static
4 warnings generated.
--
In file included from drivers/gpu/drm/radeon/radeon_irq_kms.c:29:
In file included from include/linux/pci.h:35:
In file included from include/linux/kobject.h:20:
In file included from include/linux/sysfs.h:16:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/idr.h:15:
In file included from include/linux/radix-tree.h:18:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:18:
>> include/linux/pageblock-flags.h:88:1: warning: non-void function does not return a value [-Wreturn-type]
}
^
drivers/gpu/drm/radeon/radeon_irq_kms.c:55:13: warning: no previous prototype for function 'radeon_driver_irq_handler_kms' [-Wmissing-prototypes]
irqreturn_t radeon_driver_irq_handler_kms(int irq, void *arg)
^
drivers/gpu/drm/radeon/radeon_irq_kms.c:55:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
irqreturn_t radeon_driver_irq_handler_kms(int irq, void *arg)
^
static
drivers/gpu/drm/radeon/radeon_irq_kms.c:122:6: warning: no previous prototype for function 'radeon_driver_irq_preinstall_kms' [-Wmissing-prototypes]
void radeon_driver_irq_preinstall_kms(struct drm_device *dev)
^
drivers/gpu/drm/radeon/radeon_irq_kms.c:122:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void radeon_driver_irq_preinstall_kms(struct drm_device *dev)
^
static
drivers/gpu/drm/radeon/radeon_irq_kms.c:154:5: warning: no previous prototype for function 'radeon_driver_irq_postinstall_kms' [-Wmissing-prototypes]
int radeon_driver_irq_postinstall_kms(struct drm_device *dev)
^
drivers/gpu/drm/radeon/radeon_irq_kms.c:154:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int radeon_driver_irq_postinstall_kms(struct drm_device *dev)
^
static
drivers/gpu/drm/radeon/radeon_irq_kms.c:173:6: warning: no previous prototype for function 'radeon_driver_irq_uninstall_kms' [-Wmissing-prototypes]
void radeon_driver_irq_uninstall_kms(struct drm_device *dev)
^
drivers/gpu/drm/radeon/radeon_irq_kms.c:173:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void radeon_driver_irq_uninstall_kms(struct drm_device *dev)
^
static
5 warnings generated.
..
vim +88 include/linux/pageblock-flags.h
835c134ec4dd75 Mel Gorman 2007-10-16 56
dc4b0caff24d9b Mel Gorman 2014-06-04 57 unsigned long get_pfnblock_flags_mask(struct page *page,
dc4b0caff24d9b Mel Gorman 2014-06-04 58 unsigned long pfn,
e58469bafd0524 Mel Gorman 2014-06-04 59 unsigned long mask);
dc4b0caff24d9b Mel Gorman 2014-06-04 60
48d2e577853193 Alex Shi 2020-08-12 61 bool set_pfnblock_flags_mask(struct page *page,
e58469bafd0524 Mel Gorman 2014-06-04 62 unsigned long flags,
dc4b0caff24d9b Mel Gorman 2014-06-04 63 unsigned long pfn,
e58469bafd0524 Mel Gorman 2014-06-04 64 unsigned long mask);
e58469bafd0524 Mel Gorman 2014-06-04 65
835c134ec4dd75 Mel Gorman 2007-10-16 66 /* Declarations for getting and setting flags. See mm/page_alloc.c */
bb13ffeb9f6bfe Mel Gorman 2012-10-08 67 #ifdef CONFIG_COMPACTION
bb13ffeb9f6bfe Mel Gorman 2012-10-08 68 #define get_pageblock_skip(page) \
490dec8720a68a Wei Yang 2020-08-01 69 get_pfnblock_flags_mask(page, page_to_pfn(page), \
1dc78a9e466748 Wei Yang 2020-08-01 70 (1 << (PB_migrate_skip)))
bb13ffeb9f6bfe Mel Gorman 2012-10-08 71 #define clear_pageblock_skip(page) \
490dec8720a68a Wei Yang 2020-08-01 72 set_pfnblock_flags_mask(page, 0, page_to_pfn(page), \
1dc78a9e466748 Wei Yang 2020-08-01 73 (1 << PB_migrate_skip))
bb13ffeb9f6bfe Mel Gorman 2012-10-08 74 #define set_pageblock_skip(page) \
490dec8720a68a Wei Yang 2020-08-01 75 set_pfnblock_flags_mask(page, (1 << PB_migrate_skip), \
490dec8720a68a Wei Yang 2020-08-01 76 page_to_pfn(page), \
1dc78a9e466748 Wei Yang 2020-08-01 77 (1 << PB_migrate_skip))
21dc7e023611fb David Rientjes 2017-11-17 78 #else
21dc7e023611fb David Rientjes 2017-11-17 79 static inline bool get_pageblock_skip(struct page *page)
21dc7e023611fb David Rientjes 2017-11-17 80 {
21dc7e023611fb David Rientjes 2017-11-17 81 return false;
21dc7e023611fb David Rientjes 2017-11-17 82 }
21dc7e023611fb David Rientjes 2017-11-17 83 static inline void clear_pageblock_skip(struct page *page)
21dc7e023611fb David Rientjes 2017-11-17 84 {
21dc7e023611fb David Rientjes 2017-11-17 85 }
48d2e577853193 Alex Shi 2020-08-12 86 static inline bool set_pageblock_skip(struct page *page)
21dc7e023611fb David Rientjes 2017-11-17 87 {
21dc7e023611fb David Rientjes 2017-11-17 @88 }
bb13ffeb9f6bfe Mel Gorman 2012-10-08 89 #endif /* CONFIG_COMPACTION */
bb13ffeb9f6bfe Mel Gorman 2012-10-08 90
:::::: The code at line 88 was first introduced by commit
:::::: 21dc7e023611fbcf8e38f255731bcf3cc38e7638 mm, compaction: persistently skip hugetlbfs pageblocks
:::::: TO: David Rientjes <rientjes(a)google.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH v4 2/2] xen: add helpers to allocate unpopulated memory
by kernel test robot
Hi Roger,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on xen-tip/linux-next]
[also build test ERROR on linux/master hnaz-linux-mm/master linus/master v5.8 next-20200812]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Roger-Pau-Monne/xen-balloon-fixe...
base: https://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git linux-next
config: x86_64-randconfig-a001-20200812 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 30c1633386e7cfb01c0a54b31ccf4c3a3873e71b)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/xen/grant-table.c:59:
include/xen/balloon.h:8:8: error: redefinition of 'balloon_stats'
struct balloon_stats {
^
include/xen/xen.h:61:10: note: 'include/xen/balloon.h' included multiple times, additional include site here
#include <xen/balloon.h>
^
drivers/xen/grant-table.c:59:10: note: 'include/xen/balloon.h' included multiple times, additional include site here
#include <xen/balloon.h>
^
include/xen/balloon.h:8:8: note: unguarded header; consider using #ifdef guards or #pragma once
struct balloon_stats {
^
In file included from drivers/xen/grant-table.c:59:
>> include/xen/balloon.h:33:20: error: redefinition of 'xen_balloon_init'
static inline void xen_balloon_init(void)
^
include/xen/balloon.h:33:20: note: previous definition is here
static inline void xen_balloon_init(void)
^
2 errors generated.
--
In file included from drivers/xen/balloon.c:70:
include/xen/balloon.h:8:8: error: redefinition of 'balloon_stats'
struct balloon_stats {
^
include/xen/xen.h:61:10: note: 'include/xen/balloon.h' included multiple times, additional include site here
#include <xen/balloon.h>
^
drivers/xen/balloon.c:70:10: note: 'include/xen/balloon.h' included multiple times, additional include site here
#include <xen/balloon.h>
^
include/xen/balloon.h:8:8: note: unguarded header; consider using #ifdef guards or #pragma once
struct balloon_stats {
^
In file included from drivers/xen/balloon.c:70:
>> include/xen/balloon.h:33:20: error: redefinition of 'xen_balloon_init'
static inline void xen_balloon_init(void)
^
include/xen/balloon.h:33:20: note: previous definition is here
static inline void xen_balloon_init(void)
^
2 errors generated.
--
In file included from drivers/xen/gntdev.c:41:
include/xen/balloon.h:8:8: error: redefinition of 'balloon_stats'
struct balloon_stats {
^
include/xen/xen.h:61:10: note: 'include/xen/balloon.h' included multiple times, additional include site here
#include <xen/balloon.h>
^
drivers/xen/gntdev.c:41:10: note: 'include/xen/balloon.h' included multiple times, additional include site here
#include <xen/balloon.h>
^
include/xen/balloon.h:8:8: note: unguarded header; consider using #ifdef guards or #pragma once
struct balloon_stats {
^
In file included from drivers/xen/gntdev.c:41:
>> include/xen/balloon.h:33:20: error: redefinition of 'xen_balloon_init'
static inline void xen_balloon_init(void)
^
include/xen/balloon.h:33:20: note: previous definition is here
static inline void xen_balloon_init(void)
^
In file included from drivers/xen/gntdev.c:48:
In file included from drivers/xen/gntdev-common.h:15:
include/linux/mman.h:134:9: warning: division by zero is undefined [-Wdivision-by-zero]
_calc_vm_trans(flags, MAP_SYNC, VM_SYNC );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mman.h:111:21: note: expanded from macro '_calc_vm_trans'
: ((x) & (bit1)) / ((bit1) / (bit2))))
^ ~~~~~~~~~~~~~~~~~
1 warning and 2 errors generated.
--
In file included from drivers/xen/privcmd.c:40:
include/xen/balloon.h:8:8: error: redefinition of 'balloon_stats'
struct balloon_stats {
^
include/xen/xen.h:61:10: note: 'include/xen/balloon.h' included multiple times, additional include site here
#include <xen/balloon.h>
^
drivers/xen/privcmd.c:40:10: note: 'include/xen/balloon.h' included multiple times, additional include site here
#include <xen/balloon.h>
^
include/xen/balloon.h:8:8: note: unguarded header; consider using #ifdef guards or #pragma once
struct balloon_stats {
^
In file included from drivers/xen/privcmd.c:40:
>> include/xen/balloon.h:33:20: error: redefinition of 'xen_balloon_init'
static inline void xen_balloon_init(void)
^
include/xen/balloon.h:33:20: note: previous definition is here
static inline void xen_balloon_init(void)
^
2 errors generated.
--
In file included from drivers/xen/xlate_mmu.c:43:
include/xen/balloon.h:8:8: error: redefinition of 'balloon_stats'
struct balloon_stats {
^
include/xen/xen.h:61:10: note: 'include/xen/balloon.h' included multiple times, additional include site here
#include <xen/balloon.h>
^
drivers/xen/xlate_mmu.c:43:10: note: 'include/xen/balloon.h' included multiple times, additional include site here
#include <xen/balloon.h>
^
include/xen/balloon.h:8:8: note: unguarded header; consider using #ifdef guards or #pragma once
struct balloon_stats {
^
In file included from drivers/xen/xlate_mmu.c:43:
>> include/xen/balloon.h:33:20: error: redefinition of 'xen_balloon_init'
static inline void xen_balloon_init(void)
^
include/xen/balloon.h:33:20: note: previous definition is here
static inline void xen_balloon_init(void)
^
2 errors generated.
--
In file included from drivers/xen/xenbus/xenbus_client.c:44:
In file included from include/xen/events.h:13:
In file included from arch/x86/include/asm/xen/events.h:5:
In file included from include/xen/xen.h:61:
include/xen/balloon.h:8:8: error: redefinition of 'balloon_stats'
struct balloon_stats {
^
drivers/xen/xenbus/xenbus_client.c:43:10: note: 'include/xen/balloon.h' included multiple times, additional include site here
#include <xen/balloon.h>
^
include/xen/xen.h:61:10: note: 'include/xen/balloon.h' included multiple times, additional include site here
#include <xen/balloon.h>
^
include/xen/balloon.h:8:8: note: unguarded header; consider using #ifdef guards or #pragma once
struct balloon_stats {
^
In file included from drivers/xen/xenbus/xenbus_client.c:44:
In file included from include/xen/events.h:13:
In file included from arch/x86/include/asm/xen/events.h:5:
In file included from include/xen/xen.h:61:
>> include/xen/balloon.h:33:20: error: redefinition of 'xen_balloon_init'
static inline void xen_balloon_init(void)
^
include/xen/balloon.h:33:20: note: previous definition is here
static inline void xen_balloon_init(void)
^
2 errors generated.
vim +/xen_balloon_init +33 include/xen/balloon.h
803eb047a28d239 Daniel De Graaf 2011-03-14 7
803eb047a28d239 Daniel De Graaf 2011-03-14 @8 struct balloon_stats {
803eb047a28d239 Daniel De Graaf 2011-03-14 9 /* We aim for 'current allocation' == 'target allocation'. */
803eb047a28d239 Daniel De Graaf 2011-03-14 10 unsigned long current_pages;
803eb047a28d239 Daniel De Graaf 2011-03-14 11 unsigned long target_pages;
1cf6a6c82918c9a David Vrabel 2015-06-25 12 unsigned long target_unpopulated;
803eb047a28d239 Daniel De Graaf 2011-03-14 13 /* Number of pages in high- and low-memory balloons. */
803eb047a28d239 Daniel De Graaf 2011-03-14 14 unsigned long balloon_low;
803eb047a28d239 Daniel De Graaf 2011-03-14 15 unsigned long balloon_high;
de5a77d8422fc7e David Vrabel 2015-06-25 16 unsigned long total_pages;
803eb047a28d239 Daniel De Graaf 2011-03-14 17 unsigned long schedule_delay;
803eb047a28d239 Daniel De Graaf 2011-03-14 18 unsigned long max_schedule_delay;
803eb047a28d239 Daniel De Graaf 2011-03-14 19 unsigned long retry_count;
803eb047a28d239 Daniel De Graaf 2011-03-14 20 unsigned long max_retry_count;
803eb047a28d239 Daniel De Graaf 2011-03-14 21 };
803eb047a28d239 Daniel De Graaf 2011-03-14 22
803eb047a28d239 Daniel De Graaf 2011-03-14 23 extern struct balloon_stats balloon_stats;
803eb047a28d239 Daniel De Graaf 2011-03-14 24
803eb047a28d239 Daniel De Graaf 2011-03-14 25 void balloon_set_new_target(unsigned long target);
b6f3067985f12d5 Konrad Rzeszutek Wilk 2011-03-15 26
81b286e0f1fe520 David Vrabel 2015-06-25 27 int alloc_xenballooned_pages(int nr_pages, struct page **pages);
b6f3067985f12d5 Konrad Rzeszutek Wilk 2011-03-15 28 void free_xenballooned_pages(int nr_pages, struct page **pages);
a50777c791031d7 Dan Magenheimer 2011-07-08 29
96edd61dcf44362 Juergen Gross 2017-07-10 30 #ifdef CONFIG_XEN_BALLOON
96edd61dcf44362 Juergen Gross 2017-07-10 31 void xen_balloon_init(void);
96edd61dcf44362 Juergen Gross 2017-07-10 32 #else
96edd61dcf44362 Juergen Gross 2017-07-10 @33 static inline void xen_balloon_init(void)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[android-common:android-mainline 4/6] kernel/sched/core.c:190:22: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot
tree: https://android.googlesource.com/kernel/common android-mainline
head: 9a81ce5c7163581153905c037693a7e17df4888b
commit: 6b0a9dc6df8d8be21c8d178a01e0711b0fe6ce73 [4/6] ANDROID: GKI: core: Export for runqueues
config: x86_64-randconfig-s022-20200812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-168-g9554805c-dirty
git checkout 6b0a9dc6df8d8be21c8d178a01e0711b0fe6ce73
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> kernel/sched/core.c:190:22: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
>> kernel/sched/core.c:190:22: sparse: expected void const [noderef] __percpu *__vpp_verify
>> kernel/sched/core.c:190:22: sparse: got struct rq *
kernel/sched/core.c:192:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:192:21: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:192:21: sparse: got struct rq *
kernel/sched/core.c:214:22: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:214:22: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:214:22: sparse: got struct rq *
kernel/sched/core.c:233:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:233:21: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:233:21: sparse: got struct rq *
kernel/sched/core.c:613:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/core.c:613:38: sparse: expected struct task_struct *curr
kernel/sched/core.c:613:38: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/core.c:637:25: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:637:25: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:637:25: sparse: got struct rq *
kernel/sched/core.c:1706:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *p @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/core.c:1706:33: sparse: expected struct task_struct *p
kernel/sched/core.c:1706:33: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/core.c:1706:68: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *tsk @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/core.c:1706:68: sparse: expected struct task_struct *tsk
kernel/sched/core.c:1706:68: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/core.c:1756:14: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:1756:14: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:1756:14: sparse: got struct rq *
kernel/sched/core.c:1802:25: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:1802:25: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:1802:25: sparse: got struct rq *
kernel/sched/core.c:1824:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:1824:13: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:1824:13: sparse: got struct rq *
kernel/sched/core.c:1849:25: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:1849:25: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:1849:25: sparse: got struct rq *
kernel/sched/core.c:2028:26: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2028:26: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2028:26: sparse: got struct rq *
kernel/sched/core.c:2029:26: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2029:26: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2029:26: sparse: got struct rq *
kernel/sched/core.c:2066:18: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2066:18: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2066:18: sparse: got struct rq *
kernel/sched/core.c:2067:18: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2067:18: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2067:18: sparse: got struct rq *
kernel/sched/core.c:2168:22: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2168:22: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2168:22: sparse: got struct rq *
kernel/sched/core.c:2398:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2398:40: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2398:40: sparse: got struct rq *
kernel/sched/core.c:2414:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2414:9: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2414:9: sparse: got struct rq *
kernel/sched/core.c:2443:14: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2443:14: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2443:14: sparse: got struct rq *
kernel/sched/core.c:2454:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2454:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2454:17: sparse: got struct rq *
kernel/sched/core.c:2454:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2454:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2454:17: sparse: got struct rq *
kernel/sched/core.c:2454:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2454:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2454:17: sparse: got struct rq *
kernel/sched/core.c:2454:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2454:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2454:17: sparse: got struct rq *
kernel/sched/core.c:2454:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2454:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2454:17: sparse: got struct rq *
kernel/sched/core.c:2454:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2454:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2454:17: sparse: got struct rq *
kernel/sched/core.c:2454:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2454:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2454:17: sparse: got struct rq *
kernel/sched/core.c:2454:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2454:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2454:17: sparse: got struct rq *
kernel/sched/core.c:2454:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2454:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2454:17: sparse: got struct rq *
kernel/sched/core.c:2454:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2454:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2454:17: sparse: got struct rq *
kernel/sched/core.c:2454:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2454:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2454:17: sparse: got struct rq *
kernel/sched/core.c:2454:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2454:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2454:17: sparse: got struct rq *
kernel/sched/core.c:2454:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2454:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2454:17: sparse: got struct rq *
kernel/sched/core.c:2454:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct rq * @@
kernel/sched/core.c:2454:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/sched/core.c:2454:17: sparse: got struct rq *
vim +190 kernel/sched/core.c
fa85ae2418e684 kernel/sched.c Peter Zijlstra 2008-01-25 84
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 85
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 86 /*
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 87 * Serialization rules:
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 88 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 89 * Lock order:
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 90 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 91 * p->pi_lock
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 92 * rq->lock
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 93 * hrtimer_cpu_base->lock (hrtimer_start() for bandwidth controls)
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 94 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 95 * rq1->lock
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 96 * rq2->lock where: rq1 < rq2
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 97 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 98 * Regular state:
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 99 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 100 * Normal scheduling state is serialized by rq->lock. __schedule() takes the
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 101 * local CPU's rq->lock, it optionally removes the task from the runqueue and
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 102 * always looks at the local rq data structures to find the most elegible task
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 103 * to run next.
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 104 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 105 * Task enqueue is also under rq->lock, possibly taken from another CPU.
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 106 * Wakeups from another LLC domain might use an IPI to transfer the enqueue to
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 107 * the local CPU to avoid bouncing the runqueue state around [ see
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 108 * ttwu_queue_wakelist() ]
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 109 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 110 * Task wakeup, specifically wakeups that involve migration, are horribly
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 111 * complicated to avoid having to take two rq->locks.
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 112 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 113 * Special state:
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 114 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 115 * System-calls and anything external will use task_rq_lock() which acquires
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 116 * both p->pi_lock and rq->lock. As a consequence the state they change is
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 117 * stable while holding either lock:
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 118 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 119 * - sched_setaffinity()/
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 120 * set_cpus_allowed_ptr(): p->cpus_ptr, p->nr_cpus_allowed
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 121 * - set_user_nice(): p->se.load, p->*prio
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 122 * - __sched_setscheduler(): p->sched_class, p->policy, p->*prio,
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 123 * p->se.load, p->rt_priority,
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 124 * p->dl.dl_{runtime, deadline, period, flags, bw, density}
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 125 * - sched_setnuma(): p->numa_preferred_nid
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 126 * - sched_move_task()/
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 127 * cpu_cgroup_fork(): p->sched_task_group
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 128 * - uclamp_update_active() p->uclamp*
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 129 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 130 * p->state <- TASK_*:
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 131 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 132 * is changed locklessly using set_current_state(), __set_current_state() or
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 133 * set_special_state(), see their respective comments, or by
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 134 * try_to_wake_up(). This latter uses p->pi_lock to serialize against
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 135 * concurrent self.
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 136 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 137 * p->on_rq <- { 0, 1 = TASK_ON_RQ_QUEUED, 2 = TASK_ON_RQ_MIGRATING }:
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 138 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 139 * is set by activate_task() and cleared by deactivate_task(), under
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 140 * rq->lock. Non-zero indicates the task is runnable, the special
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 141 * ON_RQ_MIGRATING state is used for migration without holding both
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 142 * rq->locks. It indicates task_cpu() is not stable, see task_rq_lock().
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 143 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 144 * p->on_cpu <- { 0, 1 }:
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 145 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 146 * is set by prepare_task() and cleared by finish_task() such that it will be
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 147 * set before p is scheduled-in and cleared after p is scheduled-out, both
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 148 * under rq->lock. Non-zero indicates the task is running on its CPU.
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 149 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 150 * [ The astute reader will observe that it is possible for two tasks on one
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 151 * CPU to have ->on_cpu = 1 at the same time. ]
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 152 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 153 * task_cpu(p): is changed by set_task_cpu(), the rules are:
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 154 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 155 * - Don't call set_task_cpu() on a blocked task:
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 156 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 157 * We don't care what CPU we're not running on, this simplifies hotplug,
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 158 * the CPU assignment of blocked tasks isn't required to be valid.
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 159 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 160 * - for try_to_wake_up(), called under p->pi_lock:
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 161 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 162 * This allows try_to_wake_up() to only take one rq->lock, see its comment.
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 163 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 164 * - for migration called under rq->lock:
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 165 * [ see task_on_rq_migrating() in task_rq_lock() ]
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 166 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 167 * o move_queued_task()
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 168 * o detach_task()
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 169 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 170 * - for migration called under double_rq_lock():
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 171 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 172 * o __migrate_swap_task()
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 173 * o push_rt_task() / pull_rt_task()
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 174 * o push_dl_task() / pull_dl_task()
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 175 * o dl_task_offline_migration()
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 176 *
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 177 */
58877d347b58c9 kernel/sched/core.c Peter Zijlstra 2020-07-02 178
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 179 /*
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 180 * __task_rq_lock - lock the rq @p resides on.
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 181 */
eb58075149b7f0 kernel/sched/core.c Peter Zijlstra 2015-07-31 182 struct rq *__task_rq_lock(struct task_struct *p, struct rq_flags *rf)
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 183 __acquires(rq->lock)
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 184 {
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 185 struct rq *rq;
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 186
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 187 lockdep_assert_held(&p->pi_lock);
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 188
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 189 for (;;) {
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 @190 rq = task_rq(p);
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 191 raw_spin_lock(&rq->lock);
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 192 if (likely(rq == task_rq(p) && !task_on_rq_migrating(p))) {
d8ac897137a230 kernel/sched/core.c Matt Fleming 2016-09-21 193 rq_pin_lock(rq, rf);
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 194 return rq;
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 195 }
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 196 raw_spin_unlock(&rq->lock);
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 197
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 198 while (unlikely(task_on_rq_migrating(p)))
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 199 cpu_relax();
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 200 }
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 201 }
3e71a462dd483c kernel/sched/core.c Peter Zijlstra 2016-04-28 202
:::::: The code at line 190 was first introduced by commit
:::::: 3e71a462dd483ce508a723356b293731e7d788ea sched/core: Move task_rq_lock() out of line
:::::: TO: Peter Zijlstra <peterz(a)infradead.org>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c:3194 cudbg_collect_flash() error: uninitialized symbol 'rc'.
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fb893de323e2d39f7a1f6df425703a2edbdf56ea
commit: 17b332f48074e7ee2169ee4268ced6274e1c95c3 cxgb4: add support to read serial flash
date: 8 weeks ago
config: parisc-randconfig-m031-20200811 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c:3194 cudbg_collect_flash() error: uninitialized symbol 'rc'.
Old smatch warnings:
drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c:3157 cudbg_collect_qdesc() error: uninitialized symbol 'rc'.
vim +/rc +3194 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c
3159
3160 int cudbg_collect_flash(struct cudbg_init *pdbg_init,
3161 struct cudbg_buffer *dbg_buff,
3162 struct cudbg_error *cudbg_err)
3163 {
3164 struct adapter *padap = pdbg_init->adap;
3165 u32 count = padap->params.sf_size, n;
3166 struct cudbg_buffer temp_buff = {0};
3167 u32 addr, i;
3168 int rc;
3169
3170 addr = FLASH_EXP_ROM_START;
3171
3172 for (i = 0; i < count; i += SF_PAGE_SIZE) {
3173 n = min_t(u32, count - i, SF_PAGE_SIZE);
3174
3175 rc = cudbg_get_buff(pdbg_init, dbg_buff, n, &temp_buff);
3176 if (rc) {
3177 cudbg_err->sys_warn = CUDBG_STATUS_PARTIAL_DATA;
3178 goto out;
3179 }
3180 rc = t4_read_flash(padap, addr, n, (u32 *)temp_buff.data, 0);
3181 if (rc)
3182 goto out;
3183
3184 addr += (n * 4);
3185 rc = cudbg_write_and_release_buff(pdbg_init, &temp_buff,
3186 dbg_buff);
3187 if (rc) {
3188 cudbg_err->sys_warn = CUDBG_STATUS_PARTIAL_DATA;
3189 goto out;
3190 }
3191 }
3192
3193 out:
> 3194 return rc;
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
arch/mips/include/asm/pgalloc.h:81:22: error: redefinition of 'pud_alloc_one'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fb893de323e2d39f7a1f6df425703a2edbdf56ea
commit: d9e8b929670b4f79e07cdbcb0fb4f162a561d5c6 asm-generic: pgalloc: provide generic pud_alloc_one() and pud_free_one()
date: 5 days ago
config: mips-randconfig-p001-20200812 (attached as .config)
compiler: mips64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout d9e8b929670b4f79e07cdbcb0fb4f162a561d5c6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/mips/mm/init.c:43:
>> arch/mips/include/asm/pgalloc.h:81:22: error: redefinition of 'pud_alloc_one'
81 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long address)
| ^~~~~~~~~~~~~
In file included from arch/mips/include/asm/pgalloc.h:18,
from arch/mips/mm/init.c:43:
include/asm-generic/pgalloc.h:160:22: note: previous definition of 'pud_alloc_one' was here
160 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
| ^~~~~~~~~~~~~
arch/mips/mm/init.c:61:6: warning: no previous prototype for 'setup_zero_pages' [-Wmissing-prototypes]
61 | void setup_zero_pages(void)
| ^~~~~~~~~~~~~~~~
--
In file included from arch/mips/mm/pgtable.c:9:
>> arch/mips/include/asm/pgalloc.h:81:22: error: redefinition of 'pud_alloc_one'
81 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long address)
| ^~~~~~~~~~~~~
In file included from arch/mips/include/asm/pgalloc.h:18,
from arch/mips/mm/pgtable.c:9:
include/asm-generic/pgalloc.h:160:22: note: previous definition of 'pud_alloc_one' was here
160 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
| ^~~~~~~~~~~~~
--
In file included from arch/mips/mm/pgtable-64.c:13:
>> arch/mips/include/asm/pgalloc.h:81:22: error: redefinition of 'pud_alloc_one'
81 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long address)
| ^~~~~~~~~~~~~
In file included from arch/mips/include/asm/pgalloc.h:18,
from arch/mips/mm/pgtable-64.c:13:
include/asm-generic/pgalloc.h:160:22: note: previous definition of 'pud_alloc_one' was here
160 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
| ^~~~~~~~~~~~~
arch/mips/mm/pgtable-64.c:90:7: warning: no previous prototype for 'mk_pmd' [-Wmissing-prototypes]
90 | pmd_t mk_pmd(struct page *page, pgprot_t prot)
| ^~~~~~
arch/mips/mm/pgtable-64.c:99:6: warning: no previous prototype for 'set_pmd_at' [-Wmissing-prototypes]
99 | void set_pmd_at(struct mm_struct *mm, unsigned long addr,
| ^~~~~~~~~~
vim +/pud_alloc_one +81 arch/mips/include/asm/pgalloc.h
3377e227af441a Alex Belits 2017-02-16 80
3377e227af441a Alex Belits 2017-02-16 @81 static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long address)
3377e227af441a Alex Belits 2017-02-16 82 {
3377e227af441a Alex Belits 2017-02-16 83 pud_t *pud;
3377e227af441a Alex Belits 2017-02-16 84
473738eb78c3e3 Michal Hocko 2017-07-12 85 pud = (pud_t *) __get_free_pages(GFP_KERNEL, PUD_ORDER);
3377e227af441a Alex Belits 2017-02-16 86 if (pud)
3377e227af441a Alex Belits 2017-02-16 87 pud_init((unsigned long)pud, (unsigned long)invalid_pmd_table);
3377e227af441a Alex Belits 2017-02-16 88 return pud;
3377e227af441a Alex Belits 2017-02-16 89 }
3377e227af441a Alex Belits 2017-02-16 90
:::::: The code at line 81 was first introduced by commit
:::::: 3377e227af441aff710726437adc20efc359fd9c MIPS: Add 48-bit VA space (and 4-level page tables) for 4K pages.
:::::: TO: Alex Belits <alex.belits(a)cavium.com>
:::::: CC: Ralf Baechle <ralf(a)linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[shenki:dev-5.8 102/137] drivers/peci/peci-core.c:1295:9: warning: Variable 'status' is reassigned a value before the old one has been used.
by kernel test robot
tree: https://github.com/shenki/linux dev-5.8
head: 4580132ac2faa1e58275527f06e99b6b92715fd5
commit: 90ddc4e972b53cb32bdc76a7180ede8b8c3797d2 [102/137] peci: Add support for PECI bus driver core
compiler: hppa-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> drivers/peci/peci-core.c:1295:9: warning: Variable 'status' is reassigned a value before the old one has been used. [redundantAssignment]
status = dev_pm_domain_attach(&client->dev, true);
^
drivers/peci/peci-core.c:1282:0: note: Variable 'status' is reassigned a value before the old one has been used.
int status = -EINVAL;
^
drivers/peci/peci-core.c:1295:9: note: Variable 'status' is reassigned a value before the old one has been used.
status = dev_pm_domain_attach(&client->dev, true);
^
>> drivers/peci/peci-core.c:1861:6: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
ret = device_add(&adapter->dev);
^
drivers/peci/peci-core.c:1843:0: note: Variable 'ret' is reassigned a value before the old one has been used.
int ret = -EINVAL;
^
drivers/peci/peci-core.c:1861:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = device_add(&adapter->dev);
^
vim +/status +1295 drivers/peci/peci-core.c
1277
1278 static int peci_device_probe(struct device *dev)
1279 {
1280 struct peci_client *client = peci_verify_client(dev);
1281 struct peci_driver *driver;
1282 int status = -EINVAL;
1283
1284 if (!client)
1285 return 0;
1286
1287 driver = to_peci_driver(dev->driver);
1288
1289 if (!driver->id_table &&
1290 !peci_of_match_device(dev->driver->of_match_table, client))
1291 return -ENODEV;
1292
1293 dev_dbg(dev, "%s: name:%s\n", __func__, client->name);
1294
> 1295 status = dev_pm_domain_attach(&client->dev, true);
1296 if (status == -EPROBE_DEFER)
1297 return status;
1298
1299 if (driver->probe)
1300 status = driver->probe(client);
1301 else
1302 status = -EINVAL;
1303
1304 if (status)
1305 goto err_detach_pm_domain;
1306
1307 return 0;
1308
1309 err_detach_pm_domain:
1310 dev_pm_domain_detach(&client->dev, true);
1311
1312 return status;
1313 }
1314
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [RFC PATCH v1 02/19] powerpc/ptrace: Move declaration of ptrace_get_reg() and ptrace_set_reg()
by kernel test robot
Hi Christophe,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on linus/master]
[also build test ERROR on v5.8 next-20200812]
[cannot apply to powerpc/next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Christophe-Leroy/powerpc-Switch-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fb893de323e2d39f7a1f6df425703a2edbdf56ea
config: powerpc64-randconfig-r004-20200812 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 30c1633386e7cfb01c0a54b31ccf4c3a3873e71b)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/kernel/ptrace/ptrace32.c:86:10: error: implicit declaration of function 'ptrace_get_reg' [-Werror,-Wimplicit-function-declaration]
ret = ptrace_get_reg(child, index, &tmp);
^
arch/powerpc/kernel/ptrace/ptrace32.c:141:10: error: implicit declaration of function 'ptrace_get_reg' [-Werror,-Wimplicit-function-declaration]
ret = ptrace_get_reg(child, numReg, &tmp2);
^
>> arch/powerpc/kernel/ptrace/ptrace32.c:190:10: error: implicit declaration of function 'ptrace_put_reg' [-Werror,-Wimplicit-function-declaration]
ret = ptrace_put_reg(child, index, data);
^
arch/powerpc/kernel/ptrace/ptrace32.c:230:10: error: implicit declaration of function 'ptrace_get_reg' [-Werror,-Wimplicit-function-declaration]
ret = ptrace_get_reg(child, numReg, &freg);
^
arch/powerpc/kernel/ptrace/ptrace32.c:237:10: error: implicit declaration of function 'ptrace_put_reg' [-Werror,-Wimplicit-function-declaration]
ret = ptrace_put_reg(child, numReg, freg);
^
5 errors generated.
vim +/ptrace_get_reg +86 arch/powerpc/kernel/ptrace/ptrace32.c
9c75a31c3525a1 arch/powerpc/kernel/ptrace32.c Michael Neuling 2008-06-26 35
81e695c026eeda arch/powerpc/kernel/ptrace32.c Roland McGrath 2007-12-20 36 long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
81e695c026eeda arch/powerpc/kernel/ptrace32.c Roland McGrath 2007-12-20 37 compat_ulong_t caddr, compat_ulong_t cdata)
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 38 {
81e695c026eeda arch/powerpc/kernel/ptrace32.c Roland McGrath 2007-12-20 39 unsigned long addr = caddr;
81e695c026eeda arch/powerpc/kernel/ptrace32.c Roland McGrath 2007-12-20 40 unsigned long data = cdata;
6b9c7ed8483775 arch/powerpc/kernel/ptrace32.c Christoph Hellwig 2006-01-08 41 int ret;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 42
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 43 switch (request) {
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 44 /*
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 45 * Read 4 bytes of the other process' storage
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 46 * data is a pointer specifying where the user wants the
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 47 * 4 bytes copied into
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 48 * addr is a pointer in the user's storage that contains an 8 byte
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 49 * address in the other process of the 4 bytes that is to be read
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 50 * (this is run in a 32-bit process looking at a 64-bit process)
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 51 * when I and D space are separate, these will need to be fixed.
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 52 */
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 53 case PPC_PTRACE_PEEKTEXT_3264:
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 54 case PPC_PTRACE_PEEKDATA_3264: {
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 55 u32 tmp;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 56 int copied;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 57 u32 __user * addrOthers;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 58
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 59 ret = -EIO;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 60
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 61 /* Get the addr in the other process that we want to read */
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 62 if (get_user(addrOthers, (u32 __user * __user *)addr) != 0)
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 63 break;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 64
84d77d3f06e7e8 arch/powerpc/kernel/ptrace32.c Eric W. Biederman 2016-11-22 65 copied = ptrace_access_vm(child, (u64)addrOthers, &tmp,
f307ab6dcea03f arch/powerpc/kernel/ptrace32.c Lorenzo Stoakes 2016-10-13 66 sizeof(tmp), FOLL_FORCE);
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 67 if (copied != sizeof(tmp))
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 68 break;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 69 ret = put_user(tmp, (u32 __user *)data);
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 70 break;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 71 }
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 72
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 73 /* Read a register (specified by ADDR) out of the "user area" */
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 74 case PTRACE_PEEKUSR: {
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 75 int index;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 76 unsigned long tmp;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 77
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 78 ret = -EIO;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 79 /* convert to index and check */
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 80 index = (unsigned long) addr >> 2;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 81 if ((addr & 3) || (index > PT_FPSCR32))
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 82 break;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 83
fabca2c0a461bd arch/powerpc/kernel/ptrace32.c Roland McGrath 2007-09-25 84 CHECK_FULL_REGS(child->thread.regs);
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 85 if (index < PT_FPR0) {
ee4a3916614829 arch/powerpc/kernel/ptrace32.c Alexey Kardashevskiy 2013-02-14 @86 ret = ptrace_get_reg(child, index, &tmp);
ee4a3916614829 arch/powerpc/kernel/ptrace32.c Alexey Kardashevskiy 2013-02-14 87 if (ret)
ee4a3916614829 arch/powerpc/kernel/ptrace32.c Alexey Kardashevskiy 2013-02-14 88 break;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 89 } else {
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 90 flush_fp_to_thread(child);
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 91 /*
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 92 * the user space code considers the floating point
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 93 * to be an array of unsigned int (32 bits) - the
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 94 * index passed in is based on this assumption.
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 95 */
de79f7b9f6f92e arch/powerpc/kernel/ptrace32.c Paul Mackerras 2013-09-10 96 tmp = ((unsigned int *)child->thread.fp_state.fpr)
9c75a31c3525a1 arch/powerpc/kernel/ptrace32.c Michael Neuling 2008-06-26 97 [FPRINDEX(index)];
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 98 }
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 99 ret = put_user((unsigned int)tmp, (u32 __user *)data);
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 100 break;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 101 }
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 102
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 103 /*
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 104 * Read 4 bytes out of the other process' pt_regs area
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 105 * data is a pointer specifying where the user wants the
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 106 * 4 bytes copied into
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 107 * addr is the offset into the other process' pt_regs structure
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 108 * that is to be read
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 109 * (this is run in a 32-bit process looking at a 64-bit process)
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 110 */
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 111 case PPC_PTRACE_PEEKUSR_3264: {
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 112 u32 index;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 113 u32 reg32bits;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 114 u64 tmp;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 115 u32 numReg;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 116 u32 part;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 117
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 118 ret = -EIO;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 119 /* Determine which register the user wants */
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 120 index = (u64)addr >> 2;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 121 numReg = index / 2;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 122 /* Determine which part of the register the user wants */
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 123 if (index % 2)
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 124 part = 1; /* want the 2nd half of the register (right-most). */
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 125 else
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 126 part = 0; /* want the 1st half of the register (left-most). */
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 127
912000e73ee8fc arch/powerpc/kernel/ptrace32.c Benjamin Herrenschmidt 2007-06-04 128 /* Validate the input - check to see if address is on the wrong boundary
912000e73ee8fc arch/powerpc/kernel/ptrace32.c Benjamin Herrenschmidt 2007-06-04 129 * or beyond the end of the user area
912000e73ee8fc arch/powerpc/kernel/ptrace32.c Benjamin Herrenschmidt 2007-06-04 130 */
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 131 if ((addr & 3) || numReg > PT_FPSCR)
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 132 break;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 133
fabca2c0a461bd arch/powerpc/kernel/ptrace32.c Roland McGrath 2007-09-25 134 CHECK_FULL_REGS(child->thread.regs);
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 135 if (numReg >= PT_FPR0) {
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 136 flush_fp_to_thread(child);
bc826666e4252f arch/powerpc/kernel/ptrace32.c Michael Neuling 2009-04-05 137 /* get 64 bit FPR */
de79f7b9f6f92e arch/powerpc/kernel/ptrace32.c Paul Mackerras 2013-09-10 138 tmp = child->thread.fp_state.fpr[numReg - PT_FPR0][0];
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 139 } else { /* register within PT_REGS struct */
ee4a3916614829 arch/powerpc/kernel/ptrace32.c Alexey Kardashevskiy 2013-02-14 140 unsigned long tmp2;
ee4a3916614829 arch/powerpc/kernel/ptrace32.c Alexey Kardashevskiy 2013-02-14 141 ret = ptrace_get_reg(child, numReg, &tmp2);
ee4a3916614829 arch/powerpc/kernel/ptrace32.c Alexey Kardashevskiy 2013-02-14 142 if (ret)
ee4a3916614829 arch/powerpc/kernel/ptrace32.c Alexey Kardashevskiy 2013-02-14 143 break;
ee4a3916614829 arch/powerpc/kernel/ptrace32.c Alexey Kardashevskiy 2013-02-14 144 tmp = tmp2;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 145 }
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 146 reg32bits = ((u32*)&tmp)[part];
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 147 ret = put_user(reg32bits, (u32 __user *)data);
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 148 break;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 149 }
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 150
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 151 /*
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 152 * Write 4 bytes into the other process' storage
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 153 * data is the 4 bytes that the user wants written
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 154 * addr is a pointer in the user's storage that contains an
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 155 * 8 byte address in the other process where the 4 bytes
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 156 * that is to be written
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 157 * (this is run in a 32-bit process looking at a 64-bit process)
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 158 * when I and D space are separate, these will need to be fixed.
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 159 */
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 160 case PPC_PTRACE_POKETEXT_3264:
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 161 case PPC_PTRACE_POKEDATA_3264: {
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 162 u32 tmp = data;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 163 u32 __user * addrOthers;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 164
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 165 /* Get the addr in the other process that we want to write into */
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 166 ret = -EIO;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 167 if (get_user(addrOthers, (u32 __user * __user *)addr) != 0)
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 168 break;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 169 ret = 0;
84d77d3f06e7e8 arch/powerpc/kernel/ptrace32.c Eric W. Biederman 2016-11-22 170 if (ptrace_access_vm(child, (u64)addrOthers, &tmp,
f307ab6dcea03f arch/powerpc/kernel/ptrace32.c Lorenzo Stoakes 2016-10-13 171 sizeof(tmp),
f307ab6dcea03f arch/powerpc/kernel/ptrace32.c Lorenzo Stoakes 2016-10-13 172 FOLL_FORCE | FOLL_WRITE) == sizeof(tmp))
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 173 break;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 174 ret = -EIO;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 175 break;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 176 }
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 177
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 178 /* write the word at location addr in the USER area */
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 179 case PTRACE_POKEUSR: {
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 180 unsigned long index;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 181
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 182 ret = -EIO;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 183 /* convert to index and check */
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 184 index = (unsigned long) addr >> 2;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 185 if ((addr & 3) || (index > PT_FPSCR32))
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 186 break;
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 187
fabca2c0a461bd arch/powerpc/kernel/ptrace32.c Roland McGrath 2007-09-25 188 CHECK_FULL_REGS(child->thread.regs);
^1da177e4c3f41 arch/ppc64/kernel/ptrace32.c Linus Torvalds 2005-04-16 189 if (index < PT_FPR0) {
865418d8e78b9c arch/powerpc/kernel/ptrace32.c Benjamin Herrenschmidt 2007-06-04 @190 ret = ptrace_put_reg(child, index, data);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[alexshi:lrunext 27/27] include/linux/pageblock-flags.h:88:1: warning: no return statement in function returning non-void
by kernel test robot
tree: https://github.com/alexshi/linux.git lrunext
head: 48d2e577853193ef6e4fa1e714fe0d333a26fa38
commit: 48d2e577853193ef6e4fa1e714fe0d333a26fa38 [27/27] mm/compaction: skip compaction if any skip bit found in pageblock
config: c6x-randconfig-r003-20200812 (attached as .config)
compiler: c6x-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 48d2e577853193ef6e4fa1e714fe0d333a26fa38
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=c6x
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/mmzone.h:18,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from lib//btree.c:43:
include/linux/pageblock-flags.h: In function 'set_pageblock_skip':
>> include/linux/pageblock-flags.h:88:1: warning: no return statement in function returning non-void [-Wreturn-type]
88 | }
| ^
--
In file included from include/linux/mmzone.h:18,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from lib//lzo/lzo1x_compress.c:15:
include/linux/pageblock-flags.h: In function 'set_pageblock_skip':
>> include/linux/pageblock-flags.h:88:1: warning: no return statement in function returning non-void [-Wreturn-type]
88 | }
| ^
lib//lzo/lzo1x_compress.c: At top level:
lib//lzo/lzo1x_compress.c:304:5: warning: no previous prototype for 'lzogeneric1x_1_compress' [-Wmissing-prototypes]
304 | int lzogeneric1x_1_compress(const unsigned char *in, size_t in_len,
| ^~~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/mmzone.h:18,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from lib//zstd/compress.c:25:
include/linux/pageblock-flags.h: In function 'set_pageblock_skip':
>> include/linux/pageblock-flags.h:88:1: warning: no return statement in function returning non-void [-Wreturn-type]
88 | }
| ^
lib//zstd/compress.c: At top level:
lib//zstd/compress.c:434:8: warning: no previous prototype for 'ZSTD_noCompressBlock' [-Wmissing-prototypes]
434 | size_t ZSTD_noCompressBlock(void *dst, size_t dstCapacity, const void *src, size_t srcSize)
| ^~~~~~~~~~~~~~~~~~~~
lib//zstd/compress.c:2252:6: warning: no previous prototype for 'ZSTD_compressBlock_greedy_extDict' [-Wmissing-prototypes]
2252 | void ZSTD_compressBlock_greedy_extDict(ZSTD_CCtx *ctx, const void *src, size_t srcSize) { ZSTD_compressBlock_lazy_extDict_generic(ctx, src, srcSize, 0, 0); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib//zstd/compress.c:2982:15: warning: no previous prototype for 'ZSTD_createCStream_advanced' [-Wmissing-prototypes]
2982 | ZSTD_CStream *ZSTD_createCStream_advanced(ZSTD_customMem customMem)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from lib//zstd/compress.c:23:
lib//zstd/zstd_internal.h:83:21: warning: 'ZSTD_did_fieldSize' defined but not used [-Wunused-const-variable=]
83 | static const size_t ZSTD_did_fieldSize[4] = {0, 1, 2, 4};
| ^~~~~~~~~~~~~~~~~~
lib//zstd/zstd_internal.h:82:21: warning: 'ZSTD_fcs_fieldSize' defined but not used [-Wunused-const-variable=]
82 | static const size_t ZSTD_fcs_fieldSize[4] = {0, 2, 4, 8};
| ^~~~~~~~~~~~~~~~~~
In file included from lib//zstd/error_private.h:26,
from lib//zstd/bitstream.h:53,
from lib//zstd/fse.h:228,
from lib//zstd/compress.c:20:
include/linux/zstd.h:798:21: warning: 'ZSTD_skippableHeaderSize' defined but not used [-Wunused-const-variable=]
798 | static const size_t ZSTD_skippableHeaderSize = 8;
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/zstd.h:795:21: warning: 'ZSTD_frameHeaderSize_min' defined but not used [-Wunused-const-variable=]
795 | static const size_t ZSTD_frameHeaderSize_min = ZSTD_FRAMEHEADERSIZE_MIN;
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/zstd.h:794:21: warning: 'ZSTD_frameHeaderSize_prefix' defined but not used [-Wunused-const-variable=]
794 | static const size_t ZSTD_frameHeaderSize_prefix = 5;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/mmzone.h:18,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from lib//zstd/decompress.c:37:
include/linux/pageblock-flags.h: In function 'set_pageblock_skip':
>> include/linux/pageblock-flags.h:88:1: warning: no return statement in function returning non-void [-Wreturn-type]
88 | }
| ^
lib//zstd/decompress.c: At top level:
lib//zstd/decompress.c:126:12: warning: no previous prototype for 'ZSTD_createDCtx_advanced' [-Wmissing-prototypes]
126 | ZSTD_DCtx *ZSTD_createDCtx_advanced(ZSTD_customMem customMem)
| ^~~~~~~~~~~~~~~~~~~~~~~~
lib//zstd/decompress.c:394:8: warning: no previous prototype for 'ZSTD_getcBlockSize' [-Wmissing-prototypes]
394 | size_t ZSTD_getcBlockSize(const void *src, size_t srcSize, blockProperties_t *bpPtr)
| ^~~~~~~~~~~~~~~~~~
lib//zstd/decompress.c:432:8: warning: no previous prototype for 'ZSTD_decodeLiteralsBlock' [-Wmissing-prototypes]
432 | size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx *dctx, const void *src, size_t srcSize) /* note : srcSize < BLOCKSIZE */
| ^~~~~~~~~~~~~~~~~~~~~~~~
lib//zstd/decompress.c:794:8: warning: no previous prototype for 'ZSTD_decodeSeqHeaders' [-Wmissing-prototypes]
794 | size_t ZSTD_decodeSeqHeaders(ZSTD_DCtx *dctx, int *nbSeqPtr, const void *src, size_t srcSize)
| ^~~~~~~~~~~~~~~~~~~~~
lib//zstd/decompress.c:1497:8: warning: no previous prototype for 'ZSTD_generateNxBytes' [-Wmissing-prototypes]
1497 | size_t ZSTD_generateNxBytes(void *dst, size_t dstCapacity, BYTE byte, size_t length)
| ^~~~~~~~~~~~~~~~~~~~
In file included from lib//zstd/decompress.c:35:
lib//zstd/zstd_internal.h:124:18: warning: 'OF_defaultNormLog' defined but not used [-Wunused-const-variable=]
124 | static const U32 OF_defaultNormLog = OF_DEFAULTNORMLOG;
| ^~~~~~~~~~~~~~~~~
lib//zstd/zstd_internal.h:122:18: warning: 'OF_defaultNorm' defined but not used [-Wunused-const-variable=]
122 | static const S16 OF_defaultNorm[MaxOff + 1] = {1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1};
| ^~~~~~~~~~~~~~
lib//zstd/zstd_internal.h:120:18: warning: 'ML_defaultNormLog' defined but not used [-Wunused-const-variable=]
120 | static const U32 ML_defaultNormLog = ML_DEFAULTNORMLOG;
| ^~~~~~~~~~~~~~~~~
lib//zstd/zstd_internal.h:117:18: warning: 'ML_defaultNorm' defined but not used [-Wunused-const-variable=]
117 | static const S16 ML_defaultNorm[MaxML + 1] = {1, 4, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
| ^~~~~~~~~~~~~~
lib//zstd/zstd_internal.h:113:18: warning: 'LL_defaultNormLog' defined but not used [-Wunused-const-variable=]
113 | static const U32 LL_defaultNormLog = LL_DEFAULTNORMLOG;
| ^~~~~~~~~~~~~~~~~
lib//zstd/zstd_internal.h:111:18: warning: 'LL_defaultNorm' defined but not used [-Wunused-const-variable=]
111 | static const S16 LL_defaultNorm[MaxLL + 1] = {4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 1, 1, 1, 1, -1, -1, -1, -1};
| ^~~~~~~~~~~~~~
--
In file included from include/linux/mmzone.h:18,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from include/kunit/test.h:15,
from lib//kunit/test.c:9:
include/linux/pageblock-flags.h: In function 'set_pageblock_skip':
>> include/linux/pageblock-flags.h:88:1: warning: no return statement in function returning non-void [-Wreturn-type]
88 | }
| ^
lib//kunit/test.c: In function 'kunit_log_append':
lib//kunit/test.c:51:2: warning: function 'kunit_log_append' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
51 | vsnprintf(line, sizeof(line), fmt, args);
| ^~~~~~~~~
--
In file included from include/linux/mmzone.h:18,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from include/kunit/test.h:15,
from lib//kunit/string-stream.c:9:
include/linux/pageblock-flags.h: In function 'set_pageblock_skip':
>> include/linux/pageblock-flags.h:88:1: warning: no return statement in function returning non-void [-Wreturn-type]
88 | }
| ^
lib//kunit/string-stream.c: In function 'string_stream_vadd':
lib//kunit/string-stream.c:85:2: warning: function 'string_stream_vadd' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
85 | len = vsnprintf(NULL, 0, fmt, args_for_counting) + 1;
| ^~~
lib//kunit/string-stream.c:95:2: warning: function 'string_stream_vadd' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
95 | len = vsnprintf(frag_container->fragment, len, fmt, args);
| ^~~
--
In file included from include/linux/mmzone.h:18,
from include/linux/gfp.h:6,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/fs.h:15,
from include/linux/debugfs.h:15,
from lib//kunit/debugfs.c:7:
include/linux/pageblock-flags.h: In function 'set_pageblock_skip':
>> include/linux/pageblock-flags.h:88:1: warning: no return statement in function returning non-void [-Wreturn-type]
88 | }
| ^
lib//kunit/debugfs.c: At top level:
lib//kunit/debugfs.c:28:6: warning: no previous prototype for 'kunit_debugfs_cleanup' [-Wmissing-prototypes]
28 | void kunit_debugfs_cleanup(void)
| ^~~~~~~~~~~~~~~~~~~~~
lib//kunit/debugfs.c:33:6: warning: no previous prototype for 'kunit_debugfs_init' [-Wmissing-prototypes]
33 | void kunit_debugfs_init(void)
| ^~~~~~~~~~~~~~~~~~
lib//kunit/debugfs.c:92:6: warning: no previous prototype for 'kunit_debugfs_create_suite' [-Wmissing-prototypes]
92 | void kunit_debugfs_create_suite(struct kunit_suite *suite)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
lib//kunit/debugfs.c:108:6: warning: no previous prototype for 'kunit_debugfs_destroy_suite' [-Wmissing-prototypes]
108 | void kunit_debugfs_destroy_suite(struct kunit_suite *suite)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +88 include/linux/pageblock-flags.h
835c134ec4dd755 Mel Gorman 2007-10-16 56
dc4b0caff24d9b2 Mel Gorman 2014-06-04 57 unsigned long get_pfnblock_flags_mask(struct page *page,
dc4b0caff24d9b2 Mel Gorman 2014-06-04 58 unsigned long pfn,
e58469bafd0524e Mel Gorman 2014-06-04 59 unsigned long mask);
dc4b0caff24d9b2 Mel Gorman 2014-06-04 60
48d2e577853193e Alex Shi 2020-08-12 61 bool set_pfnblock_flags_mask(struct page *page,
e58469bafd0524e Mel Gorman 2014-06-04 62 unsigned long flags,
dc4b0caff24d9b2 Mel Gorman 2014-06-04 63 unsigned long pfn,
e58469bafd0524e Mel Gorman 2014-06-04 64 unsigned long mask);
e58469bafd0524e Mel Gorman 2014-06-04 65
835c134ec4dd755 Mel Gorman 2007-10-16 66 /* Declarations for getting and setting flags. See mm/page_alloc.c */
bb13ffeb9f6bfeb Mel Gorman 2012-10-08 67 #ifdef CONFIG_COMPACTION
bb13ffeb9f6bfeb Mel Gorman 2012-10-08 68 #define get_pageblock_skip(page) \
490dec8720a68a0 Wei Yang 2020-08-01 69 get_pfnblock_flags_mask(page, page_to_pfn(page), \
1dc78a9e4667486 Wei Yang 2020-08-01 70 (1 << (PB_migrate_skip)))
bb13ffeb9f6bfeb Mel Gorman 2012-10-08 71 #define clear_pageblock_skip(page) \
490dec8720a68a0 Wei Yang 2020-08-01 72 set_pfnblock_flags_mask(page, 0, page_to_pfn(page), \
1dc78a9e4667486 Wei Yang 2020-08-01 73 (1 << PB_migrate_skip))
bb13ffeb9f6bfeb Mel Gorman 2012-10-08 74 #define set_pageblock_skip(page) \
490dec8720a68a0 Wei Yang 2020-08-01 75 set_pfnblock_flags_mask(page, (1 << PB_migrate_skip), \
490dec8720a68a0 Wei Yang 2020-08-01 76 page_to_pfn(page), \
1dc78a9e4667486 Wei Yang 2020-08-01 77 (1 << PB_migrate_skip))
21dc7e023611fbc David Rientjes 2017-11-17 78 #else
21dc7e023611fbc David Rientjes 2017-11-17 79 static inline bool get_pageblock_skip(struct page *page)
21dc7e023611fbc David Rientjes 2017-11-17 80 {
21dc7e023611fbc David Rientjes 2017-11-17 81 return false;
21dc7e023611fbc David Rientjes 2017-11-17 82 }
21dc7e023611fbc David Rientjes 2017-11-17 83 static inline void clear_pageblock_skip(struct page *page)
21dc7e023611fbc David Rientjes 2017-11-17 84 {
21dc7e023611fbc David Rientjes 2017-11-17 85 }
48d2e577853193e Alex Shi 2020-08-12 86 static inline bool set_pageblock_skip(struct page *page)
21dc7e023611fbc David Rientjes 2017-11-17 87 {
21dc7e023611fbc David Rientjes 2017-11-17 @88 }
bb13ffeb9f6bfeb Mel Gorman 2012-10-08 89 #endif /* CONFIG_COMPACTION */
bb13ffeb9f6bfeb Mel Gorman 2012-10-08 90
:::::: The code at line 88 was first introduced by commit
:::::: 21dc7e023611fbcf8e38f255731bcf3cc38e7638 mm, compaction: persistently skip hugetlbfs pageblocks
:::::: TO: David Rientjes <rientjes(a)google.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[habanaai:habanalabs-fixes 11/13] drivers/misc/habanalabs/common/firmware_if.c:54:4: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'}
by kernel test robot
tree: https://github.com/HabanaAI/linux.git habanalabs-fixes
head: 3a5e2fb31a2173b4ac9452009019c4d999a84744
commit: 4fdf88733ace4960aeea805f4f3213891691d9f4 [11/13] habanalabs: validate FW file size
config: arc-randconfig-r026-20200811 (attached as .config)
compiler: arc-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 4fdf88733ace4960aeea805f4f3213891691d9f4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/cdev.h:8,
from drivers/misc/habanalabs/common/habanalabs.h:15,
from drivers/misc/habanalabs/common/firmware_if.c:8:
drivers/misc/habanalabs/common/firmware_if.c: In function 'hl_fw_load_fw_to_device':
>> drivers/misc/habanalabs/common/firmware_if.c:54:4: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
54 | "FW file size %lu exceeds maximum of %u bytes\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/misc/habanalabs/common/firmware_if.c:53:3: note: in expansion of macro 'dev_err'
53 | dev_err(hdev->dev,
| ^~~~~~~
drivers/misc/habanalabs/common/firmware_if.c:54:20: note: format string is defined here
54 | "FW file size %lu exceeds maximum of %u bytes\n",
| ~~^
| |
| long unsigned int
| %u
vim +54 drivers/misc/habanalabs/common/firmware_if.c
15
16 #define FW_FILE_MAX_SIZE 0x1400000 /* maximum size of 20MB */
17 /**
18 * hl_fw_load_fw_to_device() - Load F/W code to device's memory.
19 *
20 * @hdev: pointer to hl_device structure.
21 * @fw_name: the firmware image name
22 * @dst: IO memory mapped address space to copy firmware to
23 *
24 * Copy fw code from firmware file to device memory.
25 *
26 * Return: 0 on success, non-zero for failure.
27 */
28 int hl_fw_load_fw_to_device(struct hl_device *hdev, const char *fw_name,
29 void __iomem *dst)
30 {
31 const struct firmware *fw;
32 const u64 *fw_data;
33 size_t fw_size;
34 int rc;
35
36 rc = request_firmware(&fw, fw_name, hdev->dev);
37 if (rc) {
38 dev_err(hdev->dev, "Firmware file %s is not found!\n", fw_name);
39 goto out;
40 }
41
42 fw_size = fw->size;
43 if ((fw_size % 4) != 0) {
44 dev_err(hdev->dev, "Illegal %s firmware size %zu\n",
45 fw_name, fw_size);
46 rc = -EINVAL;
47 goto out;
48 }
49
50 dev_dbg(hdev->dev, "%s firmware size == %zu\n", fw_name, fw_size);
51
52 if (fw_size > FW_FILE_MAX_SIZE) {
53 dev_err(hdev->dev,
> 54 "FW file size %lu exceeds maximum of %u bytes\n",
55 fw_size, FW_FILE_MAX_SIZE);
56 rc = -EINVAL;
57 goto out;
58 }
59
60 fw_data = (const u64 *) fw->data;
61
62 memcpy_toio(dst, fw_data, fw_size);
63
64 out:
65 release_firmware(fw);
66 return rc;
67 }
68
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month