fpga: xilinx-pr-decoupler: remove useless function
Subsystems (2)
PATCH 1/1 fpga: xilinx-pr-decoupler: remove useless function
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 <[email protected]>
Signed-off-by Jiapeng Chong <[email protected]>
--- drivers/fpga/xilinx-pr-decoupler.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/fpga/xilinx-pr-decoupler.c +0 -6
@@ -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;
Signature · 1 line
1.8.3.1
Tom Rix
reviewerQuoted 16 lines · 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 <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- drivers/fpga/xilinx-pr-decoupler.c | 6 ------ 1 file changed, 6 deletions(-)drivers/fpga/xilinx-pr-decoupler.c +0
-0
drivers/fpga/xilinx-pr-decoupler.c static inline void xlnx_pr_decoupler_write(struct xlnx_pr_decoupler_data *d, · line 37
Quoted 9 lines
drivers/fpga/xilinx-pr-decoupler.c +0
-6@@ -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
Quoted 3 lines
drivers/fpga/xilinx-pr-decoupler.c +0
-0static int xlnx_pr_decoupler_enable_set (struct fpga_bridge *bridge,bool enable) {int err;