Re: [PATCH v3 7/9] memory: renesas-rpc-if: Add wrapper functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Biju,

On Mon, 31 Mar 2025 at 14:50, Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote:
> > From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> > On Mon, 31 Mar 2025 at 14:35, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
> > > On Tue, 11 Mar 2025 at 12:36, Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote:
> > > > Even though XSPI and RPCIF has different register layout, reuse the
> > > > code by adding wrapper functions to support both XSPI and RPC-IF.
> > > >
> > > > While at it, replace error check for pm_runtime_resume_and_get() as
> > > > it can return positive value as well.
> > >
> > > While the change is fine for me, the function cannot return strict
> > > positive values:
> > > https://elixir.bootlin.com/linux/v6.13.7/source/include/linux/pm_runti
> > > me.h#L418
> > >
> > > > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> > >
> > > > --- a/drivers/memory/renesas-rpc-if.c
> > > > +++ b/drivers/memory/renesas-rpc-if.c
> > >
> > > > @@ -519,20 +543,15 @@ static void memcpy_fromio_readw(void *to,
> > > >         }
> > > >  }
> > > >
> > > > -ssize_t rpcif_dirmap_read(struct device *dev, u64 offs, size_t len,
> > > > void *buf)
> > > > +static ssize_t rpcif_dirmap_read_helper(struct rpcif_priv *rpc, u64 offs,
> > > > +                                       size_t len, void *buf)
> >
> > Seeing how none of these helper functions are reused for xSPI in the next patch, I think they should
> > be named differently. Perhaps *_impl()?
>
> You mean, rpcif_dirmap_read_impl() and xspi_dirmap_read_impl()?

Indeed.

> __rpcif_dirmap_read() and xspi_dirmap_read()

That is another option. But the former looks more attractive to me
because of symmetry.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux