public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Hao Peng <penghaob@uniontech.com>
Cc: gregkh@linuxfoundation.org, ross.schm.dev@gmail.com,
	izabela.bakollari@gmail.com, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: add initial value
Date: Fri, 12 Mar 2021 13:02:44 +0300	[thread overview]
Message-ID: <20210312100244.GN2087@kadam> (raw)
In-Reply-To: <20210311063838.19756-1-penghaob@uniontech.com>

On Thu, Mar 11, 2021 at 02:38:38PM +0800, Hao Peng wrote:
> Add initial value for some uninitialized variable and array.
> 

None of these are ever used uninitialized.  It's weird that you would
even think that.

>  			if (pmlmeext->active_keep_alive_check) {
> -				int stainfo_offset;
> +				int stainfo_offset = 0;
>  
>  				stainfo_offset = rtw_stainfo_offset(pstapriv, psta);
                                ^^^^^^^^^^^^^^^^
This one is initialized on the very next line so all the patch does is
introduce static checker warnings for no reason.

regards,
dan carpenter


      reply	other threads:[~2021-03-12 10:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11  6:38 [PATCH] staging: rtl8723bs: add initial value Hao Peng
2021-03-12 10:02 ` Dan Carpenter [this message]

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=20210312100244.GN2087@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=izabela.bakollari@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penghaob@uniontech.com \
    --cc=ross.schm.dev@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox