diff mbox

[V4,2/2] spi: s3c64xx: fix checkpatch error and warnings

Message ID 003401ce81b6$ab70cb10$02526130$@samsung.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Jingoo Han July 15, 2013, 11:54 p.m. UTC
Fix the following checkpatch error and warnings:

  ERROR: "(foo*)" should be "(foo *)"
  WARNING: line over 80 characters
  WARNING: quoted string split across lines

Also, it converts (void *) to (unsigned long *)(unsigned long)
to fix sparse error.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v3:
- Converted (void *) to (unsigned long *)(unsigned long) for sdd->ops->request

 drivers/spi/spi-s3c64xx.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Comments

Mark Brown July 16, 2013, 10:36 a.m. UTC | #1
On Tue, Jul 16, 2013 at 08:54:39AM +0900, Jingoo Han wrote:
> Fix the following checkpatch error and warnings:
> 
>   ERROR: "(foo*)" should be "(foo *)"
>   WARNING: line over 80 characters
>   WARNING: quoted string split across lines
> 
> Also, it converts (void *) to (unsigned long *)(unsigned long)
> to fix sparse error.

This doesn't apply to current code (and should really be split up a bit
for ease of review).  Can you please check and resend?
Jingoo Han July 17, 2013, 4:44 a.m. UTC | #2
On Tuesday, July 16, 2013 7:37 PM, Mark Brown wrote:
> On Tue, Jul 16, 2013 at 08:54:39AM +0900, Jingoo Han wrote:
> > Fix the following checkpatch error and warnings:
> >
> >   ERROR: "(foo*)" should be "(foo *)"
> >   WARNING: line over 80 characters
> >   WARNING: quoted string split across lines
> >
> > Also, it converts (void *) to (unsigned long *)(unsigned long)
> > to fix sparse error.
> 
> This doesn't apply to current code (and should really be split up a bit
> for ease of review).  Can you please check and resend?

Hi Mark Brown,

OK, I see. I will make the patch for only conversion,
against your spi.git repository 'for-next' branch.
Thank you. :)

Best regards,
Jingoo Han


--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 21ba0a0..0768c3c 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -338,8 +338,10 @@  static int acquire_dma(struct s3c64xx_spi_driver_data *sdd)
 	req.cap = DMA_SLAVE;
 	req.client = &s3c64xx_spi_dma_client;
 
-	sdd->rx_dma.ch = (void *)sdd->ops->request(sdd->rx_dma.dmach, &req, dev, "rx");
-	sdd->tx_dma.ch = (void *)sdd->ops->request(sdd->tx_dma.dmach, &req, dev, "tx");
+	sdd->rx_dma.ch = (unsigned long *)(unsigned long)sdd->ops->request(
+					sdd->rx_dma.dmach, &req, dev, "rx");
+	sdd->tx_dma.ch = (unsigned long *)(unsigned long)sdd->ops->request(
+					sdd->tx_dma.dmach, &req, dev, "tx");
 
 	return 1;
 }
@@ -439,7 +441,7 @@  static int s3c64xx_spi_prepare_transfer(struct spi_master *spi)
 
 	/* Acquire DMA channels */
 	sdd->rx_dma.ch = dma_request_slave_channel_compat(mask, filter,
-				(void*)sdd->rx_dma.dmach, dev, "rx");
+				(void *)sdd->rx_dma.dmach, dev, "rx");
 	if (!sdd->rx_dma.ch) {
 		dev_err(dev, "Failed to get RX DMA channel\n");
 		ret = -EBUSY;
@@ -447,7 +449,7 @@  static int s3c64xx_spi_prepare_transfer(struct spi_master *spi)
 	}
 
 	sdd->tx_dma.ch = dma_request_slave_channel_compat(mask, filter,
-				(void*)sdd->tx_dma.dmach, dev, "tx");
+				(void *)sdd->tx_dma.dmach, dev, "tx");
 	if (!sdd->tx_dma.ch) {
 		dev_err(dev, "Failed to get TX DMA channel\n");
 		ret = -EBUSY;
@@ -1361,16 +1363,14 @@  static int s3c64xx_spi_probe(struct platform_device *pdev)
 	if (!sdd->pdev->dev.of_node) {
 		res = platform_get_resource(pdev, IORESOURCE_DMA,  0);
 		if (!res) {
-			dev_warn(&pdev->dev, "Unable to get SPI tx dma "
-					"resource. Switching to poll mode\n");
+			dev_warn(&pdev->dev, "Unable to get SPI tx dma resource. Switching to poll mode\n");
 			sdd->port_conf->quirks = S3C64XX_SPI_QUIRK_POLL;
 		} else
 			sdd->tx_dma.dmach = res->start;
 
 		res = platform_get_resource(pdev, IORESOURCE_DMA,  1);
 		if (!res) {
-			dev_warn(&pdev->dev, "Unable to get SPI rx dma "
-					"resource. Switching to poll mode\n");
+			dev_warn(&pdev->dev, "Unable to get SPI rx dma resource. Switching to poll mode\n");
 			sdd->port_conf->quirks = S3C64XX_SPI_QUIRK_POLL;
 		} else
 			sdd->rx_dma.dmach = res->start;