From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [chrome-os:chromeos-4.14 2/5] net/bluetooth/mgmt.c:7071:5: error: variable 'tx_power' set but not used
Date: Fri, 29 Jan 2021 02:36:26 +0800 [thread overview]
Message-ID: <202101290224.62xO2CXt-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6248 bytes --]
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.14
head: bb69e608e02d5dbdee7cbde9985865abd5e8b4df
commit: e2c8c0b5b6ffc521ae1c2fa24ffe446277697e02 [2/5] BACKPORT: Bluetooth: Break add adv into two mgmt commands
config: arm64-chromiumos-mediatek-customedconfig-chrome-os:chromeos-4.14:e2c8c0b5b6ffc521ae1c2fa24ffe446277697e02 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 7.5.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-4.14
git checkout e2c8c0b5b6ffc521ae1c2fa24ffe446277697e02
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Note: the chrome-os/chromeos-4.14 HEAD bb69e608e02d5dbdee7cbde9985865abd5e8b4df builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
net/bluetooth/mgmt.c: In function 'add_ext_adv_params':
>> net/bluetooth/mgmt.c:7071:5: error: variable 'tx_power' set but not used [-Werror=unused-but-set-variable]
s8 tx_power;
^~~~~~~~
>> net/bluetooth/mgmt.c:7068:27: error: variable 'max_interval' set but not used [-Werror=unused-but-set-variable]
u32 flags, min_interval, max_interval;
^~~~~~~~~~~~
>> net/bluetooth/mgmt.c:7068:13: error: variable 'min_interval' set but not used [-Werror=unused-but-set-variable]
u32 flags, min_interval, max_interval;
^~~~~~~~~~~~
net/bluetooth/mgmt.c: In function 'load_long_term_keys':
net/bluetooth/mgmt.c:5504:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
type = SMP_LTK_P256_DEBUG;
~~~~~^~~~~~~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:5505:3: note: here
default:
^~~~~~~
cc1: all warnings being treated as errors
vim +/tx_power +7071 net/bluetooth/mgmt.c
7062
7063 static int add_ext_adv_params(struct sock *sk, struct hci_dev *hdev,
7064 void *data, u16 data_len)
7065 {
7066 struct mgmt_cp_add_ext_adv_params *cp = data;
7067 struct mgmt_rp_add_ext_adv_params rp;
> 7068 u32 flags, min_interval, max_interval;
7069 u16 timeout, duration;
7070 u8 status;
> 7071 s8 tx_power;
7072 int err;
7073
7074 BT_DBG("%s", hdev->name);
7075
7076 status = mgmt_le_support(hdev);
7077 if (status)
7078 return mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_EXT_ADV_PARAMS,
7079 status);
7080
7081 if (cp->instance < 1 || cp->instance > HCI_MAX_ADV_INSTANCES)
7082 return mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_EXT_ADV_PARAMS,
7083 MGMT_STATUS_INVALID_PARAMS);
7084
7085 /* The purpose of breaking add_advertising into two separate MGMT calls
7086 * for params and data is to allow more parameters to be added to this
7087 * structure in the future. For this reason, we verify that we have the
7088 * bare minimum structure we know of when the interface was defined. Any
7089 * extra parameters we don't know about will be ignored in this request.
7090 */
7091 if (data_len < MGMT_ADD_EXT_ADV_PARAMS_MIN_SIZE)
7092 return mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_ADVERTISING,
7093 MGMT_STATUS_INVALID_PARAMS);
7094
7095 flags = __le32_to_cpu(cp->flags);
7096
7097 if (!requested_adv_flags_are_valid(hdev, flags))
7098 return mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_EXT_ADV_PARAMS,
7099 MGMT_STATUS_INVALID_PARAMS);
7100
7101 hci_dev_lock(hdev);
7102
7103 /* In new interface, we require that we are powered to register */
7104 if (!hdev_is_powered(hdev)) {
7105 err = mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_EXT_ADV_PARAMS,
7106 MGMT_STATUS_REJECTED);
7107 goto unlock;
7108 }
7109
7110 if (adv_busy(hdev)) {
7111 err = mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_EXT_ADV_PARAMS,
7112 MGMT_STATUS_BUSY);
7113 goto unlock;
7114 }
7115
7116 /* Parse defined parameters from request, use defaults otherwise */
7117 timeout = (flags & MGMT_ADV_PARAM_TIMEOUT) ?
7118 __le16_to_cpu(cp->timeout) : 0;
7119
7120 duration = (flags & MGMT_ADV_PARAM_DURATION) ?
7121 __le16_to_cpu(cp->duration) :
7122 hdev->def_multi_adv_rotation_duration;
7123
7124 min_interval = (flags & MGMT_ADV_PARAM_INTERVALS) ?
7125 __le32_to_cpu(cp->min_interval) :
7126 hdev->le_adv_min_interval;
7127
7128 max_interval = (flags & MGMT_ADV_PARAM_INTERVALS) ?
7129 __le32_to_cpu(cp->max_interval) :
7130 hdev->le_adv_max_interval;
7131
7132 tx_power = (flags & MGMT_ADV_PARAM_TX_POWER) ?
7133 cp->tx_power :
7134 HCI_ADV_TX_POWER_NO_PREFERENCE;
7135
7136 /* Create advertising instance with no advertising or response data */
7137 err = hci_add_adv_instance(hdev, cp->instance, flags,
7138 0, NULL, 0, NULL, timeout, duration);
7139
7140 if (err < 0) {
7141 err = mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_EXT_ADV_PARAMS,
7142 MGMT_STATUS_FAILED);
7143 goto unlock;
7144 }
7145
7146 hdev->cur_adv_instance = cp->instance;
7147 rp.instance = cp->instance;
7148 rp.tx_power = HCI_ADV_TX_POWER_NO_PREFERENCE;
7149 rp.max_adv_data_len = tlv_data_max_len(hdev, flags, true);
7150 rp.max_scan_rsp_len = tlv_data_max_len(hdev, flags, false);
7151 err = mgmt_cmd_complete(sk, hdev->id,
7152 MGMT_OP_ADD_EXT_ADV_PARAMS,
7153 MGMT_STATUS_SUCCESS, &rp, sizeof(rp));
7154
7155 unlock:
7156 hci_dev_unlock(hdev);
7157
7158 return err;
7159 }
7160
---
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: 31879 bytes --]
reply other threads:[~2021-01-28 18:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202101290224.62xO2CXt-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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.