[linux-next:master 2957/8703] drivers/net/wireless/realtek/rtw88/rtw8822c.c:1039:2: warning: missing braces around initializer
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: e098d7762d602be640c53565ceca342f81e55ad2
commit: 5ad4d8957b69f3ebf95ac02212c388bda75aeb30 [2957/8703] rtw88: set power trim according to efuse PG values
config: i386-randconfig-a002-20200514 (attached as .config)
compiler: gcc-4.9 (Ubuntu 4.9.3-13ubuntu2) 4.9.3
reproduce:
git checkout 5ad4d8957b69f3ebf95ac02212c388bda75aeb30
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/net/wireless/realtek/rtw88/rtw8822c.c: In function 'rtw8822c_power_trim':
>> drivers/net/wireless/realtek/rtw88/rtw8822c.c:1039:2: warning: missing braces around initializer [-Wmissing-braces]
s8 bb_gain[2][8] = {0};
^
drivers/net/wireless/realtek/rtw88/rtw8822c.c:1039:2: warning: (near initialization for 'bb_gain[0]') [-Wmissing-braces]
vim +1039 drivers/net/wireless/realtek/rtw88/rtw8822c.c
1035
1036 static void rtw8822c_power_trim(struct rtw_dev *rtwdev)
1037 {
1038 u8 pg_pwr = 0xff, i, path, idx;
> 1039 s8 bb_gain[2][8] = {0};
1040 u16 rf_efuse_2g[3] = {PPG_2GL_TXAB, PPG_2GM_TXAB, PPG_2GH_TXAB};
1041 u16 rf_efuse_5g[2][5] = {{PPG_5GL1_TXA, PPG_5GL2_TXA, PPG_5GM1_TXA,
1042 PPG_5GM2_TXA, PPG_5GH1_TXA},
1043 {PPG_5GL1_TXB, PPG_5GL2_TXB, PPG_5GM1_TXB,
1044 PPG_5GM2_TXB, PPG_5GH1_TXB} };
1045 bool set = false;
1046
1047 for (i = 0; i < ARRAY_SIZE(rf_efuse_2g); i++) {
1048 rtw_read8_physical_efuse(rtwdev, rf_efuse_2g[i], &pg_pwr);
1049 if (pg_pwr == EFUSE_READ_FAIL)
1050 continue;
1051 set = true;
1052 bb_gain[RF_PATH_A][i] = FIELD_GET(PPG_2G_A_MASK, pg_pwr);
1053 bb_gain[RF_PATH_B][i] = FIELD_GET(PPG_2G_B_MASK, pg_pwr);
1054 }
1055
1056 for (i = 0; i < ARRAY_SIZE(rf_efuse_5g[0]); i++) {
1057 for (path = 0; path < rtwdev->hal.rf_path_num; path++) {
1058 rtw_read8_physical_efuse(rtwdev, rf_efuse_5g[path][i],
1059 &pg_pwr);
1060 if (pg_pwr == EFUSE_READ_FAIL)
1061 continue;
1062 set = true;
1063 idx = i + ARRAY_SIZE(rf_efuse_2g);
1064 bb_gain[path][idx] = FIELD_GET(PPG_5G_MASK, pg_pwr);
1065 }
1066 }
1067 if (set)
1068 rtw8822c_set_power_trim(rtwdev, bb_gain);
1069
1070 rtw_write32_mask(rtwdev, REG_DIS_DPD, DIS_DPD_MASK, DIS_DPD_RATEALL);
1071 }
1072
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[bcache:zoned 2/3] drivers/md/bcache/request.c:1134:34: error: no member named 'nr_zones' in 'struct request_queue'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git zoned
head: 9560b14e9901073c5fca5e5e6c531dbd950b2b04
commit: 366b493dd533a7de96f719c30d452ea745233836 [2/3] bcache: handle zone management bios for bcache device
config: x86_64-randconfig-a013-20200521 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
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
git checkout 366b493dd533a7de96f719c30d452ea745233836
# 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: kbuild test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/md/bcache/request.c:1072:47: warning: variable 'free_keys' is uninitialized when used here [-Wuninitialized]
ret = bch_keylist_realloc(&iop->insert_keys, free_keys, iop->c);
^~~~~~~~~
drivers/md/bcache/request.c:1065:25: note: initialize the variable 'free_keys' to silence this warning
int max_keys, free_keys;
^
= 0
>> drivers/md/bcache/request.c:1134:34: error: no member named 'nr_zones' in 'struct request_queue'
nr_zones = s->d->disk->queue->nr_zones;
~~~~~~~~~~~~~~~~~ ^
drivers/md/bcache/request.c:1422:9: error: implicit declaration of function 'blkdev_report_zones' [-Werror,-Wimplicit-function-declaration]
return blkdev_report_zones(dc->bdev,
^
drivers/md/bcache/request.c:1422:9: note: did you mean 'blkdev_nr_zones'?
include/linux/blkdev.h:373:28: note: 'blkdev_nr_zones' declared here
static inline unsigned int blkdev_nr_zones(struct gendisk *disk)
^
1 warning and 2 errors generated.
vim +1134 drivers/md/bcache/request.c
1054
1055 /*
1056 * Invalidate the LBA range on cache device which is covered by the
1057 * the resetting zones.
1058 */
1059 static int bch_data_invalidate_zones(struct closure *cl,
1060 size_t zone_sector,
1061 size_t nr_zones)
1062 {
1063 struct search *s = container_of(cl, struct search, cl);
1064 struct data_insert_op *iop = &s->iop;
1065 int max_keys, free_keys;
1066 size_t start = zone_sector;
1067 int ret;
1068
1069 max_keys = (block_bytes(iop->c) - sizeof(struct jset)) /
1070 sizeof(uint64_t);
1071 bch_keylist_init(&iop->insert_keys);
> 1072 ret = bch_keylist_realloc(&iop->insert_keys, free_keys, iop->c);
1073 if (ret < 0)
1074 return -ENOMEM;
1075
1076 while (nr_zones-- > 0) {
1077 atomic_t *journal_ref = NULL;
1078 size_t size = s->d->disk->queue->limits.chunk_sectors;
1079 more_keys:
1080 bch_keylist_reset(&iop->insert_keys);
1081 free_keys = max_keys;
1082
1083 while (size > 0 && free_keys >= 2) {
1084 size_t sectors = min_t(size_t, size,
1085 1U << (KEY_SIZE_BITS - 1));
1086
1087 bch_keylist_add(&iop->insert_keys,
1088 &KEY(iop->inode, start, sectors));
1089 start += sectors;
1090 size -= sectors;
1091 free_keys -= 2;
1092 }
1093
1094 /* Insert invalidate keys into btree */
1095 journal_ref = bch_journal(iop->c, &iop->insert_keys, NULL);
1096 if (!journal_ref) {
1097 ret = -EIO;
1098 break;
1099 }
1100
1101 ret = bch_btree_insert(iop->c,
1102 &iop->insert_keys, journal_ref, NULL);
1103 atomic_dec_bug(journal_ref);
1104 if (ret < 0)
1105 break;
1106
1107 if (size)
1108 goto more_keys;
1109 }
1110
1111 bch_keylist_free(&iop->insert_keys);
1112
1113 return ret;
1114 }
1115
1116 static void cached_dev_nodata(struct closure *cl)
1117 {
1118 struct search *s = container_of(cl, struct search, cl);
1119 struct bio *bio = &s->bio.bio;
1120 int nr_zones = 1;
1121
1122 if (s->iop.flush_journal)
1123 bch_journal_meta(s->iop.c, cl);
1124
1125 if (bio_op(bio) == REQ_OP_ZONE_RESET_ALL ||
1126 bio_op(bio) == REQ_OP_ZONE_RESET) {
1127 int err = 0;
1128 /*
1129 * If this is REQ_OP_ZONE_RESET_ALL bio, cached data
1130 * covered by all zones should be invalidate from the
1131 * cache device.
1132 */
1133 if (bio_op(bio) == REQ_OP_ZONE_RESET_ALL)
> 1134 nr_zones = s->d->disk->queue->nr_zones;
1135
1136 err = bch_data_invalidate_zones(
1137 cl, bio->bi_iter.bi_sector, nr_zones);
1138
1139 if (err < 0) {
1140 s->iop.status = errno_to_blk_status(err);
1141 /* debug, should be removed before post patch */
1142 bio->bi_status = BLK_STS_TIMEOUT;
1143 /* set by bio_cnt_set() in do_bio_hook() */
1144 bio_put(bio);
1145 /*
1146 * Invalidate cached data fails, don't send
1147 * the zone reset bio to backing device and
1148 * return failure. Otherwise potential data
1149 * corruption on bcache device may happen.
1150 */
1151 goto continue_bio_complete;
1152 }
1153
1154 }
1155
1156 /*
1157 * For flush or zone management bios, of cause
1158 * they should be sent to backing device too.
1159 */
1160 bio->bi_end_io = backing_request_endio;
1161 closure_bio_submit(s->iop.c, bio, cl);
1162
1163 continue_bio_complete:
1164 continue_at(cl, cached_dev_bio_complete, NULL);
1165 }
1166
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[dhowells-fs:fscache-iter 41/61] fs/fscache/cookie.c:504 __fscache_invalidate() warn: inconsistent returns 'cookie->lock'.
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter
head: 59f33c90ef6c1a75d4af75e5f60d98c0d965b6a2
commit: 4d15b33ef7e1f76b879588e3104e5cc83299f229 [41/61] fscache, cachefiles: Rewrite invalidation
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
git checkout 4d15b33ef7e1f76b879588e3104e5cc83299f229
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
fs/fscache/cookie.c:504 __fscache_invalidate() warn: inconsistent returns 'cookie->lock'.
# https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/com...
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git remote update dhowells-fs
git checkout 4d15b33ef7e1f76b879588e3104e5cc83299f229
vim +504 fs/fscache/cookie.c
4d15b33ef7e1f7 David Howells 2020-02-06 477 void __fscache_invalidate(struct fscache_cookie *cookie,
4d15b33ef7e1f7 David Howells 2020-02-06 478 const void *aux_data, loff_t new_size,
4d15b33ef7e1f7 David Howells 2020-02-06 479 unsigned int flags)
ef778e7ae67cd4 David Howells 2012-12-20 480 {
4d15b33ef7e1f7 David Howells 2020-02-06 481 struct fscache_object *object = NULL;
4d15b33ef7e1f7 David Howells 2020-02-06 482
fc9bade4eccbd7 David Howells 2020-02-06 483 _enter("{%s}", cookie->type_name);
ef778e7ae67cd4 David Howells 2012-12-20 484
ef778e7ae67cd4 David Howells 2012-12-20 485 fscache_stat(&fscache_n_invalidates);
ef778e7ae67cd4 David Howells 2012-12-20 486
ef778e7ae67cd4 David Howells 2012-12-20 487 /* Only permit invalidation of data files. Invalidating an index will
ef778e7ae67cd4 David Howells 2012-12-20 488 * require the caller to release all its attachments to the tree rooted
ef778e7ae67cd4 David Howells 2012-12-20 489 * there, and if it's doing that, it may as well just retire the
ef778e7ae67cd4 David Howells 2012-12-20 490 * cookie.
ef778e7ae67cd4 David Howells 2012-12-20 491 */
c7444f2954ac78 David Howells 2020-05-02 492 ASSERTCMP(cookie->type, !=, FSCACHE_COOKIE_TYPE_INDEX);
ef778e7ae67cd4 David Howells 2012-12-20 493
13e34f199ebd59 David Howells 2020-02-06 494 spin_lock(&cookie->lock);
4d15b33ef7e1f7 David Howells 2020-02-06 495 fscache_update_aux(cookie, aux_data, &new_size);
13e34f199ebd59 David Howells 2020-02-06 496 cookie->zero_point = new_size;
4d15b33ef7e1f7 David Howells 2020-02-06 497
4d15b33ef7e1f7 David Howells 2020-02-06 498 if (!hlist_empty(&cookie->backing_objects)) {
4d15b33ef7e1f7 David Howells 2020-02-06 499 object = hlist_entry(cookie->backing_objects.first,
4d15b33ef7e1f7 David Howells 2020-02-06 500 struct fscache_object, cookie_link);
4d15b33ef7e1f7 David Howells 2020-02-06 501 object->inval_counter++;
4d15b33ef7e1f7 David Howells 2020-02-06 502 }
4d15b33ef7e1f7 David Howells 2020-02-06 503
4d15b33ef7e1f7 David Howells 2020-02-06 @504 switch (cookie->stage) {
^^^^^^^^^^^^^
4d15b33ef7e1f7 David Howells 2020-02-06 505 case FSCACHE_COOKIE_STAGE_QUIESCENT:
4d15b33ef7e1f7 David Howells 2020-02-06 506 case FSCACHE_COOKIE_STAGE_DEAD:
4d15b33ef7e1f7 David Howells 2020-02-06 507 case FSCACHE_COOKIE_STAGE_INITIALISING: /* Assume later checks will catch it */
4d15b33ef7e1f7 David Howells 2020-02-06 508 case FSCACHE_COOKIE_STAGE_INVALIDATING: /* is_still_valid will catch it */
4d15b33ef7e1f7 David Howells 2020-02-06 509 spin_unlock(&cookie->lock);
4d15b33ef7e1f7 David Howells 2020-02-06 510 _leave(" [no %u]", cookie->stage);
4d15b33ef7e1f7 David Howells 2020-02-06 511 return;
4d15b33ef7e1f7 David Howells 2020-02-06 512
4d15b33ef7e1f7 David Howells 2020-02-06 513 case FSCACHE_COOKIE_STAGE_LOOKING_UP:
4d15b33ef7e1f7 David Howells 2020-02-06 514 _leave(" [look %x]", object->inval_counter);
drop the lock here?
4d15b33ef7e1f7 David Howells 2020-02-06 515 return;
4d15b33ef7e1f7 David Howells 2020-02-06 516
4d15b33ef7e1f7 David Howells 2020-02-06 517 case FSCACHE_COOKIE_STAGE_NO_DATA_YET:
4d15b33ef7e1f7 David Howells 2020-02-06 518 case FSCACHE_COOKIE_STAGE_ACTIVE:
4d15b33ef7e1f7 David Howells 2020-02-06 519 cookie->stage = FSCACHE_COOKIE_STAGE_INVALIDATING;
4d15b33ef7e1f7 David Howells 2020-02-06 520 wake_up_var(&cookie->stage);
4d15b33ef7e1f7 David Howells 2020-02-06 521
4d15b33ef7e1f7 David Howells 2020-02-06 522 atomic_inc(&cookie->n_ops);
4d15b33ef7e1f7 David Howells 2020-02-06 523 object->cache->ops->grab_object(object, fscache_obj_get_inval);
13e34f199ebd59 David Howells 2020-02-06 524 spin_unlock(&cookie->lock);
13e34f199ebd59 David Howells 2020-02-06 525
4d15b33ef7e1f7 David Howells 2020-02-06 526 fscache_dispatch(cookie, object, flags, fscache_invalidate_object);
4d15b33ef7e1f7 David Howells 2020-02-06 527 _leave(" [inv]");
4d15b33ef7e1f7 David Howells 2020-02-06 528 return;
4d15b33ef7e1f7 David Howells 2020-02-06 529 }
ef778e7ae67cd4 David Howells 2012-12-20 530 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[dhowells-fs:fscache-iter 21/61] fs/cachefiles/namei.c:300 cachefiles_walk_to_object() warn: signedness bug returning '(-105)'
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter
head: 59f33c90ef6c1a75d4af75e5f60d98c0d965b6a2
commit: 667b9011d562075c1d4e831862efa31f2f47fba0 [21/61] fscache: Replace the object management state machine
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
git checkout 667b9011d562075c1d4e831862efa31f2f47fba0
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
fs/cachefiles/namei.c:300 cachefiles_walk_to_object() warn: signedness bug returning '(-105)'
fs/fscache/obj.c:27 fscache_do_alloc_object() warn: argument 2 to %lx specifier is cast from pointer
# https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/com...
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git remote update dhowells-fs
git checkout 667b9011d562075c1d4e831862efa31f2f47fba0
vim +300 fs/cachefiles/namei.c
667b9011d56207 David Howells 2020-02-06 273 bool cachefiles_walk_to_object(struct cachefiles_object *parent,
^^^^
bool
9ae326a69004de David Howells 2009-04-03 274 struct cachefiles_object *object,
5c65c4e759eafd David Howells 2020-02-06 275 const char *key)
9ae326a69004de David Howells 2009-04-03 276 {
9ae326a69004de David Howells 2009-04-03 277 struct cachefiles_cache *cache;
9ae326a69004de David Howells 2009-04-03 278 struct dentry *dir, *next = NULL;
a18feb55769b70 David Howells 2018-04-04 279 struct inode *inode;
821404434f3324 David Howells 2010-12-24 280 struct path path;
9ae326a69004de David Howells 2009-04-03 281 unsigned long start;
9ae326a69004de David Howells 2009-04-03 282 const char *name;
667b9011d56207 David Howells 2020-02-06 283 bool marked = false, negated = false;
9ae326a69004de David Howells 2009-04-03 284 int ret, nlen;
9ae326a69004de David Howells 2009-04-03 285
c61ea31dac0319 David Howells 2010-05-11 286 _enter("OBJ%x{%p},OBJ%x,%s,",
c61ea31dac0319 David Howells 2010-05-11 287 parent->fscache.debug_id, parent->dentry,
c61ea31dac0319 David Howells 2010-05-11 288 object->fscache.debug_id, key);
9ae326a69004de David Howells 2009-04-03 289
9ae326a69004de David Howells 2009-04-03 290 cache = container_of(parent->fscache.cache,
9ae326a69004de David Howells 2009-04-03 291 struct cachefiles_cache, cache);
821404434f3324 David Howells 2010-12-24 292 path.mnt = cache->mnt;
9ae326a69004de David Howells 2009-04-03 293
9ae326a69004de David Howells 2009-04-03 294 ASSERT(parent->dentry);
466b77bc954c23 David Howells 2015-03-17 295 ASSERT(d_backing_inode(parent->dentry));
9ae326a69004de David Howells 2009-04-03 296
e36cb0b89ce20b David Howells 2015-01-29 297 if (!(d_is_dir(parent->dentry))) {
9ae326a69004de David Howells 2009-04-03 298 // TODO: convert file to dir
9ae326a69004de David Howells 2009-04-03 299 _leave("looking up in none directory");
9ae326a69004de David Howells 2009-04-03 @300 return -ENOBUFS;
^^^^^^^^
Negative error code.
9ae326a69004de David Howells 2009-04-03 301 }
9ae326a69004de David Howells 2009-04-03 302
9ae326a69004de David Howells 2009-04-03 303 dir = dget(parent->dentry);
9ae326a69004de David Howells 2009-04-03 304
9ae326a69004de David Howells 2009-04-03 305 advance:
9ae326a69004de David Howells 2009-04-03 306 /* attempt to transit the first directory component */
9ae326a69004de David Howells 2009-04-03 307 name = key;
9ae326a69004de David Howells 2009-04-03 308 nlen = strlen(key);
9ae326a69004de David Howells 2009-04-03 309
9ae326a69004de David Howells 2009-04-03 310 /* key ends in a double NUL */
9ae326a69004de David Howells 2009-04-03 311 key = key + nlen + 1;
9ae326a69004de David Howells 2009-04-03 312 if (!*key)
9ae326a69004de David Howells 2009-04-03 313 key = NULL;
9ae326a69004de David Howells 2009-04-03 314
9ae326a69004de David Howells 2009-04-03 315 lookup_again:
9ae326a69004de David Howells 2009-04-03 316 /* search the current directory for the element name */
9ae326a69004de David Howells 2009-04-03 317 _debug("lookup '%s'", name);
9ae326a69004de David Howells 2009-04-03 318
5955102c9984fa Al Viro 2016-01-22 319 inode_lock_nested(d_inode(dir), I_MUTEX_PARENT);
9ae326a69004de David Howells 2009-04-03 320
9ae326a69004de David Howells 2009-04-03 321 start = jiffies;
9ae326a69004de David Howells 2009-04-03 322 next = lookup_one_len(name, dir, nlen);
9ae326a69004de David Howells 2009-04-03 323 cachefiles_hist(cachefiles_lookup_histogram, start);
a18feb55769b70 David Howells 2018-04-04 324 if (IS_ERR(next)) {
a18feb55769b70 David Howells 2018-04-04 325 trace_cachefiles_lookup(object, next, NULL);
db940cc2b33723 David Howells 2020-02-06 326 ret = PTR_ERR(next);
^^^^^^^^^^^^^^^^^^^
9ae326a69004de David Howells 2009-04-03 327 goto lookup_error;
a18feb55769b70 David Howells 2018-04-04 328 }
9ae326a69004de David Howells 2009-04-03 329
a18feb55769b70 David Howells 2018-04-04 330 inode = d_backing_inode(next);
a18feb55769b70 David Howells 2018-04-04 331 trace_cachefiles_lookup(object, next, inode);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[bcache:zoned 1/3] drivers/md/bcache/request.c:1325:9: error: implicit declaration of function 'blkdev_report_zones'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git zoned
head: 9560b14e9901073c5fca5e5e6c531dbd950b2b04
commit: dbdcbd380a1847351fd02972a53ef07c1dd55065 [1/3] bcache: export bcache zone information for zoned backing device
config: x86_64-randconfig-a013-20200521 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
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
git checkout dbdcbd380a1847351fd02972a53ef07c1dd55065
# 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: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/md/bcache/request.c:1325:9: error: implicit declaration of function 'blkdev_report_zones' [-Werror,-Wimplicit-function-declaration]
return blkdev_report_zones(dc->bdev,
^
drivers/md/bcache/request.c:1325:9: note: did you mean 'blkdev_nr_zones'?
include/linux/blkdev.h:373:28: note: 'blkdev_nr_zones' declared here
static inline unsigned int blkdev_nr_zones(struct gendisk *disk)
^
1 error generated.
--
>> drivers/md/bcache/super.c:1391:8: error: no member named 'nr_zones' in 'struct request_queue'
d_q->nr_zones = b_q->nr_zones -
~~~ ^
drivers/md/bcache/super.c:1391:24: error: no member named 'nr_zones' in 'struct request_queue'
d_q->nr_zones = b_q->nr_zones -
~~~ ^
2 errors generated.
vim +/blkdev_report_zones +1325 drivers/md/bcache/request.c
1315
1316 static int cached_dev_report_zones(struct bch_report_zones_args *args,
1317 unsigned int nr_zones)
1318 {
1319 struct bcache_device *d = args->bcache_device;
1320 struct cached_dev *dc = container_of(d, struct cached_dev, disk);
1321 /* skip zone 0 which is fully occupied by bcache super block */
1322 sector_t sector = args->sector + dc->sb.data_offset;
1323
1324 /* sector is real LBA of backing device */
> 1325 return blkdev_report_zones(dc->bdev,
1326 sector,
1327 nr_zones,
1328 cached_dev_report_zones_cb,
1329 args);
1330 }
1331
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[dsahern-linux:nexthops/del-group-03 4/7] net/ipv4/fib_trie.c:1575 fib_table_lookup() error: uninitialized symbol 'nhsel'.
by Dan Carpenter
tree: https://github.com/dsahern/linux nexthops/del-group-03
head: b8c06bc47e0a04603de20861b8d5f7291ff0bc12
commit: 063512a047f24cd25298dbb37ae1247a407dbdde [4/7] ipv4: Refactor nhc evaluation in fib_table_lookup
:::::: branch date: 19 hours ago
:::::: commit date: 20 hours ago
config: x86_64-defconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
git checkout 063512a047f24cd25298dbb37ae1247a407dbdde
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
net/ipv4/fib_trie.c:1575 fib_table_lookup() error: uninitialized symbol 'nhsel'.
# https://github.com/dsahern/linux/commit/063512a047f24cd25298dbb37ae1247a4...
git remote add dsahern-linux https://github.com/dsahern/linux
git remote update dsahern-linux
git checkout 063512a047f24cd25298dbb37ae1247a407dbdde
vim +/nhsel +1575 net/ipv4/fib_trie.c
19baf839ff4a8d Robert Olsson 2005-06-21 1519 found:
71e8b67d0fdd2f Alexander Duyck 2015-03-04 1520 /* this line carries forward the xor from earlier in the function */
71e8b67d0fdd2f Alexander Duyck 2015-03-04 1521 index = key ^ n->key;
71e8b67d0fdd2f Alexander Duyck 2015-03-04 1522
9f9e636d4f89f7 Alexander Duyck 2014-12-31 1523 /* Step 3: Process the leaf, if that fails fall back to backtracing */
79e5ad2ceb0067 Alexander Duyck 2015-02-25 1524 hlist_for_each_entry_rcu(fa, &n->leaf, fa_list) {
345e9b54268ae0 Alexander Duyck 2014-12-31 1525 struct fib_info *fi = fa->fa_info;
063512a047f24c David Ahern 2020-05-21 1526 struct fib_nh_common *nhc;
345e9b54268ae0 Alexander Duyck 2014-12-31 1527 int nhsel, err;
^^^^^
345e9b54268ae0 Alexander Duyck 2014-12-31 1528
a5829f536b3d11 Alexander Duyck 2016-01-28 1529 if ((BITS_PER_LONG > KEYLENGTH) || (fa->fa_slen < KEYLENGTH)) {
a5829f536b3d11 Alexander Duyck 2016-01-28 1530 if (index >= (1ul << fa->fa_slen))
9b6ebad5c3a152 Alexander Duyck 2015-02-25 1531 continue;
a5829f536b3d11 Alexander Duyck 2016-01-28 1532 }
345e9b54268ae0 Alexander Duyck 2014-12-31 1533 if (fa->fa_tos && fa->fa_tos != flp->flowi4_tos)
345e9b54268ae0 Alexander Duyck 2014-12-31 1534 continue;
345e9b54268ae0 Alexander Duyck 2014-12-31 1535 if (fi->fib_dead)
345e9b54268ae0 Alexander Duyck 2014-12-31 1536 continue;
345e9b54268ae0 Alexander Duyck 2014-12-31 1537 if (fa->fa_info->fib_scope < flp->flowi4_scope)
345e9b54268ae0 Alexander Duyck 2014-12-31 1538 continue;
345e9b54268ae0 Alexander Duyck 2014-12-31 1539 fib_alias_accessed(fa);
345e9b54268ae0 Alexander Duyck 2014-12-31 1540 err = fib_props[fa->fa_type].error;
345e9b54268ae0 Alexander Duyck 2014-12-31 1541 if (unlikely(err < 0)) {
4c7e8084fd467d David Ahern 2019-06-03 1542 out_reject:
345e9b54268ae0 Alexander Duyck 2014-12-31 1543 #ifdef CONFIG_IP_FIB_TRIE_STATS
345e9b54268ae0 Alexander Duyck 2014-12-31 1544 this_cpu_inc(stats->semantic_match_passed);
345e9b54268ae0 Alexander Duyck 2014-12-31 1545 #endif
9f323973c915d4 David Ahern 2018-05-23 1546 trace_fib_table_lookup(tb->tb_id, flp, NULL, err);
345e9b54268ae0 Alexander Duyck 2014-12-31 1547 return err;
345e9b54268ae0 Alexander Duyck 2014-12-31 1548 }
345e9b54268ae0 Alexander Duyck 2014-12-31 1549 if (fi->fib_flags & RTNH_F_DEAD)
345e9b54268ae0 Alexander Duyck 2014-12-31 1550 continue;
4c7e8084fd467d David Ahern 2019-06-03 1551
063512a047f24c David Ahern 2020-05-21 1552 if (unlikely(fi->nh)) {
063512a047f24c David Ahern 2020-05-21 1553 if (nexthop_is_blackhole(fi->nh)) {
4c7e8084fd467d David Ahern 2019-06-03 1554 err = fib_props[RTN_BLACKHOLE].error;
4c7e8084fd467d David Ahern 2019-06-03 1555 goto out_reject;
4c7e8084fd467d David Ahern 2019-06-03 1556 }
4c7e8084fd467d David Ahern 2019-06-03 1557
063512a047f24c David Ahern 2020-05-21 1558 nhc = nexthop_get_nhc_lookup(fi->nh, fib_flags, flp);
063512a047f24c David Ahern 2020-05-21 1559 if (nhc)
063512a047f24c David Ahern 2020-05-21 1560 goto set_result;
^^^^^^^^^^^^^^^
goto
063512a047f24c David Ahern 2020-05-21 1561 goto miss;
063512a047f24c David Ahern 2020-05-21 1562 }
063512a047f24c David Ahern 2020-05-21 1563
5481d73f81549e David Ahern 2019-06-03 1564 for (nhsel = 0; nhsel < fib_info_num_path(fi); nhsel++) {
063512a047f24c David Ahern 2020-05-21 1565 nhc = fib_info_nhc(fi, nhsel);
345e9b54268ae0 Alexander Duyck 2014-12-31 1566
063512a047f24c David Ahern 2020-05-21 1567 if (!fib_lookup_good_nhc(nhc, fib_flags, flp))
345e9b54268ae0 Alexander Duyck 2014-12-31 1568 continue;
063512a047f24c David Ahern 2020-05-21 1569 set_result:
345e9b54268ae0 Alexander Duyck 2014-12-31 1570 if (!(fib_flags & FIB_LOOKUP_NOREF))
0029c0deb590bc Reshetova, Elena 2017-07-04 1571 refcount_inc(&fi->fib_clntref);
345e9b54268ae0 Alexander Duyck 2014-12-31 1572
6ffd903415320d David Ahern 2017-05-25 1573 res->prefix = htonl(n->key);
9b6ebad5c3a152 Alexander Duyck 2015-02-25 1574 res->prefixlen = KEYLENGTH - fa->fa_slen;
345e9b54268ae0 Alexander Duyck 2014-12-31 @1575 res->nh_sel = nhsel;
^^^^^^^^^^^^^^^^^^^
Uninitialized.
eba618abacade7 David Ahern 2019-04-02 1576 res->nhc = nhc;
345e9b54268ae0 Alexander Duyck 2014-12-31 1577 res->type = fa->fa_type;
345e9b54268ae0 Alexander Duyck 2014-12-31 1578 res->scope = fi->fib_scope;
345e9b54268ae0 Alexander Duyck 2014-12-31 1579 res->fi = fi;
345e9b54268ae0 Alexander Duyck 2014-12-31 1580 res->table = tb;
79e5ad2ceb0067 Alexander Duyck 2015-02-25 1581 res->fa_head = &n->leaf;
345e9b54268ae0 Alexander Duyck 2014-12-31 1582 #ifdef CONFIG_IP_FIB_TRIE_STATS
345e9b54268ae0 Alexander Duyck 2014-12-31 1583 this_cpu_inc(stats->semantic_match_passed);
345e9b54268ae0 Alexander Duyck 2014-12-31 1584 #endif
eba618abacade7 David Ahern 2019-04-02 1585 trace_fib_table_lookup(tb->tb_id, flp, nhc, err);
f6d3c19274c74f David Ahern 2015-08-28 1586
345e9b54268ae0 Alexander Duyck 2014-12-31 1587 return err;
345e9b54268ae0 Alexander Duyck 2014-12-31 1588 }
345e9b54268ae0 Alexander Duyck 2014-12-31 1589 }
063512a047f24c David Ahern 2020-05-21 1590 miss:
345e9b54268ae0 Alexander Duyck 2014-12-31 1591 #ifdef CONFIG_IP_FIB_TRIE_STATS
345e9b54268ae0 Alexander Duyck 2014-12-31 1592 this_cpu_inc(stats->semantic_match_miss);
345e9b54268ae0 Alexander Duyck 2014-12-31 1593 #endif
9f9e636d4f89f7 Alexander Duyck 2014-12-31 1594 goto backtrace;
19baf839ff4a8d Robert Olsson 2005-06-21 1595 }
6fc01438a94702 Florian Westphal 2011-08-25 1596 EXPORT_SYMBOL_GPL(fib_table_lookup);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[regulator:for-5.8 14/15] drivers/regulator/max8998.c:374:5: warning: no previous prototype for function 'max8998_set_current_limit'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-5.8
head: 0c680ffb99ea4022b97fbbf831da46b0f90958a5
commit: 4ffea5e083f8125fe273cf331ecb10d901eb64a2 [14/15] regulator: max8998: Add charger regulator
config: x86_64-randconfig-a011-20200521 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
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
git checkout 4ffea5e083f8125fe273cf331ecb10d901eb64a2
# 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: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/regulator/max8998.c:374:5: warning: no previous prototype for function 'max8998_set_current_limit' [-Wmissing-prototypes]
int max8998_set_current_limit(struct regulator_dev *rdev,
^
drivers/regulator/max8998.c:374:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int max8998_set_current_limit(struct regulator_dev *rdev,
^
static
>> drivers/regulator/max8998.c:418:5: warning: no previous prototype for function 'max8998_get_current_limit' [-Wmissing-prototypes]
int max8998_get_current_limit(struct regulator_dev *rdev)
^
drivers/regulator/max8998.c:418:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int max8998_get_current_limit(struct regulator_dev *rdev)
^
static
2 warnings generated.
vim +/max8998_set_current_limit +374 drivers/regulator/max8998.c
373
> 374 int max8998_set_current_limit(struct regulator_dev *rdev,
375 int min_uA, int max_uA)
376 {
377 struct max8998_data *max8998 = rdev_get_drvdata(rdev);
378 struct i2c_client *i2c = max8998->iodev->i2c;
379 unsigned int n_currents = rdev->desc->n_current_limits;
380 int i, sel = -1;
381
382 if (n_currents == 0)
383 return -EINVAL;
384
385 if (rdev->desc->curr_table) {
386 const unsigned int *curr_table = rdev->desc->curr_table;
387 bool ascend = curr_table[n_currents - 1] > curr_table[0];
388
389 /* search for closest to maximum */
390 if (ascend) {
391 for (i = n_currents - 1; i >= 0; i--) {
392 if (min_uA <= curr_table[i] &&
393 curr_table[i] <= max_uA) {
394 sel = i;
395 break;
396 }
397 }
398 } else {
399 for (i = 0; i < n_currents; i++) {
400 if (min_uA <= curr_table[i] &&
401 curr_table[i] <= max_uA) {
402 sel = i;
403 break;
404 }
405 }
406 }
407 }
408
409 if (sel < 0)
410 return -EINVAL;
411
412 sel <<= ffs(rdev->desc->csel_mask) - 1;
413
414 return max8998_update_reg(i2c, rdev->desc->csel_reg,
415 sel, rdev->desc->csel_mask);
416 }
417
> 418 int max8998_get_current_limit(struct regulator_dev *rdev)
419 {
420 struct max8998_data *max8998 = rdev_get_drvdata(rdev);
421 struct i2c_client *i2c = max8998->iodev->i2c;
422 u8 val;
423 int ret;
424
425 ret = max8998_read_reg(i2c, rdev->desc->csel_reg, &val);
426 if (ret != 0)
427 return ret;
428
429 val &= rdev->desc->csel_mask;
430 val >>= ffs(rdev->desc->csel_mask) - 1;
431
432 if (rdev->desc->curr_table) {
433 if (val >= rdev->desc->n_current_limits)
434 return -EINVAL;
435
436 return rdev->desc->curr_table[val];
437 }
438
439 return -EINVAL;
440 }
441
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
Re: [RFC PATCH v12 05/11] time: Add mechanism to recognize clocksource in time_get_snapshot
by kbuild test robot
Hi Jianyong,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on linus/master]
[also build test WARNING on v5.7-rc6 next-20200519]
[cannot apply to tip/timers/core kvmarm/next kvm/linux-next]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Jianyong-Wu/Enable-ptp_kvm-for-a...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 051143e1602d90ea71887d92363edd539d411de5
config: x86_64-defconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
smatch warnings:
kernel/time/clocksource.c:931 __clocksource_register_scale() warn: inconsistent indenting
vim +931 kernel/time/clocksource.c
913
914 /**
915 * __clocksource_register_scale - Used to install new clocksources
916 * @cs: clocksource to be registered
917 * @scale: Scale factor multiplied against freq to get clocksource hz
918 * @freq: clocksource frequency (cycles per second) divided by scale
919 *
920 * Returns -EBUSY if registration fails, zero otherwise.
921 *
922 * This *SHOULD NOT* be called directly! Please use the
923 * clocksource_register_hz() or clocksource_register_khz helper functions.
924 */
925 int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq)
926 {
927 unsigned long flags;
928
929 clocksource_arch_init(cs);
930
> 931 if (WARN_ON_ONCE((unsigned int)cs->id >= CSID_MAX))
932 cs->id = CSID_GENERIC;
933
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months