From: Conor Dooley <conor@kernel.org>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Cc: conor.dooley@microchip.com, daire.mcnamara@microchip.com,
broonie@kernel.org, linux-riscv@lists.infradead.org,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
Abaci Robot <abaci@linux.alibaba.com>
Subject: Re: [PATCH] spi: microchip-core: Remove the unused function mchp_corespi_enable()
Date: Mon, 17 Oct 2022 10:49:38 +0100 [thread overview]
Message-ID: <Y00lMjEncoxwkNiJ@spud> (raw)
In-Reply-To: <20221017092141.9789-1-jiapeng.chong@linux.alibaba.com>
On Mon, Oct 17, 2022 at 05:21:41PM +0800, Jiapeng Chong wrote:
> The function mchp_corespi_enable() is defined in the spi-microchip-core.c
> file, but not called elsewhere, so delete this unused function.
>
> drivers/spi/spi-microchip-core.c:122:20: warning: unused function 'mchp_corespi_enable'.
>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2418
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> drivers/spi/spi-microchip-core.c | 9 ---------
> 1 file changed, 9 deletions(-)
>
> diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c
> index d352844c798c..aeaa1da88f39 100644
> --- a/drivers/spi/spi-microchip-core.c
> +++ b/drivers/spi/spi-microchip-core.c
> @@ -119,15 +119,6 @@ static inline void mchp_corespi_write(struct mchp_corespi *spi, unsigned int reg
> writel(val, spi->regs + reg);
> }
>
> -static inline void mchp_corespi_enable(struct mchp_corespi *spi)
> -{
> - u32 control = mchp_corespi_read(spi, REG_CONTROL);
> -
> - control |= CONTROL_ENABLE;
> -
> - mchp_corespi_write(spi, REG_CONTROL, control);
> -}
That's a bit silly... Thanks Jiapeng.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> -
> static inline void mchp_corespi_disable(struct mchp_corespi *spi)
> {
> u32 control = mchp_corespi_read(spi, REG_CONTROL);
> --
> 2.20.1.7.g153144c
>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Conor Dooley <conor@kernel.org>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Cc: conor.dooley@microchip.com, daire.mcnamara@microchip.com,
broonie@kernel.org, linux-riscv@lists.infradead.org,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
Abaci Robot <abaci@linux.alibaba.com>
Subject: Re: [PATCH] spi: microchip-core: Remove the unused function mchp_corespi_enable()
Date: Mon, 17 Oct 2022 10:49:38 +0100 [thread overview]
Message-ID: <Y00lMjEncoxwkNiJ@spud> (raw)
In-Reply-To: <20221017092141.9789-1-jiapeng.chong@linux.alibaba.com>
On Mon, Oct 17, 2022 at 05:21:41PM +0800, Jiapeng Chong wrote:
> The function mchp_corespi_enable() is defined in the spi-microchip-core.c
> file, but not called elsewhere, so delete this unused function.
>
> drivers/spi/spi-microchip-core.c:122:20: warning: unused function 'mchp_corespi_enable'.
>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2418
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> drivers/spi/spi-microchip-core.c | 9 ---------
> 1 file changed, 9 deletions(-)
>
> diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c
> index d352844c798c..aeaa1da88f39 100644
> --- a/drivers/spi/spi-microchip-core.c
> +++ b/drivers/spi/spi-microchip-core.c
> @@ -119,15 +119,6 @@ static inline void mchp_corespi_write(struct mchp_corespi *spi, unsigned int reg
> writel(val, spi->regs + reg);
> }
>
> -static inline void mchp_corespi_enable(struct mchp_corespi *spi)
> -{
> - u32 control = mchp_corespi_read(spi, REG_CONTROL);
> -
> - control |= CONTROL_ENABLE;
> -
> - mchp_corespi_write(spi, REG_CONTROL, control);
> -}
That's a bit silly... Thanks Jiapeng.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> -
> static inline void mchp_corespi_disable(struct mchp_corespi *spi)
> {
> u32 control = mchp_corespi_read(spi, REG_CONTROL);
> --
> 2.20.1.7.g153144c
>
next prev parent reply other threads:[~2022-10-17 9:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 9:21 [PATCH] spi: microchip-core: Remove the unused function mchp_corespi_enable() Jiapeng Chong
2022-10-17 9:21 ` Jiapeng Chong
2022-10-17 9:49 ` Conor Dooley [this message]
2022-10-17 9:49 ` Conor Dooley
2022-10-18 12:45 ` Mark Brown
2022-10-18 12:45 ` Mark Brown
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=Y00lMjEncoxwkNiJ@spud \
--to=conor@kernel.org \
--cc=abaci@linux.alibaba.com \
--cc=broonie@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=daire.mcnamara@microchip.com \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.