[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202105282237.P69ARTyl-lkp@intel.com>
Date: Fri, 28 May 2021 22:33:41 +0800
From: kernel test robot <lkp@...el.com>
To: Sebastian Reichel <sebastian.reichel@...labora.com>,
Mark Brown <broonie@...nel.org>,
Rob Herring <robh+dt@...nel.org>
Cc: kbuild-all@...ts.01.org, Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>, Ian Ray <ian.ray@...com>,
linux-kernel@...r.kernel.org, linux-spi@...r.kernel.org
Subject: Re: [PATCHv3 5/5] misc: gehc-achc: new driver
Hi Sebastian,
I love your patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on char-misc/char-misc-testing v5.13-rc3]
[cannot apply to spi/for-next next-20210528]
[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/Sebastian-Reichel/GE-Healthcare-PPD-firmware-upgrade-driver-for-ACHC/20210528-193816
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: nds32-randconfig-p002-20210528 (attached as .config)
compiler: nds32le-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/dac014da90e2715a80e4f7139ac40333cd3d4bec
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sebastian-Reichel/GE-Healthcare-PPD-firmware-upgrade-driver-for-ACHC/20210528-193816
git checkout dac014da90e2715a80e4f7139ac40333cd3d4bec
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/spi/spidev.c:730:5: warning: no previous prototype for 'spidev_probe' [-Wmissing-prototypes]
730 | int spidev_probe(struct spi_device *spi)
| ^~~~~~~~~~~~
>> drivers/spi/spidev.c:793:5: warning: no previous prototype for 'spidev_remove' [-Wmissing-prototypes]
793 | int spidev_remove(struct spi_device *spi)
| ^~~~~~~~~~~~~
vim +/spidev_probe +730 drivers/spi/spidev.c
729
> 730 int spidev_probe(struct spi_device *spi)
731 {
732 struct spidev_data *spidev;
733 int status;
734 unsigned long minor;
735
736 /*
737 * spidev should never be referenced in DT without a specific
738 * compatible string, it is a Linux implementation thing
739 * rather than a description of the hardware.
740 */
741 WARN(spi->dev.of_node &&
742 of_device_is_compatible(spi->dev.of_node, "spidev"),
743 "%pOF: buggy DT: spidev listed directly in DT\n", spi->dev.of_node);
744
745 spidev_probe_acpi(spi);
746
747 /* Allocate driver data */
748 spidev = kzalloc(sizeof(*spidev), GFP_KERNEL);
749 if (!spidev)
750 return -ENOMEM;
751
752 /* Initialize the driver data */
753 spidev->spi = spi;
754 spin_lock_init(&spidev->spi_lock);
755 mutex_init(&spidev->buf_lock);
756
757 INIT_LIST_HEAD(&spidev->device_entry);
758
759 /* If we can allocate a minor number, hook up this device.
760 * Reusing minors is fine so long as udev or mdev is working.
761 */
762 mutex_lock(&device_list_lock);
763 minor = find_first_zero_bit(minors, N_SPI_MINORS);
764 if (minor < N_SPI_MINORS) {
765 struct device *dev;
766
767 spidev->devt = MKDEV(SPIDEV_MAJOR, minor);
768 dev = device_create(spidev_class, &spi->dev, spidev->devt,
769 spidev, "spidev%d.%d",
770 spi->master->bus_num, spi->chip_select);
771 status = PTR_ERR_OR_ZERO(dev);
772 } else {
773 dev_dbg(&spi->dev, "no minor number available!\n");
774 status = -ENODEV;
775 }
776 if (status == 0) {
777 set_bit(minor, minors);
778 list_add(&spidev->device_entry, &device_list);
779 }
780 mutex_unlock(&device_list_lock);
781
782 spidev->speed_hz = spi->max_speed_hz;
783
784 if (status == 0)
785 spi_set_drvdata(spi, spidev);
786 else
787 kfree(spidev);
788
789 return status;
790 }
791 EXPORT_SYMBOL_GPL(spidev_probe);
792
> 793 int spidev_remove(struct spi_device *spi)
794 {
795 struct spidev_data *spidev = spi_get_drvdata(spi);
796
797 /* prevent new opens */
798 mutex_lock(&device_list_lock);
799 /* make sure ops on existing fds can abort cleanly */
800 spin_lock_irq(&spidev->spi_lock);
801 spidev->spi = NULL;
802 spin_unlock_irq(&spidev->spi_lock);
803
804 list_del(&spidev->device_entry);
805 device_destroy(spidev_class, spidev->devt);
806 clear_bit(MINOR(spidev->devt), minors);
807 if (spidev->users == 0)
808 kfree(spidev);
809 mutex_unlock(&device_list_lock);
810
811 return 0;
812 }
813 EXPORT_SYMBOL_GPL(spidev_remove);
814
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (24046 bytes)
Powered by blists - more mailing lists