tree:
https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 7d447bb293df1263f722e38a09c553f431f1ddc6
commit: 886e310cf5af7ee90cc42bd148100307834150ae [114/249] CHROMIUM: Bluetooth: hci_h5:
keep RTL8822C powered during suspend
config: x86_64-randconfig-r025-20210609 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add chrome-os
https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout 886e310cf5af7ee90cc42bd148100307834150ae
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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/bluetooth/hci_h5.c: In function 'h5_serdev_probe':
> drivers/bluetooth/hci_h5.c:801:18: error: variable 'hdev'
set but not used [-Werror=unused-but-set-variable]
801 | struct hci_dev
*hdev;
| ^~~~
cc1: all warnings being treated as errors
vim +/hdev +801 drivers/bluetooth/hci_h5.c
796
797 static int h5_serdev_probe(struct serdev_device *serdev)
798 {
799 const struct acpi_device_id *match;
800 struct device *dev = &serdev->dev;
801 struct hci_dev *hdev;
802 struct h5 *h5;
803 const struct h5_device_data *data;
804 int err;
805
806 h5 = devm_kzalloc(dev, sizeof(*h5), GFP_KERNEL);
807 if (!h5)
808 return -ENOMEM;
809
810 set_bit(HCI_UART_RESET_ON_INIT, &h5->serdev_hu.hdev_flags);
811
812 h5->hu = &h5->serdev_hu;
813 h5->serdev_hu.serdev = serdev;
814 serdev_device_set_drvdata(serdev, h5);
815
816 if (has_acpi_companion(dev)) {
817 match = acpi_match_device(dev->driver->acpi_match_table, dev);
818 if (!match)
819 return -ENODEV;
820
821 data = (const struct h5_device_data *)match->driver_data;
822 h5->vnd = data->vnd;
823 h5->id = (char *)match->id;
824
825 if (h5->vnd->acpi_gpio_map)
826 devm_acpi_dev_add_driver_gpios(dev,
827 h5->vnd->acpi_gpio_map);
828 } else {
829 data = of_device_get_match_data(dev);
830 if (!data)
831 return -ENODEV;
832
833 h5->vnd = data->vnd;
834 }
835
836
837 h5->enable_gpio = devm_gpiod_get_optional(dev, "enable",
GPIOD_OUT_LOW);
838 if (IS_ERR(h5->enable_gpio))
839 return PTR_ERR(h5->enable_gpio);
840
841 h5->device_wake_gpio = devm_gpiod_get_optional(dev, "device-wake",
842 GPIOD_OUT_LOW);
843 if (IS_ERR(h5->device_wake_gpio))
844 return PTR_ERR(h5->device_wake_gpio);
845
846 err = hci_uart_register_device(&h5->serdev_hu, &h5p);
847 if (err)
848 return err;
849
850 hdev = h5->serdev_hu.hdev;
851
852 /* Set H5 specific quirks */
853 if (data->capabilities & H5_CAP_WAKEUP_ENABLE)
854 set_bit(H5_WAKEUP_ENABLE, &h5->flags);
855
856 return 0;
857 }
858
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org