lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 12 Oct 2022 11:11:58 +0200
From:   Stefan Schmidt <stefan@...enfreihafen.org>
To:     cgel.zte@...il.com, varkabhadram@...il.com
Cc:     alex.aring@...il.com, davem@...emloft.net, edumazet@...gle.com,
        kuba@...nel.org, pabeni@...hat.com, linux-wpan@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Xu Panda <xu.panda@....com.cn>, Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH linux-next] ieee802154: cc2520: remove the unneeded result
 variable

Hello.

On 12.09.22 09:20, cgel.zte@...il.com wrote:
> From: Xu Panda <xu.panda@....com.cn>
> 
> Return the value cc2520_write_register() directly instead of storing it in
> another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Xu Panda <xu.panda@....com.cn>
> ---
>   drivers/net/ieee802154/cc2520.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc2520.c
> index c69b87d3837d..abe331c795df 100644
> --- a/drivers/net/ieee802154/cc2520.c
> +++ b/drivers/net/ieee802154/cc2520.c
> @@ -632,7 +632,6 @@ static int
>   cc2520_set_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
>   {
>          struct cc2520_private *priv = hw->priv;
> -       int ret;
> 
>          dev_dbg(&priv->spi->dev, "trying to set channel\n");
> 
> @@ -640,10 +639,8 @@ cc2520_set_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
>          WARN_ON(channel < CC2520_MINCHANNEL);
>          WARN_ON(channel > CC2520_MAXCHANNEL);
> 
> -       ret = cc2520_write_register(priv, CC2520_FREQCTRL,
> -                                   11 + 5 * (channel - 11));
> -
> -       return ret;
> +       return cc2520_write_register(priv, CC2520_FREQCTRL,
> +                                    11 + 5 * (channel - 11));
>   }
> 
>   static int

The patch itself looks good, but it does not apply here:

[stefan@...alhost wpan-next]$ git am -s 
linux-next-ieee802154-cc2520-remove-the-unneeded-result-variable.patch
Applying: ieee802154: cc2520: remove the unneeded result variable
error: patch failed: drivers/net/ieee802154/cc2520.c:632
error: drivers/net/ieee802154/cc2520.c: patch does not apply
Patch failed at 0001 ieee802154: cc2520: remove the unneeded result variable

Against which tree did you make this patch? Could you please rebase 
against latest net-next or wpan-next?

regards
Stefan Schmidt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ