drivers/clocksource/timer-pistachio.c:74:22: warning: variable 'overflow' set but not used
by kernel test robot
Hi Drew,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: debe436e77c72fcee804fb867f275e6d31aa999c
commit: a47d7ef4550d08fb428ea4c3f1a9c71674212208 clocksource/drivers/pistachio: Fix trivial typo
date: 7 months ago
config: mips-randconfig-r012-20210927 (attached as .config)
compiler: mips-linux-gcc (GCC) 11.2.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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a47d7ef4550d08fb428ea4c3f1a9c71674212208
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.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 warnings (new ones prefixed by >>):
drivers/clocksource/timer-pistachio.c: In function 'pistachio_clocksource_read_cycles':
>> drivers/clocksource/timer-pistachio.c:74:22: warning: variable 'overflow' set but not used [-Wunused-but-set-variable]
74 | u32 counter, overflow;
| ^~~~~~~~
vim +/overflow +74 drivers/clocksource/timer-pistachio.c
69
70 static u64 notrace
71 pistachio_clocksource_read_cycles(struct clocksource *cs)
72 {
73 struct pistachio_clocksource *pcs = to_pistachio_clocksource(cs);
> 74 u32 counter, overflow;
75 unsigned long flags;
76
77 /*
78 * The counter value is only refreshed after the overflow value is read.
79 * And they must be read in strict order, hence raw spin lock added.
80 */
81
82 raw_spin_lock_irqsave(&pcs->lock, flags);
83 overflow = gpt_readl(pcs->base, TIMER_CURRENT_OVERFLOW_VALUE, 0);
84 counter = gpt_readl(pcs->base, TIMER_CURRENT_VALUE, 0);
85 raw_spin_unlock_irqrestore(&pcs->lock, flags);
86
87 return (u64)~counter;
88 }
89
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/gpu/drm/ttm/ttm_range_manager.c:144: warning: expecting prototype for ttm_range_man_init(). Prototype was for ttm_range_man_init_nocheck() instead
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: 617d5b34f22c66fe9fc9f150be27f5de1b87ca15 drm/ttm: Try to check if new ttm man out of bounds during compile
date: 9 weeks ago
config: x86_64-randconfig-a014-20210927 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 617d5b34f22c66fe9fc9f150be27f5de1b87ca15
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/ttm/ kernel/locking/
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 >>):
>> drivers/gpu/drm/ttm/ttm_range_manager.c:144: warning: expecting prototype for ttm_range_man_init(). Prototype was for ttm_range_man_init_nocheck() instead
>> drivers/gpu/drm/ttm/ttm_range_manager.c:178: warning: expecting prototype for ttm_range_man_fini(). Prototype was for ttm_range_man_fini_nocheck() instead
vim +144 drivers/gpu/drm/ttm/ttm_range_manager.c
98399abd52b234 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 129
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 130 /**
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 131 * ttm_range_man_init
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 132 *
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 133 * @bdev: ttm device
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 134 * @type: memory manager type
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 135 * @use_tt: if the memory manager uses tt
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 136 * @p_size: size of area to be managed in pages.
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 137 *
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 138 * Initialise a generic range manager for the selected memory type.
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 139 * The range manager is installed for this device in the type slot.
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 140 */
617d5b34f22c66 drivers/gpu/drm/ttm/ttm_range_manager.c xinhui pan 2021-09-13 141 int ttm_range_man_init_nocheck(struct ttm_device *bdev,
9c3006a4cc1b16 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2020-09-11 142 unsigned type, bool use_tt,
d961db75ce86a8 drivers/gpu/drm/ttm/ttm_bo_manager.c Ben Skeggs 2010-08-05 143 unsigned long p_size)
d961db75ce86a8 drivers/gpu/drm/ttm/ttm_bo_manager.c Ben Skeggs 2010-08-05 @144 {
9de59bc201496f drivers/gpu/drm/ttm/ttm_range_manager.c Dave Airlie 2020-08-04 145 struct ttm_resource_manager *man;
d7a67cb16238ab drivers/gpu/drm/ttm/ttm_bo_manager.c Thomas Hellstrom 2010-10-29 146 struct ttm_range_manager *rman;
d961db75ce86a8 drivers/gpu/drm/ttm/ttm_bo_manager.c Ben Skeggs 2010-08-05 147
d7a67cb16238ab drivers/gpu/drm/ttm/ttm_bo_manager.c Thomas Hellstrom 2010-10-29 148 rman = kzalloc(sizeof(*rman), GFP_KERNEL);
d7a67cb16238ab drivers/gpu/drm/ttm/ttm_bo_manager.c Thomas Hellstrom 2010-10-29 149 if (!rman)
d961db75ce86a8 drivers/gpu/drm/ttm/ttm_bo_manager.c Ben Skeggs 2010-08-05 150 return -ENOMEM;
d961db75ce86a8 drivers/gpu/drm/ttm/ttm_bo_manager.c Ben Skeggs 2010-08-05 151
3a1fc38edac75d drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 152 man = &rman->manager;
3a1fc38edac75d drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 153 man->use_tt = use_tt;
3a1fc38edac75d drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 154
80938c28ee67ba drivers/gpu/drm/ttm/ttm_range_manager.c Dave Airlie 2020-08-04 155 man->func = &ttm_range_manager_func;
37205891d84f92 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 156
9de59bc201496f drivers/gpu/drm/ttm/ttm_range_manager.c Dave Airlie 2020-08-04 157 ttm_resource_manager_init(man, p_size);
37205891d84f92 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 158
77ef8bbc87be7a drivers/gpu/drm/ttm/ttm_bo_manager.c David Herrmann 2013-07-01 159 drm_mm_init(&rman->mm, 0, p_size);
d7a67cb16238ab drivers/gpu/drm/ttm/ttm_bo_manager.c Thomas Hellstrom 2010-10-29 160 spin_lock_init(&rman->lock);
d961db75ce86a8 drivers/gpu/drm/ttm/ttm_bo_manager.c Ben Skeggs 2010-08-05 161
3a1fc38edac75d drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 162 ttm_set_driver_manager(bdev, type, &rman->manager);
9de59bc201496f drivers/gpu/drm/ttm/ttm_range_manager.c Dave Airlie 2020-08-04 163 ttm_resource_manager_set_used(man, true);
3c90424bd7df15 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 164 return 0;
3c90424bd7df15 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 165 }
617d5b34f22c66 drivers/gpu/drm/ttm/ttm_range_manager.c xinhui pan 2021-09-13 166 EXPORT_SYMBOL(ttm_range_man_init_nocheck);
3c90424bd7df15 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 167
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 168 /**
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 169 * ttm_range_man_fini
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 170 *
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 171 * @bdev: ttm device
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 172 * @type: memory manager type
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 173 *
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 174 * Remove the generic range manager from a slot and tear it down.
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 175 */
617d5b34f22c66 drivers/gpu/drm/ttm/ttm_range_manager.c xinhui pan 2021-09-13 176 int ttm_range_man_fini_nocheck(struct ttm_device *bdev,
37205891d84f92 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 177 unsigned type)
56ee8b1c71ffb5 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 @178 {
:::::: The code at line 144 was first introduced by commit
:::::: d961db75ce86a84f1f04e91ad1014653ed7d9f46 drm/ttm: restructure to allow driver to plug in alternate memory manager
:::::: TO: Ben Skeggs <bskeggs(a)redhat.com>
:::::: CC: Ben Skeggs <bskeggs(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [PATCH V3 4/4] mm/damon: Remove some no need func definitions in damon.h file
by kernel test robot
Hi Xin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on hnaz-mm/master]
url: https://github.com/0day-ci/linux/commits/Xin-Hao/mm-damon-Do-some-small-c...
base: https://github.com/hnaz/linux-mm master
config: hexagon-randconfig-r041-20211115 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project fbe72e41b99dc7994daac300d208a955be3e4a0a)
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
# https://github.com/0day-ci/linux/commit/c9ed99dc122a1b52e3d9591ed817ccc82...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Xin-Hao/mm-damon-Do-some-small-changes/20211113-000614
git checkout c9ed99dc122a1b52e3d9591ed817ccc826b08de0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
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 >>):
>> mm/damon/vaddr.c:274:6: warning: no previous prototype for function 'damon_va_init' [-Wmissing-prototypes]
void damon_va_init(struct damon_ctx *ctx)
^
mm/damon/vaddr.c:274:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void damon_va_init(struct damon_ctx *ctx)
^
static
>> mm/damon/vaddr.c:358:6: warning: no previous prototype for function 'damon_va_update' [-Wmissing-prototypes]
void damon_va_update(struct damon_ctx *ctx)
^
mm/damon/vaddr.c:358:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void damon_va_update(struct damon_ctx *ctx)
^
static
>> mm/damon/vaddr.c:420:6: warning: no previous prototype for function 'damon_va_prepare_access_checks' [-Wmissing-prototypes]
void damon_va_prepare_access_checks(struct damon_ctx *ctx)
^
mm/damon/vaddr.c:420:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void damon_va_prepare_access_checks(struct damon_ctx *ctx)
^
static
>> mm/damon/vaddr.c:541:14: warning: no previous prototype for function 'damon_va_check_accesses' [-Wmissing-prototypes]
unsigned int damon_va_check_accesses(struct damon_ctx *ctx)
^
mm/damon/vaddr.c:541:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
unsigned int damon_va_check_accesses(struct damon_ctx *ctx)
^
static
>> mm/damon/vaddr.c:605:5: warning: no previous prototype for function 'damon_va_apply_scheme' [-Wmissing-prototypes]
int damon_va_apply_scheme(struct damon_ctx *ctx, struct damon_target *t,
^
mm/damon/vaddr.c:605:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int damon_va_apply_scheme(struct damon_ctx *ctx, struct damon_target *t,
^
static
>> mm/damon/vaddr.c:636:5: warning: no previous prototype for function 'damon_va_scheme_score' [-Wmissing-prototypes]
int damon_va_scheme_score(struct damon_ctx *context, struct damon_target *t,
^
mm/damon/vaddr.c:636:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int damon_va_scheme_score(struct damon_ctx *context, struct damon_target *t,
^
static
6 warnings generated.
vim +/damon_va_init +274 mm/damon/vaddr.c
3f49584b262cf8 SeongJae Park 2021-09-07 272
3f49584b262cf8 SeongJae Park 2021-09-07 273 /* Initialize '->regions_list' of every target (task) */
3f49584b262cf8 SeongJae Park 2021-09-07 @274 void damon_va_init(struct damon_ctx *ctx)
3f49584b262cf8 SeongJae Park 2021-09-07 275 {
3f49584b262cf8 SeongJae Park 2021-09-07 276 struct damon_target *t;
3f49584b262cf8 SeongJae Park 2021-09-07 277
3f49584b262cf8 SeongJae Park 2021-09-07 278 damon_for_each_target(t, ctx) {
3f49584b262cf8 SeongJae Park 2021-09-07 279 /* the user may set the target regions as they want */
3f49584b262cf8 SeongJae Park 2021-09-07 280 if (!damon_nr_regions(t))
3f49584b262cf8 SeongJae Park 2021-09-07 281 __damon_va_init_regions(ctx, t);
3f49584b262cf8 SeongJae Park 2021-09-07 282 }
3f49584b262cf8 SeongJae Park 2021-09-07 283 }
3f49584b262cf8 SeongJae Park 2021-09-07 284
3f49584b262cf8 SeongJae Park 2021-09-07 285 /*
3f49584b262cf8 SeongJae Park 2021-09-07 286 * Functions for the dynamic monitoring target regions update
3f49584b262cf8 SeongJae Park 2021-09-07 287 */
3f49584b262cf8 SeongJae Park 2021-09-07 288
3f49584b262cf8 SeongJae Park 2021-09-07 289 /*
3f49584b262cf8 SeongJae Park 2021-09-07 290 * Check whether a region is intersecting an address range
3f49584b262cf8 SeongJae Park 2021-09-07 291 *
3f49584b262cf8 SeongJae Park 2021-09-07 292 * Returns true if it is.
3f49584b262cf8 SeongJae Park 2021-09-07 293 */
3f49584b262cf8 SeongJae Park 2021-09-07 294 static bool damon_intersect(struct damon_region *r, struct damon_addr_range *re)
3f49584b262cf8 SeongJae Park 2021-09-07 295 {
3f49584b262cf8 SeongJae Park 2021-09-07 296 return !(r->ar.end <= re->start || re->end <= r->ar.start);
3f49584b262cf8 SeongJae Park 2021-09-07 297 }
3f49584b262cf8 SeongJae Park 2021-09-07 298
3f49584b262cf8 SeongJae Park 2021-09-07 299 /*
3f49584b262cf8 SeongJae Park 2021-09-07 300 * Update damon regions for the three big regions of the given target
3f49584b262cf8 SeongJae Park 2021-09-07 301 *
3f49584b262cf8 SeongJae Park 2021-09-07 302 * t the given target
3f49584b262cf8 SeongJae Park 2021-09-07 303 * bregions the three big regions of the target
3f49584b262cf8 SeongJae Park 2021-09-07 304 */
3f49584b262cf8 SeongJae Park 2021-09-07 305 static void damon_va_apply_three_regions(struct damon_target *t,
3f49584b262cf8 SeongJae Park 2021-09-07 306 struct damon_addr_range bregions[3])
3f49584b262cf8 SeongJae Park 2021-09-07 307 {
3f49584b262cf8 SeongJae Park 2021-09-07 308 struct damon_region *r, *next;
966a1baa2355c1 Xin Hao 2021-10-28 309 unsigned int i;
3f49584b262cf8 SeongJae Park 2021-09-07 310
3f49584b262cf8 SeongJae Park 2021-09-07 311 /* Remove regions which are not in the three big regions now */
3f49584b262cf8 SeongJae Park 2021-09-07 312 damon_for_each_region_safe(r, next, t) {
3f49584b262cf8 SeongJae Park 2021-09-07 313 for (i = 0; i < 3; i++) {
3f49584b262cf8 SeongJae Park 2021-09-07 314 if (damon_intersect(r, &bregions[i]))
3f49584b262cf8 SeongJae Park 2021-09-07 315 break;
3f49584b262cf8 SeongJae Park 2021-09-07 316 }
3f49584b262cf8 SeongJae Park 2021-09-07 317 if (i == 3)
3f49584b262cf8 SeongJae Park 2021-09-07 318 damon_destroy_region(r, t);
3f49584b262cf8 SeongJae Park 2021-09-07 319 }
3f49584b262cf8 SeongJae Park 2021-09-07 320
3f49584b262cf8 SeongJae Park 2021-09-07 321 /* Adjust intersecting regions to fit with the three big regions */
3f49584b262cf8 SeongJae Park 2021-09-07 322 for (i = 0; i < 3; i++) {
3f49584b262cf8 SeongJae Park 2021-09-07 323 struct damon_region *first = NULL, *last;
3f49584b262cf8 SeongJae Park 2021-09-07 324 struct damon_region *newr;
3f49584b262cf8 SeongJae Park 2021-09-07 325 struct damon_addr_range *br;
3f49584b262cf8 SeongJae Park 2021-09-07 326
3f49584b262cf8 SeongJae Park 2021-09-07 327 br = &bregions[i];
3f49584b262cf8 SeongJae Park 2021-09-07 328 /* Get the first and last regions which intersects with br */
3f49584b262cf8 SeongJae Park 2021-09-07 329 damon_for_each_region(r, t) {
3f49584b262cf8 SeongJae Park 2021-09-07 330 if (damon_intersect(r, br)) {
3f49584b262cf8 SeongJae Park 2021-09-07 331 if (!first)
3f49584b262cf8 SeongJae Park 2021-09-07 332 first = r;
3f49584b262cf8 SeongJae Park 2021-09-07 333 last = r;
3f49584b262cf8 SeongJae Park 2021-09-07 334 }
3f49584b262cf8 SeongJae Park 2021-09-07 335 if (r->ar.start >= br->end)
3f49584b262cf8 SeongJae Park 2021-09-07 336 break;
3f49584b262cf8 SeongJae Park 2021-09-07 337 }
3f49584b262cf8 SeongJae Park 2021-09-07 338 if (!first) {
3f49584b262cf8 SeongJae Park 2021-09-07 339 /* no damon_region intersects with this big region */
3f49584b262cf8 SeongJae Park 2021-09-07 340 newr = damon_new_region(
3f49584b262cf8 SeongJae Park 2021-09-07 341 ALIGN_DOWN(br->start,
3f49584b262cf8 SeongJae Park 2021-09-07 342 DAMON_MIN_REGION),
3f49584b262cf8 SeongJae Park 2021-09-07 343 ALIGN(br->end, DAMON_MIN_REGION));
3f49584b262cf8 SeongJae Park 2021-09-07 344 if (!newr)
3f49584b262cf8 SeongJae Park 2021-09-07 345 continue;
3f49584b262cf8 SeongJae Park 2021-09-07 346 damon_insert_region(newr, damon_prev_region(r), r, t);
3f49584b262cf8 SeongJae Park 2021-09-07 347 } else {
3f49584b262cf8 SeongJae Park 2021-09-07 348 first->ar.start = ALIGN_DOWN(br->start,
3f49584b262cf8 SeongJae Park 2021-09-07 349 DAMON_MIN_REGION);
3f49584b262cf8 SeongJae Park 2021-09-07 350 last->ar.end = ALIGN(br->end, DAMON_MIN_REGION);
3f49584b262cf8 SeongJae Park 2021-09-07 351 }
3f49584b262cf8 SeongJae Park 2021-09-07 352 }
3f49584b262cf8 SeongJae Park 2021-09-07 353 }
3f49584b262cf8 SeongJae Park 2021-09-07 354
3f49584b262cf8 SeongJae Park 2021-09-07 355 /*
3f49584b262cf8 SeongJae Park 2021-09-07 356 * Update regions for current memory mappings
3f49584b262cf8 SeongJae Park 2021-09-07 357 */
3f49584b262cf8 SeongJae Park 2021-09-07 @358 void damon_va_update(struct damon_ctx *ctx)
3f49584b262cf8 SeongJae Park 2021-09-07 359 {
3f49584b262cf8 SeongJae Park 2021-09-07 360 struct damon_addr_range three_regions[3];
3f49584b262cf8 SeongJae Park 2021-09-07 361 struct damon_target *t;
3f49584b262cf8 SeongJae Park 2021-09-07 362
3f49584b262cf8 SeongJae Park 2021-09-07 363 damon_for_each_target(t, ctx) {
3f49584b262cf8 SeongJae Park 2021-09-07 364 if (damon_va_three_regions(t, three_regions))
3f49584b262cf8 SeongJae Park 2021-09-07 365 continue;
3f49584b262cf8 SeongJae Park 2021-09-07 366 damon_va_apply_three_regions(t, three_regions);
3f49584b262cf8 SeongJae Park 2021-09-07 367 }
3f49584b262cf8 SeongJae Park 2021-09-07 368 }
3f49584b262cf8 SeongJae Park 2021-09-07 369
3f49584b262cf8 SeongJae Park 2021-09-07 370 static int damon_mkold_pmd_entry(pmd_t *pmd, unsigned long addr,
3f49584b262cf8 SeongJae Park 2021-09-07 371 unsigned long next, struct mm_walk *walk)
3f49584b262cf8 SeongJae Park 2021-09-07 372 {
3f49584b262cf8 SeongJae Park 2021-09-07 373 pte_t *pte;
3f49584b262cf8 SeongJae Park 2021-09-07 374 spinlock_t *ptl;
3f49584b262cf8 SeongJae Park 2021-09-07 375
3f49584b262cf8 SeongJae Park 2021-09-07 376 if (pmd_huge(*pmd)) {
3f49584b262cf8 SeongJae Park 2021-09-07 377 ptl = pmd_lock(walk->mm, pmd);
3f49584b262cf8 SeongJae Park 2021-09-07 378 if (pmd_huge(*pmd)) {
3f49584b262cf8 SeongJae Park 2021-09-07 379 damon_pmdp_mkold(pmd, walk->mm, addr);
3f49584b262cf8 SeongJae Park 2021-09-07 380 spin_unlock(ptl);
3f49584b262cf8 SeongJae Park 2021-09-07 381 return 0;
3f49584b262cf8 SeongJae Park 2021-09-07 382 }
3f49584b262cf8 SeongJae Park 2021-09-07 383 spin_unlock(ptl);
3f49584b262cf8 SeongJae Park 2021-09-07 384 }
3f49584b262cf8 SeongJae Park 2021-09-07 385
3f49584b262cf8 SeongJae Park 2021-09-07 386 if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd)))
3f49584b262cf8 SeongJae Park 2021-09-07 387 return 0;
3f49584b262cf8 SeongJae Park 2021-09-07 388 pte = pte_offset_map_lock(walk->mm, pmd, addr, &ptl);
3f49584b262cf8 SeongJae Park 2021-09-07 389 if (!pte_present(*pte))
3f49584b262cf8 SeongJae Park 2021-09-07 390 goto out;
3f49584b262cf8 SeongJae Park 2021-09-07 391 damon_ptep_mkold(pte, walk->mm, addr);
3f49584b262cf8 SeongJae Park 2021-09-07 392 out:
3f49584b262cf8 SeongJae Park 2021-09-07 393 pte_unmap_unlock(pte, ptl);
3f49584b262cf8 SeongJae Park 2021-09-07 394 return 0;
3f49584b262cf8 SeongJae Park 2021-09-07 395 }
3f49584b262cf8 SeongJae Park 2021-09-07 396
aafaf6b3b9b77a Rikard Falkeborn 2021-10-28 397 static const struct mm_walk_ops damon_mkold_ops = {
3f49584b262cf8 SeongJae Park 2021-09-07 398 .pmd_entry = damon_mkold_pmd_entry,
3f49584b262cf8 SeongJae Park 2021-09-07 399 };
3f49584b262cf8 SeongJae Park 2021-09-07 400
3f49584b262cf8 SeongJae Park 2021-09-07 401 static void damon_va_mkold(struct mm_struct *mm, unsigned long addr)
3f49584b262cf8 SeongJae Park 2021-09-07 402 {
3f49584b262cf8 SeongJae Park 2021-09-07 403 mmap_read_lock(mm);
3f49584b262cf8 SeongJae Park 2021-09-07 404 walk_page_range(mm, addr, addr + 1, &damon_mkold_ops, NULL);
3f49584b262cf8 SeongJae Park 2021-09-07 405 mmap_read_unlock(mm);
3f49584b262cf8 SeongJae Park 2021-09-07 406 }
3f49584b262cf8 SeongJae Park 2021-09-07 407
3f49584b262cf8 SeongJae Park 2021-09-07 408 /*
3f49584b262cf8 SeongJae Park 2021-09-07 409 * Functions for the access checking of the regions
3f49584b262cf8 SeongJae Park 2021-09-07 410 */
3f49584b262cf8 SeongJae Park 2021-09-07 411
a7c7432ffce91f Xin Hao 2021-11-13 412 static void __damon_va_prepare_access_check(struct damon_ctx *ctx,
3f49584b262cf8 SeongJae Park 2021-09-07 413 struct mm_struct *mm, struct damon_region *r)
3f49584b262cf8 SeongJae Park 2021-09-07 414 {
3f49584b262cf8 SeongJae Park 2021-09-07 415 r->sampling_addr = damon_rand(r->ar.start, r->ar.end);
3f49584b262cf8 SeongJae Park 2021-09-07 416
3f49584b262cf8 SeongJae Park 2021-09-07 417 damon_va_mkold(mm, r->sampling_addr);
3f49584b262cf8 SeongJae Park 2021-09-07 418 }
3f49584b262cf8 SeongJae Park 2021-09-07 419
3f49584b262cf8 SeongJae Park 2021-09-07 @420 void damon_va_prepare_access_checks(struct damon_ctx *ctx)
3f49584b262cf8 SeongJae Park 2021-09-07 421 {
3f49584b262cf8 SeongJae Park 2021-09-07 422 struct damon_target *t;
3f49584b262cf8 SeongJae Park 2021-09-07 423 struct mm_struct *mm;
3f49584b262cf8 SeongJae Park 2021-09-07 424 struct damon_region *r;
3f49584b262cf8 SeongJae Park 2021-09-07 425
3f49584b262cf8 SeongJae Park 2021-09-07 426 damon_for_each_target(t, ctx) {
3f49584b262cf8 SeongJae Park 2021-09-07 427 mm = damon_get_mm(t);
3f49584b262cf8 SeongJae Park 2021-09-07 428 if (!mm)
3f49584b262cf8 SeongJae Park 2021-09-07 429 continue;
3f49584b262cf8 SeongJae Park 2021-09-07 430 damon_for_each_region(r, t)
a7c7432ffce91f Xin Hao 2021-11-13 431 __damon_va_prepare_access_check(ctx, mm, r);
3f49584b262cf8 SeongJae Park 2021-09-07 432 mmput(mm);
3f49584b262cf8 SeongJae Park 2021-09-07 433 }
3f49584b262cf8 SeongJae Park 2021-09-07 434 }
3f49584b262cf8 SeongJae Park 2021-09-07 435
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[driver-core:debugfs_cleanup 1/1] fs/d_path.c:20:20: warning: Unsigned variable '.' can't be negative so it is unnecessary to test it. [unsignedPositive]
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git debugfs_cleanup
head: 8247270bcf99bc7bf661ae2a3f2ee6e64c7f957d
commit: 8247270bcf99bc7bf661ae2a3f2ee6e64c7f957d [1/1] fs: make d_path-like functions all have unsigned size
compiler: ia64-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> fs/d_path.c:20:20: warning: Unsigned variable '.' can't be negative so it is unnecessary to test it. [unsignedPositive]
if (likely(p->len >= 0))
^
vim +20 fs/d_path.c
7a5cf791a74764 Al Viro 2018-03-05 10
ad08ae586586ea Al Viro 2021-05-12 11 struct prepend_buffer {
ad08ae586586ea Al Viro 2021-05-12 12 char *buf;
8247270bcf99bc Greg Kroah-Hartman 2021-07-27 13 unsigned int len;
ad08ae586586ea Al Viro 2021-05-12 14 };
ad08ae586586ea Al Viro 2021-05-12 15 #define DECLARE_BUFFER(__name, __buf, __len) \
ad08ae586586ea Al Viro 2021-05-12 16 struct prepend_buffer __name = {.buf = __buf + __len, .len = __len}
ad08ae586586ea Al Viro 2021-05-12 17
ad08ae586586ea Al Viro 2021-05-12 18 static char *extract_string(struct prepend_buffer *p)
7a5cf791a74764 Al Viro 2018-03-05 19 {
ad08ae586586ea Al Viro 2021-05-12 @20 if (likely(p->len >= 0))
ad08ae586586ea Al Viro 2021-05-12 21 return p->buf;
ad08ae586586ea Al Viro 2021-05-12 22 return ERR_PTR(-ENAMETOOLONG);
ad08ae586586ea Al Viro 2021-05-12 23 }
ad08ae586586ea Al Viro 2021-05-12 24
:::::: The code at line 20 was first introduced by commit
:::::: ad08ae586586ea9e2c0228a3d5a083500ea54202 d_path: introduce struct prepend_buffer
:::::: TO: Al Viro <viro(a)zeniv.linux.org.uk>
:::::: CC: Al Viro <viro(a)zeniv.linux.org.uk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Wycena paneli fotowoltaicznych
by Miłosz Nowak
Dzień dobry,
dostrzegam możliwość współpracy z Państwa firmą.
Świadczymy kompleksową obsługę inwestycji w fotowoltaikę, która obniża koszty energii elektrycznej nawet o 90%.
Czy są Państwo zainteresowani weryfikacją wstępnych propozycji?
Pozdrawiam,
Miłosz Nowak
10 months, 1 week
Re: [PATCH v1 1/1] fpga: dfl: pci: Use pci_find_vsec_capability() when looking for DFL
by kernel test robot
Hi Andy,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.16-rc1 next-20211115]
[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/Andy-Shevchenko/fpga-dfl-pci-Use...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git d2f38a3c6507b2520101f9a3807ed98f1bdc545a
config: i386-randconfig-a014-20211115 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project fbe72e41b99dc7994daac300d208a955be3e4a0a)
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
# https://github.com/0day-ci/linux/commit/dfc10076ac7a63331954a33cabf94a1af...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/fpga-dfl-pci-Use-pci_find_vsec_capability-when-looking-for-DFL/20211109-234228
git checkout dfc10076ac7a63331954a33cabf94a1af3632210
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
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 >>):
drivers/fpga/dfl-pci.c:146:34: error: use of undeclared identifier 'dev'
voff = pci_find_vsec_capability(dev, PCI_VENDOR_ID_INTEL, PCI_VSEC_ID_INTEL_DFLS);
^
>> drivers/fpga/dfl-pci.c:350:32: warning: shift count >= width of type [-Wshift-count-overflow]
if (!pci_set_dma_mask(pcidev, DMA_BIT_MASK(64))) {
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
drivers/fpga/dfl-pci.c:351:45: warning: shift count >= width of type [-Wshift-count-overflow]
ret = pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
2 warnings and 1 error generated.
vim +350 drivers/fpga/dfl-pci.c
968b8199e2585a Wu Hao 2018-06-30 332
72ddd9f34040a4 Zhang Yi 2018-06-30 333 static
72ddd9f34040a4 Zhang Yi 2018-06-30 334 int cci_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *pcidevid)
72ddd9f34040a4 Zhang Yi 2018-06-30 335 {
72ddd9f34040a4 Zhang Yi 2018-06-30 336 int ret;
72ddd9f34040a4 Zhang Yi 2018-06-30 337
72ddd9f34040a4 Zhang Yi 2018-06-30 338 ret = pcim_enable_device(pcidev);
72ddd9f34040a4 Zhang Yi 2018-06-30 339 if (ret < 0) {
72ddd9f34040a4 Zhang Yi 2018-06-30 340 dev_err(&pcidev->dev, "Failed to enable device %d.\n", ret);
72ddd9f34040a4 Zhang Yi 2018-06-30 341 return ret;
72ddd9f34040a4 Zhang Yi 2018-06-30 342 }
72ddd9f34040a4 Zhang Yi 2018-06-30 343
72ddd9f34040a4 Zhang Yi 2018-06-30 344 ret = pci_enable_pcie_error_reporting(pcidev);
72ddd9f34040a4 Zhang Yi 2018-06-30 345 if (ret && ret != -EINVAL)
72ddd9f34040a4 Zhang Yi 2018-06-30 346 dev_info(&pcidev->dev, "PCIE AER unavailable %d.\n", ret);
72ddd9f34040a4 Zhang Yi 2018-06-30 347
72ddd9f34040a4 Zhang Yi 2018-06-30 348 pci_set_master(pcidev);
72ddd9f34040a4 Zhang Yi 2018-06-30 349
72ddd9f34040a4 Zhang Yi 2018-06-30 @350 if (!pci_set_dma_mask(pcidev, DMA_BIT_MASK(64))) {
72ddd9f34040a4 Zhang Yi 2018-06-30 351 ret = pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(64));
72ddd9f34040a4 Zhang Yi 2018-06-30 352 if (ret)
72ddd9f34040a4 Zhang Yi 2018-06-30 353 goto disable_error_report_exit;
72ddd9f34040a4 Zhang Yi 2018-06-30 354 } else if (!pci_set_dma_mask(pcidev, DMA_BIT_MASK(32))) {
72ddd9f34040a4 Zhang Yi 2018-06-30 355 ret = pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(32));
72ddd9f34040a4 Zhang Yi 2018-06-30 356 if (ret)
72ddd9f34040a4 Zhang Yi 2018-06-30 357 goto disable_error_report_exit;
72ddd9f34040a4 Zhang Yi 2018-06-30 358 } else {
72ddd9f34040a4 Zhang Yi 2018-06-30 359 ret = -EIO;
72ddd9f34040a4 Zhang Yi 2018-06-30 360 dev_err(&pcidev->dev, "No suitable DMA support available.\n");
72ddd9f34040a4 Zhang Yi 2018-06-30 361 goto disable_error_report_exit;
72ddd9f34040a4 Zhang Yi 2018-06-30 362 }
72ddd9f34040a4 Zhang Yi 2018-06-30 363
968b8199e2585a Wu Hao 2018-06-30 364 ret = cci_init_drvdata(pcidev);
968b8199e2585a Wu Hao 2018-06-30 365 if (ret) {
968b8199e2585a Wu Hao 2018-06-30 366 dev_err(&pcidev->dev, "Fail to init drvdata %d.\n", ret);
968b8199e2585a Wu Hao 2018-06-30 367 goto disable_error_report_exit;
968b8199e2585a Wu Hao 2018-06-30 368 }
968b8199e2585a Wu Hao 2018-06-30 369
968b8199e2585a Wu Hao 2018-06-30 370 ret = cci_enumerate_feature_devs(pcidev);
bfef946dbe1bbe Xu Yilun 2020-06-16 371 if (!ret)
968b8199e2585a Wu Hao 2018-06-30 372 return ret;
72ddd9f34040a4 Zhang Yi 2018-06-30 373
bfef946dbe1bbe Xu Yilun 2020-06-16 374 dev_err(&pcidev->dev, "enumeration failure %d.\n", ret);
bfef946dbe1bbe Xu Yilun 2020-06-16 375
72ddd9f34040a4 Zhang Yi 2018-06-30 376 disable_error_report_exit:
72ddd9f34040a4 Zhang Yi 2018-06-30 377 pci_disable_pcie_error_reporting(pcidev);
72ddd9f34040a4 Zhang Yi 2018-06-30 378 return ret;
72ddd9f34040a4 Zhang Yi 2018-06-30 379 }
72ddd9f34040a4 Zhang Yi 2018-06-30 380
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [PATCH v4] Add payload to be 32-bit aligned to fix dropped packets
by kernel test robot
Hi Kumar,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.16-rc1 next-20211115]
[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/Kumar-Thangavel/Add-payload-to-b...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git cb690f5238d71f543f4ce874aa59237cf53a877c
config: riscv-buildonly-randconfig-r006-20211115 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project fbe72e41b99dc7994daac300d208a955be3e4a0a)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/263eaf647698f405f4f9905c947bf73b8...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kumar-Thangavel/Add-payload-to-be-32-bit-aligned-to-fix-dropped-packets/20211110-175537
git checkout 263eaf647698f405f4f9905c947bf73b87c55b79
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
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 >>):
>> net/ncsi/ncsi-cmd.c:225:9: warning: comparison of distinct pointer types ('typeof (payload) *' (aka 'unsigned short *') and 'typeof (26) *' (aka 'int *')) [-Wcompare-distinct-pointer-types]
len += max(payload, 26);
^~~~~~~~~~~~~~~~
include/linux/minmax.h:52:19: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(x, y, >)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
1 warning generated.
vim +225 net/ncsi/ncsi-cmd.c
210
211 static int ncsi_cmd_handler_oem(struct sk_buff *skb,
212 struct ncsi_cmd_arg *nca)
213 {
214 struct ncsi_cmd_oem_pkt *cmd;
215 unsigned int len;
216 /* NC-SI spec DSP_0222_1.2.0, section 8.2.2.2
217 * requires payload to be padded with 0 to
218 * 32-bit boundary before the checksum field.
219 * Ensure the padding bytes are accounted for in
220 * skb allocation
221 */
222
223 unsigned short payload = ALIGN(nca->payload, 4);
224 len = sizeof(struct ncsi_cmd_pkt_hdr) + 4;
> 225 len += max(payload, 26);
226
227 cmd = skb_put_zero(skb, len);
228 memcpy(&cmd->mfr_id, nca->data, nca->payload);
229 ncsi_cmd_build_header(&cmd->cmd.common, nca);
230
231 return 0;
232 }
233
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
arch/arm/mm/fault.c:210:24: sparse: sparse: incorrect type in return expression (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: caed89dab0ca0e73d7e016c04e1f5957650f4ec3 ARM: 9128/1: mm: Refactor the __do_page_fault()
date: 4 weeks ago
config: arm-randconfig-s031-20211115 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout caed89dab0ca0e73d7e016c04e1f5957650f4ec3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash arch/arm/mm/
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 >>)
>> arch/arm/mm/fault.c:210:24: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted vm_fault_t @@ got int @@
arch/arm/mm/fault.c:210:24: sparse: expected restricted vm_fault_t
arch/arm/mm/fault.c:210:24: sparse: got int
arch/arm/mm/fault.c:214:32: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted vm_fault_t @@ got int @@
arch/arm/mm/fault.c:214:32: sparse: expected restricted vm_fault_t
arch/arm/mm/fault.c:214:32: sparse: got int
arch/arm/mm/fault.c:216:32: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted vm_fault_t @@ got int @@
arch/arm/mm/fault.c:216:32: sparse: expected restricted vm_fault_t
arch/arm/mm/fault.c:216:32: sparse: got int
arch/arm/mm/fault.c:218:32: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted vm_fault_t @@ got int @@
arch/arm/mm/fault.c:218:32: sparse: expected restricted vm_fault_t
arch/arm/mm/fault.c:218:32: sparse: got int
arch/arm/mm/fault.c:226:24: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted vm_fault_t @@ got int @@
arch/arm/mm/fault.c:226:24: sparse: expected restricted vm_fault_t
arch/arm/mm/fault.c:226:24: sparse: got int
arch/arm/mm/fault.c:312:13: sparse: sparse: restricted vm_fault_t degrades to integer
arch/arm/mm/fault.c:312:13: sparse: sparse: restricted vm_fault_t degrades to integer
arch/arm/mm/fault.c:345:24: sparse: sparse: restricted vm_fault_t degrades to integer
arch/arm/mm/fault.c:510:1: sparse: sparse: symbol 'do_DataAbort' was not declared. Should it be static?
arch/arm/mm/fault.c:540:1: sparse: sparse: symbol 'do_PrefetchAbort' was not declared. Should it be static?
vim +210 arch/arm/mm/fault.c
202
203 static vm_fault_t __kprobes
204 __do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
205 unsigned int flags, struct task_struct *tsk,
206 struct pt_regs *regs)
207 {
208 struct vm_area_struct *vma = find_vma(mm, addr);
209 if (unlikely(!vma))
> 210 return VM_FAULT_BADMAP;
211
212 if (unlikely(vma->vm_start > addr)) {
213 if (!(vma->vm_flags & VM_GROWSDOWN))
214 return VM_FAULT_BADMAP;
215 if (addr < FIRST_USER_ADDRESS)
216 return VM_FAULT_BADMAP;
217 if (expand_stack(vma, addr))
218 return VM_FAULT_BADMAP;
219 }
220
221 /*
222 * Ok, we have a good vm_area for this
223 * memory access, so we can handle it.
224 */
225 if (access_error(fsr, vma))
226 return VM_FAULT_BADACCESS;
227
228 return handle_mm_fault(vma, addr & PAGE_MASK, flags, regs);
229 }
230
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week