From: kernel test robot <lkp@intel.com>
To: Finn Behrens <fin@nyantec.com>, linux-wireless@vger.kernel.org
Cc: kbuild-all@lists.01.org
Subject: Re: [PATCH v2] nl80211: reset regdom when reloading regdb
Date: Thu, 26 Nov 2020 20:58:55 +0800 [thread overview]
Message-ID: <202011262008.YPMvZI3l-lkp@intel.com> (raw)
In-Reply-To: <X7+F/ht8T7aGiIl7@bombur.kloenk.de>
[-- Attachment #1: Type: text/plain, Size: 4952 bytes --]
Hi Finn,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mac80211-next/master]
[also build test WARNING on mac80211/master linus/master v5.10-rc5 next-20201126]
[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/Finn-Behrens/nl80211-reset-regdom-when-reloading-regdb/20201126-184229
base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: m68k-allmodconfig (attached as .config)
compiler: m68k-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
# https://github.com/0day-ci/linux/commit/60f644b62d0171339bf90cbb65245a171d2edc2a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Finn-Behrens/nl80211-reset-regdom-when-reloading-regdb/20201126-184229
git checkout 60f644b62d0171339bf90cbb65245a171d2edc2a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
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/kernel.h:11,
from net/wireless/reg.c:50:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
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));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
net/wireless/reg.c: In function 'reg_reload_regdb':
>> net/wireless/reg.c:1109:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
1109 | const struct ieee80211_regdomain *current_regdomain = NULL;
| ^~~~~
net/wireless/reg.c:1113:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
1113 | struct regulatory_request *request = NULL;
| ^~~~~~
net/wireless/reg.c: In function 'reg_process_hint_user':
>> net/wireless/reg.c:2686:39: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
2686 | treatment == REG_REQ_ALREADY_SET &&
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
2687 | !user_request->reload)
| ~~~~~~~~~~~~~~~~~~~~~
vim +1109 net/wireless/reg.c
1077
1078 int reg_reload_regdb(void)
1079 {
1080 const struct firmware *fw;
1081 void *db;
1082 int err;
1083
1084 err = request_firmware(&fw, "regulatory.db", ®_pdev->dev);
1085 if (err) {
1086 pr_info("failed to load regulatory.db\n");
1087 return err;
1088 }
1089
1090 if (!valid_regdb(fw->data, fw->size)) {
1091 pr_info("loaded regulatory.db is malformed or signature is missing/invalid\n");
1092 err = -ENODATA;
1093 goto out;
1094 }
1095
1096 db = kmemdup(fw->data, fw->size, GFP_KERNEL);
1097 if (!db) {
1098 err = -ENOMEM;
1099 goto out;
1100 }
1101
1102 rtnl_lock();
1103 if (!IS_ERR_OR_NULL(regdb))
1104 kfree(regdb);
1105 regdb = db;
1106 rtnl_unlock();
1107
1108 // reset regulatory
> 1109 const struct ieee80211_regdomain *current_regdomain = NULL;
1110
1111 current_regdomain = get_cfg80211_regdom();
1112
1113 struct regulatory_request *request = NULL;
1114
1115 request = kzalloc(sizeof(*request), GFP_KERNEL);
1116 if (!request) {
1117 err = -ENOMEM;
1118 goto out;
1119 }
1120
1121 request->wiphy_idx = WIPHY_IDX_INVALID;
1122 request->alpha2[0] = current_regdomain->alpha2[0];
1123 request->alpha2[1] = current_regdomain->alpha2[1];
1124 request->initiator = NL80211_USER_REG_HINT_USER;
1125 request->user_reg_hint_type = NL80211_USER_REG_HINT_USER;
1126 request->reload = true;
1127
1128 queue_regulatory_request(request);
1129
1130 out:
1131 release_firmware(fw);
1132 return err;
1133 }
1134
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 58903 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2] nl80211: reset regdom when reloading regdb
Date: Thu, 26 Nov 2020 20:58:55 +0800 [thread overview]
Message-ID: <202011262008.YPMvZI3l-lkp@intel.com> (raw)
In-Reply-To: <X7+F/ht8T7aGiIl7@bombur.kloenk.de>
[-- Attachment #1: Type: text/plain, Size: 5076 bytes --]
Hi Finn,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mac80211-next/master]
[also build test WARNING on mac80211/master linus/master v5.10-rc5 next-20201126]
[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/Finn-Behrens/nl80211-reset-regdom-when-reloading-regdb/20201126-184229
base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: m68k-allmodconfig (attached as .config)
compiler: m68k-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
# https://github.com/0day-ci/linux/commit/60f644b62d0171339bf90cbb65245a171d2edc2a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Finn-Behrens/nl80211-reset-regdom-when-reloading-regdb/20201126-184229
git checkout 60f644b62d0171339bf90cbb65245a171d2edc2a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
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/kernel.h:11,
from net/wireless/reg.c:50:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
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));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
net/wireless/reg.c: In function 'reg_reload_regdb':
>> net/wireless/reg.c:1109:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
1109 | const struct ieee80211_regdomain *current_regdomain = NULL;
| ^~~~~
net/wireless/reg.c:1113:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
1113 | struct regulatory_request *request = NULL;
| ^~~~~~
net/wireless/reg.c: In function 'reg_process_hint_user':
>> net/wireless/reg.c:2686:39: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
2686 | treatment == REG_REQ_ALREADY_SET &&
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
2687 | !user_request->reload)
| ~~~~~~~~~~~~~~~~~~~~~
vim +1109 net/wireless/reg.c
1077
1078 int reg_reload_regdb(void)
1079 {
1080 const struct firmware *fw;
1081 void *db;
1082 int err;
1083
1084 err = request_firmware(&fw, "regulatory.db", ®_pdev->dev);
1085 if (err) {
1086 pr_info("failed to load regulatory.db\n");
1087 return err;
1088 }
1089
1090 if (!valid_regdb(fw->data, fw->size)) {
1091 pr_info("loaded regulatory.db is malformed or signature is missing/invalid\n");
1092 err = -ENODATA;
1093 goto out;
1094 }
1095
1096 db = kmemdup(fw->data, fw->size, GFP_KERNEL);
1097 if (!db) {
1098 err = -ENOMEM;
1099 goto out;
1100 }
1101
1102 rtnl_lock();
1103 if (!IS_ERR_OR_NULL(regdb))
1104 kfree(regdb);
1105 regdb = db;
1106 rtnl_unlock();
1107
1108 // reset regulatory
> 1109 const struct ieee80211_regdomain *current_regdomain = NULL;
1110
1111 current_regdomain = get_cfg80211_regdom();
1112
1113 struct regulatory_request *request = NULL;
1114
1115 request = kzalloc(sizeof(*request), GFP_KERNEL);
1116 if (!request) {
1117 err = -ENOMEM;
1118 goto out;
1119 }
1120
1121 request->wiphy_idx = WIPHY_IDX_INVALID;
1122 request->alpha2[0] = current_regdomain->alpha2[0];
1123 request->alpha2[1] = current_regdomain->alpha2[1];
1124 request->initiator = NL80211_USER_REG_HINT_USER;
1125 request->user_reg_hint_type = NL80211_USER_REG_HINT_USER;
1126 request->reload = true;
1127
1128 queue_regulatory_request(request);
1129
1130 out:
1131 release_firmware(fw);
1132 return err;
1133 }
1134
---
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: 58903 bytes --]
next prev parent reply other threads:[~2020-11-26 13:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-21 12:45 [PATCH] nl80211: reset regdom when reloading regdb Finn Behrens
2020-11-26 10:39 ` [PATCH v2] " Finn Behrens
2020-11-26 12:58 ` kernel test robot [this message]
2020-11-26 12:58 ` kernel test robot
2020-12-04 11:39 ` Johannes Berg
2021-11-13 10:54 ` [PATCH v4] " Finn Behrens
2021-11-26 12:08 ` Johannes Berg
2021-11-27 10:28 ` [PATCH v5] " Finn Behrens
2021-11-30 16:02 ` Nathan Chancellor
2021-11-30 16:50 ` Finn Behrens
2021-11-30 18:32 ` Nathan Chancellor
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=202011262008.YPMvZI3l-lkp@intel.com \
--to=lkp@intel.com \
--cc=fin@nyantec.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-wireless@vger.kernel.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.