From: Michal Simek <michal.simek@amd.com>
To: Tom Rix <trix@redhat.com>,
mdf@kernel.org, hao.wu@intel.com, yilun.xu@intel.com,
michal.simek@xilinx.com, nathan@kernel.org,
ndesaulniers@google.com
Cc: linux-fpga@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH] fpga: xilinx-pr-decoupler: remove unused xlnx_pr_decouple_read function
Date: Mon, 20 Mar 2023 08:40:22 +0100 [thread overview]
Message-ID: <c8eaefed-e1fd-e0c1-7e8f-561c20632646@amd.com> (raw)
In-Reply-To: <20230317230617.1673923-1-trix@redhat.com>
On 3/18/23 00:06, Tom Rix wrote:
> 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);
next prev parent reply other threads:[~2023-03-20 7:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 23:06 [PATCH] fpga: xilinx-pr-decoupler: remove unused xlnx_pr_decouple_read function Tom Rix
2023-03-18 9:59 ` Xu Yilun
2023-03-18 12:59 ` Tom Rix
2023-03-20 1:32 ` Xu Yilun
2023-03-20 7:40 ` Michal Simek [this message]
2023-03-20 14:16 ` Xu Yilun
2023-03-20 16:24 ` Tom Rix
2023-03-20 20:05 ` Tom Rix
2023-03-21 15:35 ` Michal Simek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c8eaefed-e1fd-e0c1-7e8f-561c20632646@amd.com \
--to=michal.simek@amd.com \
--cc=hao.wu@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mdf@kernel.org \
--cc=michal.simek@xilinx.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).