Message ID | 20210225064842.36952-1-samirweng1979@163.com |
---|---|
State | Superseded |
Headers | show |
Series | qtnfmac: remove meaningless goto statement and labels | expand |
Hi samirweng1979,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on wireless-drivers-next/master]
[also build test ERROR on wireless-drivers/master sparc-next/master v5.11 next-20210225]
[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/samirweng1979/qtnfmac-remove-meaningless-goto-statement-and-labels/20210225-145714
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: sparc-randconfig-s031-20210225 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-229-g60c1f270-dirty
# https://github.com/0day-ci/linux/commit/d18bea1fd25dee219ae56343ff9caf9cb6eb1519
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review samirweng1979/qtnfmac-remove-meaningless-goto-statement-and-labels/20210225-145714
git checkout d18bea1fd25dee219ae56343ff9caf9cb6eb1519
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sparc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/net/wireless/quantenna/qtnfmac/commands.c: In function 'qtnf_cmd_send_change_sta':
>> drivers/net/wireless/quantenna/qtnfmac/commands.c:1901:3: error: label 'out' used but not defined
1901 | goto out;
| ^~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS || MCOUNT
Selected by
- LOCKDEP && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && !MIPS && !PPC && !ARM && !S390 && !MICROBLAZE && !ARC && !X86
- FAULT_INJECTION_STACKTRACE_FILTER && FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT && !X86_64 && !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
vim +/out +1901 drivers/net/wireless/quantenna/qtnfmac/commands.c
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1867
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1868 int qtnf_cmd_send_change_sta(struct qtnf_vif *vif, const u8 *mac,
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1869 struct station_parameters *params)
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1870 {
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1871 struct sk_buff *cmd_skb;
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1872 struct qlink_cmd_change_sta *cmd;
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1873 int ret = 0;
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1874
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1875 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1876 QLINK_CMD_CHANGE_STA,
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1877 sizeof(*cmd));
c93fe71c91d0ae Sergey Matyukevich 2018-01-22 1878 if (!cmd_skb)
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1879 return -ENOMEM;
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1880
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1881 qtnf_bus_lock(vif->mac->bus);
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1882
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1883 cmd = (struct qlink_cmd_change_sta *)cmd_skb->data;
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1884 ether_addr_copy(cmd->sta_addr, mac);
4d2a7a1cfa68e3 Igor Mitsyanko 2017-12-19 1885 cmd->flag_update.mask =
4d2a7a1cfa68e3 Igor Mitsyanko 2017-12-19 1886 cpu_to_le32(qtnf_encode_sta_flags(params->sta_flags_mask));
4d2a7a1cfa68e3 Igor Mitsyanko 2017-12-19 1887 cmd->flag_update.value =
4d2a7a1cfa68e3 Igor Mitsyanko 2017-12-19 1888 cpu_to_le32(qtnf_encode_sta_flags(params->sta_flags_set));
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1889
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1890 switch (vif->wdev.iftype) {
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1891 case NL80211_IFTYPE_AP:
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1892 cmd->if_type = cpu_to_le16(QLINK_IFTYPE_AP);
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1893 break;
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1894 case NL80211_IFTYPE_STATION:
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1895 cmd->if_type = cpu_to_le16(QLINK_IFTYPE_STATION);
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1896 break;
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1897 default:
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1898 pr_err("unsupported iftype %d\n", vif->wdev.iftype);
63f6982075d890 Colin Ian King 2020-09-25 1899 dev_kfree_skb(cmd_skb);
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1900 ret = -EINVAL;
805b28c05c8e04 Sergey Matyukevich 2017-07-28 @1901 goto out;
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1902 }
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1903
c6ed298ffe09fb Sergey Matyukevich 2018-10-05 1904 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1905
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1906 qtnf_bus_unlock(vif->mac->bus);
c6ed298ffe09fb Sergey Matyukevich 2018-10-05 1907
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1908 return ret;
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1909 }
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1910
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Hi samirweng1979,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on wireless-drivers-next/master]
[also build test ERROR on wireless-drivers/master sparc-next/master v5.11 next-20210225]
[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/samirweng1979/qtnfmac-remove-meaningless-goto-statement-and-labels/20210225-145714
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: x86_64-randconfig-a001-20210225 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a921aaf789912d981cbb2036bdc91ad7289e1523)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/d18bea1fd25dee219ae56343ff9caf9cb6eb1519
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review samirweng1979/qtnfmac-remove-meaningless-goto-statement-and-labels/20210225-145714
git checkout d18bea1fd25dee219ae56343ff9caf9cb6eb1519
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/net/wireless/quantenna/qtnfmac/commands.c:1901:8: error: use of undeclared label 'out'
goto out;
^
1 error generated.
vim +/out +1901 drivers/net/wireless/quantenna/qtnfmac/commands.c
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1867
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1868 int qtnf_cmd_send_change_sta(struct qtnf_vif *vif, const u8 *mac,
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1869 struct station_parameters *params)
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1870 {
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1871 struct sk_buff *cmd_skb;
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1872 struct qlink_cmd_change_sta *cmd;
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1873 int ret = 0;
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1874
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1875 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1876 QLINK_CMD_CHANGE_STA,
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1877 sizeof(*cmd));
c93fe71c91d0ae Sergey Matyukevich 2018-01-22 1878 if (!cmd_skb)
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1879 return -ENOMEM;
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1880
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1881 qtnf_bus_lock(vif->mac->bus);
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1882
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1883 cmd = (struct qlink_cmd_change_sta *)cmd_skb->data;
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1884 ether_addr_copy(cmd->sta_addr, mac);
4d2a7a1cfa68e3 Igor Mitsyanko 2017-12-19 1885 cmd->flag_update.mask =
4d2a7a1cfa68e3 Igor Mitsyanko 2017-12-19 1886 cpu_to_le32(qtnf_encode_sta_flags(params->sta_flags_mask));
4d2a7a1cfa68e3 Igor Mitsyanko 2017-12-19 1887 cmd->flag_update.value =
4d2a7a1cfa68e3 Igor Mitsyanko 2017-12-19 1888 cpu_to_le32(qtnf_encode_sta_flags(params->sta_flags_set));
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1889
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1890 switch (vif->wdev.iftype) {
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1891 case NL80211_IFTYPE_AP:
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1892 cmd->if_type = cpu_to_le16(QLINK_IFTYPE_AP);
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1893 break;
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1894 case NL80211_IFTYPE_STATION:
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1895 cmd->if_type = cpu_to_le16(QLINK_IFTYPE_STATION);
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1896 break;
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1897 default:
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1898 pr_err("unsupported iftype %d\n", vif->wdev.iftype);
63f6982075d890 Colin Ian King 2020-09-25 1899 dev_kfree_skb(cmd_skb);
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1900 ret = -EINVAL;
805b28c05c8e04 Sergey Matyukevich 2017-07-28 @1901 goto out;
805b28c05c8e04 Sergey Matyukevich 2017-07-28 1902 }
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1903
c6ed298ffe09fb Sergey Matyukevich 2018-10-05 1904 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1905
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1906 qtnf_bus_unlock(vif->mac->bus);
c6ed298ffe09fb Sergey Matyukevich 2018-10-05 1907
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1908 return ret;
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1909 }
98f44cb0655cbe Igor Mitsyanko 2017-05-11 1910
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
On Thu, 25 Feb 2021 12:22:54 +0200 Kalle Valo <kvalo@codeaurora.org> wrote: > kernel test robot <lkp@intel.com> writes: > > > Hi samirweng1979, > > > > Thank you for the patch! Yet something to improve: > > > > [auto build test ERROR on wireless-drivers-next/master] > > [also build test ERROR on wireless-drivers/master sparc-next/master > > v5.11 next-20210225] [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/samirweng1979/qtnfmac-remove-meaningless-goto-statement-and-labels/20210225-145714 > > base: > > https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git > > master config: x86_64-randconfig-a001-20210225 (attached > > as .config) compiler: clang version 13.0.0 > > (https://github.com/llvm/llvm-project > > a921aaf789912d981cbb2036bdc91ad7289e1523) 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 x86_64 > > cross compiling tool for clang build # apt-get install > > binutils-x86-64-linux-gnu # > > https://github.com/0day-ci/linux/commit/d18bea1fd25dee219ae56343ff9caf9cb6eb1519 > > git remote add linux-review https://github.com/0day-ci/linux git > > fetch --no-tags linux-review > > samirweng1979/qtnfmac-remove-meaningless-goto-statement-and-labels/20210225-145714 > > git checkout d18bea1fd25dee219ae56343ff9caf9cb6eb1519 # save the > > attached .config to linux build tree > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross > > ARCH=x86_64 > > > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot <lkp@intel.com> > > > > All errors (new ones prefixed by >>): > > > >>> drivers/net/wireless/quantenna/qtnfmac/commands.c:1901:8: error: > >>> use of undeclared label 'out' > > goto out; > > Do you compile test your patches? This error implies that not. > Compilation test is a hard requirement for patches. > Hikvalo, I'm sorry for make this mistake, and I will compile success before send patch later. thanks.
diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index f3ccbd2..842bf03 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -379,10 +379,6 @@ int qtnf_cmd_send_stop_ap(struct qtnf_vif *vif) qtnf_bus_lock(vif->mac->bus); ret = qtnf_cmd_send(vif->mac->bus, cmd_skb); - if (ret) - goto out; - -out: qtnf_bus_unlock(vif->mac->bus); return ret; @@ -407,10 +403,7 @@ int qtnf_cmd_send_register_mgmt(struct qtnf_vif *vif, u16 frame_type, bool reg) cmd->do_register = reg; ret = qtnf_cmd_send(vif->mac->bus, cmd_skb); - if (ret) - goto out; -out: qtnf_bus_unlock(vif->mac->bus); return ret; @@ -446,10 +439,7 @@ int qtnf_cmd_send_frame(struct qtnf_vif *vif, u32 cookie, u16 flags, qtnf_cmd_skb_put_buffer(cmd_skb, buf, len); ret = qtnf_cmd_send(vif->mac->bus, cmd_skb); - if (ret) - goto out; -out: qtnf_bus_unlock(vif->mac->bus); return ret; @@ -477,10 +467,6 @@ int qtnf_cmd_send_mgmt_set_appie(struct qtnf_vif *vif, u8 frame_type, qtnf_bus_lock(vif->mac->bus); ret = qtnf_cmd_send(vif->mac->bus, cmd_skb); - if (ret) - goto out; - -out: qtnf_bus_unlock(vif->mac->bus); return ret; @@ -1677,10 +1663,7 @@ int qtnf_cmd_send_update_phy_params(struct qtnf_wmac *mac, u32 changed) wiphy->retry_short); ret = qtnf_cmd_send(mac->bus, cmd_skb); - if (ret) - goto out; -out: qtnf_bus_unlock(mac->bus); return ret; @@ -1772,10 +1755,7 @@ int qtnf_cmd_send_add_key(struct qtnf_vif *vif, u8 key_index, bool pairwise, params->seq_len); ret = qtnf_cmd_send(vif->mac->bus, cmd_skb); - if (ret) - goto out; -out: qtnf_bus_unlock(vif->mac->bus); return ret; @@ -1807,10 +1787,7 @@ int qtnf_cmd_send_del_key(struct qtnf_vif *vif, u8 key_index, bool pairwise, cmd->pairwise = pairwise; ret = qtnf_cmd_send(vif->mac->bus, cmd_skb); - if (ret) - goto out; -out: qtnf_bus_unlock(vif->mac->bus); return ret; @@ -1837,10 +1814,7 @@ int qtnf_cmd_send_set_default_key(struct qtnf_vif *vif, u8 key_index, cmd->multicast = multicast; ret = qtnf_cmd_send(vif->mac->bus, cmd_skb); - if (ret) - goto out; -out: qtnf_bus_unlock(vif->mac->bus); return ret; @@ -1864,10 +1838,7 @@ int qtnf_cmd_send_set_default_mgmt_key(struct qtnf_vif *vif, u8 key_index) cmd->key_index = key_index; ret = qtnf_cmd_send(vif->mac->bus, cmd_skb); - if (ret) - goto out; -out: qtnf_bus_unlock(vif->mac->bus); return ret; @@ -1931,10 +1902,7 @@ int qtnf_cmd_send_change_sta(struct qtnf_vif *vif, const u8 *mac, } ret = qtnf_cmd_send(vif->mac->bus, cmd_skb); - if (ret) - goto out; -out: qtnf_bus_unlock(vif->mac->bus); return ret; @@ -1966,10 +1934,7 @@ int qtnf_cmd_send_del_sta(struct qtnf_vif *vif, cmd->reason_code = cpu_to_le16(params->reason_code); ret = qtnf_cmd_send(vif->mac->bus, cmd_skb); - if (ret) - goto out; -out: qtnf_bus_unlock(vif->mac->bus); return ret; @@ -2189,10 +2154,6 @@ int qtnf_cmd_send_connect(struct qtnf_vif *vif, qtnf_bus_lock(vif->mac->bus); ret = qtnf_cmd_send(vif->mac->bus, cmd_skb); - if (ret) - goto out; - -out: qtnf_bus_unlock(vif->mac->bus); return ret; @@ -2218,10 +2179,6 @@ int qtnf_cmd_send_external_auth(struct qtnf_vif *vif, qtnf_bus_lock(vif->mac->bus); ret = qtnf_cmd_send(vif->mac->bus, cmd_skb); - if (ret) - goto out; - -out: qtnf_bus_unlock(vif->mac->bus); return ret; @@ -2245,10 +2202,7 @@ int qtnf_cmd_send_disconnect(struct qtnf_vif *vif, u16 reason_code) cmd->reason = cpu_to_le16(reason_code); ret = qtnf_cmd_send(vif->mac->bus, cmd_skb); - if (ret) - goto out; -out: qtnf_bus_unlock(vif->mac->bus); return ret; @@ -2271,10 +2225,6 @@ int qtnf_cmd_send_updown_intf(struct qtnf_vif *vif, bool up) qtnf_bus_lock(vif->mac->bus); ret = qtnf_cmd_send(vif->mac->bus, cmd_skb); - if (ret) - goto out; - -out: qtnf_bus_unlock(vif->mac->bus); return ret; @@ -2580,10 +2530,6 @@ int qtnf_cmd_start_cac(const struct qtnf_vif *vif, qtnf_bus_lock(bus); ret = qtnf_cmd_send(bus, cmd_skb); - if (ret) - goto out; - -out: qtnf_bus_unlock(bus); return ret; @@ -2611,10 +2557,6 @@ int qtnf_cmd_set_mac_acl(const struct qtnf_vif *vif, qtnf_bus_lock(bus); ret = qtnf_cmd_send(bus, cmd_skb); - if (ret) - goto out; - -out: qtnf_bus_unlock(bus); return ret; @@ -2639,10 +2581,7 @@ int qtnf_cmd_send_pm_set(const struct qtnf_vif *vif, u8 pm_mode, int timeout) qtnf_bus_lock(bus); ret = qtnf_cmd_send(bus, cmd_skb); - if (ret) - goto out; -out: qtnf_bus_unlock(bus); return ret; @@ -2754,10 +2693,7 @@ int qtnf_cmd_send_wowlan_set(const struct qtnf_vif *vif, cmd->triggers = cpu_to_le32(triggers); ret = qtnf_cmd_send(bus, cmd_skb); - if (ret) - goto out; -out: qtnf_bus_unlock(bus); return ret; } @@ -2821,10 +2757,6 @@ int qtnf_cmd_send_update_owe(struct qtnf_vif *vif, qtnf_bus_lock(vif->mac->bus); ret = qtnf_cmd_send(vif->mac->bus, cmd_skb); - if (ret) - goto out; - -out: qtnf_bus_unlock(vif->mac->bus); return ret;