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 4/7] spi: mpc52xx-psc: add parenthesis for sizeof
Date: Tue, 18 May 2021 09:38:19 +0800 [thread overview]
Message-ID: <1621301902-64158-5-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-mpc52xx-psc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-mpc52xx-psc.c b/drivers/spi/spi-mpc52xx-psc.c
index 17935e7..21ef5d4 100644
--- a/drivers/spi/spi-mpc52xx-psc.c
+++ b/drivers/spi/spi-mpc52xx-psc.c
@@ -265,7 +265,7 @@ static int mpc52xx_psc_spi_setup(struct spi_device *spi)
return -EINVAL;
if (!cs) {
- cs = kzalloc(sizeof *cs, GFP_KERNEL);
+ cs = kzalloc(sizeof(*cs), GFP_KERNEL);
if (!cs)
return -ENOMEM;
spi->controller_state = cs;
@@ -365,7 +365,7 @@ static int mpc52xx_psc_spi_do_probe(struct device *dev, u32 regaddr,
struct spi_master *master;
int ret;
- master = spi_alloc_master(dev, sizeof *mps);
+ master = spi_alloc_master(dev, sizeof(*mps));
if (master == NULL)
return -ENOMEM;
--
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 ` Zhiqi Song [this message]
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 ` [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-5-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).