[android-common:android12-5.4 4/9] drivers/dma-buf/heaps/page_pool.c:236:17: sparse: sparse: symbol 'pool_shrinker' was not declared. Should it be static?
by kernel test robot
Hi John,
First bad commit (maybe != root cause):
tree: https://android.googlesource.com/kernel/common android12-5.4
head: 82c67a98c7494b4e71dcbea03335509e9ccecfa5
commit: 44008f99d9ca0793e2562967e1da01fa74ee4a41 [4/9] ANDROID: dma-buf: system_heap: Add pagepool support to system heap
config: i386-randconfig-s001-20210812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.4
git checkout 44008f99d9ca0793e2562967e1da01fa74ee4a41
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/dma-buf/heaps/ kernel/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/dma-buf/heaps/page_pool.c:236:17: sparse: sparse: symbol 'pool_shrinker' was not declared. Should it be static?
drivers/dma-buf/heaps/page_pool.c:243:5: sparse: sparse: symbol 'dmabuf_page_pool_init_shrinker' was not declared. Should it be static?
vim +/pool_shrinker +236 drivers/dma-buf/heaps/page_pool.c
bd4db96bfc247a John Stultz 2020-10-02 235
bd4db96bfc247a John Stultz 2020-10-02 @236 struct shrinker pool_shrinker = {
bd4db96bfc247a John Stultz 2020-10-02 237 .count_objects = dmabuf_page_pool_shrink_count,
bd4db96bfc247a John Stultz 2020-10-02 238 .scan_objects = dmabuf_page_pool_shrink_scan,
bd4db96bfc247a John Stultz 2020-10-02 239 .seeks = DEFAULT_SEEKS,
bd4db96bfc247a John Stultz 2020-10-02 240 .batch = 0,
bd4db96bfc247a John Stultz 2020-10-02 241 };
bd4db96bfc247a John Stultz 2020-10-02 242
:::::: The code at line 236 was first introduced by commit
:::::: bd4db96bfc247afdaf7a4cfde85fd8147522f3e6 ANDROID: dma-buf: heaps: Add a shrinker controlled page pool
:::::: TO: John Stultz <john.stultz(a)linaro.org>
:::::: CC: John Stultz <john.stultz(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH v8 3/5] Bluetooth: refactor set_exp_feature with a feature table
by kernel test robot
Hi Joseph,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bluetooth-next/master]
[also build test ERROR on next-20210813]
[cannot apply to bluetooth/master v5.14-rc5]
[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]
url: https://github.com/0day-ci/linux/commits/Joseph-Hwang/Bluetooth-btusb-dis...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: hexagon-randconfig-r041-20210814 (attached as .config)
compiler: clang version 12.0.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
# https://github.com/0day-ci/linux/commit/7a3d3d918d33f8f8796cb27e1f137c56c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Joseph-Hwang/Bluetooth-btusb-disable-Intel-link-statistics-telemetry-events/20210814-005423
git checkout 7a3d3d918d33f8f8796cb27e1f137c56c2afaeac
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=hexagon SHELL=/bin/bash net/bluetooth/
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 >>):
>> net/bluetooth/mgmt.c:4086:1: error: function definition is not allowed here
{
^
net/bluetooth/mgmt.c:4137:1: error: function definition is not allowed here
{
^
net/bluetooth/mgmt.c:4150:1: error: function definition is not allowed here
{
^
net/bluetooth/mgmt.c:4208:1: error: function definition is not allowed here
{
^
net/bluetooth/mgmt.c:4217:1: error: function definition is not allowed here
{
^
net/bluetooth/mgmt.c:4238:1: error: function definition is not allowed here
{
^
net/bluetooth/mgmt.c:4286:1: error: function definition is not allowed here
{
^
net/bluetooth/mgmt.c:4327:1: error: function definition is not allowed here
{
^
net/bluetooth/mgmt.c:4390:1: error: function definition is not allowed here
{
^
net/bluetooth/mgmt.c:4415:1: error: function definition is not allowed here
{
^
net/bluetooth/mgmt.c:4446:1: error: function definition is not allowed here
{
^
net/bluetooth/mgmt.c:4483:1: error: function definition is not allowed here
{
^
net/bluetooth/mgmt.c:4519:1: error: function definition is not allowed here
{
^
net/bluetooth/mgmt.c:4551:1: error: function definition is not allowed here
{
^
net/bluetooth/mgmt.c:4616:1: error: function definition is not allowed here
{
^
net/bluetooth/mgmt.c:4675:1: error: function definition is not allowed here
{
^
net/bluetooth/mgmt.c:4726:1: error: function definition is not allowed here
{
^
net/bluetooth/mgmt.c:4834:1: error: function definition is not allowed here
{
^
net/bluetooth/mgmt.c:4870:1: error: function definition is not allowed here
{
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
vim +4086 net/bluetooth/mgmt.c
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4083
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4084 static int get_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4085 u16 data_len)
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 @4086 {
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4087 struct mgmt_cp_get_device_flags *cp = data;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4088 struct mgmt_rp_get_device_flags rp;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4089 struct bdaddr_list_with_flags *br_params;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4090 struct hci_conn_params *params;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4091 u32 supported_flags = SUPPORTED_DEVICE_FLAGS();
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4092 u32 current_flags = 0;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4093 u8 status = MGMT_STATUS_INVALID_PARAMS;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4094
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4095 bt_dev_dbg(hdev, "Get device flags %pMR (type 0x%x)\n",
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4096 &cp->addr.bdaddr, cp->addr.type);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4097
3ca33e3fb4f919 Abhishek Pandit-Subedi 2020-06-19 4098 hci_dev_lock(hdev);
3ca33e3fb4f919 Abhishek Pandit-Subedi 2020-06-19 4099
02ce2c2c24024a Tedd Ho-Jeong An 2021-05-26 4100 memset(&rp, 0, sizeof(rp));
02ce2c2c24024a Tedd Ho-Jeong An 2021-05-26 4101
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4102 if (cp->addr.type == BDADDR_BREDR) {
3d4f9c00492b4e Archie Pusaka 2021-06-04 4103 br_params = hci_bdaddr_list_lookup_with_flags(&hdev->accept_list,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4104 &cp->addr.bdaddr,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4105 cp->addr.type);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4106 if (!br_params)
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4107 goto done;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4108
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4109 current_flags = br_params->current_flags;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4110 } else {
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4111 params = hci_conn_params_lookup(hdev, &cp->addr.bdaddr,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4112 le_addr_type(cp->addr.type));
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4113
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4114 if (!params)
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4115 goto done;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4116
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4117 current_flags = params->current_flags;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4118 }
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4119
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4120 bacpy(&rp.addr.bdaddr, &cp->addr.bdaddr);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4121 rp.addr.type = cp->addr.type;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4122 rp.supported_flags = cpu_to_le32(supported_flags);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4123 rp.current_flags = cpu_to_le32(current_flags);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4124
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4125 status = MGMT_STATUS_SUCCESS;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4126
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4127 done:
3ca33e3fb4f919 Abhishek Pandit-Subedi 2020-06-19 4128 hci_dev_unlock(hdev);
3ca33e3fb4f919 Abhishek Pandit-Subedi 2020-06-19 4129
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4130 return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_GET_DEVICE_FLAGS, status,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4131 &rp, sizeof(rp));
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4132 }
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4133
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH v8 3/5] Bluetooth: refactor set_exp_feature with a feature table
by kernel test robot
Hi Joseph,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bluetooth-next/master]
[also build test ERROR on next-20210813]
[cannot apply to bluetooth/master v5.14-rc5]
[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]
url: https://github.com/0day-ci/linux/commits/Joseph-Hwang/Bluetooth-btusb-dis...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 11.2.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
# https://github.com/0day-ci/linux/commit/7a3d3d918d33f8f8796cb27e1f137c56c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Joseph-Hwang/Bluetooth-btusb-disable-Intel-link-statistics-telemetry-events/20210814-005423
git checkout 7a3d3d918d33f8f8796cb27e1f137c56c2afaeac
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash net/bluetooth/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
net/bluetooth/mgmt.c: In function 'set_exp_feature':
>> net/bluetooth/mgmt.c:4084:12: error: invalid storage class for function 'get_device_flags'
4084 | static int get_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,
| ^~~~~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:4084:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
4084 | static int get_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,
| ^~~~~~
>> net/bluetooth/mgmt.c:4134:13: error: invalid storage class for function 'device_flags_changed'
4134 | static void device_flags_changed(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:4148:12: error: invalid storage class for function 'set_device_flags'
4148 | static int set_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,
| ^~~~~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:4206:13: error: invalid storage class for function 'mgmt_adv_monitor_added'
4206 | static void mgmt_adv_monitor_added(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:4236:12: error: invalid storage class for function 'read_adv_mon_features'
4236 | static int read_adv_mon_features(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:4324:12: error: invalid storage class for function '__add_adv_patterns_monitor'
4324 | static int __add_adv_patterns_monitor(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:4388:13: error: invalid storage class for function 'parse_adv_monitor_rssi'
4388 | static void parse_adv_monitor_rssi(struct adv_monitor *m,
| ^~~~~~~~~~~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:4413:11: error: invalid storage class for function 'parse_adv_monitor_pattern'
4413 | static u8 parse_adv_monitor_pattern(struct adv_monitor *m, u8 pattern_count,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:4444:12: error: invalid storage class for function 'add_adv_patterns_monitor'
4444 | static int add_adv_patterns_monitor(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:4481:12: error: invalid storage class for function 'add_adv_patterns_monitor_rssi'
4481 | static int add_adv_patterns_monitor_rssi(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:4549:12: error: invalid storage class for function 'remove_adv_monitor'
4549 | static int remove_adv_monitor(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:4614:13: error: invalid storage class for function 'read_local_oob_data_complete'
4614 | static void read_local_oob_data_complete(struct hci_dev *hdev, u8 status,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:4673:12: error: invalid storage class for function 'read_local_oob_data'
4673 | static int read_local_oob_data(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:4724:12: error: invalid storage class for function 'add_remote_oob_data'
4724 | static int add_remote_oob_data(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:4832:12: error: invalid storage class for function 'remove_remote_oob_data'
4832 | static int remove_remote_oob_data(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:4899:13: error: invalid storage class for function 'discovery_type_is_valid'
4899 | static bool discovery_type_is_valid(struct hci_dev *hdev, uint8_t type,
| ^~~~~~~~~~~~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:4926:12: error: invalid storage class for function 'start_discovery_internal'
4926 | static int start_discovery_internal(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:4994:12: error: invalid storage class for function 'start_discovery'
4994 | static int start_discovery(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:5001:12: error: invalid storage class for function 'start_limited_discovery'
5001 | static int start_limited_discovery(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:5009:12: error: invalid storage class for function 'service_discovery_cmd_complete'
5009 | static int service_discovery_cmd_complete(struct mgmt_pending_cmd *cmd,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:5016:12: error: invalid storage class for function 'start_service_discovery'
5016 | static int start_service_discovery(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:5148:12: error: invalid storage class for function 'stop_discovery'
5148 | static int stop_discovery(struct sock *sk, struct hci_dev *hdev, void *data,
| ^~~~~~~~~~~~~~
net/bluetooth/mgmt.c:5190:12: error: invalid storage class for function 'confirm_name'
5190 | static int confirm_name(struct sock *sk, struct hci_dev *hdev, void *data,
| ^~~~~~~~~~~~
net/bluetooth/mgmt.c:5232:12: error: invalid storage class for function 'block_device'
5232 | static int block_device(struct sock *sk, struct hci_dev *hdev, void *data,
| ^~~~~~~~~~~~
net/bluetooth/mgmt.c:5268:12: error: invalid storage class for function 'unblock_device'
5268 | static int unblock_device(struct sock *sk, struct hci_dev *hdev, void *data,
| ^~~~~~~~~~~~~~
net/bluetooth/mgmt.c:5304:12: error: invalid storage class for function 'set_device_id'
5304 | static int set_device_id(struct sock *sk, struct hci_dev *hdev, void *data,
| ^~~~~~~~~~~~~
net/bluetooth/mgmt.c:5339:13: error: invalid storage class for function 'enable_advertising_instance'
5339 | static void enable_advertising_instance(struct hci_dev *hdev, u8 status,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:5345:13: error: invalid storage class for function 'set_advertising_complete'
5345 | static void set_advertising_complete(struct hci_dev *hdev, u8 status,
| ^~~~~~~~~~~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:5419:12: error: invalid storage class for function 'set_advertising'
5419 | static int set_advertising(struct sock *sk, struct hci_dev *hdev, void *data,
| ^~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:5538:12: error: invalid storage class for function 'set_static_address'
5538 | static int set_static_address(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:5582:12: error: invalid storage class for function 'set_scan_params'
5582 | static int set_scan_params(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:5639:13: error: invalid storage class for function 'fast_connectable_complete'
5639 | static void fast_connectable_complete(struct hci_dev *hdev, u8 status,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:5673:12: error: invalid storage class for function 'set_fast_connectable'
5673 | static int set_fast_connectable(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:5738:13: error: invalid storage class for function 'set_bredr_complete'
5738 | static void set_bredr_complete(struct hci_dev *hdev, u8 status, u16 opcode)
| ^~~~~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:5770:12: error: invalid storage class for function 'set_bredr'
5770 | static int set_bredr(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
| ^~~~~~~~~
net/bluetooth/mgmt.c:5882:13: error: invalid storage class for function 'sc_enable_complete'
5882 | static void sc_enable_complete(struct hci_dev *hdev, u8 status, u16 opcode)
| ^~~~~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:5927:12: error: invalid storage class for function 'set_secure_conn'
5927 | static int set_secure_conn(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:6015:12: error: invalid storage class for function 'set_debug_keys'
6015 | static int set_debug_keys(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~
net/bluetooth/mgmt.c:6062:12: error: invalid storage class for function 'set_privacy'
6062 | static int set_privacy(struct sock *sk, struct hci_dev *hdev, void *cp_data,
| ^~~~~~~~~~~
net/bluetooth/mgmt.c:6119:13: error: invalid storage class for function 'irk_is_valid'
6119 | static bool irk_is_valid(struct mgmt_irk_info *irk)
| ^~~~~~~~~~~~
net/bluetooth/mgmt.c:6135:12: error: invalid storage class for function 'load_irks'
6135 | static int load_irks(struct sock *sk, struct hci_dev *hdev, void *cp_data,
| ^~~~~~~~~
net/bluetooth/mgmt.c:6206:13: error: invalid storage class for function 'ltk_is_valid'
6206 | static bool ltk_is_valid(struct mgmt_ltk_info *key)
| ^~~~~~~~~~~~
net/bluetooth/mgmt.c:6225:12: error: invalid storage class for function 'load_long_term_keys'
6225 | static int load_long_term_keys(struct sock *sk, struct hci_dev *hdev,
| ^~~~~~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:6321:12: error: invalid storage class for function 'conn_info_cmd_complete'
6321 | static int conn_info_cmd_complete(struct mgmt_pending_cmd *cmd, u8 status)
| ^~~~~~~~~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:6348:13: error: invalid storage class for function 'conn_info_refresh_complete'
6348 | static void conn_info_refresh_complete(struct hci_dev *hdev, u8 hci_status,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:6402:12: error: invalid storage class for function 'get_conn_info'
6402 | static int get_conn_info(struct sock *sk, struct hci_dev *hdev, void *data,
| ^~~~~~~~~~~~~
net/bluetooth/mgmt.c:6523:12: error: invalid storage class for function 'clock_info_cmd_complete'
6523 | static int clock_info_cmd_complete(struct mgmt_pending_cmd *cmd, u8 status)
| ^~~~~~~~~~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:6559:13: error: invalid storage class for function 'get_clock_info_complete'
6559 | static void get_clock_info_complete(struct hci_dev *hdev, u8 status, u16 opcode)
| ^~~~~~~~~~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:6591:12: error: invalid storage class for function 'get_clock_info'
6591 | static int get_clock_info(struct sock *sk, struct hci_dev *hdev, void *data,
| ^~~~~~~~~~~~~~
net/bluetooth/mgmt.c:6667:13: error: invalid storage class for function 'is_connected'
6667 | static bool is_connected(struct hci_dev *hdev, bdaddr_t *addr, u8 type)
| ^~~~~~~~~~~~
net/bluetooth/mgmt.c:6685:12: error: invalid storage class for function 'hci_conn_params_set'
6685 | static int hci_conn_params_set(struct hci_dev *hdev, bdaddr_t *addr,
| ^~~~~~~~~~~~~~~~~~~
net/bluetooth/mgmt.c:6729:13: error: invalid storage class for function 'device_added'
6729 | static void device_added(struct sock *sk, struct hci_dev *hdev,
vim +/get_device_flags +4084 net/bluetooth/mgmt.c
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4083
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 @4084 static int get_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4085 u16 data_len)
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4086 {
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4087 struct mgmt_cp_get_device_flags *cp = data;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4088 struct mgmt_rp_get_device_flags rp;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4089 struct bdaddr_list_with_flags *br_params;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4090 struct hci_conn_params *params;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4091 u32 supported_flags = SUPPORTED_DEVICE_FLAGS();
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4092 u32 current_flags = 0;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4093 u8 status = MGMT_STATUS_INVALID_PARAMS;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4094
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4095 bt_dev_dbg(hdev, "Get device flags %pMR (type 0x%x)\n",
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4096 &cp->addr.bdaddr, cp->addr.type);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4097
3ca33e3fb4f919 Abhishek Pandit-Subedi 2020-06-19 4098 hci_dev_lock(hdev);
3ca33e3fb4f919 Abhishek Pandit-Subedi 2020-06-19 4099
02ce2c2c24024a Tedd Ho-Jeong An 2021-05-26 4100 memset(&rp, 0, sizeof(rp));
02ce2c2c24024a Tedd Ho-Jeong An 2021-05-26 4101
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4102 if (cp->addr.type == BDADDR_BREDR) {
3d4f9c00492b4e Archie Pusaka 2021-06-04 4103 br_params = hci_bdaddr_list_lookup_with_flags(&hdev->accept_list,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4104 &cp->addr.bdaddr,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4105 cp->addr.type);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4106 if (!br_params)
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4107 goto done;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4108
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4109 current_flags = br_params->current_flags;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4110 } else {
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4111 params = hci_conn_params_lookup(hdev, &cp->addr.bdaddr,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4112 le_addr_type(cp->addr.type));
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4113
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4114 if (!params)
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4115 goto done;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4116
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4117 current_flags = params->current_flags;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4118 }
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4119
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4120 bacpy(&rp.addr.bdaddr, &cp->addr.bdaddr);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4121 rp.addr.type = cp->addr.type;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4122 rp.supported_flags = cpu_to_le32(supported_flags);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4123 rp.current_flags = cpu_to_le32(current_flags);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4124
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4125 status = MGMT_STATUS_SUCCESS;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4126
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4127 done:
3ca33e3fb4f919 Abhishek Pandit-Subedi 2020-06-19 4128 hci_dev_unlock(hdev);
3ca33e3fb4f919 Abhishek Pandit-Subedi 2020-06-19 4129
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4130 return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_GET_DEVICE_FLAGS, status,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4131 &rp, sizeof(rp));
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4132 }
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4133
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 @4134 static void device_flags_changed(struct sock *sk, struct hci_dev *hdev,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4135 bdaddr_t *bdaddr, u8 bdaddr_type,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4136 u32 supported_flags, u32 current_flags)
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4137 {
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4138 struct mgmt_ev_device_flags_changed ev;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4139
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4140 bacpy(&ev.addr.bdaddr, bdaddr);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4141 ev.addr.type = bdaddr_type;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4142 ev.supported_flags = cpu_to_le32(supported_flags);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4143 ev.current_flags = cpu_to_le32(current_flags);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4144
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4145 mgmt_event(MGMT_EV_DEVICE_FLAGS_CHANGED, hdev, &ev, sizeof(ev), sk);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4146 }
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4147
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 @4148 static int set_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4149 u16 len)
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4150 {
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4151 struct mgmt_cp_set_device_flags *cp = data;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4152 struct bdaddr_list_with_flags *br_params;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4153 struct hci_conn_params *params;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4154 u8 status = MGMT_STATUS_INVALID_PARAMS;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4155 u32 supported_flags = SUPPORTED_DEVICE_FLAGS();
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4156 u32 current_flags = __le32_to_cpu(cp->current_flags);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4157
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4158 bt_dev_dbg(hdev, "Set device flags %pMR (type 0x%x) = 0x%x",
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4159 &cp->addr.bdaddr, cp->addr.type,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4160 __le32_to_cpu(current_flags));
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4161
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4162 if ((supported_flags | current_flags) != supported_flags) {
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4163 bt_dev_warn(hdev, "Bad flag given (0x%x) vs supported (0x%0x)",
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4164 current_flags, supported_flags);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4165 goto done;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4166 }
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4167
3ca33e3fb4f919 Abhishek Pandit-Subedi 2020-06-19 4168 hci_dev_lock(hdev);
3ca33e3fb4f919 Abhishek Pandit-Subedi 2020-06-19 4169
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4170 if (cp->addr.type == BDADDR_BREDR) {
3d4f9c00492b4e Archie Pusaka 2021-06-04 4171 br_params = hci_bdaddr_list_lookup_with_flags(&hdev->accept_list,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4172 &cp->addr.bdaddr,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4173 cp->addr.type);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4174
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4175 if (br_params) {
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4176 br_params->current_flags = current_flags;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4177 status = MGMT_STATUS_SUCCESS;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4178 } else {
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4179 bt_dev_warn(hdev, "No such BR/EDR device %pMR (0x%x)",
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4180 &cp->addr.bdaddr, cp->addr.type);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4181 }
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4182 } else {
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4183 params = hci_conn_params_lookup(hdev, &cp->addr.bdaddr,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4184 le_addr_type(cp->addr.type));
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4185 if (params) {
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4186 params->current_flags = current_flags;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4187 status = MGMT_STATUS_SUCCESS;
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4188 } else {
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4189 bt_dev_warn(hdev, "No such LE device %pMR (0x%x)",
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4190 &cp->addr.bdaddr,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4191 le_addr_type(cp->addr.type));
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4192 }
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4193 }
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4194
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4195 done:
3ca33e3fb4f919 Abhishek Pandit-Subedi 2020-06-19 4196 hci_dev_unlock(hdev);
3ca33e3fb4f919 Abhishek Pandit-Subedi 2020-06-19 4197
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4198 if (status == MGMT_STATUS_SUCCESS)
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4199 device_flags_changed(sk, hdev, &cp->addr.bdaddr, cp->addr.type,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4200 supported_flags, current_flags);
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4201
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4202 return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_SET_DEVICE_FLAGS, status,
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4203 &cp->addr, sizeof(cp->addr));
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4204 }
4c54bf2b093bb2 Abhishek Pandit-Subedi 2020-06-17 4205
b52729f27b1e39 Miao-chen Chou 2020-06-17 @4206 static void mgmt_adv_monitor_added(struct sock *sk, struct hci_dev *hdev,
b52729f27b1e39 Miao-chen Chou 2020-06-17 4207 u16 handle)
b52729f27b1e39 Miao-chen Chou 2020-06-17 4208 {
b52729f27b1e39 Miao-chen Chou 2020-06-17 4209 struct mgmt_ev_adv_monitor_added ev;
b52729f27b1e39 Miao-chen Chou 2020-06-17 4210
b52729f27b1e39 Miao-chen Chou 2020-06-17 4211 ev.monitor_handle = cpu_to_le16(handle);
b52729f27b1e39 Miao-chen Chou 2020-06-17 4212
b52729f27b1e39 Miao-chen Chou 2020-06-17 4213 mgmt_event(MGMT_EV_ADV_MONITOR_ADDED, hdev, &ev, sizeof(ev), sk);
b52729f27b1e39 Miao-chen Chou 2020-06-17 4214 }
b52729f27b1e39 Miao-chen Chou 2020-06-17 4215
66bd095ab5d408 Archie Pusaka 2021-01-22 4216 void mgmt_adv_monitor_removed(struct hci_dev *hdev, u16 handle)
cdde92e230719f Miao-chen Chou 2020-06-17 4217 {
66bd095ab5d408 Archie Pusaka 2021-01-22 4218 struct mgmt_ev_adv_monitor_removed ev;
66bd095ab5d408 Archie Pusaka 2021-01-22 4219 struct mgmt_pending_cmd *cmd;
66bd095ab5d408 Archie Pusaka 2021-01-22 4220 struct sock *sk_skip = NULL;
66bd095ab5d408 Archie Pusaka 2021-01-22 4221 struct mgmt_cp_remove_adv_monitor *cp;
66bd095ab5d408 Archie Pusaka 2021-01-22 4222
66bd095ab5d408 Archie Pusaka 2021-01-22 4223 cmd = pending_find(MGMT_OP_REMOVE_ADV_MONITOR, hdev);
66bd095ab5d408 Archie Pusaka 2021-01-22 4224 if (cmd) {
66bd095ab5d408 Archie Pusaka 2021-01-22 4225 cp = cmd->param;
66bd095ab5d408 Archie Pusaka 2021-01-22 4226
66bd095ab5d408 Archie Pusaka 2021-01-22 4227 if (cp->monitor_handle)
66bd095ab5d408 Archie Pusaka 2021-01-22 4228 sk_skip = cmd->sk;
66bd095ab5d408 Archie Pusaka 2021-01-22 4229 }
cdde92e230719f Miao-chen Chou 2020-06-17 4230
cdde92e230719f Miao-chen Chou 2020-06-17 4231 ev.monitor_handle = cpu_to_le16(handle);
cdde92e230719f Miao-chen Chou 2020-06-17 4232
66bd095ab5d408 Archie Pusaka 2021-01-22 4233 mgmt_event(MGMT_EV_ADV_MONITOR_REMOVED, hdev, &ev, sizeof(ev), sk_skip);
cdde92e230719f Miao-chen Chou 2020-06-17 4234 }
cdde92e230719f Miao-chen Chou 2020-06-17 4235
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 @4236 static int read_adv_mon_features(struct sock *sk, struct hci_dev *hdev,
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4237 void *data, u16 len)
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4238 {
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4239 struct adv_monitor *monitor = NULL;
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4240 struct mgmt_rp_read_adv_monitor_features *rp = NULL;
cafd472a10ff3b Peilin Ye 2020-09-09 4241 int handle, err;
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4242 size_t rp_size = 0;
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4243 __u32 supported = 0;
a2a4dedf88ab2f Archie Pusaka 2021-01-22 4244 __u32 enabled = 0;
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4245 __u16 num_handles = 0;
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4246 __u16 handles[HCI_MAX_ADV_MONITOR_NUM_HANDLES];
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4247
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4248 BT_DBG("request for %s", hdev->name);
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4249
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4250 hci_dev_lock(hdev);
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4251
a2a4dedf88ab2f Archie Pusaka 2021-01-22 4252 if (msft_monitor_supported(hdev))
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4253 supported |= MGMT_ADV_MONITOR_FEATURE_MASK_OR_PATTERNS;
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4254
a2a4dedf88ab2f Archie Pusaka 2021-01-22 4255 idr_for_each_entry(&hdev->adv_monitors_idr, monitor, handle)
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4256 handles[num_handles++] = monitor->handle;
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4257
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4258 hci_dev_unlock(hdev);
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4259
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4260 rp_size = sizeof(*rp) + (num_handles * sizeof(u16));
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4261 rp = kmalloc(rp_size, GFP_KERNEL);
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4262 if (!rp)
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4263 return -ENOMEM;
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4264
a2a4dedf88ab2f Archie Pusaka 2021-01-22 4265 /* All supported features are currently enabled */
a2a4dedf88ab2f Archie Pusaka 2021-01-22 4266 enabled = supported;
a2a4dedf88ab2f Archie Pusaka 2021-01-22 4267
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4268 rp->supported_features = cpu_to_le32(supported);
a2a4dedf88ab2f Archie Pusaka 2021-01-22 4269 rp->enabled_features = cpu_to_le32(enabled);
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4270 rp->max_num_handles = cpu_to_le16(HCI_MAX_ADV_MONITOR_NUM_HANDLES);
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4271 rp->max_num_patterns = HCI_MAX_ADV_MONITOR_NUM_PATTERNS;
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4272 rp->num_handles = cpu_to_le16(num_handles);
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4273 if (num_handles)
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4274 memcpy(&rp->handles, &handles, (num_handles * sizeof(u16)));
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4275
cafd472a10ff3b Peilin Ye 2020-09-09 4276 err = mgmt_cmd_complete(sk, hdev->id,
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4277 MGMT_OP_READ_ADV_MONITOR_FEATURES,
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4278 MGMT_STATUS_SUCCESS, rp, rp_size);
cafd472a10ff3b Peilin Ye 2020-09-09 4279
cafd472a10ff3b Peilin Ye 2020-09-09 4280 kfree(rp);
cafd472a10ff3b Peilin Ye 2020-09-09 4281
cafd472a10ff3b Peilin Ye 2020-09-09 4282 return err;
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4283 }
e5e1e7fd470ccf Miao-chen Chou 2020-06-17 4284
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH v5 1/2] f2fs: introduce proc/fs/f2fs/<dev>/fsck_stack node
by kernel test robot
Hi Yangtao,
I love your patch! Yet something to improve:
[auto build test ERROR on v5.14-rc5]
[cannot apply to f2fs/dev-test next-20210813]
[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]
url: https://github.com/0day-ci/linux/commits/Yangtao-Li/f2fs-introduce-proc-f...
base: 36a21d51725af2ce0700c6ebcb6b9594aac658a6
config: openrisc-buildonly-randconfig-r006-20210813 (attached as .config)
compiler: or1k-linux-gcc (GCC) 11.2.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
# https://github.com/0day-ci/linux/commit/82cad918b8c0849884a4fa162595110dc...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Yangtao-Li/f2fs-introduce-proc-fs-f2fs-dev-fsck_stack-node/20210813-203435
git checkout 82cad918b8c0849884a4fa162595110dcb777627
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=openrisc SHELL=/bin/bash
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 >>):
or1k-linux-ld: fs/f2fs/dir.o: in function `set_sbi_flag.part.0':
>> dir.c:(.text+0x28): undefined reference to `filter_irq_stacks'
dir.c:(.text+0x28): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `filter_irq_stacks'
>> or1k-linux-ld: dir.c:(.text+0x38): undefined reference to `stack_depot_save'
dir.c:(.text+0x38): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `stack_depot_save'
or1k-linux-ld: fs/f2fs/file.o: in function `set_sbi_flag.part.0':
>> file.c:(.text+0xc58): undefined reference to `filter_irq_stacks'
file.c:(.text+0xc58): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `filter_irq_stacks'
>> or1k-linux-ld: file.c:(.text+0xc68): undefined reference to `stack_depot_save'
file.c:(.text+0xc68): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `stack_depot_save'
or1k-linux-ld: fs/f2fs/inode.o: in function `set_sbi_flag.part.0':
>> inode.c:(.text+0x234): undefined reference to `filter_irq_stacks'
inode.c:(.text+0x234): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `filter_irq_stacks'
>> or1k-linux-ld: inode.c:(.text+0x244): undefined reference to `stack_depot_save'
inode.c:(.text+0x244): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `stack_depot_save'
or1k-linux-ld: fs/f2fs/super.o: in function `set_sbi_flag.part.0':
>> super.c:(.text+0x54b8): undefined reference to `filter_irq_stacks'
super.c:(.text+0x54b8): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `filter_irq_stacks'
>> or1k-linux-ld: super.c:(.text+0x54c8): undefined reference to `stack_depot_save'
super.c:(.text+0x54c8): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `stack_depot_save'
or1k-linux-ld: fs/f2fs/inline.o: in function `set_sbi_flag.part.0':
>> inline.c:(.text+0x28): undefined reference to `filter_irq_stacks'
inline.c:(.text+0x28): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `filter_irq_stacks'
>> or1k-linux-ld: inline.c:(.text+0x38): undefined reference to `stack_depot_save'
inline.c:(.text+0x38): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `stack_depot_save'
or1k-linux-ld: fs/f2fs/checkpoint.o: in function `set_sbi_flag.part.0':
>> checkpoint.c:(.text+0x134): undefined reference to `filter_irq_stacks'
checkpoint.c:(.text+0x134): additional relocation overflows omitted from the output
>> or1k-linux-ld: checkpoint.c:(.text+0x144): undefined reference to `stack_depot_save'
or1k-linux-ld: fs/f2fs/gc.o: in function `set_sbi_flag.part.0':
>> gc.c:(.text+0x178): undefined reference to `filter_irq_stacks'
>> or1k-linux-ld: gc.c:(.text+0x188): undefined reference to `stack_depot_save'
or1k-linux-ld: fs/f2fs/node.o: in function `set_sbi_flag.part.0':
>> node.c:(.text+0x1cc): undefined reference to `filter_irq_stacks'
>> or1k-linux-ld: node.c:(.text+0x1dc): undefined reference to `stack_depot_save'
or1k-linux-ld: fs/f2fs/segment.o: in function `set_sbi_flag.part.0':
>> segment.c:(.text+0x674): undefined reference to `filter_irq_stacks'
>> or1k-linux-ld: segment.c:(.text+0x684): undefined reference to `stack_depot_save'
or1k-linux-ld: fs/f2fs/sysfs.o: in function `fsck_stack_seq_show':
>> sysfs.c:(.text+0x448): undefined reference to `stack_depot_fetch'
or1k-linux-ld: fs/f2fs/xattr.o: in function `set_sbi_flag.part.0':
>> xattr.c:(.text+0x278): undefined reference to `filter_irq_stacks'
or1k-linux-ld: xattr.c:(.text+0x288): undefined reference to `stack_depot_save'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH v1 net-next 3/3] ptp_ocp: use bits.h macros for all masks
by kernel test robot
Hi Andy,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.14-rc5]
[cannot apply to net-next/master next-20210813]
[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]
url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ptp_ocp-Switch-t...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f8e6dfc64f6135d1b6c5215c14cd30b9b60a0008
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.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
# https://github.com/0day-ci/linux/commit/6366fc4d87438e21b0bdf4d4f680a5ec5...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/ptp_ocp-Switch-to-use-module_pci_driver-macro/20210813-202935
git checkout 6366fc4d87438e21b0bdf4d4f680a5ec582740ad
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/pci.h:37,
from drivers/ptp/ptp_ocp.c:8:
drivers/ptp/ptp_ocp.c: In function 'ptp_ocp_tod_info':
>> drivers/ptp/ptp_ocp.c:276:34: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=]
276 | dev_info(&bp->pdev->dev, "utc_offset: %d valid:%d leap_valid:%d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/ptp/ptp_ocp.c:276:9: note: in expansion of macro 'dev_info'
276 | dev_info(&bp->pdev->dev, "utc_offset: %d valid:%d leap_valid:%d\n",
| ^~~~~~~~
drivers/ptp/ptp_ocp.c:276:48: note: format string is defined here
276 | dev_info(&bp->pdev->dev, "utc_offset: %d valid:%d leap_valid:%d\n",
| ~^
| |
| int
| %ld
vim +276 drivers/ptp/ptp_ocp.c
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 234
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 235 static void
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 236 ptp_ocp_tod_info(struct ptp_ocp *bp)
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 237 {
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 238 static const char * const proto_name[] = {
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 239 "NMEA", "NMEA_ZDA", "NMEA_RMC", "NMEA_none",
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 240 "UBX", "UBX_UTC", "UBX_LS", "UBX_none"
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 241 };
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 242 static const char * const gnss_name[] = {
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 243 "ALL", "COMBINED", "GPS", "GLONASS", "GALILEO", "BEIDOU",
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 244 };
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 245 u32 version, ctrl, reg;
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 246 int idx;
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 247
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 248 version = ioread32(&bp->tod->version);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 249 dev_info(&bp->pdev->dev, "TOD Version %d.%d.%d\n",
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 250 version >> 24, (version >> 16) & 0xff, version & 0xffff);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 251
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 252 ctrl = ioread32(&bp->tod->ctrl);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 253 ctrl |= TOD_CTRL_PROTOCOL | TOD_CTRL_ENABLE;
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 254 ctrl &= ~(TOD_CTRL_DISABLE_FMT_A | TOD_CTRL_DISABLE_FMT_B);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 255 iowrite32(ctrl, &bp->tod->ctrl);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 256
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 257 ctrl = ioread32(&bp->tod->ctrl);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 258 idx = ctrl & TOD_CTRL_PROTOCOL ? 4 : 0;
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 259 idx += (ctrl >> 16) & 3;
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 260 dev_info(&bp->pdev->dev, "control: %x\n", ctrl);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 261 dev_info(&bp->pdev->dev, "TOD Protocol %s %s\n", proto_name[idx],
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 262 ctrl & TOD_CTRL_ENABLE ? "enabled" : "");
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 263
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 264 idx = (ctrl >> TOD_CTRL_GNSS_SHIFT) & TOD_CTRL_GNSS_MASK;
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 265 if (idx < ARRAY_SIZE(gnss_name))
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 266 dev_info(&bp->pdev->dev, "GNSS %s\n", gnss_name[idx]);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 267
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 268 reg = ioread32(&bp->tod->status);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 269 dev_info(&bp->pdev->dev, "status: %x\n", reg);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 270
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 271 reg = ioread32(&bp->tod->correction_sec);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 272 dev_info(&bp->pdev->dev, "correction: %d\n", reg);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 273
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 274 reg = ioread32(&bp->tod->utc_status);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 275 dev_info(&bp->pdev->dev, "utc_status: %x\n", reg);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 @276 dev_info(&bp->pdev->dev, "utc_offset: %d valid:%d leap_valid:%d\n",
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 277 reg & TOD_STATUS_UTC_MASK, reg & TOD_STATUS_UTC_VALID ? 1 : 0,
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 278 reg & TOD_STATUS_LEAP_VALID ? 1 : 0);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 279 }
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 280
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[tegra-drm:drm/tegra/for-next 16/17] drivers/gpu/drm/tegra/dc.c:1843:53: warning: variable 'new_dc_state' set but not used
by kernel test robot
tree: git://anongit.freedesktop.org/tegra/linux.git drm/tegra/for-next
head: ad85b0843ee4536593415ca890d7fb52cd7f1fbe
commit: 04d5d5df9df79f9045e76404775fc8a084aac23d [16/17] drm/tegra: dc: Support memory bandwidth management
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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 tegra-drm git://anongit.freedesktop.org/tegra/linux.git
git fetch --no-tags tegra-drm drm/tegra/for-next
git checkout 04d5d5df9df79f9045e76404775fc8a084aac23d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/gpu/drm/tegra/dc.c: In function 'tegra_crtc_update_memory_bandwidth':
>> drivers/gpu/drm/tegra/dc.c:1843:53: warning: variable 'new_dc_state' set but not used [-Wunused-but-set-variable]
1843 | const struct tegra_dc_state *old_dc_state, *new_dc_state;
| ^~~~~~~~~~~~
>> drivers/gpu/drm/tegra/dc.c:1843:38: warning: variable 'old_dc_state' set but not used [-Wunused-but-set-variable]
1843 | const struct tegra_dc_state *old_dc_state, *new_dc_state;
| ^~~~~~~~~~~~
drivers/gpu/drm/tegra/dc.c: In function 'tegra_crtc_calculate_memory_bandwidth':
>> drivers/gpu/drm/tegra/dc.c:2223:38: warning: variable 'old_state' set but not used [-Wunused-but-set-variable]
2223 | const struct drm_crtc_state *old_state;
| ^~~~~~~~~
vim +/new_dc_state +1843 drivers/gpu/drm/tegra/dc.c
1836
1837 static void
1838 tegra_crtc_update_memory_bandwidth(struct drm_crtc *crtc,
1839 struct drm_atomic_state *state,
1840 bool prepare_bandwidth_transition)
1841 {
1842 const struct tegra_plane_state *old_tegra_state, *new_tegra_state;
> 1843 const struct tegra_dc_state *old_dc_state, *new_dc_state;
1844 u32 i, new_avg_bw, old_avg_bw, new_peak_bw, old_peak_bw;
1845 const struct drm_plane_state *old_plane_state;
1846 const struct drm_crtc_state *old_crtc_state;
1847 struct tegra_dc_window window, old_window;
1848 struct tegra_dc *dc = to_tegra_dc(crtc);
1849 struct tegra_plane *tegra;
1850 struct drm_plane *plane;
1851
1852 if (dc->soc->has_nvdisplay)
1853 return;
1854
1855 old_crtc_state = drm_atomic_get_old_crtc_state(state, crtc);
1856 old_dc_state = to_const_dc_state(old_crtc_state);
1857 new_dc_state = to_const_dc_state(crtc->state);
1858
1859 if (!crtc->state->active) {
1860 if (!old_crtc_state->active)
1861 return;
1862
1863 /*
1864 * When CRTC is disabled on DPMS, the state of attached planes
1865 * is kept unchanged. Hence we need to enforce removal of the
1866 * bandwidths from the ICC paths.
1867 */
1868 drm_atomic_crtc_for_each_plane(plane, crtc) {
1869 tegra = to_tegra_plane(plane);
1870
1871 icc_set_bw(tegra->icc_mem, 0, 0);
1872 icc_set_bw(tegra->icc_mem_vfilter, 0, 0);
1873 }
1874
1875 return;
1876 }
1877
1878 for_each_old_plane_in_state(old_crtc_state->state, plane,
1879 old_plane_state, i) {
1880 old_tegra_state = to_const_tegra_plane_state(old_plane_state);
1881 new_tegra_state = to_const_tegra_plane_state(plane->state);
1882 tegra = to_tegra_plane(plane);
1883
1884 /*
1885 * We're iterating over the global atomic state and it contains
1886 * planes from another CRTC, hence we need to filter out the
1887 * planes unrelated to this CRTC.
1888 */
1889 if (tegra->dc != dc)
1890 continue;
1891
1892 new_avg_bw = new_tegra_state->avg_memory_bandwidth;
1893 old_avg_bw = old_tegra_state->avg_memory_bandwidth;
1894
1895 new_peak_bw = new_tegra_state->total_peak_memory_bandwidth;
1896 old_peak_bw = old_tegra_state->total_peak_memory_bandwidth;
1897
1898 /*
1899 * See the comment related to !crtc->state->active above,
1900 * which explains why bandwidths need to be updated when
1901 * CRTC is turning ON.
1902 */
1903 if (new_avg_bw == old_avg_bw && new_peak_bw == old_peak_bw &&
1904 old_crtc_state->active)
1905 continue;
1906
1907 window.src.h = drm_rect_height(&plane->state->src) >> 16;
1908 window.dst.h = drm_rect_height(&plane->state->dst);
1909
1910 old_window.src.h = drm_rect_height(&old_plane_state->src) >> 16;
1911 old_window.dst.h = drm_rect_height(&old_plane_state->dst);
1912
1913 /*
1914 * During the preparation phase (atomic_begin), the memory
1915 * freq should go high before the DC changes are committed
1916 * if bandwidth requirement goes up, otherwise memory freq
1917 * should to stay high if BW requirement goes down. The
1918 * opposite applies to the completion phase (post_commit).
1919 */
1920 if (prepare_bandwidth_transition) {
1921 new_avg_bw = max(old_avg_bw, new_avg_bw);
1922 new_peak_bw = max(old_peak_bw, new_peak_bw);
1923
1924 if (tegra_plane_use_vertical_filtering(tegra, &old_window))
1925 window = old_window;
1926 }
1927
1928 icc_set_bw(tegra->icc_mem, new_avg_bw, new_peak_bw);
1929
1930 if (tegra_plane_use_vertical_filtering(tegra, &window))
1931 icc_set_bw(tegra->icc_mem_vfilter, new_avg_bw, new_peak_bw);
1932 else
1933 icc_set_bw(tegra->icc_mem_vfilter, 0, 0);
1934 }
1935 }
1936
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
drivers/net/wireless/mediatek/mt76/mt7915/init.c:134:41: warning: passing argument 1 of 'thermal_cooling_device_register' discards 'const' qualifier from pointer target type
by kernel test robot
Hi Ryder,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f8e6dfc64f6135d1b6c5215c14cd30b9b60a0008
commit: 34b877d972bec8cbf397a57393317672cf92996f mt76: mt7915: add thermal cooling device support
date: 8 weeks ago
config: x86_64-buildonly-randconfig-r001-20210812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 34b877d972bec8cbf397a57393317672cf92996f
# 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 warnings (new ones prefixed by >>):
drivers/net/wireless/mediatek/mt76/mt7915/init.c: In function 'mt7915_thermal_init':
>> drivers/net/wireless/mediatek/mt76/mt7915/init.c:134:41: warning: passing argument 1 of 'thermal_cooling_device_register' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
134 | cdev = thermal_cooling_device_register(wiphy_name(wiphy), phy,
| ^~~~~~~~~~~~~~~~~
In file included from drivers/net/wireless/mediatek/mt76/mt7915/init.c:7:
include/linux/thermal.h:407:39: note: expected 'char *' but argument is of type 'const char *'
407 | thermal_cooling_device_register(char *type, void *devdata,
| ~~~~~~^~~~
vim +134 drivers/net/wireless/mediatek/mt76/mt7915/init.c
127
128 static int mt7915_thermal_init(struct mt7915_phy *phy)
129 {
130 struct wiphy *wiphy = phy->mt76->hw->wiphy;
131 struct thermal_cooling_device *cdev;
132 struct device *hwmon;
133
> 134 cdev = thermal_cooling_device_register(wiphy_name(wiphy), phy,
135 &mt7915_thermal_ops);
136 if (!IS_ERR(cdev)) {
137 if (sysfs_create_link(&wiphy->dev.kobj, &cdev->device.kobj,
138 "cooling_device") < 0)
139 thermal_cooling_device_unregister(cdev);
140 else
141 phy->cdev = cdev;
142 }
143
144 if (!IS_REACHABLE(CONFIG_HWMON))
145 return 0;
146
147 hwmon = devm_hwmon_device_register_with_groups(&wiphy->dev,
148 wiphy_name(wiphy), phy,
149 mt7915_hwmon_groups);
150 if (IS_ERR(hwmon))
151 return PTR_ERR(hwmon);
152
153 return 0;
154 }
155
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH v1 net-next 4/7] ptp_pch: Switch to use module_pci_driver() macro
by kernel test robot
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ptp_pch-use-mac_...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git b769cf44ed55f4b277b89cf53df6092f0c9082d0
config: powerpc64-randconfig-r034-20210813 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 62df4df41c939205b2dc0a2a3bfb75b8c1ed74fa)
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
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/0day-ci/linux/commit/6c1fff5c80fe8f1a12c20bac2d28ebfa5...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/ptp_pch-use-mac_pton/20210813-203135
git checkout 6c1fff5c80fe8f1a12c20bac2d28ebfa5960bde7
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/ptp/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
__do_insb
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/ptp/ptp_pch.c:13:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:174:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/ptp/ptp_pch.c:13:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:176:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/ptp/ptp_pch.c:13:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:178:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/ptp/ptp_pch.c:13:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:180:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/ptp/ptp_pch.c:13:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:182:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> drivers/ptp/ptp_pch.c:604:1: warning: declaration specifier missing, defaulting to 'int'
module_pci_driver(pch_driver);
^
int
>> drivers/ptp/ptp_pch.c:604:19: error: a parameter list without types is only allowed in a function definition
module_pci_driver(pch_driver);
^
13 warnings and 1 error generated.
vim +604 drivers/ptp/ptp_pch.c
596
597 static struct pci_driver pch_driver = {
598 .name = KBUILD_MODNAME,
599 .id_table = pch_ieee1588_pcidev_id,
600 .probe = pch_probe,
601 .remove = pch_remove,
602 .driver.pm = &pch_pm_ops,
603 };
> 604 module_pci_driver(pch_driver);
605
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month