Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1459397
| From | LABBE Corentin <clabbe.montjoie@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [linux-sunxi] [RFC PATCH 1/5] mailbox: introduce ARM SMC based mailbox |
| Date | 2016-08-10 20:30 +0200 |
| Message-ID | <s4Gql-b4-1@gated-at.bofh.it> (permalink) |
| References | <s4dRo-752-7@gated-at.bofh.it> <s4dRo-752-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello
Just a minor comment below
> +static int smc_mbox_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct mbox_controller *mbox;
> + int ret = 0;
> + int i;
> +
> + ret = of_property_count_elems_of_size(dev->of_node, "identifiers",
> + sizeof(u32));
> + if (ret < 0)
> + return ret;
> +
> + mbox = devm_kzalloc(dev, sizeof(*mbox), GFP_KERNEL);
> + if (mbox == NULL)
> + return -ENOMEM;
checkpatch prefer !mbox
> +
> + mbox->num_chans = ret;
> + mbox->chans = devm_kmalloc_array(dev, mbox->num_chans,
> + sizeof(*mbox->chans),
> + GFP_KERNEL | __GFP_ZERO);
devm_kcalloc seems to do the same
Regards
LABBE Corentin
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 0/5] Allwinner MMC firmware clocks implementation Andre Przywara <andre.przywara@arm.com> - 2016-08-09 14:00 +0200
[RFC PATCH 1/5] mailbox: introduce ARM SMC based mailbox Andre Przywara <andre.przywara@arm.com> - 2016-08-09 14:00 +0200
Re: [linux-sunxi] [RFC PATCH 1/5] mailbox: introduce ARM SMC based mailbox LABBE Corentin <clabbe.montjoie@gmail.com> - 2016-08-10 20:30 +0200
[RFC PATCH 3/5] arm64: dts: sunxi: add SCPI node to sun50i-a64.dtsi Andre Przywara <andre.przywara@arm.com> - 2016-08-09 14:00 +0200
[RFC PATCH 2/5] DT: mailbox: add binding doc for the ARM SMC mailbox Andre Przywara <andre.przywara@arm.com> - 2016-08-09 14:00 +0200
[RFC PATCH 5/5] arm64: dts: sunxi: add MMC nodes to Pine64 and BPi-M64 .dts Andre Przywara <andre.przywara@arm.com> - 2016-08-09 14:00 +0200
Re: [RFC PATCH 0/5] Allwinner MMC firmware clocks implementation Stefan Monnier <monnier@iro.umontreal.ca> - 2016-08-09 15:10 +0200
csiph-web