2021-05-19 11:12:54

by Zhiqi Song

[permalink] [raw]
Subject: [PATCH 0/7] drivers: spi - add parenthesis for sizeof

This patchset fixes missing parentheses of sizeof reported by checkpatch.pl
under drivers/spi/.

Zhiqi Song (7):
spi: lm70llp: add parenthesis for sizeof
spi: mpc512x-psc: add parenthesis for sizeof
spi: mpc52xx: add parenthesis for sizeof
spi: mpc52xx-psc: add parenthesis for sizeof
spi: omap2-mcspi: add parenthesis for sizeof
spi: omap-uwire: add parenthesis for sizeof
spi: ppc4xx: add parenthesis for sizeof

drivers/spi/spi-lm70llp.c | 2 +-
drivers/spi/spi-mpc512x-psc.c | 4 ++--
drivers/spi/spi-mpc52xx-psc.c | 4 ++--
drivers/spi/spi-mpc52xx.c | 2 +-
drivers/spi/spi-omap-uwire.c | 2 +-
drivers/spi/spi-omap2-mcspi.c | 2 +-
drivers/spi/spi-ppc4xx.c | 4 ++--
7 files changed, 10 insertions(+), 10 deletions(-)

--
2.7.4



2021-05-19 11:12:54

by Zhiqi Song

[permalink] [raw]
Subject: [PATCH 5/7] spi: omap2-mcspi: add parenthesis for sizeof

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 <[email protected]>
---
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


2021-05-19 11:13:09

by Zhiqi Song

[permalink] [raw]
Subject: [PATCH 1/7] spi: lm70llp: add parenthesis for sizeof

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.

Cc: Kaiwan N Billimoria <[email protected]>
Signed-off-by: Zhiqi Song <[email protected]>
---
drivers/spi/spi-lm70llp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-lm70llp.c b/drivers/spi/spi-lm70llp.c
index f914b8d..ead0507 100644
--- a/drivers/spi/spi-lm70llp.c
+++ b/drivers/spi/spi-lm70llp.c
@@ -202,7 +202,7 @@ static void spi_lm70llp_attach(struct parport *p)
* the lm70 driver could verify it, reading the manf ID.
*/

- master = spi_alloc_master(p->physport->dev, sizeof *pp);
+ master = spi_alloc_master(p->physport->dev, sizeof(*pp));
if (!master) {
status = -ENOMEM;
goto out_fail;
--
2.7.4


2021-05-19 11:13:09

by Zhiqi Song

[permalink] [raw]
Subject: [PATCH 3/7] spi: mpc52xx: add parenthesis for sizeof

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 <[email protected]>
---
drivers/spi/spi-mpc52xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-mpc52xx.c b/drivers/spi/spi-mpc52xx.c
index 124cba7..5104152 100644
--- a/drivers/spi/spi-mpc52xx.c
+++ b/drivers/spi/spi-mpc52xx.c
@@ -415,7 +415,7 @@ static int mpc52xx_spi_probe(struct platform_device *op)
}

dev_dbg(&op->dev, "allocating spi_master struct\n");
- master = spi_alloc_master(&op->dev, sizeof *ms);
+ master = spi_alloc_master(&op->dev, sizeof(*ms));
if (!master) {
rc = -ENOMEM;
goto err_alloc;
--
2.7.4


2021-05-19 11:17:57

by Zhiqi Song

[permalink] [raw]
Subject: [PATCH 6/7] spi: omap-uwire: add parenthesis for sizeof

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 <[email protected]>
---
drivers/spi/spi-omap-uwire.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-omap-uwire.c b/drivers/spi/spi-omap-uwire.c
index ceb479f..c975e86 100644
--- a/drivers/spi/spi-omap-uwire.c
+++ b/drivers/spi/spi-omap-uwire.c
@@ -453,7 +453,7 @@ static int uwire_probe(struct platform_device *pdev)
struct uwire_spi *uwire;
int status;

- master = spi_alloc_master(&pdev->dev, sizeof *uwire);
+ master = spi_alloc_master(&pdev->dev, sizeof(*uwire));
if (!master)
return -ENODEV;

--
2.7.4


2021-05-21 19:43:21

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 0/7] drivers: spi - add parenthesis for sizeof

On Tue, 18 May 2021 09:38:15 +0800, Zhiqi Song wrote:
> This patchset fixes missing parentheses of sizeof reported by checkpatch.pl
> under drivers/spi/.
>
> Zhiqi Song (7):
> spi: lm70llp: add parenthesis for sizeof
> spi: mpc512x-psc: add parenthesis for sizeof
> spi: mpc52xx: add parenthesis for sizeof
> spi: mpc52xx-psc: add parenthesis for sizeof
> spi: omap2-mcspi: add parenthesis for sizeof
> spi: omap-uwire: add parenthesis for sizeof
> spi: ppc4xx: add parenthesis for sizeof
>
> [...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/7] spi: lm70llp: add parenthesis for sizeof
commit: a2bd5afd59c1dec8e559096c3a5c912360c267ca
[2/7] spi: mpc512x-psc: add parenthesis for sizeof
commit: 722cb2b197e125d6816aac43ec2d411c7b22daa9
[3/7] spi: mpc52xx: add parenthesis for sizeof
commit: ac7357ac769e3b4bd52e691f22d745c89126069f
[4/7] spi: mpc52xx-psc: add parenthesis for sizeof
commit: 75d4c2d64b30c8583b82afdcc9dc4db2083dee5b
[5/7] spi: omap2-mcspi: add parenthesis for sizeof
commit: 8267dc6d6889235e6dac21156cc9d6e5d5319d3b
[6/7] spi: omap-uwire: add parenthesis for sizeof
commit: 19bae51b0191129fd9a6d163678404b77cab24c9
[7/7] spi: ppc4xx: add parenthesis for sizeof
commit: 07c74f844b740a858e40fe6c15dd9a2f3b7f6476

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark