Merge series "drivers: spi - add parenthesis for sizeof" from Zhiqi Song <songzhiqi1@huawei.com>:
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
This commit is contained in:
Коммит
b8b0da8312
|
@ -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;
|
||||
|
|
|
@ -369,7 +369,7 @@ static int mpc512x_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;
|
||||
|
||||
|
@ -491,7 +491,7 @@ static int mpc512x_psc_spi_do_probe(struct device *dev, u32 regaddr,
|
|||
void *tempp;
|
||||
struct clk *clk;
|
||||
|
||||
master = spi_alloc_master(dev, sizeof *mps);
|
||||
master = spi_alloc_master(dev, sizeof(*mps));
|
||||
if (master == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче