Re: [PATCH] floppy: hide invalid floppy disk types

From: kbuild test robot
Date: Sun Dec 08 2019 - 19:33:45 EST


Hi "Moritz,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on block/for-next]
[also build test ERROR on linux/master linus/master v5.4 next-20191208]
[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/Moritz-M-ller/floppy-hide-invalid-floppy-disk-types/20191209-035056
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: x86_64-rhel (attached as .config)
compiler: gcc-7 (Debian 7.5.0-1) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

drivers//block/floppy.c: In function 'floppy_available':
>> drivers//block/floppy.c:4524:6: error: 'type' undeclared (first use in this function); did you mean 'true'?
if (type >= ARRAY_SIZE(default_drive_params))
^~~~
true
drivers//block/floppy.c:4524:6: note: each undeclared identifier is reported only once for each function it appears in

vim +4524 drivers//block/floppy.c

4516
4517 static bool floppy_available(int drive)
4518 {
4519 if (!(allowed_drive_mask & (1 << drive)))
4520 return false;
4521 if (fdc_state[FDC(drive)].version == FDC_NONE)
4522 return false;
4523 #ifndef CONFIG_FLOPPY_ALLOW_UNKNOWN_TYPES
> 4524 if (type >= ARRAY_SIZE(default_drive_params))
4525 return false;
4526 #endif
4527 return true;
4528 }
4529

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation

Attachment: .config.gz
Description: application/gzip