From: Tom Rix <trix@redhat.com>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>, mdf@kernel.org
Cc: michal.simek@xilinx.com, linux-fpga@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fpga: xilinx-pr-decoupler: remove useless function
Date: Tue, 13 Apr 2021 07:41:35 -0700 [thread overview]
Message-ID: <40a0449f-37c4-6b3a-5a34-d865db971f9f@redhat.com> (raw)
In-Reply-To: <1618285894-111432-1-git-send-email-jiapeng.chong@linux.alibaba.com>
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;
prev parent reply other threads:[~2021-04-13 14:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-13 3:51 [PATCH] fpga: xilinx-pr-decoupler: remove useless function Jiapeng Chong
2021-04-13 14:41 ` Tom Rix [this message]
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=40a0449f-37c4-6b3a-5a34-d865db971f9f@redhat.com \
--to=trix@redhat.com \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mdf@kernel.org \
--cc=michal.simek@xilinx.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).