diff mbox series

fpga: xilinx-pr-decoupler: Use readl wrapper instead of pure readl

Message ID 0381e4e8061c2fee182a104768e84feff3a82d25.1679412800.git.michal.simek@amd.com (mailing list archive)
State New
Headers show
Series fpga: xilinx-pr-decoupler: Use readl wrapper instead of pure readl | expand

Commit Message

Michal Simek March 21, 2023, 3:33 p.m. UTC
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 <michal.simek@amd.com>
---

Created based on discussion with Tom here
https://lore.kernel.org/r/20230317230617.1673923-1-trix@redhat.com
---
 drivers/fpga/xilinx-pr-decoupler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rix March 21, 2023, 5:10 p.m. UTC | #1
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 <michal.simek@amd.com>
> ---
>
> Created based on discussion with Tom here
> https://lore.kernel.org/r/20230317230617.1673923-1-trix@redhat.com
> ---
>   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 <trix@redhat.com>

>   
>   	clk_disable(priv->clk);
>
Xu Yilun March 25, 2023, 7:38 a.m. UTC | #2
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 <michal.simek@amd.com>
> > ---
> > 
> > Created based on discussion with Tom here
> > https://lore.kernel.org/r/20230317230617.1673923-1-trix@redhat.com
> > ---
> >   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 <trix@redhat.com>

Acked-by: Xu Yilun <yilun.xu@intel.com>

Applied.

> 
> >   	clk_disable(priv->clk);
>
diff mbox series

Patch

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);