* [chrome-os:chromeos-5.4 114/123] drivers/bluetooth/hci_h5.c:801:18: warning: variable 'hdev' set but not used
@ 2021-06-08 10:19 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-06-08 10:19 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4863 bytes --]
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 06c9bac92e211df6900cbdc07b4f5741d3549dde
commit: 886e310cf5af7ee90cc42bd148100307834150ae [114/123] CHROMIUM: Bluetooth: hci_h5: keep RTL8822C powered during suspend
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-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
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/ioport.h:13,
from include/linux/acpi.h:12,
from drivers/bluetooth/hci_h5.c:9:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/xtensa/include/asm/page.h:182:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
182 | ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
arch/xtensa/include/asm/page.h:190:32: note: in expansion of macro 'pfn_valid'
190 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
| ^~~~~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/bluetooth/hci_h5.c: In function 'h5_serdev_probe':
>> drivers/bluetooth/hci_h5.c:801:18: warning: variable 'hdev' set but not used [-Wunused-but-set-variable]
801 | struct hci_dev *hdev;
| ^~~~
At top level:
drivers/bluetooth/hci_h5.c:1035:36: warning: 'h5_data_rtl8723bs' defined but not used [-Wunused-const-variable=]
1035 | static const struct h5_device_data h5_data_rtl8723bs = {
| ^~~~~~~~~~~~~~~~~
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(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 61803 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-08 10:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-08 10:19 [chrome-os:chromeos-5.4 114/123] drivers/bluetooth/hci_h5.c:801:18: warning: variable 'hdev' set but not used kernel test robot
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.