linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fpga: xilinx-pr-decoupler: remove useless function
@ 2021-04-13  3:51 Jiapeng Chong
  2021-04-13 14:41 ` Tom Rix
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-04-13  3:51 UTC (permalink / raw)
  To: mdf
  Cc: trix, michal.simek, linux-fpga, linux-arm-kernel, linux-kernel,
	Jiapeng Chong

Fix the following gcc warning:

drivers/fpga/xilinx-pr-decoupler.c:32:19: warning: unused function
'xlnx_pr_decouple_read' [-Wunused-function].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.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 7d69af2..f407cb2 100644
--- a/drivers/fpga/xilinx-pr-decoupler.c
+++ b/drivers/fpga/xilinx-pr-decoupler.c
@@ -29,12 +29,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;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fpga: xilinx-pr-decoupler: remove useless function
  2021-04-13  3:51 [PATCH] fpga: xilinx-pr-decoupler: remove useless function Jiapeng Chong
@ 2021-04-13 14:41 ` Tom Rix
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rix @ 2021-04-13 14:41 UTC (permalink / raw)
  To: Jiapeng Chong, mdf
  Cc: michal.simek, linux-fpga, linux-arm-kernel, linux-kernel


On 4/12/21 8:51 PM, Jiapeng Chong wrote:
> Fix the following gcc warning:
>
> drivers/fpga/xilinx-pr-decoupler.c:32:19: warning: unused function
> 'xlnx_pr_decouple_read' [-Wunused-function].
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.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 7d69af2..f407cb2 100644
> --- a/drivers/fpga/xilinx-pr-decoupler.c
> +++ b/drivers/fpga/xilinx-pr-decoupler.c
> @@ -29,12 +29,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);
> -}
> -

I am not in favor of removing this function.

It should have been used in xlnx_pr_decoupler_enable_show() instead of 
the bare readl().

So use it in this function, and for consistency rename to 
xlnx_pr_decoupler_read()

that is 'decouple' -> 'decoupler'

Tom

>   static int xlnx_pr_decoupler_enable_set(struct fpga_bridge *bridge, bool enable)
>   {
>   	int err;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-13 14:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13  3:51 [PATCH] fpga: xilinx-pr-decoupler: remove useless function Jiapeng Chong
2021-04-13 14:41 ` Tom Rix

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).