All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	linux-bluetooth@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH] Bluetooth: hci_core: Fix missing instances using HCI_MAX_AD_LENGTH
Date: Mon, 21 Aug 2023 21:03:52 +0800	[thread overview]
Message-ID: <202308212004.EXsdDWkd-lkp@intel.com> (raw)
In-Reply-To: <20230818212211.3207580-1-luiz.dentz@gmail.com>

Hi Luiz,

kernel test robot noticed the following build errors:

[auto build test ERROR on linux-next/master]
[also build test ERROR on linus/master v6.5-rc7]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Luiz-Augusto-von-Dentz/Bluetooth-hci_core-Fix-missing-instances-using-HCI_MAX_AD_LENGTH/20230821-102220
base:   linux-next/master
patch link:    https://lore.kernel.org/r/20230818212211.3207580-1-luiz.dentz%40gmail.com
patch subject: [PATCH] Bluetooth: hci_core: Fix missing instances using HCI_MAX_AD_LENGTH
config: i386-buildonly-randconfig-002-20230821 (https://download.01.org/0day-ci/archive/20230821/202308212004.EXsdDWkd-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20230821/202308212004.EXsdDWkd-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308212004.EXsdDWkd-lkp@intel.com/

All errors (new ones prefixed by >>):

>> net/bluetooth/eir.c:36:19: error: use of undeclared identifier 'dev'; did you mean 'hdev'?
           if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
                            ^~~
                            hdev
   include/net/bluetooth/hci_core.h:1854:19: note: expanded from macro 'max_adv_len'
           (ext_adv_capable(dev) ? HCI_MAX_EXT_AD_LENGTH : HCI_MAX_AD_LENGTH)
                            ^
   include/net/bluetooth/hci_core.h:1850:33: note: expanded from macro 'ext_adv_capable'
   #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
                                   ^
   include/linux/compiler.h:55:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^
   include/linux/compiler.h:57:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                      ^
   net/bluetooth/eir.c:30:42: note: 'hdev' declared here
   u8 eir_append_local_name(struct hci_dev *hdev, u8 *ptr, u8 ad_len)
                                            ^
>> net/bluetooth/eir.c:36:19: error: use of undeclared identifier 'dev'; did you mean 'hdev'?
           if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
                            ^~~
                            hdev
   include/net/bluetooth/hci_core.h:1854:19: note: expanded from macro 'max_adv_len'
           (ext_adv_capable(dev) ? HCI_MAX_EXT_AD_LENGTH : HCI_MAX_AD_LENGTH)
                            ^
   include/net/bluetooth/hci_core.h:1850:33: note: expanded from macro 'ext_adv_capable'
   #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
                                   ^
   include/linux/compiler.h:55:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^
   include/linux/compiler.h:57:61: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                               ^
   net/bluetooth/eir.c:30:42: note: 'hdev' declared here
   u8 eir_append_local_name(struct hci_dev *hdev, u8 *ptr, u8 ad_len)
                                            ^
>> net/bluetooth/eir.c:36:19: error: use of undeclared identifier 'dev'; did you mean 'hdev'?
           if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
                            ^~~
                            hdev
   include/net/bluetooth/hci_core.h:1854:19: note: expanded from macro 'max_adv_len'
           (ext_adv_capable(dev) ? HCI_MAX_EXT_AD_LENGTH : HCI_MAX_AD_LENGTH)
                            ^
   include/net/bluetooth/hci_core.h:1850:33: note: expanded from macro 'ext_adv_capable'
   #define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
                                   ^
   include/linux/compiler.h:55:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^
   include/linux/compiler.h:57:86: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                                                        ^
   include/linux/compiler.h:68:3: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
            ^
   net/bluetooth/eir.c:30:42: note: 'hdev' declared here
   u8 eir_append_local_name(struct hci_dev *hdev, u8 *ptr, u8 ad_len)
                                            ^
   3 errors generated.


vim +36 net/bluetooth/eir.c

    29	
    30	u8 eir_append_local_name(struct hci_dev *hdev, u8 *ptr, u8 ad_len)
    31	{
    32		size_t short_len;
    33		size_t complete_len;
    34	
    35		/* no space left for name (+ NULL + type + len) */
  > 36		if ((max_adv_len(dev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 3)
    37			return ad_len;
    38	
    39		/* use complete name if present and fits */
    40		complete_len = strnlen(hdev->dev_name, sizeof(hdev->dev_name));
    41		if (complete_len && complete_len <= HCI_MAX_SHORT_NAME_LENGTH)
    42			return eir_append_name(ptr, ad_len, EIR_NAME_COMPLETE,
    43					       hdev->dev_name, complete_len + 1);
    44	
    45		/* use short name if present */
    46		short_len = strnlen(hdev->short_name, sizeof(hdev->short_name));
    47		if (short_len)
    48			return eir_append_name(ptr, ad_len, EIR_NAME_SHORT,
    49					       hdev->short_name,
    50					       short_len == HCI_MAX_SHORT_NAME_LENGTH ?
    51					       short_len : short_len + 1);
    52	
    53		/* use shortened full name if present, we already know that name
    54		 * is longer then HCI_MAX_SHORT_NAME_LENGTH
    55		 */
    56		if (complete_len)
    57			return eir_append_name(ptr, ad_len, EIR_NAME_SHORT,
    58					       hdev->dev_name,
    59					       HCI_MAX_SHORT_NAME_LENGTH);
    60	
    61		return ad_len;
    62	}
    63	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      parent reply	other threads:[~2023-08-21 13:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18 21:22 [PATCH] Bluetooth: hci_core: Fix missing instances using HCI_MAX_AD_LENGTH Luiz Augusto von Dentz
2023-08-18 21:53 ` bluez.test.bot
2023-08-21 13:03 ` kernel test robot [this message]

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=202308212004.EXsdDWkd-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=luiz.dentz@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.