From: Levente Kurusa <levex@linux.com>
To: "Geyslan Gregório Bem" <geyslan@gmail.com>,
Caizhiyong <caizhiyong@hisilicon.com>
Cc: Mark Brown <broonie@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Wanglin (Albert)" <albert.wanglin@hisilicon.com>,
Levente Kurusa <ilevex.linux@gmail.com>
Subject: Re: [PATCH] regmap: Fix 'ret' would return an uninitialized value
Date: Fri, 15 Nov 2013 14:27:54 +0100 [thread overview]
Message-ID: <5286215A.4020009@linux.com> (raw)
In-Reply-To: <CAGG-pUT22xoksid-2GmJsDmVQk8gR8zHvAr=r3Z2E4BLf+1jJA@mail.gmail.com>
2013-11-15 14:00 keltezéssel, Geyslan Gregório Bem írta:
> 2013/11/15 Caizhiyong <caizhiyong@hisilicon.com>:
>> From: Cai Zhiyong <caizhiyong@huawei.com>
>> Date: Mon, 11 Nov 2013 19:26:14 +0800
>> Subject: [PATCH] regmap: Fix 'ret' would return an uninitialized value
>>
>> This patch give a warning when calling regmap_register_patch with
>> parameter num_regs <= 0.
>>
>> When the num_regs parameter is zero and krealloc doesn't fail,
>> then the code would return an uninitialized value. However,
>> calling this function with num_regs == 0, would be a waste as it
>> essentially does nothing.
>>
>> Signed-off-by: Cai Zhiyong <caizhiyong@huawei.com>
> Reviewed-by: Geyslan G. Bem <geyslan@gmail.com>
>
> Seems a good approach.
>
The patch doesn't apply. After manually applying this it
threw a compilation error:
drivers/base/regmap/regmap.c: In function ‘regmap_register_patch’:
drivers/base/regmap/regmap.c:2176:6: error: expected expression before ‘)’ token
Cai,
You have missed the second parameter of WARN_ONCE().
Please append what you'd prefer to have outputten once the condition evaluates to true.
--
Regards,
Levente Kurusa
next prev parent reply other threads:[~2013-11-15 13:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-15 11:30 [PATCH] regmap: Fix 'ret' would return an uninitialized value Caizhiyong
2013-11-15 13:00 ` Geyslan Gregório Bem
2013-11-15 13:27 ` Levente Kurusa [this message]
2013-11-15 15:52 ` Geyslan Gregório Bem
2013-11-15 15:58 ` Mark Brown
2013-11-15 16:09 ` Geyslan Gregório Bem
2013-11-15 16:03 ` Levente Kurusa
-- strict thread matches above, loose matches on Subject: below --
2013-11-18 12:29 Caizhiyong
2013-11-18 12:35 ` Mark Brown
2013-11-18 13:24 ` Geyslan Gregório Bem
2013-11-11 11:35 Caizhiyong
2013-11-14 12:58 ` Mark Brown
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=5286215A.4020009@linux.com \
--to=levex@linux.com \
--cc=albert.wanglin@hisilicon.com \
--cc=broonie@kernel.org \
--cc=caizhiyong@hisilicon.com \
--cc=geyslan@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=ilevex.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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