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 7/7] spi: ppc4xx: add parenthesis for sizeof
Date: Tue, 18 May 2021 09:38:22 +0800 [thread overview]
Message-ID: <1621301902-64158-8-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-ppc4xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-ppc4xx.c b/drivers/spi/spi-ppc4xx.c
index 59d201a..d65f047 100644
--- a/drivers/spi/spi-ppc4xx.c
+++ b/drivers/spi/spi-ppc4xx.c
@@ -223,7 +223,7 @@ static int spi_ppc4xx_setup(struct spi_device *spi)
}
if (cs == NULL) {
- cs = kzalloc(sizeof *cs, GFP_KERNEL);
+ cs = kzalloc(sizeof(*cs), GFP_KERNEL);
if (!cs)
return -ENOMEM;
spi->controller_state = cs;
@@ -349,7 +349,7 @@ static int spi_ppc4xx_of_probe(struct platform_device *op)
int ret;
const unsigned int *clk;
- master = spi_alloc_master(dev, sizeof *hw);
+ master = spi_alloc_master(dev, sizeof(*hw));
if (master == NULL)
return -ENOMEM;
master->dev.of_node = np;
--
2.7.4
next prev 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 ` [PATCH 5/7] spi: omap2-mcspi: " Zhiqi Song
2021-05-18 1:38 ` [PATCH 6/7] spi: omap-uwire: " Zhiqi Song
2021-05-18 1:38 ` Zhiqi Song [this message]
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-8-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).