[PATCH] spi: xilinx_spi: remove unused local variable

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] spi: xilinx_spi: remove unused local variable

Michal Simek-3
From: T Karthik Reddy <[hidden email]>

Remove unused variable 'count' which is causing warning while
compilation.

Signed-off-by: T Karthik Reddy <[hidden email]>
Signed-off-by: Michal Simek <[hidden email]>
---

 drivers/spi/xilinx_spi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
index c0cfe94d4439..47a5571aecd7 100644
--- a/drivers/spi/xilinx_spi.c
+++ b/drivers/spi/xilinx_spi.c
@@ -214,7 +214,7 @@ static void xilinx_spi_startup_block(struct udevice *dev, unsigned int bytes,
  struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
  const unsigned char *txp = dout;
  unsigned char *rxp = din;
- u32 reg, count;
+ u32 reg;
  u32 txbytes = bytes;
  u32 rxbytes = bytes;
 
@@ -224,10 +224,10 @@ static void xilinx_spi_startup_block(struct udevice *dev, unsigned int bytes,
  * it sets txp to the initial value for the normal operation.
  */
  for ( ; priv->startup < 2; priv->startup++) {
- count = xilinx_spi_fill_txfifo(bus, txp, txbytes);
+ xilinx_spi_fill_txfifo(bus, txp, txbytes);
  reg = readl(&regs->spicr) & ~SPICR_MASTER_INHIBIT;
  writel(reg, &regs->spicr);
- count = xilinx_spi_read_rxfifo(bus, rxp, rxbytes);
+ xilinx_spi_read_rxfifo(bus, rxp, rxbytes);
  txp = din;
 
  if (priv->startup) {
--
2.28.0

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] spi: xilinx_spi: remove unused local variable

Michal Simek-4
st 14. 10. 2020 v 11:38 odesílatel Michal Simek
<[hidden email]> napsal:

>
> From: T Karthik Reddy <[hidden email]>
>
> Remove unused variable 'count' which is causing warning while
> compilation.
>
> Signed-off-by: T Karthik Reddy <[hidden email]>
> Signed-off-by: Michal Simek <[hidden email]>
> ---
>
>  drivers/spi/xilinx_spi.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
> index c0cfe94d4439..47a5571aecd7 100644
> --- a/drivers/spi/xilinx_spi.c
> +++ b/drivers/spi/xilinx_spi.c
> @@ -214,7 +214,7 @@ static void xilinx_spi_startup_block(struct udevice *dev, unsigned int bytes,
>         struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
>         const unsigned char *txp = dout;
>         unsigned char *rxp = din;
> -       u32 reg, count;
> +       u32 reg;
>         u32 txbytes = bytes;
>         u32 rxbytes = bytes;
>
> @@ -224,10 +224,10 @@ static void xilinx_spi_startup_block(struct udevice *dev, unsigned int bytes,
>          * it sets txp to the initial value for the normal operation.
>          */
>         for ( ; priv->startup < 2; priv->startup++) {
> -               count = xilinx_spi_fill_txfifo(bus, txp, txbytes);
> +               xilinx_spi_fill_txfifo(bus, txp, txbytes);
>                 reg = readl(&regs->spicr) & ~SPICR_MASTER_INHIBIT;
>                 writel(reg, &regs->spicr);
> -               count = xilinx_spi_read_rxfifo(bus, rxp, rxbytes);
> +               xilinx_spi_read_rxfifo(bus, rxp, rxbytes);
>                 txp = din;
>
>                 if (priv->startup) {
> --
> 2.28.0
>

Applied.
M

--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs