All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] spi: xilinx: remove unnecessary spaces
@ 2014-02-26  1:24 Jingoo Han
       [not found] ` <003101cf3291$8948f3a0$9bdadae0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Jingoo Han @ 2014-02-26  1:24 UTC (permalink / raw)
  To: 'Mark Brown'
  Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, 'Jingoo Han',
	'Michal Simek'

Remove unnecessary space in order to fix the following
checkpatch issues.

  WARNING: Unnecessary space after function pointer name

Signed-off-by: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
 drivers/spi/spi-xilinx.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
index 66dbefc..a3b0b99 100644
--- a/drivers/spi/spi-xilinx.c
+++ b/drivers/spi/spi-xilinx.c
@@ -87,10 +87,10 @@ struct xilinx_spi {
 	const u8 *tx_ptr;	/* pointer in the Rx buffer */
 	int remaining_bytes;	/* the number of bytes left to transfer */
 	u8 bits_per_word;
-	unsigned int (*read_fn) (void __iomem *);
-	void (*write_fn) (u32, void __iomem *);
-	void (*tx_fn) (struct xilinx_spi *);
-	void (*rx_fn) (struct xilinx_spi *);
+	unsigned int (*read_fn)(void __iomem *);
+	void (*write_fn)(u32, void __iomem *);
+	void (*tx_fn)(struct xilinx_spi *);
+	void (*rx_fn)(struct xilinx_spi *);
 };
 
 static void xspi_write32(u32 val, void __iomem *addr)
-- 
1.7.10.4


--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] spi: omap-100k: fix spacing coding style issue
       [not found] ` <003101cf3291$8948f3a0$9bdadae0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2014-02-26  1:27   ` Jingoo Han
       [not found]     ` <003701cf3291$def77600$9ce66200$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  2014-02-26  6:20   ` [PATCH 1/2] spi: xilinx: remove unnecessary spaces Michal Simek
  2014-02-27  4:40   ` Mark Brown
  2 siblings, 1 reply; 5+ messages in thread
From: Jingoo Han @ 2014-02-26  1:27 UTC (permalink / raw)
  To: 'Mark Brown'
  Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, 'Jingoo Han',
	'Cory Maccarrone', 'Michal Nazarewicz'

Fix the following checkpatch issues.

  ERROR: space prohibited after that open parenthesis '('
  ERROR: space required before the open parenthesis '('
  ERROR: trailing statements should be on next line
  ERROR: space required after that ',' (ctx:VxV)
  ERROR: spaces required around that '-=' (ctx:VxV)
  WARNING: sizeof *cs should be sizeof(*cs)

Signed-off-by: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
 drivers/spi/spi-omap-100k.c |   36 +++++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c
index 3b8b36a..c9e2282 100644
--- a/drivers/spi/spi-omap-100k.c
+++ b/drivers/spi/spi-omap-100k.c
@@ -128,7 +128,7 @@ static void spi100k_write_data(struct spi_master *master, int len, int data)
 	}
 
 	spi100k_enable_clock(master);
-	writew( data , spi100k->base + SPI_TX_MSB);
+	writew(data , spi100k->base + SPI_TX_MSB);
 
 	writew(SPI_CTRL_SEN(0) |
 	       SPI_CTRL_WORD_SIZE(len) |
@@ -136,7 +136,8 @@ static void spi100k_write_data(struct spi_master *master, int len, int data)
 	       spi100k->base + SPI_CTRL);
 
 	/* Wait for bit ack send change */
-	while((readw(spi100k->base + SPI_STATUS) & SPI_STATUS_WE) != SPI_STATUS_WE);
+	while ((readw(spi100k->base + SPI_STATUS) & SPI_STATUS_WE) != SPI_STATUS_WE)
+		;
 	udelay(1000);
 
 	spi100k_disable_clock(master);
@@ -144,7 +145,7 @@ static void spi100k_write_data(struct spi_master *master, int len, int data)
 
 static int spi100k_read_data(struct spi_master *master, int len)
 {
-	int dataH,dataL;
+	int dataH, dataL;
 	struct omap1_spi100k *spi100k = spi_master_get_devdata(master);
 
 	/* Always do at least 16 bits */
@@ -157,7 +158,8 @@ static int spi100k_read_data(struct spi_master *master, int len)
 	       SPI_CTRL_RD,
 	       spi100k->base + SPI_CTRL);
 
-	while((readw(spi100k->base + SPI_STATUS) & SPI_STATUS_RD) != SPI_STATUS_RD);
+	while ((readw(spi100k->base + SPI_STATUS) & SPI_STATUS_RD) != SPI_STATUS_RD)
+		;
 	udelay(1000);
 
 	dataL = readw(spi100k->base + SPI_RX_LSB);
@@ -208,12 +210,12 @@ omap1_spi100k_txrx_pio(struct spi_device *spi, struct spi_transfer *xfer)
 		rx = xfer->rx_buf;
 		tx = xfer->tx_buf;
 		do {
-			c-=1;
+			c -= 1;
 			if (xfer->tx_buf != NULL)
 				spi100k_write_data(spi->master, word_len, *tx++);
 			if (xfer->rx_buf != NULL)
 				*rx++ = spi100k_read_data(spi->master, word_len);
-		} while(c);
+		} while (c);
 	} else if (word_len <= 16) {
 		u16             *rx;
 		const u16       *tx;
@@ -221,12 +223,12 @@ omap1_spi100k_txrx_pio(struct spi_device *spi, struct spi_transfer *xfer)
 		rx = xfer->rx_buf;
 		tx = xfer->tx_buf;
 		do {
-			c-=2;
+			c -= 2;
 			if (xfer->tx_buf != NULL)
-				spi100k_write_data(spi->master,word_len, *tx++);
+				spi100k_write_data(spi->master, word_len, *tx++);
 			if (xfer->rx_buf != NULL)
-				*rx++ = spi100k_read_data(spi->master,word_len);
-		} while(c);
+				*rx++ = spi100k_read_data(spi->master, word_len);
+		} while (c);
 	} else if (word_len <= 32) {
 		u32             *rx;
 		const u32       *tx;
@@ -234,12 +236,12 @@ omap1_spi100k_txrx_pio(struct spi_device *spi, struct spi_transfer *xfer)
 		rx = xfer->rx_buf;
 		tx = xfer->tx_buf;
 		do {
-			c-=4;
+			c -= 4;
 			if (xfer->tx_buf != NULL)
-				spi100k_write_data(spi->master,word_len, *tx);
+				spi100k_write_data(spi->master, word_len, *tx);
 			if (xfer->rx_buf != NULL)
-				*rx = spi100k_read_data(spi->master,word_len);
-		} while(c);
+				*rx = spi100k_read_data(spi->master, word_len);
+		} while (c);
 	}
 	return count - c;
 }
@@ -281,7 +283,7 @@ static int omap1_spi100k_setup(struct spi_device *spi)
 	spi100k = spi_master_get_devdata(spi->master);
 
 	if (!cs) {
-		cs = kzalloc(sizeof *cs, GFP_KERNEL);
+		cs = kzalloc(sizeof(*cs), GFP_KERNEL);
 		if (!cs)
 			return -ENOMEM;
 		cs->base = spi100k->base + spi->chip_select * 0x14;
@@ -398,14 +400,14 @@ static int omap1_spi100k_probe(struct platform_device *pdev)
 	if (!pdev->id)
 		return -EINVAL;
 
-	master = spi_alloc_master(&pdev->dev, sizeof *spi100k);
+	master = spi_alloc_master(&pdev->dev, sizeof(*spi100k));
 	if (master == NULL) {
 		dev_dbg(&pdev->dev, "master allocation failed\n");
 		return -ENOMEM;
 	}
 
 	if (pdev->id != -1)
-	       master->bus_num = pdev->id;
+		master->bus_num = pdev->id;
 
 	master->setup = omap1_spi100k_setup;
 	master->transfer_one_message = omap1_spi100k_transfer_one_message;
-- 
1.7.10.4


--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] spi: xilinx: remove unnecessary spaces
       [not found] ` <003101cf3291$8948f3a0$9bdadae0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  2014-02-26  1:27   ` [PATCH 2/2] spi: omap-100k: fix spacing coding style issue Jingoo Han
@ 2014-02-26  6:20   ` Michal Simek
  2014-02-27  4:40   ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Michal Simek @ 2014-02-26  6:20 UTC (permalink / raw)
  To: Jingoo Han
  Cc: 'Mark Brown',
	linux-spi-u79uwXL29TY76Z2rM5mHXA, 'Michal Simek'

[-- Attachment #1: Type: text/plain, Size: 1565 bytes --]

On 02/26/2014 02:24 AM, Jingoo Han wrote:
> Remove unnecessary space in order to fix the following
> checkpatch issues.
> 
>   WARNING: Unnecessary space after function pointer name
> 
> Signed-off-by: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> ---
>  drivers/spi/spi-xilinx.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
> index 66dbefc..a3b0b99 100644
> --- a/drivers/spi/spi-xilinx.c
> +++ b/drivers/spi/spi-xilinx.c
> @@ -87,10 +87,10 @@ struct xilinx_spi {
>  	const u8 *tx_ptr;	/* pointer in the Rx buffer */
>  	int remaining_bytes;	/* the number of bytes left to transfer */
>  	u8 bits_per_word;
> -	unsigned int (*read_fn) (void __iomem *);
> -	void (*write_fn) (u32, void __iomem *);
> -	void (*tx_fn) (struct xilinx_spi *);
> -	void (*rx_fn) (struct xilinx_spi *);
> +	unsigned int (*read_fn)(void __iomem *);
> +	void (*write_fn)(u32, void __iomem *);
> +	void (*tx_fn)(struct xilinx_spi *);
> +	void (*rx_fn)(struct xilinx_spi *);
>  };
>  
>  static void xspi_write32(u32 val, void __iomem *addr)
> 

Reviewed-by: Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] spi: xilinx: remove unnecessary spaces
       [not found] ` <003101cf3291$8948f3a0$9bdadae0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  2014-02-26  1:27   ` [PATCH 2/2] spi: omap-100k: fix spacing coding style issue Jingoo Han
  2014-02-26  6:20   ` [PATCH 1/2] spi: xilinx: remove unnecessary spaces Michal Simek
@ 2014-02-27  4:40   ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2014-02-27  4:40 UTC (permalink / raw)
  To: Jingoo Han; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, 'Michal Simek'

[-- Attachment #1: Type: text/plain, Size: 156 bytes --]

On Wed, Feb 26, 2014 at 10:24:47AM +0900, Jingoo Han wrote:
> Remove unnecessary space in order to fix the following
> checkpatch issues.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] spi: omap-100k: fix spacing coding style issue
       [not found]     ` <003701cf3291$def77600$9ce66200$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2014-03-05  4:35       ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2014-03-05  4:35 UTC (permalink / raw)
  To: Jingoo Han
  Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, 'Cory Maccarrone',
	'Michal Nazarewicz'

[-- Attachment #1: Type: text/plain, Size: 117 bytes --]

On Wed, Feb 26, 2014 at 10:27:10AM +0900, Jingoo Han wrote:
> Fix the following checkpatch issues.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-03-05  4:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-26  1:24 [PATCH 1/2] spi: xilinx: remove unnecessary spaces Jingoo Han
     [not found] ` <003101cf3291$8948f3a0$9bdadae0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-02-26  1:27   ` [PATCH 2/2] spi: omap-100k: fix spacing coding style issue Jingoo Han
     [not found]     ` <003701cf3291$def77600$9ce66200$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-05  4:35       ` Mark Brown
2014-02-26  6:20   ` [PATCH 1/2] spi: xilinx: remove unnecessary spaces Michal Simek
2014-02-27  4:40   ` Mark Brown

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.