diff mbox

[4/9] spi: spi-mxs: Fix checkpatch issue

Message ID 002401cfc658$b32398f0$196acad0$%han@samsung.com (mailing list archive)
State Accepted
Commit a7fa3219456bc044cc6b8654a5d8218a9df1c7bd
Headers show

Commit Message

Jingoo Han Sept. 2, 2014, 2:50 a.m. UTC
Fix the following checkpatch warnings.

  WARNING: Missing a blank line after declarations
  WARNING: Prefer kcalloc over kzalloc with multiply

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/spi/spi-mxs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Marek Vasut Sept. 2, 2014, 12:15 p.m. UTC | #1
On Tuesday, September 02, 2014 at 04:50:48 AM, Jingoo Han wrote:
> Fix the following checkpatch warnings.
> 
>   WARNING: Missing a blank line after declarations
>   WARNING: Prefer kcalloc over kzalloc with multiply
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Obviously makes sense, thanks!

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Brown Sept. 2, 2014, 4:32 p.m. UTC | #2
On Tue, Sep 02, 2014 at 11:50:48AM +0900, Jingoo Han wrote:
> Fix the following checkpatch warnings.
> 
>   WARNING: Missing a blank line after declarations
>   WARNING: Prefer kcalloc over kzalloc with multiply

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c
index 2884f0c2f5f0..c3f8d3a22472 100644
--- a/drivers/spi/spi-mxs.c
+++ b/drivers/spi/spi-mxs.c
@@ -154,12 +154,14 @@  static int mxs_ssp_wait(struct mxs_spi *spi, int offset, int mask, bool set)
 static void mxs_ssp_dma_irq_callback(void *param)
 {
 	struct mxs_spi *spi = param;
+
 	complete(&spi->c);
 }
 
 static irqreturn_t mxs_ssp_irq_handler(int irq, void *dev_id)
 {
 	struct mxs_ssp *ssp = dev_id;
+
 	dev_err(ssp->dev, "%s[%i] CTRL1=%08x STATUS=%08x\n",
 		__func__, __LINE__,
 		readl(ssp->base + HW_SSP_CTRL1(ssp)),
@@ -189,7 +191,7 @@  static int mxs_spi_txrx_dma(struct mxs_spi *spi,
 	if (!len)
 		return -EINVAL;
 
-	dma_xfer = kzalloc(sizeof(*dma_xfer) * sgs, GFP_KERNEL);
+	dma_xfer = kcalloc(sgs, sizeof(*dma_xfer), GFP_KERNEL);
 	if (!dma_xfer)
 		return -ENOMEM;