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:   Mon, 7 Jun 2021 08:49:58 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Yang Yingliang <yangyingliang@...wei.com>
Cc:     linux-kernel <linux-kernel@...r.kernel.org>,
        netdev <netdev@...r.kernel.org>,
        Hans Ulli Kroll <ulli.kroll@...glemail.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH net-next v2] net: gemini: Use devm_platform_get_and_ioremap_resource()

On Mon, Jun 7, 2021 at 3:05 AM Yang Yingliang <yangyingliang@...wei.com> wrote:
> On 2021/6/5 23:17, Linus Walleij wrote:
> > On Sat, Jun 5, 2021 at 2:32 PM Yang Yingliang <yangyingliang@...wei.com> wrote:
> >
> >> Use devm_platform_get_and_ioremap_resource() to simplify
> >> code.
> >>
> >> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> > (...)
> >> -       dmares = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >> -       gmacres = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> > Should you not also delete the local variables
> > dmares and gmacres? I doubt they are used
> > after this.
>
> They are used to print message before returning gemini_ethernet_port_probe()
> static int gemini_ethernet_port_probe(struct platform_device *pdev)

Yes and after this they will print something undefined since you never
assign them anything, so the dmares and gmacres prints need to be
removed too. (Which is fine.)

Yours,
Linus Walleij

Powered by blists - more mailing lists