diff mbox series

[v2,2/3] Bluetooth: hci_h5: Add support for binding RTL8723BS with device tree

Message ID 20200407055837.3508017-2-alistair@alistair23.me (mailing list archive)
State New, archived
Headers show
Series [v2,1/3] dt-bindings: net: bluetooth: Add rtl8723bs-bluetooth | expand

Commit Message

Alistair Francis April 7, 2020, 5:58 a.m. UTC
From: Vasily Khoruzhick <anarsoul@gmail.com>

RTL8723BS is often used in ARM boards, so add ability to bind it
using device tree.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Alistair Francis <alistair@alistair23.me>
---
 drivers/bluetooth/hci_h5.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Vasily Khoruzhick April 7, 2020, 6:50 a.m. UTC | #1
On Mon, Apr 6, 2020 at 10:58 PM Alistair Francis <alistair@alistair23.me> wrote:
>
> From: Vasily Khoruzhick <anarsoul@gmail.com>
>
> RTL8723BS is often used in ARM boards, so add ability to bind it
> using device tree.
>
> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
> Signed-off-by: Alistair Francis <alistair@alistair23.me>
> ---
>  drivers/bluetooth/hci_h5.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
> index 106c110efe56..b0e25a7ca850 100644
> --- a/drivers/bluetooth/hci_h5.c
> +++ b/drivers/bluetooth/hci_h5.c
> @@ -1019,6 +1019,8 @@ static const struct of_device_id rtl_bluetooth_of_match[] = {
>         { .compatible = "realtek,rtl8822cs-bt",
>           .data = (const void *)&rtl_vnd },
>  #endif
> +       { .compatible = "realtek,rtl8822bs-bt",

Wrong compatible? Also you probably want to keep it over #endif.

> +         .data = (const void *)&rtl_vnd },
>         { },
>  };
>  MODULE_DEVICE_TABLE(of, rtl_bluetooth_of_match);
> --
> 2.25.1
>
Alistair Francis April 8, 2020, 2:40 a.m. UTC | #2
On Mon, Apr 6, 2020 at 11:51 PM Vasily Khoruzhick <anarsoul@gmail.com> wrote:
>
> On Mon, Apr 6, 2020 at 10:58 PM Alistair Francis <alistair@alistair23.me> wrote:
> >
> > From: Vasily Khoruzhick <anarsoul@gmail.com>
> >
> > RTL8723BS is often used in ARM boards, so add ability to bind it
> > using device tree.
> >
> > Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
> > Signed-off-by: Alistair Francis <alistair@alistair23.me>
> > ---
> >  drivers/bluetooth/hci_h5.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
> > index 106c110efe56..b0e25a7ca850 100644
> > --- a/drivers/bluetooth/hci_h5.c
> > +++ b/drivers/bluetooth/hci_h5.c
> > @@ -1019,6 +1019,8 @@ static const struct of_device_id rtl_bluetooth_of_match[] = {
> >         { .compatible = "realtek,rtl8822cs-bt",
> >           .data = (const void *)&rtl_vnd },
> >  #endif
> > +       { .compatible = "realtek,rtl8822bs-bt",
>
> Wrong compatible? Also you probably want to keep it over #endif.

Fixed.

Alistair

>
> > +         .data = (const void *)&rtl_vnd },
> >         { },
> >  };
> >  MODULE_DEVICE_TABLE(of, rtl_bluetooth_of_match);
> > --
> > 2.25.1
> >
kernel test robot April 21, 2020, 8:05 a.m. UTC | #3
Hi Alistair,

I love your patch! Yet something to improve:

[auto build test ERROR on net/master]
[also build test ERROR on net-next/master v5.7-rc2 next-20200420]
[cannot apply to bluetooth/master ipvs/master]
[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/Alistair-Francis/dt-bindings-net-bluetooth-Add-rtl8723bs-bluetooth/20200407-140111
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git aa81700cf2326e288c9ca1fe7b544039617f1fc2
config: arm64-randconfig-a001-20200421 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project a9b137f9ffba8cb25dfd7dd1fb613e8aac121b37)
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/bluetooth/hci_h5.c:1023:27: error: use of undeclared identifier 'rtl_vnd'
             .data = (const void *)&rtl_vnd },
                                    ^
>> drivers/bluetooth/hci_h5.c:1026:1: error: definition of variable with array type needs an explicit size or an initializer
   MODULE_DEVICE_TABLE(of, rtl_bluetooth_of_match);
   ^
   include/linux/module.h:240:21: note: expanded from macro 'MODULE_DEVICE_TABLE'
   extern typeof(name) __mod_##type##__##name##_device_table               \
                       ^
   <scratch space>:85:1: note: expanded from here
   __mod_of__rtl_bluetooth_of_match_device_table
   ^
   2 errors generated.

vim +1026 drivers/bluetooth/hci_h5.c

28a75e4c813c7ae Hans de Goede     2018-10-30  1016  
848fc6164158d69 Max Chou          2020-02-17  1017  static const struct of_device_id rtl_bluetooth_of_match[] = {
848fc6164158d69 Max Chou          2020-02-17  1018  #ifdef CONFIG_BT_HCIUART_RTL
848fc6164158d69 Max Chou          2020-02-17  1019  	{ .compatible = "realtek,rtl8822cs-bt",
848fc6164158d69 Max Chou          2020-02-17  1020  	  .data = (const void *)&rtl_vnd },
848fc6164158d69 Max Chou          2020-02-17  1021  #endif
025703659453391 Vasily Khoruzhick 2020-04-06  1022  	{ .compatible = "realtek,rtl8822bs-bt",
025703659453391 Vasily Khoruzhick 2020-04-06  1023  	  .data = (const void *)&rtl_vnd },
848fc6164158d69 Max Chou          2020-02-17  1024  	{ },
848fc6164158d69 Max Chou          2020-02-17  1025  };
848fc6164158d69 Max Chou          2020-02-17 @1026  MODULE_DEVICE_TABLE(of, rtl_bluetooth_of_match);
848fc6164158d69 Max Chou          2020-02-17  1027  

:::::: The code at line 1026 was first introduced by commit
:::::: 848fc6164158d697b70b390a2db5019663713f47 Bluetooth: hci_h5: btrtl: Add support for RTL8822C

:::::: TO: Max Chou <max.chou@realtek.com>
:::::: CC: Marcel Holtmann <marcel@holtmann.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff mbox series

Patch

diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
index 106c110efe56..b0e25a7ca850 100644
--- a/drivers/bluetooth/hci_h5.c
+++ b/drivers/bluetooth/hci_h5.c
@@ -1019,6 +1019,8 @@  static const struct of_device_id rtl_bluetooth_of_match[] = {
 	{ .compatible = "realtek,rtl8822cs-bt",
 	  .data = (const void *)&rtl_vnd },
 #endif
+	{ .compatible = "realtek,rtl8822bs-bt",
+	  .data = (const void *)&rtl_vnd },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, rtl_bluetooth_of_match);