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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+V-a8s2MCB=_dX+V7_hARyJybKwnTgZyVWgPb3B0tmvLZaSzw@mail.gmail.com>
Date:   Wed, 25 Nov 2020 15:32:31 +0000
From:   "Lad, Prabhakar" <prabhakar.csengg@...il.com>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>,
        Sergei Shtylyov <sergei.shtylyov@...il.com>
Cc:     Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Jiri Kosina <trivial@...nel.org>,
        Mark Brown <broonie@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
        Biju Das <biju.das.jz@...renesas.com>
Subject: Re: [PATCH 2/5] memory: renesas-rpc-if: Make rpcif_enable/disable_rpm()
 as static inline

Hi Geert,

Thank you for the review.

On Tue, Nov 24, 2020 at 3:43 PM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
>
> Hi Prabhakar,
>
> On Tue, Nov 24, 2020 at 12:27 PM Lad Prabhakar
> <prabhakar.mahadev-lad.rj@...renesas.com> wrote:
> > Define rpcif_enable_rpm() and rpcif_disable_rpm() as static
> > inline in the header instead of exporting it.
> >
> > Suggested-by: Pavel Machek <pavel@...x.de>
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
>
> Thanks for your patch, which is an improvement.
>
> > --- a/include/memory/renesas-rpc-if.h
> > +++ b/include/memory/renesas-rpc-if.h
> > @@ -10,6 +10,7 @@
> >  #ifndef __RENESAS_RPC_IF_H
> >  #define __RENESAS_RPC_IF_H
> >
> > +#include <linux/pm_runtime.h>
> >  #include <linux/types.h>
> >
> >  enum rpcif_data_dir {
> > @@ -77,11 +78,19 @@ struct      rpcif {
> >
> >  int  rpcif_sw_init(struct rpcif *rpc, struct device *dev);
> >  void rpcif_hw_init(struct rpcif *rpc, bool hyperflash);
> > -void rpcif_enable_rpm(struct rpcif *rpc);
> > -void rpcif_disable_rpm(struct rpcif *rpc);
> >  void rpcif_prepare(struct rpcif *rpc, const struct rpcif_op *op, u64 *offs,
> >                    size_t *len);
> >  int rpcif_manual_xfer(struct rpcif *rpc);
> >  ssize_t rpcif_dirmap_read(struct rpcif *rpc, u64 offs, size_t len, void *buf);
> >
> > +static inline void rpcif_enable_rpm(struct rpcif *rpc)
> > +{
> > +       pm_runtime_enable(rpc->dev);
> > +}
> > +
> > +static inline void rpcif_disable_rpm(struct rpcif *rpc)
> > +{
> > +       pm_runtime_put_sync(rpc->dev);
>
> Looking at how this is used, this should call pm_runtime_disable()
> instead.
>
> And probably this should be moved inside the core RPC-IF driver:
>   1. pm_runtime_enable() could be called from rpcif_sw_init(),
>   2. pm_runtime_put_sync() can be called from a new rpc_sw_deinit()
>      function, to be called by the SPI and MTD drivers on probe failure
>      and on remove.
>
Totally agree.

Sergei are you OK with the above suggestions ?

Cheers,
Prabhakar

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ