From: kernel test robot <lkp@intel.com>
To: Jiri Kosina <jikos@kernel.org>, Denis Efremov <efremov@linux.com>
Cc: kbuild-all@lists.01.org, Jens Axboe <axboe@kernel.dk>,
linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
Wim Osterholt <wim@djo.tudelft.nl>
Subject: Re: [PATCH] floppy: reintroduce O_NDELAY fix
Date: Thu, 21 Jan 2021 21:28:59 +0800 [thread overview]
Message-ID: <202101212136.UDIlSh1F-lkp@intel.com> (raw)
In-Reply-To: <nycvar.YFH.7.76.2101211122290.5622@cbobk.fhfr.pm>
[-- Attachment #1: Type: text/plain, Size: 6802 bytes --]
Hi Jiri,
I love your patch! Yet something to improve:
[auto build test ERROR on block/for-next]
[also build test ERROR on linux/master linus/master v5.11-rc4 next-20210121]
[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/Jiri-Kosina/floppy-reintroduce-O_NDELAY-fix/20210121-182951
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: sparc64-randconfig-r033-20210121 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/605da67173ab7c362845b2f74c2914bfcec6db2e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jiri-Kosina/floppy-reintroduce-O_NDELAY-fix/20210121-182951
git checkout 605da67173ab7c362845b2f74c2914bfcec6db2e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from arch/sparc/include/asm/floppy.h:5,
from drivers/block/floppy.c:251:
arch/sparc/include/asm/floppy_64.h:200:13: warning: no previous prototype for 'sparc_floppy_irq' [-Wmissing-prototypes]
200 | irqreturn_t sparc_floppy_irq(int irq, void *dev_cookie)
| ^~~~~~~~~~~~~~~~
In file included from arch/sparc/include/asm/floppy.h:5,
from drivers/block/floppy.c:251:
arch/sparc/include/asm/floppy_64.h:437:6: warning: no previous prototype for 'sun_pci_fd_dma_callback' [-Wmissing-prototypes]
437 | void sun_pci_fd_dma_callback(struct ebus_dma_info *p, int event, void *cookie)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/block/floppy.c: In function 'floppy_open':
>> drivers/block/floppy.c:4125:3: error: 'UDRS' undeclared (first use in this function)
4125 | UDRS->last_checked = 0;
| ^~~~
drivers/block/floppy.c:4125:3: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/block/floppy.c:4127:3: error: implicit declaration of function 'check_disk_change'; did you mean 'bdev_disk_changed'? [-Werror=implicit-function-declaration]
4127 | check_disk_change(bdev);
| ^~~~~~~~~~~~~~~~~
| bdev_disk_changed
cc1: some warnings being treated as errors
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for COMPAT_BINFMT_ELF
Depends on COMPAT && BINFMT_ELF
Selected by
- COMPAT && SPARC64
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS || MCOUNT
Selected by
- LOCKDEP && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && !MIPS && !PPC && !ARM && !S390 && !MICROBLAZE && !ARC && !X86
vim +/UDRS +4125 drivers/block/floppy.c
4052
4053 /*
4054 * floppy_open check for aliasing (/dev/fd0 can be the same as
4055 * /dev/PS0 etc), and disallows simultaneous access to the same
4056 * drive with different device numbers.
4057 */
4058 static int floppy_open(struct block_device *bdev, fmode_t mode)
4059 {
4060 int drive = (long)bdev->bd_disk->private_data;
4061 int old_dev, new_dev;
4062 int try;
4063 int res = -EBUSY;
4064 char *tmp;
4065
4066 mutex_lock(&floppy_mutex);
4067 mutex_lock(&open_lock);
4068 old_dev = drive_state[drive].fd_device;
4069 if (opened_bdev[drive] && opened_bdev[drive] != bdev)
4070 goto out2;
4071
4072 if (!drive_state[drive].fd_ref && (drive_params[drive].flags & FD_BROKEN_DCL)) {
4073 set_bit(FD_DISK_CHANGED_BIT, &drive_state[drive].flags);
4074 set_bit(FD_VERIFY_BIT, &drive_state[drive].flags);
4075 }
4076
4077 drive_state[drive].fd_ref++;
4078
4079 opened_bdev[drive] = bdev;
4080
4081 res = -ENXIO;
4082
4083 if (!floppy_track_buffer) {
4084 /* if opening an ED drive, reserve a big buffer,
4085 * else reserve a small one */
4086 if ((drive_params[drive].cmos == 6) || (drive_params[drive].cmos == 5))
4087 try = 64; /* Only 48 actually useful */
4088 else
4089 try = 32; /* Only 24 actually useful */
4090
4091 tmp = (char *)fd_dma_mem_alloc(1024 * try);
4092 if (!tmp && !floppy_track_buffer) {
4093 try >>= 1; /* buffer only one side */
4094 INFBOUND(try, 16);
4095 tmp = (char *)fd_dma_mem_alloc(1024 * try);
4096 }
4097 if (!tmp && !floppy_track_buffer)
4098 fallback_on_nodma_alloc(&tmp, 2048 * try);
4099 if (!tmp && !floppy_track_buffer) {
4100 DPRINT("Unable to allocate DMA memory\n");
4101 goto out;
4102 }
4103 if (floppy_track_buffer) {
4104 if (tmp)
4105 fd_dma_mem_free((unsigned long)tmp, try * 1024);
4106 } else {
4107 buffer_min = buffer_max = -1;
4108 floppy_track_buffer = tmp;
4109 max_buffer_sectors = try;
4110 }
4111 }
4112
4113 new_dev = MINOR(bdev->bd_dev);
4114 drive_state[drive].fd_device = new_dev;
4115 set_capacity(disks[drive][ITYPE(new_dev)], floppy_sizes[new_dev]);
4116 if (old_dev != -1 && old_dev != new_dev) {
4117 if (buffer_drive == drive)
4118 buffer_track = -1;
4119 }
4120
4121 if (fdc_state[FDC(drive)].rawcmd == 1)
4122 fdc_state[FDC(drive)].rawcmd = 2;
4123
4124 if (mode & (FMODE_READ|FMODE_WRITE)) {
> 4125 UDRS->last_checked = 0;
4126 clear_bit(FD_OPEN_SHOULD_FAIL_BIT, &drive_state[drive].flags);
> 4127 check_disk_change(bdev);
4128 if (test_bit(FD_DISK_CHANGED_BIT, &drive_state[drive].flags))
4129 goto out;
4130 if (test_bit(FD_OPEN_SHOULD_FAIL_BIT, &drive_state[drive].flags))
4131 goto out;
4132 }
4133
4134 res = -EROFS;
4135
4136 if ((mode & FMODE_WRITE) &&
4137 !test_bit(FD_DISK_WRITABLE_BIT, &drive_state[drive].flags))
4138 goto out;
4139
4140 mutex_unlock(&open_lock);
4141 mutex_unlock(&floppy_mutex);
4142 return 0;
4143 out:
4144 drive_state[drive].fd_ref--;
4145
4146 if (!drive_state[drive].fd_ref)
4147 opened_bdev[drive] = NULL;
4148 out2:
4149 mutex_unlock(&open_lock);
4150 mutex_unlock(&floppy_mutex);
4151 return res;
4152 }
4153
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25754 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] floppy: reintroduce O_NDELAY fix
Date: Thu, 21 Jan 2021 21:28:59 +0800 [thread overview]
Message-ID: <202101212136.UDIlSh1F-lkp@intel.com> (raw)
In-Reply-To: <nycvar.YFH.7.76.2101211122290.5622@cbobk.fhfr.pm>
[-- Attachment #1: Type: text/plain, Size: 6973 bytes --]
Hi Jiri,
I love your patch! Yet something to improve:
[auto build test ERROR on block/for-next]
[also build test ERROR on linux/master linus/master v5.11-rc4 next-20210121]
[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/Jiri-Kosina/floppy-reintroduce-O_NDELAY-fix/20210121-182951
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: sparc64-randconfig-r033-20210121 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/605da67173ab7c362845b2f74c2914bfcec6db2e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jiri-Kosina/floppy-reintroduce-O_NDELAY-fix/20210121-182951
git checkout 605da67173ab7c362845b2f74c2914bfcec6db2e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from arch/sparc/include/asm/floppy.h:5,
from drivers/block/floppy.c:251:
arch/sparc/include/asm/floppy_64.h:200:13: warning: no previous prototype for 'sparc_floppy_irq' [-Wmissing-prototypes]
200 | irqreturn_t sparc_floppy_irq(int irq, void *dev_cookie)
| ^~~~~~~~~~~~~~~~
In file included from arch/sparc/include/asm/floppy.h:5,
from drivers/block/floppy.c:251:
arch/sparc/include/asm/floppy_64.h:437:6: warning: no previous prototype for 'sun_pci_fd_dma_callback' [-Wmissing-prototypes]
437 | void sun_pci_fd_dma_callback(struct ebus_dma_info *p, int event, void *cookie)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/block/floppy.c: In function 'floppy_open':
>> drivers/block/floppy.c:4125:3: error: 'UDRS' undeclared (first use in this function)
4125 | UDRS->last_checked = 0;
| ^~~~
drivers/block/floppy.c:4125:3: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/block/floppy.c:4127:3: error: implicit declaration of function 'check_disk_change'; did you mean 'bdev_disk_changed'? [-Werror=implicit-function-declaration]
4127 | check_disk_change(bdev);
| ^~~~~~~~~~~~~~~~~
| bdev_disk_changed
cc1: some warnings being treated as errors
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for COMPAT_BINFMT_ELF
Depends on COMPAT && BINFMT_ELF
Selected by
- COMPAT && SPARC64
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS || MCOUNT
Selected by
- LOCKDEP && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && !MIPS && !PPC && !ARM && !S390 && !MICROBLAZE && !ARC && !X86
vim +/UDRS +4125 drivers/block/floppy.c
4052
4053 /*
4054 * floppy_open check for aliasing (/dev/fd0 can be the same as
4055 * /dev/PS0 etc), and disallows simultaneous access to the same
4056 * drive with different device numbers.
4057 */
4058 static int floppy_open(struct block_device *bdev, fmode_t mode)
4059 {
4060 int drive = (long)bdev->bd_disk->private_data;
4061 int old_dev, new_dev;
4062 int try;
4063 int res = -EBUSY;
4064 char *tmp;
4065
4066 mutex_lock(&floppy_mutex);
4067 mutex_lock(&open_lock);
4068 old_dev = drive_state[drive].fd_device;
4069 if (opened_bdev[drive] && opened_bdev[drive] != bdev)
4070 goto out2;
4071
4072 if (!drive_state[drive].fd_ref && (drive_params[drive].flags & FD_BROKEN_DCL)) {
4073 set_bit(FD_DISK_CHANGED_BIT, &drive_state[drive].flags);
4074 set_bit(FD_VERIFY_BIT, &drive_state[drive].flags);
4075 }
4076
4077 drive_state[drive].fd_ref++;
4078
4079 opened_bdev[drive] = bdev;
4080
4081 res = -ENXIO;
4082
4083 if (!floppy_track_buffer) {
4084 /* if opening an ED drive, reserve a big buffer,
4085 * else reserve a small one */
4086 if ((drive_params[drive].cmos == 6) || (drive_params[drive].cmos == 5))
4087 try = 64; /* Only 48 actually useful */
4088 else
4089 try = 32; /* Only 24 actually useful */
4090
4091 tmp = (char *)fd_dma_mem_alloc(1024 * try);
4092 if (!tmp && !floppy_track_buffer) {
4093 try >>= 1; /* buffer only one side */
4094 INFBOUND(try, 16);
4095 tmp = (char *)fd_dma_mem_alloc(1024 * try);
4096 }
4097 if (!tmp && !floppy_track_buffer)
4098 fallback_on_nodma_alloc(&tmp, 2048 * try);
4099 if (!tmp && !floppy_track_buffer) {
4100 DPRINT("Unable to allocate DMA memory\n");
4101 goto out;
4102 }
4103 if (floppy_track_buffer) {
4104 if (tmp)
4105 fd_dma_mem_free((unsigned long)tmp, try * 1024);
4106 } else {
4107 buffer_min = buffer_max = -1;
4108 floppy_track_buffer = tmp;
4109 max_buffer_sectors = try;
4110 }
4111 }
4112
4113 new_dev = MINOR(bdev->bd_dev);
4114 drive_state[drive].fd_device = new_dev;
4115 set_capacity(disks[drive][ITYPE(new_dev)], floppy_sizes[new_dev]);
4116 if (old_dev != -1 && old_dev != new_dev) {
4117 if (buffer_drive == drive)
4118 buffer_track = -1;
4119 }
4120
4121 if (fdc_state[FDC(drive)].rawcmd == 1)
4122 fdc_state[FDC(drive)].rawcmd = 2;
4123
4124 if (mode & (FMODE_READ|FMODE_WRITE)) {
> 4125 UDRS->last_checked = 0;
4126 clear_bit(FD_OPEN_SHOULD_FAIL_BIT, &drive_state[drive].flags);
> 4127 check_disk_change(bdev);
4128 if (test_bit(FD_DISK_CHANGED_BIT, &drive_state[drive].flags))
4129 goto out;
4130 if (test_bit(FD_OPEN_SHOULD_FAIL_BIT, &drive_state[drive].flags))
4131 goto out;
4132 }
4133
4134 res = -EROFS;
4135
4136 if ((mode & FMODE_WRITE) &&
4137 !test_bit(FD_DISK_WRITABLE_BIT, &drive_state[drive].flags))
4138 goto out;
4139
4140 mutex_unlock(&open_lock);
4141 mutex_unlock(&floppy_mutex);
4142 return 0;
4143 out:
4144 drive_state[drive].fd_ref--;
4145
4146 if (!drive_state[drive].fd_ref)
4147 opened_bdev[drive] = NULL;
4148 out2:
4149 mutex_unlock(&open_lock);
4150 mutex_unlock(&floppy_mutex);
4151 return res;
4152 }
4153
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 25754 bytes --]
next prev parent reply other threads:[~2021-01-21 13:30 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-10 23:02 disfunctional floppy driver in kernels 4.5, 4.6 and 4.7 Wim Osterholt
2016-06-11 13:15 ` VFS regression ? " One Thousand Gnomes
2016-06-12 0:23 ` Wim Osterholt
2016-06-13 12:15 ` Jiri Kosina
2016-06-14 18:43 ` Wim Osterholt
2016-06-15 7:09 ` Jiri Kosina
2016-06-15 11:42 ` Wim Osterholt
2016-06-15 13:20 ` Al Viro
2016-06-15 14:13 ` Jiri Kosina
2016-06-15 22:47 ` Wim Osterholt
2016-06-16 7:53 ` [PATCH] floppy: fix open(O_ACCMODE) for ioctl-only open Jiri Kosina
2016-06-30 11:18 ` [PATCH RESEND] " Jiri Kosina
2016-07-25 18:09 ` Wim Osterholt
2016-07-25 20:48 ` Jens Axboe
2021-01-19 15:53 ` Jiri Kosina
2021-01-21 4:44 ` Denis Efremov
2021-01-21 10:25 ` Jiri Kosina
2021-01-21 13:28 ` kernel test robot [this message]
2021-01-21 13:28 ` [PATCH] floppy: reintroduce O_NDELAY fix kernel test robot
2021-01-21 14:44 ` [PATCH RESEND] floppy: fix open(O_ACCMODE) for ioctl-only open Jiri Kosina
2021-01-21 15:02 ` Denis Efremov
2021-01-21 15:05 ` Jiri Kosina
2021-01-22 11:13 ` [PATCH] floppy: reintroduce O_NDELAY fix Jiri Kosina
2021-01-26 8:21 ` Denis Efremov
2021-01-26 9:31 ` Kurt Garloff
2021-01-26 9:59 ` Denis Efremov
2021-02-04 9:24 ` Jiri Kosina
2021-02-04 10:18 ` Denis Efremov
2021-01-21 14:45 ` [PATCH RESEND] floppy: fix open(O_ACCMODE) for ioctl-only open Denis Efremov
2016-06-15 23:07 ` disfunctional floppy driver in kernels 4.5, 4.6 and 4.7 Wim Osterholt
2016-06-15 23:12 ` Jiri Kosina
2016-06-15 23:13 ` Joe Perches
2016-06-14 19:09 ` Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202101212136.UDIlSh1F-lkp@intel.com \
--to=lkp@intel.com \
--cc=axboe@kernel.dk \
--cc=efremov@linux.com \
--cc=jikos@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wim@djo.tudelft.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.