Re: [PATCH 2/2] regulator: mp8899: Add MPS MP8899 PMIC regulator driver
From: Vignesh Viswanathan
Date: Tue May 26 2026 - 05:45:37 EST
On 5/26/2026 2:58 PM, Krzysztof Kozlowski wrote:
> 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.
Sure Krzysztof, Will do.
Thanks,
Vignesh
>
> Best regards,
> Krzysztof