2023-03-21 15:33:46

by Michal Simek

[permalink] [raw]
Subject: [PATCH] fpga: xilinx-pr-decoupler: Use readl wrapper instead of pure readl

Driver has IO wrappers but xlnx_pr_decouple_read() is not used and readl is
used instead which is just wrong.
It is also generating sparse issue that xlnx_pr_decouple_read() is unused.

Signed-off-by: Michal Simek <[email protected]>
---

Created based on discussion with Tom here
https://lore.kernel.org/r/[email protected]
---
drivers/fpga/xilinx-pr-decoupler.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/fpga/xilinx-pr-decoupler.c b/drivers/fpga/xilinx-pr-decoupler.c
index 2d9c491f7be9..b76d85449b8f 100644
--- a/drivers/fpga/xilinx-pr-decoupler.c
+++ b/drivers/fpga/xilinx-pr-decoupler.c
@@ -69,7 +69,7 @@ static int xlnx_pr_decoupler_enable_show(struct fpga_bridge *bridge)
if (err)
return err;

- status = readl(priv->io_base);
+ status = xlnx_pr_decouple_read(priv, CTRL_OFFSET);

clk_disable(priv->clk);

--
2.36.1



2023-03-21 17:12:20

by Tom Rix

[permalink] [raw]
Subject: Re: [PATCH] fpga: xilinx-pr-decoupler: Use readl wrapper instead of pure readl


On 3/21/23 8:33 AM, Michal Simek wrote:
> Driver has IO wrappers but xlnx_pr_decouple_read() is not used and readl is
> used instead which is just wrong.
> It is also generating sparse issue that xlnx_pr_decouple_read() is unused.
>
> Signed-off-by: Michal Simek <[email protected]>
> ---
>
> Created based on discussion with Tom here
> https://lore.kernel.org/r/[email protected]
> ---
> drivers/fpga/xilinx-pr-decoupler.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/fpga/xilinx-pr-decoupler.c b/drivers/fpga/xilinx-pr-decoupler.c
> index 2d9c491f7be9..b76d85449b8f 100644
> --- a/drivers/fpga/xilinx-pr-decoupler.c
> +++ b/drivers/fpga/xilinx-pr-decoupler.c
> @@ -69,7 +69,7 @@ static int xlnx_pr_decoupler_enable_show(struct fpga_bridge *bridge)
> if (err)
> return err;
>
> - status = readl(priv->io_base);
> + status = xlnx_pr_decouple_read(priv, CTRL_OFFSET);

Thanks for the change.

Reviewed-by: Tom Rix <[email protected]>

>
> clk_disable(priv->clk);
>


2023-03-25 08:04:58

by Xu Yilun

[permalink] [raw]
Subject: Re: [PATCH] fpga: xilinx-pr-decoupler: Use readl wrapper instead of pure readl

On 2023-03-21 at 10:10:14 -0700, Tom Rix wrote:
>
> On 3/21/23 8:33 AM, Michal Simek wrote:
> > Driver has IO wrappers but xlnx_pr_decouple_read() is not used and readl is
> > used instead which is just wrong.
> > It is also generating sparse issue that xlnx_pr_decouple_read() is unused.
> >
> > Signed-off-by: Michal Simek <[email protected]>
> > ---
> >
> > Created based on discussion with Tom here
> > https://lore.kernel.org/r/[email protected]
> > ---
> > drivers/fpga/xilinx-pr-decoupler.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/fpga/xilinx-pr-decoupler.c b/drivers/fpga/xilinx-pr-decoupler.c
> > index 2d9c491f7be9..b76d85449b8f 100644
> > --- a/drivers/fpga/xilinx-pr-decoupler.c
> > +++ b/drivers/fpga/xilinx-pr-decoupler.c
> > @@ -69,7 +69,7 @@ static int xlnx_pr_decoupler_enable_show(struct fpga_bridge *bridge)
> > if (err)
> > return err;
> > - status = readl(priv->io_base);
> > + status = xlnx_pr_decouple_read(priv, CTRL_OFFSET);
>
> Thanks for the change.
>
> Reviewed-by: Tom Rix <[email protected]>

Acked-by: Xu Yilun <[email protected]>

Applied.

>
> > clk_disable(priv->clk);
>