Re: [PATCH] openrisc: rename or32 code & comments to or1k
by kernel test robot
Hi Randy,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on openrisc/for-next]
[also build test WARNING on linux/master linus/master v5.14-rc1 next-20210715]
[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/Randy-Dunlap/openrisc-rename-or3...
base: https://github.com/openrisc/linux.git for-next
config: openrisc-buildonly-randconfig-r002-20210716 (attached as .config)
compiler: or1k-linux-gcc (GCC) 10.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
# https://github.com/0day-ci/linux/commit/d5551791af9959a80485de163c57a26be...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Randy-Dunlap/openrisc-rename-or32-code-comments-to-or1k/20210716-102427
git checkout d5551791af9959a80485de163c57a26be971ae5e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=openrisc
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 >>):
>> arch/openrisc/kernel/setup.c:220:13: warning: no previous prototype for 'or1k_early_setup' [-Wmissing-prototypes]
220 | void __init or1k_early_setup(void *fdt)
| ^~~~~~~~~~~~~~~~
arch/openrisc/kernel/setup.c:246:13: warning: no previous prototype for 'detect_unit_config' [-Wmissing-prototypes]
246 | void __init detect_unit_config(unsigned long upr, unsigned long mask,
| ^~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for LOCKDEP
Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
Selected by
- LOCK_STAT && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
- DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
vim +/or1k_early_setup +220 arch/openrisc/kernel/setup.c
210
211 /**
212 * or1k_early_setup
213 *
214 * Handles the pointer to the device tree that this kernel is to use
215 * for establishing the available platform devices.
216 *
217 * Falls back on built-in device tree in case null pointer is passed.
218 */
219
> 220 void __init or1k_early_setup(void *fdt)
221 {
222 if (fdt)
223 pr_info("FDT at %p\n", fdt);
224 else {
225 fdt = __dtb_start;
226 pr_info("Compiled-in FDT at %p\n", fdt);
227 }
228 early_init_devtree(fdt);
229 }
230
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
arch/powerpc/lib/sstep.c:1172:21: error: variable 'suffix' set but not used
by kernel test robot
Hi Jordan,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d936eb23874433caa3e3d841cfa16f5434b85dcf
commit: 650b55b707fdfa764e9f2b81314d3eb4216fb962 powerpc: Add prefixed instructions to instruction data type
date: 1 year, 2 months ago
config: powerpc64-buildonly-randconfig-r004-20210716 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 10.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
# 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 650b55b707fdfa764e9f2b81314d3eb4216fb962
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 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/lib/sstep.c: In function 'analyse_instr':
>> arch/powerpc/lib/sstep.c:1172:21: error: variable 'suffix' set but not used [-Werror=unused-but-set-variable]
1172 | unsigned int word, suffix;
| ^~~~~~
arch/powerpc/lib/sstep.c:1168:31: error: variable 'rc' set but not used [-Werror=unused-but-set-variable]
1168 | unsigned int opcode, ra, rb, rc, rd, spr, u;
| ^~
cc1: all warnings being treated as errors
vim +/suffix +1172 arch/powerpc/lib/sstep.c
1153
1154 /*
1155 * Decode an instruction, and return information about it in *op
1156 * without changing *regs.
1157 * Integer arithmetic and logical instructions, branches, and barrier
1158 * instructions can be emulated just using the information in *op.
1159 *
1160 * Return value is 1 if the instruction can be emulated just by
1161 * updating *regs with the information in *op, -1 if we need the
1162 * GPRs but *regs doesn't contain the full register set, or 0
1163 * otherwise.
1164 */
1165 int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
1166 struct ppc_inst instr)
1167 {
1168 unsigned int opcode, ra, rb, rc, rd, spr, u;
1169 unsigned long int imm;
1170 unsigned long int val, val2;
1171 unsigned int mb, me, sh;
> 1172 unsigned int word, suffix;
1173 long ival;
1174
1175 word = ppc_inst_val(instr);
1176 suffix = ppc_inst_suffix(instr);
1177
1178 op->type = COMPUTE;
1179
1180 opcode = ppc_inst_primary_opcode(instr);
1181 switch (opcode) {
1182 case 16: /* bc */
1183 op->type = BRANCH;
1184 imm = (signed short)(word & 0xfffc);
1185 if ((word & 2) == 0)
1186 imm += regs->nip;
1187 op->val = truncate_if_32bit(regs->msr, imm);
1188 if (word & 1)
1189 op->type |= SETLK;
1190 if (branch_taken(word, regs, op))
1191 op->type |= BRTAKEN;
1192 return 1;
1193 #ifdef CONFIG_PPC64
1194 case 17: /* sc */
1195 if ((word & 0xfe2) == 2)
1196 op->type = SYSCALL;
1197 else
1198 op->type = UNKNOWN;
1199 return 0;
1200 #endif
1201 case 18: /* b */
1202 op->type = BRANCH | BRTAKEN;
1203 imm = word & 0x03fffffc;
1204 if (imm & 0x02000000)
1205 imm -= 0x04000000;
1206 if ((word & 2) == 0)
1207 imm += regs->nip;
1208 op->val = truncate_if_32bit(regs->msr, imm);
1209 if (word & 1)
1210 op->type |= SETLK;
1211 return 1;
1212 case 19:
1213 switch ((word >> 1) & 0x3ff) {
1214 case 0: /* mcrf */
1215 op->type = COMPUTE + SETCC;
1216 rd = 7 - ((word >> 23) & 0x7);
1217 ra = 7 - ((word >> 18) & 0x7);
1218 rd *= 4;
1219 ra *= 4;
1220 val = (regs->ccr >> ra) & 0xf;
1221 op->ccval = (regs->ccr & ~(0xfUL << rd)) | (val << rd);
1222 return 1;
1223
1224 case 16: /* bclr */
1225 case 528: /* bcctr */
1226 op->type = BRANCH;
1227 imm = (word & 0x400)? regs->ctr: regs->link;
1228 op->val = truncate_if_32bit(regs->msr, imm);
1229 if (word & 1)
1230 op->type |= SETLK;
1231 if (branch_taken(word, regs, op))
1232 op->type |= BRTAKEN;
1233 return 1;
1234
1235 case 18: /* rfid, scary */
1236 if (regs->msr & MSR_PR)
1237 goto priv;
1238 op->type = RFI;
1239 return 0;
1240
1241 case 150: /* isync */
1242 op->type = BARRIER | BARRIER_ISYNC;
1243 return 1;
1244
1245 case 33: /* crnor */
1246 case 129: /* crandc */
1247 case 193: /* crxor */
1248 case 225: /* crnand */
1249 case 257: /* crand */
1250 case 289: /* creqv */
1251 case 417: /* crorc */
1252 case 449: /* cror */
1253 op->type = COMPUTE + SETCC;
1254 ra = (word >> 16) & 0x1f;
1255 rb = (word >> 11) & 0x1f;
1256 rd = (word >> 21) & 0x1f;
1257 ra = (regs->ccr >> (31 - ra)) & 1;
1258 rb = (regs->ccr >> (31 - rb)) & 1;
1259 val = (word >> (6 + ra * 2 + rb)) & 1;
1260 op->ccval = (regs->ccr & ~(1UL << (31 - rd))) |
1261 (val << (31 - rd));
1262 return 1;
1263 }
1264 break;
1265 case 31:
1266 switch ((word >> 1) & 0x3ff) {
1267 case 598: /* sync */
1268 op->type = BARRIER + BARRIER_SYNC;
1269 #ifdef __powerpc64__
1270 switch ((word >> 21) & 3) {
1271 case 1: /* lwsync */
1272 op->type = BARRIER + BARRIER_LWSYNC;
1273 break;
1274 case 2: /* ptesync */
1275 op->type = BARRIER + BARRIER_PTESYNC;
1276 break;
1277 }
1278 #endif
1279 return 1;
1280
1281 case 854: /* eieio */
1282 op->type = BARRIER + BARRIER_EIEIO;
1283 return 1;
1284 }
1285 break;
1286 }
1287
1288 /* Following cases refer to regs->gpr[], so we need all regs */
1289 if (!FULL_REGS(regs))
1290 return -1;
1291
1292 rd = (word >> 21) & 0x1f;
1293 ra = (word >> 16) & 0x1f;
1294 rb = (word >> 11) & 0x1f;
1295 rc = (word >> 6) & 0x1f;
1296
1297 switch (opcode) {
1298 #ifdef __powerpc64__
1299 case 2: /* tdi */
1300 if (rd & trap_compare(regs->gpr[ra], (short) word))
1301 goto trap;
1302 return 1;
1303 #endif
1304 case 3: /* twi */
1305 if (rd & trap_compare((int)regs->gpr[ra], (short) word))
1306 goto trap;
1307 return 1;
1308
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [PATCH 2/3] null_blk: add error handling support for add_disk()
by kernel test robot
Hi Luis,
I love your patch! Yet something to improve:
[auto build test ERROR on block/for-next]
[also build test ERROR on v5.14-rc1 next-20210715]
[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/Luis-Chamberlain/block-simple-ad...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: x86_64-randconfig-b001-20210715 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 0e49c54a8cbd3e779e5526a5888c683c01cc3c50)
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
# https://github.com/0day-ci/linux/commit/df9eb8cd323290580b5c3c6b2bed0261e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Luis-Chamberlain/block-simple-add_disk-driver-conversions/20210716-035618
git checkout df9eb8cd323290580b5c3c6b2bed0261e67bc16b
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=x86_64 SHELL=/bin/bash
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 >>):
>> drivers/block/null_blk/main.c:1724:9: error: returning 'void' from a function with incompatible result type 'int'
return add_disk(disk);
^~~~~~~~~~~~~~
1 error generated.
vim +1724 drivers/block/null_blk/main.c
1698
1699 static int null_gendisk_register(struct nullb *nullb)
1700 {
1701 sector_t size = ((sector_t)nullb->dev->size * SZ_1M) >> SECTOR_SHIFT;
1702 struct gendisk *disk = nullb->disk;
1703
1704 set_capacity(disk, size);
1705
1706 disk->flags |= GENHD_FL_EXT_DEVT | GENHD_FL_SUPPRESS_PARTITION_INFO;
1707 disk->major = null_major;
1708 disk->first_minor = nullb->index;
1709 disk->minors = 1;
1710 if (queue_is_mq(nullb->q))
1711 disk->fops = &null_rq_ops;
1712 else
1713 disk->fops = &null_bio_ops;
1714 disk->private_data = nullb;
1715 strncpy(disk->disk_name, nullb->disk_name, DISK_NAME_LEN);
1716
1717 if (nullb->dev->zoned) {
1718 int ret = null_register_zoned_dev(nullb);
1719
1720 if (ret)
1721 return ret;
1722 }
1723
> 1724 return add_disk(disk);
1725 }
1726
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
[android-goldfish:android-3.18 59/309] arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (884f8b44 becomes 44)
by kernel test robot
tree: https://android.googlesource.com/kernel/goldfish android-3.18
head: 401f7aa077928b7d29b91b3574194309dfb3f4e4
commit: cc1aa665b505d3fe1debbee9cdbab8f53109d11a [59/309] inet: frags: get rid of ipfrag_skb_cb/FRAG_CB
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
git remote add android-goldfish https://android.googlesource.com/kernel/goldfish
git fetch --no-tags android-goldfish android-3.18
git checkout cc1aa665b505d3fe1debbee9cdbab8f53109d11a
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash LDFLAGS=-z max-page-size=0x200000 arch/x86/net/
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/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (e58948 becomes 48)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (e58948 becomes 8948)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (ec8148 becomes 48)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (ec8148 becomes 8148)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (228 becomes 28)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (9d8948 becomes 48)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (9d8948 becomes 8948)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (fffffdd8 becomes d8)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (ad894c becomes 4c)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (ad894c becomes 894c)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (fffffde0 becomes e0)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (b5894c becomes 4c)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (b5894c becomes 894c)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (fffffde8 becomes e8)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (bd894c becomes 4c)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (bd894c becomes 894c)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (fffffdf0 becomes f0)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (c031 becomes 31)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (ed314d becomes 4d)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (ed314d becomes 314d)
>> arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (884f8b44 becomes 44)
>> arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (884f8b44 becomes 8b44)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (8f8b44 becomes 44)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (8f8b44 becomes 8b44)
>> arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (8c4f2b44 becomes 44)
>> arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (8c4f2b44 becomes 2b44)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (8f2b44 becomes 44)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (8f2b44 becomes 2b44)
>> arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (e0578b4c becomes 4c)
>> arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (e0578b4c becomes 8b4c)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (978b4c becomes 4c)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (978b4c becomes 8b4c)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (c3c749 becomes 49)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (c3c749 becomes c749)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (d231 becomes 31)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (fb8349 becomes 49)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (fb8349 becomes 8349)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (975 becomes 75)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (c031 becomes 31)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (f3f749 becomes 49)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (f3f749 becomes f749)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (f3f741 becomes 41)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (f3f741 becomes f741)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (d38949 becomes 49)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (d38949 becomes 8949)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (c38949 becomes 49)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (c38949 becomes 8949)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (c0c748 becomes 48)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (c0c748 becomes c748)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (b70f45 becomes 45)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (b70f45 becomes f45)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (b70f becomes f)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (f41 becomes 41)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (b70f45 becomes 45)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (b70f45 becomes f45)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (b70f becomes f)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (c641 becomes 41)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (c74166 becomes 66)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (c74166 becomes 4166)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (c766 becomes 66)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (c741 becomes 41)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (8966 becomes 66)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (1f0 becomes f0)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (5241 becomes 41)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (5141 becomes 41)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (5941 becomes 41)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (5a41 becomes 41)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (c681 becomes 81)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (9d8b48 becomes 48)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (9d8b48 becomes 8b48)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (fffffdd8 becomes d8)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (ad8b4c becomes 4c)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (ad8b4c becomes 8b4c)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (fffffde0 becomes e0)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (b58b4c becomes 4c)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (b58b4c becomes 8b4c)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (fffffde8 becomes e8)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (bd8b4c becomes 4c)
arch/x86/net/bpf_jit_comp.c:32:31: sparse: sparse: cast truncates bits from constant value (bd8b4c becomes 8b4c)
arch/x86/net/bpf_jit_comp.c:30:24: sparse: sparse: cast truncates bits from constant value (fffffdf0 becomes f0)
In file included from arch/x86/include/asm/compat.h:8,
from include/linux/compat.h:19,
from include/linux/ethtool.h:15,
from include/linux/netdevice.h:43,
from arch/x86/net/bpf_jit_comp.c:11:
include/linux/sched.h:1067:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
1067 | const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
| ^~~~~
arch/x86/net/bpf_jit_comp.c: In function 'do_jit':
arch/x86/net/bpf_jit_comp.c:369:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
369 | if (imm32 < 0) {
| ^
arch/x86/net/bpf_jit_comp.c:378:3: note: here
378 | case BPF_ALU | BPF_MOV | BPF_K:
| ^~~~
vim +30 arch/x86/net/bpf_jit_comp.c
0a14842f5a3c0e Eric Dumazet 2011-04-20 26
0a14842f5a3c0e Eric Dumazet 2011-04-20 27 static inline u8 *emit_code(u8 *ptr, u32 bytes, unsigned int len)
0a14842f5a3c0e Eric Dumazet 2011-04-20 28 {
0a14842f5a3c0e Eric Dumazet 2011-04-20 29 if (len == 1)
0a14842f5a3c0e Eric Dumazet 2011-04-20 @30 *ptr = bytes;
0a14842f5a3c0e Eric Dumazet 2011-04-20 31 else if (len == 2)
0a14842f5a3c0e Eric Dumazet 2011-04-20 @32 *(u16 *)ptr = bytes;
0a14842f5a3c0e Eric Dumazet 2011-04-20 33 else {
0a14842f5a3c0e Eric Dumazet 2011-04-20 34 *(u32 *)ptr = bytes;
0a14842f5a3c0e Eric Dumazet 2011-04-20 35 barrier();
0a14842f5a3c0e Eric Dumazet 2011-04-20 36 }
0a14842f5a3c0e Eric Dumazet 2011-04-20 37 return ptr + len;
0a14842f5a3c0e Eric Dumazet 2011-04-20 38 }
0a14842f5a3c0e Eric Dumazet 2011-04-20 39
:::::: The code at line 30 was first introduced by commit
:::::: 0a14842f5a3c0e88a1e59fac5c3025db39721f74 net: filter: Just In Time compiler for x86-64
:::::: TO: Eric Dumazet <eric.dumazet(a)gmail.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [RFC 5/5] block/sx8: add error handling support for add_disk()
by kernel test robot
Hi Luis,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on block/for-next]
[also build test ERROR on linus/master v5.14-rc1 next-20210715]
[cannot apply to linux/master]
[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/Luis-Chamberlain/block-use-flag-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: arm64-randconfig-r036-20210715 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 0e49c54a8cbd3e779e5526a5888c683c01cc3c50)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/6b028ffa67d111371215cfeb9ea04ed6e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Luis-Chamberlain/block-use-flag-enhancement-for-del_gendisk/20210716-043130
git checkout 6b028ffa67d111371215cfeb9ea04ed6e3d30723
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/block/
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 >>):
>> drivers/block/sx8.c:1206:21: error: assigning to 'int' from incompatible type 'void'
host->probe_err = add_disk(disk);
^ ~~~~~~~~~~~~~~
1 error generated.
vim +1206 drivers/block/sx8.c
1116
1117 static void carm_fsm_task (struct work_struct *work)
1118 {
1119 struct carm_host *host =
1120 container_of(work, struct carm_host, fsm_task);
1121 unsigned long flags;
1122 unsigned int state;
1123 int rc, i, next_dev;
1124 int reschedule = 0;
1125 int new_state = HST_INVALID;
1126
1127 spin_lock_irqsave(&host->lock, flags);
1128 state = host->state;
1129 spin_unlock_irqrestore(&host->lock, flags);
1130
1131 DPRINTK("ENTER, state == %s\n", state_name[state]);
1132
1133 switch (state) {
1134 case HST_PROBE_START:
1135 new_state = HST_ALLOC_BUF;
1136 reschedule = 1;
1137 break;
1138
1139 case HST_ALLOC_BUF:
1140 rc = carm_send_special(host, carm_fill_alloc_buf);
1141 if (rc) {
1142 new_state = HST_ERROR;
1143 reschedule = 1;
1144 }
1145 break;
1146
1147 case HST_SYNC_TIME:
1148 rc = carm_send_special(host, carm_fill_sync_time);
1149 if (rc) {
1150 new_state = HST_ERROR;
1151 reschedule = 1;
1152 }
1153 break;
1154
1155 case HST_GET_FW_VER:
1156 rc = carm_send_special(host, carm_fill_get_fw_ver);
1157 if (rc) {
1158 new_state = HST_ERROR;
1159 reschedule = 1;
1160 }
1161 break;
1162
1163 case HST_PORT_SCAN:
1164 rc = carm_send_special(host, carm_fill_scan_channels);
1165 if (rc) {
1166 new_state = HST_ERROR;
1167 reschedule = 1;
1168 }
1169 break;
1170
1171 case HST_DEV_SCAN_START:
1172 host->cur_scan_dev = -1;
1173 new_state = HST_DEV_SCAN;
1174 reschedule = 1;
1175 break;
1176
1177 case HST_DEV_SCAN:
1178 next_dev = -1;
1179 for (i = host->cur_scan_dev + 1; i < CARM_MAX_PORTS; i++)
1180 if (host->dev_present & (1 << i)) {
1181 next_dev = i;
1182 break;
1183 }
1184
1185 if (next_dev >= 0) {
1186 host->cur_scan_dev = next_dev;
1187 rc = carm_array_info(host, next_dev);
1188 if (rc) {
1189 new_state = HST_ERROR;
1190 reschedule = 1;
1191 }
1192 } else {
1193 new_state = HST_DEV_ACTIVATE;
1194 reschedule = 1;
1195 }
1196 break;
1197
1198 case HST_DEV_ACTIVATE: {
1199 int activated = 0;
1200 for (i = 0; i < CARM_MAX_PORTS; i++)
1201 if (host->dev_active & (1 << i)) {
1202 struct carm_port *port = &host->port[i];
1203 struct gendisk *disk = port->disk;
1204
1205 set_capacity(disk, port->capacity);
> 1206 host->probe_err = add_disk(disk);
1207 if (!host->probe_err)
1208 activated++;
1209 else
1210 break;
1211 }
1212
1213 printk(KERN_INFO DRV_NAME "(%s): %d ports activated\n",
1214 pci_name(host->pdev), activated);
1215
1216 new_state = HST_PROBE_FINISHED;
1217 reschedule = 1;
1218 break;
1219 }
1220 case HST_PROBE_FINISHED:
1221 complete(&host->probe_comp);
1222 break;
1223 case HST_ERROR:
1224 /* FIXME: TODO */
1225 break;
1226
1227 default:
1228 /* should never occur */
1229 printk(KERN_ERR PFX "BUG: unknown state %d\n", state);
1230 assert(0);
1231 break;
1232 }
1233
1234 if (new_state != HST_INVALID) {
1235 spin_lock_irqsave(&host->lock, flags);
1236 host->state = new_state;
1237 spin_unlock_irqrestore(&host->lock, flags);
1238 }
1239 if (reschedule)
1240 schedule_work(&host->fsm_task);
1241 }
1242
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [PATCH] media: usb: uvc: uvc_driver: Added a function pr_info() in uvc_driver and staging: android: Decleared file operation with const keyword in android keyword
by kernel test robot
Hi Saptarshi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Saptarshi-Patra/media-usb-uvc-uv...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 77d34a4683b053108ecd466cc7c4193b45805528
config: parisc-buildonly-randconfig-r001-20210715 (attached as .config)
compiler: hppa-linux-gcc (GCC) 10.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
# https://github.com/0day-ci/linux/commit/9bcd3c935ac7432af5857cd7481496390...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Saptarshi-Patra/media-usb-uvc-uvc_driver-Added-a-function-pr_info-in-uvc_driver-and-staging-android-Decleared-file-operation-with-const-/20210716-040300
git checkout 9bcd3c935ac7432af5857cd74814963908d01a5d
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=parisc SHELL=/bin/bash drivers/staging/android/
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 >>):
drivers/staging/android/ashmem.c: In function 'ashmem_mmap':
>> drivers/staging/android/ashmem.c:431:16: error: assignment of read-only variable 'vmfile_fops'
431 | vmfile_fops = *vmfile->f_op;
| ^
>> drivers/staging/android/ashmem.c:432:21: error: assignment of member 'mmap' in read-only object
432 | vmfile_fops.mmap = ashmem_vmfile_mmap;
| ^
>> drivers/staging/android/ashmem.c:433:34: error: assignment of member 'get_unmapped_area' in read-only object
433 | vmfile_fops.get_unmapped_area =
| ^
drivers/staging/android/ashmem.c:409:17: warning: variable 'inode' set but not used [-Wunused-but-set-variable]
409 | struct inode *inode;
| ^~~~~
vim +/vmfile_fops +431 drivers/staging/android/ashmem.c
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 377
11980c2ac4ccfa Robert Love 2011-12-20 378 static int ashmem_mmap(struct file *file, struct vm_area_struct *vma)
11980c2ac4ccfa Robert Love 2011-12-20 379 {
9bcd3c935ac743 Saptarshi Patra 2021-07-16 380 static const struct file_operations vmfile_fops;
11980c2ac4ccfa Robert Love 2011-12-20 381 struct ashmem_area *asma = file->private_data;
11980c2ac4ccfa Robert Love 2011-12-20 382 int ret = 0;
11980c2ac4ccfa Robert Love 2011-12-20 383
11980c2ac4ccfa Robert Love 2011-12-20 384 mutex_lock(&ashmem_mutex);
11980c2ac4ccfa Robert Love 2011-12-20 385
11980c2ac4ccfa Robert Love 2011-12-20 386 /* user needs to SET_SIZE before mapping */
59848d6aded59a Alistair Strachan 2018-06-19 387 if (!asma->size) {
11980c2ac4ccfa Robert Love 2011-12-20 388 ret = -EINVAL;
11980c2ac4ccfa Robert Love 2011-12-20 389 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 390 }
11980c2ac4ccfa Robert Love 2011-12-20 391
8632c614565d0c Alistair Strachan 2018-06-19 392 /* requested mapping size larger than object size */
8632c614565d0c Alistair Strachan 2018-06-19 393 if (vma->vm_end - vma->vm_start > PAGE_ALIGN(asma->size)) {
11980c2ac4ccfa Robert Love 2011-12-20 394 ret = -EINVAL;
11980c2ac4ccfa Robert Love 2011-12-20 395 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 396 }
11980c2ac4ccfa Robert Love 2011-12-20 397
11980c2ac4ccfa Robert Love 2011-12-20 398 /* requested protection bits must match our allowed protection mask */
59848d6aded59a Alistair Strachan 2018-06-19 399 if ((vma->vm_flags & ~calc_vm_prot_bits(asma->prot_mask, 0)) &
59848d6aded59a Alistair Strachan 2018-06-19 400 calc_vm_prot_bits(PROT_MASK, 0)) {
11980c2ac4ccfa Robert Love 2011-12-20 401 ret = -EPERM;
11980c2ac4ccfa Robert Love 2011-12-20 402 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 403 }
56f76fc68492af Arve Hjønnevåg 2011-12-20 404 vma->vm_flags &= ~calc_vm_may_flags(~asma->prot_mask);
11980c2ac4ccfa Robert Love 2011-12-20 405
11980c2ac4ccfa Robert Love 2011-12-20 406 if (!asma->file) {
11980c2ac4ccfa Robert Love 2011-12-20 407 char *name = ASHMEM_NAME_DEF;
11980c2ac4ccfa Robert Love 2011-12-20 408 struct file *vmfile;
3e338d3c95c735 Suren Baghdasaryan 2020-07-30 409 struct inode *inode;
11980c2ac4ccfa Robert Love 2011-12-20 410
11980c2ac4ccfa Robert Love 2011-12-20 411 if (asma->name[ASHMEM_NAME_PREFIX_LEN] != '\0')
11980c2ac4ccfa Robert Love 2011-12-20 412 name = asma->name;
11980c2ac4ccfa Robert Love 2011-12-20 413
11980c2ac4ccfa Robert Love 2011-12-20 414 /* ... and allocate the backing shmem file */
11980c2ac4ccfa Robert Love 2011-12-20 415 vmfile = shmem_file_setup(name, asma->size, vma->vm_flags);
7f44cb0ba88b40 Viresh Kumar 2015-07-31 416 if (IS_ERR(vmfile)) {
11980c2ac4ccfa Robert Love 2011-12-20 417 ret = PTR_ERR(vmfile);
11980c2ac4ccfa Robert Love 2011-12-20 418 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 419 }
97fbfef6bd5978 Shuxiao Zhang 2017-04-06 420 vmfile->f_mode |= FMODE_LSEEK;
3e338d3c95c735 Suren Baghdasaryan 2020-07-30 421 inode = file_inode(vmfile);
3e338d3c95c735 Suren Baghdasaryan 2020-07-30 422 lockdep_set_class(&inode->i_rwsem, &backing_shmem_inode_class);
11980c2ac4ccfa Robert Love 2011-12-20 423 asma->file = vmfile;
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 424 /*
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 425 * override mmap operation of the vmfile so that it can't be
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 426 * remapped which would lead to creation of a new vma with no
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 427 * asma permission checks. Have to override get_unmapped_area
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 428 * as well to prevent VM_BUG_ON check for f_ops modification.
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 429 */
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 430 if (!vmfile_fops.mmap) {
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 @431 vmfile_fops = *vmfile->f_op;
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 @432 vmfile_fops.mmap = ashmem_vmfile_mmap;
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 @433 vmfile_fops.get_unmapped_area =
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 434 ashmem_vmfile_get_unmapped_area;
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 435 }
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 436 vmfile->f_op = &vmfile_fops;
11980c2ac4ccfa Robert Love 2011-12-20 437 }
11980c2ac4ccfa Robert Love 2011-12-20 438 get_file(asma->file);
11980c2ac4ccfa Robert Love 2011-12-20 439
11980c2ac4ccfa Robert Love 2011-12-20 440 /*
11980c2ac4ccfa Robert Love 2011-12-20 441 * XXX - Reworked to use shmem_zero_setup() instead of
11980c2ac4ccfa Robert Love 2011-12-20 442 * shmem_set_file while we're in staging. -jstultz
11980c2ac4ccfa Robert Love 2011-12-20 443 */
11980c2ac4ccfa Robert Love 2011-12-20 444 if (vma->vm_flags & VM_SHARED) {
11980c2ac4ccfa Robert Love 2011-12-20 445 ret = shmem_zero_setup(vma);
11980c2ac4ccfa Robert Love 2011-12-20 446 if (ret) {
11980c2ac4ccfa Robert Love 2011-12-20 447 fput(asma->file);
11980c2ac4ccfa Robert Love 2011-12-20 448 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 449 }
44960f2a7b63e2 John Stultz 2018-07-31 450 } else {
44960f2a7b63e2 John Stultz 2018-07-31 451 vma_set_anonymous(vma);
11980c2ac4ccfa Robert Love 2011-12-20 452 }
11980c2ac4ccfa Robert Love 2011-12-20 453
295992fb815e79 Christian König 2020-09-14 454 vma_set_file(vma, asma->file);
295992fb815e79 Christian König 2020-09-14 455 /* XXX: merge this with the get_file() above if possible */
295992fb815e79 Christian König 2020-09-14 456 fput(asma->file);
11980c2ac4ccfa Robert Love 2011-12-20 457
11980c2ac4ccfa Robert Love 2011-12-20 458 out:
11980c2ac4ccfa Robert Love 2011-12-20 459 mutex_unlock(&ashmem_mutex);
11980c2ac4ccfa Robert Love 2011-12-20 460 return ret;
11980c2ac4ccfa Robert Love 2011-12-20 461 }
11980c2ac4ccfa Robert Love 2011-12-20 462
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [PATCH 2/3] null_blk: add error handling support for add_disk()
by kernel test robot
Hi Luis,
I love your patch! Yet something to improve:
[auto build test ERROR on block/for-next]
[also build test ERROR on v5.14-rc1 next-20210715]
[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/Luis-Chamberlain/block-simple-ad...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: h8300-randconfig-r032-20210715 (attached as .config)
compiler: h8300-linux-gcc (GCC) 10.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
# https://github.com/0day-ci/linux/commit/df9eb8cd323290580b5c3c6b2bed0261e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Luis-Chamberlain/block-simple-add_disk-driver-conversions/20210716-035618
git checkout df9eb8cd323290580b5c3c6b2bed0261e67bc16b
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=h8300 SHELL=/bin/bash drivers/block/
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 include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/block/null_blk/main.c:6:
include/linux/scatterlist.h: In function 'sg_set_buf':
include/asm-generic/page.h:89:50: warning: ordered comparison of pointer with null pointer [-Wextra]
89 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:137:2: note: in expansion of macro 'BUG_ON'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:137:10: note: in expansion of macro 'virt_addr_valid'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/block/null_blk/main.c: In function 'null_gendisk_register':
>> drivers/block/null_blk/main.c:1724:9: error: void value not ignored as it ought to be
1724 | return add_disk(disk);
| ^~~~~~~~~~~~~~
drivers/block/null_blk/main.c:1725:1: error: control reaches end of non-void function [-Werror=return-type]
1725 | }
| ^
cc1: some warnings being treated as errors
vim +1724 drivers/block/null_blk/main.c
1698
1699 static int null_gendisk_register(struct nullb *nullb)
1700 {
1701 sector_t size = ((sector_t)nullb->dev->size * SZ_1M) >> SECTOR_SHIFT;
1702 struct gendisk *disk = nullb->disk;
1703
1704 set_capacity(disk, size);
1705
1706 disk->flags |= GENHD_FL_EXT_DEVT | GENHD_FL_SUPPRESS_PARTITION_INFO;
1707 disk->major = null_major;
1708 disk->first_minor = nullb->index;
1709 disk->minors = 1;
1710 if (queue_is_mq(nullb->q))
1711 disk->fops = &null_rq_ops;
1712 else
1713 disk->fops = &null_bio_ops;
1714 disk->private_data = nullb;
1715 strncpy(disk->disk_name, nullb->disk_name, DISK_NAME_LEN);
1716
1717 if (nullb->dev->zoned) {
1718 int ret = null_register_zoned_dev(nullb);
1719
1720 if (ret)
1721 return ret;
1722 }
1723
> 1724 return add_disk(disk);
1725 }
1726
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [RFC 2/5] bcache: add error handling support for add_disk()
by kernel test robot
Hi Luis,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on block/for-next]
[also build test ERROR on linus/master v5.14-rc1 next-20210715]
[cannot apply to linux/master]
[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/Luis-Chamberlain/block-use-flag-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: x86_64-randconfig-a004-20210715 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 0e49c54a8cbd3e779e5526a5888c683c01cc3c50)
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
# https://github.com/0day-ci/linux/commit/75d7d3207d699f24abb7502f1dc8c1ff0...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Luis-Chamberlain/block-use-flag-enhancement-for-del_gendisk/20210716-043130
git checkout 75d7d3207d699f24abb7502f1dc8c1ff00a9ac1a
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/block/ drivers/md/bcache/ drivers/scsi/
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 >>):
>> drivers/md/bcache/super.c:1080:6: error: assigning to 'int' from incompatible type 'void'
ret = add_disk(d->disk);
^ ~~~~~~~~~~~~~~~~~
drivers/md/bcache/super.c:1549:6: error: assigning to 'int' from incompatible type 'void'
err = add_disk(d->disk);
^ ~~~~~~~~~~~~~~~~~
2 errors generated.
vim +1080 drivers/md/bcache/super.c
1041
1042
1043 int bch_cached_dev_run(struct cached_dev *dc)
1044 {
1045 int ret = 0;
1046 struct bcache_device *d = &dc->disk;
1047 char *buf = kmemdup_nul(dc->sb.label, SB_LABEL_SIZE, GFP_KERNEL);
1048 char *env[] = {
1049 "DRIVER=bcache",
1050 kasprintf(GFP_KERNEL, "CACHED_UUID=%pU", dc->sb.uuid),
1051 kasprintf(GFP_KERNEL, "CACHED_LABEL=%s", buf ? : ""),
1052 NULL,
1053 };
1054
1055 if (dc->io_disable) {
1056 pr_err("I/O disabled on cached dev %s\n",
1057 dc->backing_dev_name);
1058 ret = -EIO;
1059 goto out;
1060 }
1061
1062 if (atomic_xchg(&dc->running, 1)) {
1063 pr_info("cached dev %s is running already\n",
1064 dc->backing_dev_name);
1065 ret = -EBUSY;
1066 goto out;
1067 }
1068
1069 if (!d->c &&
1070 BDEV_STATE(&dc->sb) != BDEV_STATE_NONE) {
1071 struct closure cl;
1072
1073 closure_init_stack(&cl);
1074
1075 SET_BDEV_STATE(&dc->sb, BDEV_STATE_STALE);
1076 bch_write_bdev_super(dc, &cl);
1077 closure_sync(&cl);
1078 }
1079
> 1080 ret = add_disk(d->disk);
1081 if (ret)
1082 goto out;
1083 bd_link_disk_holder(dc->bdev, dc->disk.disk);
1084 /*
1085 * won't show up in the uevent file, use udevadm monitor -e instead
1086 * only class / kset properties are persistent
1087 */
1088 kobject_uevent_env(&disk_to_dev(d->disk)->kobj, KOBJ_CHANGE, env);
1089
1090 if (sysfs_create_link(&d->kobj, &disk_to_dev(d->disk)->kobj, "dev") ||
1091 sysfs_create_link(&disk_to_dev(d->disk)->kobj,
1092 &d->kobj, "bcache")) {
1093 pr_err("Couldn't create bcache dev <-> disk sysfs symlinks\n");
1094 ret = -ENOMEM;
1095 goto out;
1096 }
1097
1098 dc->status_update_thread = kthread_run(cached_dev_status_update,
1099 dc, "bcache_status_update");
1100 if (IS_ERR(dc->status_update_thread)) {
1101 pr_warn("failed to create bcache_status_update kthread, continue to run without monitoring backing device status\n");
1102 }
1103
1104 out:
1105 kfree(env[1]);
1106 kfree(env[2]);
1107 kfree(buf);
1108 return ret;
1109 }
1110
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months