All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Abhishek Kumar <kuabhs@chromium.org>,
	Brian Norris <briannorris@chromium.org>,
	kbuild-all@lists.01.org, lkp@intel.com, kbuild@lists.01.org,
	Carl Huang <cjhuang@codeaurora.org>,
	ath10k@lists.infradead.org
Subject: Re: [ath6kl:pending 10/12] drivers/net/wireless/ath/ath10k/mac.c:3010 ath10k_mac_set_sar_specs() warn: this array is probably non-NULL. 'sar->sub_specs'
Date: Wed, 27 Jan 2021 12:52:09 +0200	[thread overview]
Message-ID: <871re6abza.fsf@codeaurora.org> (raw)
In-Reply-To: <20210122150728.GS2696@kadam> (Dan Carpenter's message of "Fri, 22 Jan 2021 18:07:28 +0300")

Dan Carpenter <dan.carpenter@oracle.com> writes:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git pending
> head:   13112a10a90ece17774a25bc363a7561c26aa19f
> commit: c995c0bdf2d68ce279507a2017e1e65e823339df [10/12] ath10k: allow
> dynamic SAR power limits via common API
> config: x86_64-randconfig-m001-20210121 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> New smatch warnings:
> drivers/net/wireless/ath/ath10k/mac.c:3010 ath10k_mac_set_sar_specs()
> warn: this array is probably non-NULL. 'sar->sub_specs'
>
> Old smatch warnings:
> drivers/net/wireless/ath/ath10k/mac.c:5150 ath10k_start() warn:
> missing error code 'ret'
> drivers/net/wireless/ath/ath10k/mac.c:5589 ath10k_add_interface()
> warn: missing error code 'ret'
>
> vim +3010 drivers/net/wireless/ath/ath10k/mac.c
>
> c995c0bdf2d68ce Carl Huang 2021-01-18  2993  
> c995c0bdf2d68ce Carl Huang 2021-01-18 2994 static int
> ath10k_mac_set_sar_specs(struct ieee80211_hw *hw,
> c995c0bdf2d68ce Carl Huang 2021-01-18 2995 const struct
> cfg80211_sar_specs *sar)
> c995c0bdf2d68ce Carl Huang 2021-01-18  2996  {
> c995c0bdf2d68ce Carl Huang 2021-01-18 2997 const struct
> cfg80211_sar_sub_specs *sub_specs;
> c995c0bdf2d68ce Carl Huang 2021-01-18  2998  	struct ath10k *ar = hw->priv;
> c995c0bdf2d68ce Carl Huang 2021-01-18  2999  	u32 i;
> c995c0bdf2d68ce Carl Huang 2021-01-18  3000  	int ret;
> c995c0bdf2d68ce Carl Huang 2021-01-18  3001  
> c995c0bdf2d68ce Carl Huang 2021-01-18  3002  	mutex_lock(&ar->conf_mutex);
> c995c0bdf2d68ce Carl Huang 2021-01-18  3003  
> c995c0bdf2d68ce Carl Huang 2021-01-18 3004 if
> (!ar->hw_params.dynamic_sar_support) {
> c995c0bdf2d68ce Carl Huang 2021-01-18  3005  		ret = -EOPNOTSUPP;
> c995c0bdf2d68ce Carl Huang 2021-01-18  3006  		goto error;
> c995c0bdf2d68ce Carl Huang 2021-01-18  3007  	}
> c995c0bdf2d68ce Carl Huang 2021-01-18  3008  
> c995c0bdf2d68ce Carl Huang 2021-01-18 3009 if (!sar || sar->type !=
> NL80211_SAR_TYPE_POWER ||
> c995c0bdf2d68ce Carl Huang 2021-01-18 @3010 sar->num_sub_specs == 0 ||
> !sar->sub_specs) {
>                                                                                ^^^^^^^^^^^^^^^
> You could delete this if you want.  It can't be NULL.

I removed !sar->sub_specs (I hope that's what you meant) in the in the
pending branch, thanks.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@codeaurora.org>
To: kbuild-all@lists.01.org
Subject: Re: [ath6kl:pending 10/12] drivers/net/wireless/ath/ath10k/mac.c:3010 ath10k_mac_set_sar_specs() warn: this array is probably non-NULL. 'sar->sub_specs'
Date: Wed, 27 Jan 2021 12:52:09 +0200	[thread overview]
Message-ID: <871re6abza.fsf@codeaurora.org> (raw)
In-Reply-To: <20210122150728.GS2696@kadam>

[-- Attachment #1: Type: text/plain, Size: 2706 bytes --]

Dan Carpenter <dan.carpenter@oracle.com> writes:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git pending
> head:   13112a10a90ece17774a25bc363a7561c26aa19f
> commit: c995c0bdf2d68ce279507a2017e1e65e823339df [10/12] ath10k: allow
> dynamic SAR power limits via common API
> config: x86_64-randconfig-m001-20210121 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> New smatch warnings:
> drivers/net/wireless/ath/ath10k/mac.c:3010 ath10k_mac_set_sar_specs()
> warn: this array is probably non-NULL. 'sar->sub_specs'
>
> Old smatch warnings:
> drivers/net/wireless/ath/ath10k/mac.c:5150 ath10k_start() warn:
> missing error code 'ret'
> drivers/net/wireless/ath/ath10k/mac.c:5589 ath10k_add_interface()
> warn: missing error code 'ret'
>
> vim +3010 drivers/net/wireless/ath/ath10k/mac.c
>
> c995c0bdf2d68ce Carl Huang 2021-01-18  2993  
> c995c0bdf2d68ce Carl Huang 2021-01-18 2994 static int
> ath10k_mac_set_sar_specs(struct ieee80211_hw *hw,
> c995c0bdf2d68ce Carl Huang 2021-01-18 2995 const struct
> cfg80211_sar_specs *sar)
> c995c0bdf2d68ce Carl Huang 2021-01-18  2996  {
> c995c0bdf2d68ce Carl Huang 2021-01-18 2997 const struct
> cfg80211_sar_sub_specs *sub_specs;
> c995c0bdf2d68ce Carl Huang 2021-01-18  2998  	struct ath10k *ar = hw->priv;
> c995c0bdf2d68ce Carl Huang 2021-01-18  2999  	u32 i;
> c995c0bdf2d68ce Carl Huang 2021-01-18  3000  	int ret;
> c995c0bdf2d68ce Carl Huang 2021-01-18  3001  
> c995c0bdf2d68ce Carl Huang 2021-01-18  3002  	mutex_lock(&ar->conf_mutex);
> c995c0bdf2d68ce Carl Huang 2021-01-18  3003  
> c995c0bdf2d68ce Carl Huang 2021-01-18 3004 if
> (!ar->hw_params.dynamic_sar_support) {
> c995c0bdf2d68ce Carl Huang 2021-01-18  3005  		ret = -EOPNOTSUPP;
> c995c0bdf2d68ce Carl Huang 2021-01-18  3006  		goto error;
> c995c0bdf2d68ce Carl Huang 2021-01-18  3007  	}
> c995c0bdf2d68ce Carl Huang 2021-01-18  3008  
> c995c0bdf2d68ce Carl Huang 2021-01-18 3009 if (!sar || sar->type !=
> NL80211_SAR_TYPE_POWER ||
> c995c0bdf2d68ce Carl Huang 2021-01-18 @3010 sar->num_sub_specs == 0 ||
> !sar->sub_specs) {
>                                                                                ^^^^^^^^^^^^^^^
> You could delete this if you want.  It can't be NULL.

I removed !sar->sub_specs (I hope that's what you meant) in the in the
pending branch, thanks.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  reply	other threads:[~2021-01-27 10:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22 15:07 [ath6kl:pending 10/12] drivers/net/wireless/ath/ath10k/mac.c:3010 ath10k_mac_set_sar_specs() warn: this array is probably non-NULL. 'sar->sub_specs' Dan Carpenter
2021-01-22 15:07 ` Dan Carpenter
2021-01-22 15:07 ` Dan Carpenter
2021-01-27 10:52 ` Kalle Valo [this message]
2021-01-27 10:52   ` Kalle Valo
2021-01-27 10:58   ` Dan Carpenter
2021-01-27 10:58     ` Dan Carpenter
2021-01-27 10:58     ` Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2021-01-22  3:34 kernel test robot

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=871re6abza.fsf@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=ath10k@lists.infradead.org \
    --cc=briannorris@chromium.org \
    --cc=cjhuang@codeaurora.org \
    --cc=dan.carpenter@oracle.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=kuabhs@chromium.org \
    --cc=lkp@intel.com \
    /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.