[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdau+=rcyWaL_Ahd9RzcTwk88kKQ-UF_dwzgos60UhnEew@mail.gmail.com>
Date: Wed, 30 May 2018 09:10:27 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Mark Brown <broonie@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Sangbeom Kim <sbkim73@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>
Subject: Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of
GPIO number
On Mon, May 28, 2018 at 2:26 PM, Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
> On Mon, May 28, 2018 at 2:29 PM, Bartlomiej Zolnierkiewicz
> <b.zolnierkie@...sung.com> wrote:
>
>> - s2mps11->ext_control_gpiod = devm_kmalloc(&pdev->dev,
>> + s2mps11->ext_control_gpiod = devm_kzalloc(&pdev->dev,
>> sizeof(*s2mps11->ext_control_gpiod) * rdev_num,
>> GFP_KERNEL);
>
> devm_kcalloc() I would rather use.
The patch replace kmalloc with kzalloc amd kcalloc does not initialize
memory to zero.
We don't have demv_kzcalloc() I'm afraid, I wonder it even makes
sense to add?
Yours,
Linus Walleij
Powered by blists - more mailing lists