Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1432424

[PATCH v2 5/5] spi: s3c64xx: use unsigned type for fifo handling variables

From Andi Shyti <andi.shyti@samsung.com>
Newsgroups linux.kernel
Subject [PATCH v2 5/5] spi: s3c64xx: use unsigned type for fifo handling variables
Date 2016-06-28 04:50 +0200
Message-ID <rORg6-IJ-31@gated-at.bofh.it> (permalink)
References <rORg5-IJ-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The 'quirks' variable cannot ever be negative, therefore use u8
instead of int. The 8 bit size is given from the fact that
currently the quirks variable has very few statuses.

The rx_lvl_offset and tx_st_done store shift values, so that u8
is a proper size.

fifo_lvl_mask stores a series of masks, to be in we will keep the
32 bit size.

Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 drivers/spi/spi-s3c64xx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 6d8486f..6c9503a 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -150,10 +150,10 @@ struct s3c64xx_spi_dma_data {
  * which is provided as driver data to the driver.
  */
 struct s3c64xx_spi_port_config {
-	int	fifo_lvl_mask[MAX_SPI_PORTS];
-	int	rx_lvl_offset;
-	int	tx_st_done;
-	int	quirks;
+	u32	fifo_lvl_mask[MAX_SPI_PORTS];
+	u8	rx_lvl_offset;
+	u8	tx_st_done;
+	u8	quirks;
 	bool	high_speed;
 	bool	clk_from_cmu;
 };
-- 
2.8.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/5] s3c64xx: consider the case of a disconnected CS line  and some code rework Andi Shyti <andi.shyti@samsung.com> - 2016-06-28 04:50 +0200
  [PATCH v2 3/5] spi: s3c64xx: do not configure the device twice Andi Shyti <andi.shyti@samsung.com> - 2016-06-28 04:50 +0200
  [PATCH v2 5/5] spi: s3c64xx: use unsigned type for fifo handling  variables Andi Shyti <andi.shyti@samsung.com> - 2016-06-28 04:50 +0200
    Re: [PATCH v2 5/5] spi: s3c64xx: use unsigned type for fifo handling  variables Mark Brown <broonie@kernel.org> - 2016-07-05 17:00 +0200
      Re: [PATCH v2 5/5] spi: s3c64xx: use unsigned type for fifo handling  variables Andi Shyti <andi@etezian.org> - 2016-07-05 17:10 +0200

csiph-web