Thread (9 messages) 9 messages, 3 authors, 2023-03-21

Re: [PATCH] fpga: xilinx-pr-decoupler: remove unused xlnx_pr_decouple_read function

From: Michal Simek <michal.simek@amd.com>
Date: 2023-03-20 07:40:51
Also in: linux-fpga, lkml, llvm
Subsystem: fpga manager framework, the rest · Maintainers: Moritz Fischer, Xu Yilun, Linus Torvalds


On 3/18/23 00:06, Tom Rix wrote:
quoted hunk ↗ jump to hunk
CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.


clang with W=1 reports
drivers/fpga/xilinx-pr-decoupler.c:37:19: error: unused function 'xlnx_pr_decouple_read' [-Werror,-Wunused-function]
static inline u32 xlnx_pr_decouple_read(const struct xlnx_pr_decoupler_data *d,
                   ^
This static function is not used, so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
---
  drivers/fpga/xilinx-pr-decoupler.c | 6 ------
  1 file changed, 6 deletions(-)
diff --git a/drivers/fpga/xilinx-pr-decoupler.c b/drivers/fpga/xilinx-pr-decoupler.c
index 2d9c491f7be9..b6f18c07c752 100644
--- a/drivers/fpga/xilinx-pr-decoupler.c
+++ b/drivers/fpga/xilinx-pr-decoupler.c
@@ -34,12 +34,6 @@ static inline void xlnx_pr_decoupler_write(struct xlnx_pr_decoupler_data *d,
         writel(val, d->io_base + offset);
  }

-static inline u32 xlnx_pr_decouple_read(const struct xlnx_pr_decoupler_data *d,
-                                       u32 offset)
-{
-       return readl(d->io_base + offset);
-}
-
  static int xlnx_pr_decoupler_enable_set(struct fpga_bridge *bridge, bool enable)
  {
         int err;
--
2.27.0
It should be fixed like this instead.

Thanks,
Michal
diff --git a/drivers/fpga/xilinx-pr-decoupler.c b/drivers/fpga/xilinx-pr-decoupler.c
index 2d9c491f7be9..58508f44cd49 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);

         clk_disable(priv->clk);


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help