From: Krzysztof Kozlowski <krzk@kernel.org>
To: Vignesh Viswanathan <vignesh.viswanathan@oss.qualcomm.com>
Cc: Saravanan Sekar <sravanhome@gmail.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org,
Manikanta Mylavarapu <manikanta.mylavarapu@oss.qualcomm.com>
Subject: Re: [PATCH 2/2] regulator: mp8899: Add MPS MP8899 PMIC regulator driver
Date: Tue, 26 May 2026 11:28:41 +0200 [thread overview]
Message-ID: <a7518314-727e-4932-aa60-844a5ec79ab8@kernel.org> (raw)
In-Reply-To: <0993456c-40ed-4fc2-b9a8-036cca928709@oss.qualcomm.com>
On 26/05/2026 09:39, Vignesh Viswanathan wrote:
>>> + */
>>> +static int mp8899_i2c_probe(struct i2c_client *client)
>>> +{
>>> + struct mp8899_regulator_info *info;
>>> + struct regulator_config config = {};
>>> + struct device *dev = &client->dev;
>>> + struct regulator_dev *rdev;
>>> + struct regmap *regmap;
>>> + unsigned int vout_select;
>>> + int i, ret;
>>> +
>>> + info = devm_kzalloc(dev, sizeof(struct mp8899_regulator_info), GFP_KERNEL);
>>
>> This is some very old code. If you were working on upstream, you would
>> notice that syntax is sizeof(*). But NOW the syntax is even simpler: kzalloc_obj().
>
> Ack, will fix this.
I might be wrong about second part - it seems there is no
devm_kzalloc_obj, so devm_kzalloc is correct. But anyway please use
sizeof(*) style.
Best regards,
Krzysztof
next prev parent reply other threads:[~2026-05-26 9:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 18:21 [PATCH 0/2] Add regulator driver for MPS MP8899 PMIC Vignesh Viswanathan
2026-05-19 18:21 ` [PATCH 1/2] dt-bindings: regulator: mps,mp8899: Add binding for " Vignesh Viswanathan
2026-05-20 10:27 ` Krzysztof Kozlowski
2026-05-26 7:39 ` Vignesh Viswanathan
2026-05-20 10:28 ` Krzysztof Kozlowski
2026-05-26 7:39 ` Vignesh Viswanathan
2026-05-19 18:21 ` [PATCH 2/2] regulator: mp8899: Add MPS MP8899 PMIC regulator driver Vignesh Viswanathan
2026-05-19 18:54 ` sashiko-bot
2026-05-20 10:39 ` Krzysztof Kozlowski
2026-05-26 7:39 ` Vignesh Viswanathan
2026-05-26 9:28 ` Krzysztof Kozlowski [this message]
2026-05-26 9:38 ` Vignesh Viswanathan
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=a7518314-727e-4932-aa60-844a5ec79ab8@kernel.org \
--to=krzk@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manikanta.mylavarapu@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=sravanhome@gmail.com \
--cc=vignesh.viswanathan@oss.qualcomm.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