All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhiqi Song <songzhiqi1@huawei.com>
To: <broonie@kernel.org>
Cc: <linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linuxarm@huawei.com>, Zhiqi Song <songzhiqi1@huawei.com>
Subject: [PATCH 5/7] spi: omap2-mcspi: add parenthesis for sizeof
Date: Tue, 18 May 2021 09:38:20 +0800	[thread overview]
Message-ID: <1621301902-64158-6-git-send-email-songzhiqi1@huawei.com> (raw)
In-Reply-To: <1621301902-64158-1-git-send-email-songzhiqi1@huawei.com>

Fix missing parenthesis of sizeof reported by checkpatch.pl:
 WARNING: sizeof *pp should be sizeof(*pp).

The kernel coding style suggests thinking of sizeof as a function
and add parenthesis.

Signed-off-by: Zhiqi Song <songzhiqi1@huawei.com>
---
 drivers/spi/spi-omap2-mcspi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 999c227..a06c8f4 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1040,7 +1040,7 @@ static int omap2_mcspi_setup(struct spi_device *spi)
 	struct omap2_mcspi_cs	*cs = spi->controller_state;
 
 	if (!cs) {
-		cs = kzalloc(sizeof *cs, GFP_KERNEL);
+		cs = kzalloc(sizeof(*cs), GFP_KERNEL);
 		if (!cs)
 			return -ENOMEM;
 		cs->base = mcspi->base + spi->chip_select * 0x14;
-- 
2.7.4


  parent reply	other threads:[~2021-05-18  1:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18  1:38 [PATCH 0/7] drivers: spi - add parenthesis for sizeof Zhiqi Song
2021-05-18  1:38 ` [PATCH 1/7] spi: lm70llp: " Zhiqi Song
2021-05-18  1:38 ` [PATCH 2/7] spi: mpc512x-psc: " Zhiqi Song
2021-05-18  1:38 ` [PATCH 3/7] spi: mpc52xx: " Zhiqi Song
2021-05-18  1:38 ` [PATCH 4/7] spi: mpc52xx-psc: " Zhiqi Song
2021-05-18  1:38 ` Zhiqi Song [this message]
2021-05-18  1:38 ` [PATCH 6/7] spi: omap-uwire: " Zhiqi Song
2021-05-18  1:38 ` [PATCH 7/7] spi: ppc4xx: " Zhiqi Song
2021-05-20 21:07 ` [PATCH 0/7] drivers: spi - " Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1621301902-64158-6-git-send-email-songzhiqi1@huawei.com \
    --to=songzhiqi1@huawei.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.