mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Schmidt <stefan@osg.samsung.com>
To: Colin King <colin.king@canonical.com>,
	Xue Liu <liuxuenetmail@gmail.com>,
	Alexander Aring <alex.aring@gmail.com>,
	linux-wpan@vger.kernel.org, netdev@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] ieee802154: remove unused variable 'val'
Date: Fri, 2 Mar 2018 11:41:00 +0100	[thread overview]
Message-ID: <dc14d4c6-e58a-ab13-ad75-efc71ff454e8@osg.samsung.com> (raw)
In-Reply-To: <20180301144019.14321-1-colin.king@canonical.com>

Hello.


On 03/01/2018 03:40 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable 'val' is not being initialized and is later being logically
> or'd with DAR_PHY_CTRL4_PROMISCUOUS. Considering this variable is never
> being read anyway we may as well remove val altogether.
>
> Cleans up error detected by cppcheck:
> drivers/net/ieee802154/mcr20a.c:732: (error) Uninitialized variable: val
>
> Fixes: 8c6ad9cc5157 ("ieee802154: Add NXP MCR20A IEEE 802.15.4 transceiver driver")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/net/ieee802154/mcr20a.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/ieee802154/mcr20a.c b/drivers/net/ieee802154/mcr20a.c
> index d9eb22a52551..55a22c761808 100644
> --- a/drivers/net/ieee802154/mcr20a.c
> +++ b/drivers/net/ieee802154/mcr20a.c
> @@ -723,13 +723,11 @@ mcr20a_set_promiscuous_mode(struct ieee802154_hw *hw, const bool on)
>  	struct mcr20a_local *lp = hw->priv;
>  	int ret;
>  	u8 rx_frame_filter_reg = 0x0;
> -	u8 val;
>  
>  	dev_dbg(printdev(lp), "%s(%d)\n", __func__, on);
>  
>  	if (on) {
>  		/* All frame types accepted*/
> -		val |= DAR_PHY_CTRL4_PROMISCUOUS;
>  		rx_frame_filter_reg &= ~(IAR_RX_FRAME_FLT_FRM_VER);
>  		rx_frame_filter_reg |= (IAR_RX_FRAME_FLT_ACK_FT |
>  				  IAR_RX_FRAME_FLT_NS_FT);

This patch has been applied to the wpan-next tree and will be
part of the next pull request to net-next. Thanks!

regards
Stefan Schmidt

      reply	other threads:[~2018-03-02 10:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-01 14:40 Colin King
2018-03-02 10:41 ` Stefan Schmidt [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=dc14d4c6-e58a-ab13-ad75-efc71ff454e8@osg.samsung.com \
    --to=stefan@osg.samsung.com \
    --cc=alex.aring@gmail.com \
    --cc=colin.king@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=liuxuenetmail@gmail.com \
    --cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®