* [PATCH] regulator: tps65090: remove usage of IS_ERR_OR_NULL
@ 2013-10-01 4:11 Manish Badarkhe
2013-10-01 9:22 ` Mark Brown
0 siblings, 1 reply; 5+ messages in thread
From: Manish Badarkhe @ 2013-10-01 4:11 UTC (permalink / raw)
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A, lgirdwood-Re5JQEeQqe8AvxtiuMwx3w,
rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ,
badarkhe.manish-Re5JQEeQqe8AvxtiuMwx3w
This patch changes the driver to avoid the usage of IS_ERR_OR_NULL()
macro.
The case present in this patch simply translates to normal check for pointer,
wheather it is NULL or has an error code.
Signed-off-by: Manish Badarkhe <badarkhe.manish-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
:100644 100644 bd611cdf.. ad3d4d4... M drivers/regulator/tps65090-regulator.c
drivers/regulator/tps65090-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/tps65090-regulator.c b/drivers/regulator/tps65090-regulator.c
index bd611cdf..ad3d4d4 100644
--- a/drivers/regulator/tps65090-regulator.c
+++ b/drivers/regulator/tps65090-regulator.c
@@ -245,7 +245,7 @@ static int tps65090_regulator_probe(struct platform_device *pdev)
if (!tps65090_pdata && tps65090_mfd->dev->of_node)
tps65090_pdata = tps65090_parse_dt_reg_data(pdev,
&tps65090_reg_matches);
- if (IS_ERR_OR_NULL(tps65090_pdata)) {
+ if (!tps65090_pdata || IS_ERR(tps65090_pdata)) {
dev_err(&pdev->dev, "Platform data missing\n");
return tps65090_pdata ? PTR_ERR(tps65090_pdata) : -EINVAL;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] regulator: tps65090: remove usage of IS_ERR_OR_NULL
2013-10-01 4:11 [PATCH] regulator: tps65090: remove usage of IS_ERR_OR_NULL Manish Badarkhe
@ 2013-10-01 9:22 ` Mark Brown
[not found] ` <20131001092258.GJ19304-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2013-10-01 9:22 UTC (permalink / raw)
To: Manish Badarkhe; +Cc: linux-kernel, linux-tegra, lgirdwood, rmk+kernel
[-- Attachment #1: Type: text/plain, Size: 151 bytes --]
On Tue, Oct 01, 2013 at 09:41:04AM +0530, Manish Badarkhe wrote:
> This patch changes the driver to avoid the usage of IS_ERR_OR_NULL()
> macro.
Why?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] regulator: tps65090: remove usage of IS_ERR_OR_NULL
[not found] ` <20131001092258.GJ19304-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
@ 2013-10-01 14:59 ` Manish Badarkhe
[not found] ` <CAKDJKT6kBi_axtn+qDBkwueRGn_zzOAdSstRF=x1OqX-TrO2XQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Manish Badarkhe @ 2013-10-01 14:59 UTC (permalink / raw)
To: Mark Brown
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA, Liam Girdwood,
rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ
Hi Mark,
Thank you for your reply.
On Tue, Oct 1, 2013 at 2:52 PM, Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> On Tue, Oct 01, 2013 at 09:41:04AM +0530, Manish Badarkhe wrote:
>> This patch changes the driver to avoid the usage of IS_ERR_OR_NULL()
>> macro.
>
> Why?
Code use "IS_ERR_OR_NULL()" properly as per current implementation. But
as per patches [1], [2] below, the use of "IS_ERR_OR_NULL()" has been
deprecated.
Hence done this change.
[1] - http://www.mail-archive.com/linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org/msg78030.html
[2] - http://comments.gmane.org/gmane.linux.power-management.general/33515
Please let me know your opinion about this change, If not necessary,
will revert back
this change.
Regards,
Manish Badarkhe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] regulator: tps65090: remove usage of IS_ERR_OR_NULL
[not found] ` <CAKDJKT6kBi_axtn+qDBkwueRGn_zzOAdSstRF=x1OqX-TrO2XQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-10-01 15:49 ` Stephen Warren
2013-10-01 16:32 ` Manish Badarkhe
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Warren @ 2013-10-01 15:49 UTC (permalink / raw)
To: Manish Badarkhe
Cc: Mark Brown, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA, Liam Girdwood,
rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ
On 10/01/2013 08:59 AM, Manish Badarkhe wrote:
> Hi Mark,
>
> Thank you for your reply.
>
> On Tue, Oct 1, 2013 at 2:52 PM, Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
>> On Tue, Oct 01, 2013 at 09:41:04AM +0530, Manish Badarkhe wrote:
>>> This patch changes the driver to avoid the usage of IS_ERR_OR_NULL()
>>> macro.
>>
>> Why?
>
> Code use "IS_ERR_OR_NULL()" properly as per current implementation. But
> as per patches [1], [2] below, the use of "IS_ERR_OR_NULL()" has been
> deprecated.
> Hence done this change.
The intent was to deprecate to *concept* of checking a return value for
both NULL and an error. Simply removing usage of the macro and replacing
it with the exact same code that was part of the macro doesn't fulfil
the intent at all.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] regulator: tps65090: remove usage of IS_ERR_OR_NULL
2013-10-01 15:49 ` Stephen Warren
@ 2013-10-01 16:32 ` Manish Badarkhe
0 siblings, 0 replies; 5+ messages in thread
From: Manish Badarkhe @ 2013-10-01 16:32 UTC (permalink / raw)
To: Stephen Warren
Cc: Mark Brown, linux-kernel@vger.kernel.org, linux-tegra,
Liam Girdwood, rmk+kernel
Hi Stephan,
Thank you for your reply.
On Tue, Oct 1, 2013 at 9:19 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 10/01/2013 08:59 AM, Manish Badarkhe wrote:
>> Hi Mark,
>>
>> Thank you for your reply.
>>
>> On Tue, Oct 1, 2013 at 2:52 PM, Mark Brown <broonie@kernel.org> wrote:
>>> On Tue, Oct 01, 2013 at 09:41:04AM +0530, Manish Badarkhe wrote:
>>>> This patch changes the driver to avoid the usage of IS_ERR_OR_NULL()
>>>> macro.
>>>
>>> Why?
>>
>> Code use "IS_ERR_OR_NULL()" properly as per current implementation. But
>> as per patches [1], [2] below, the use of "IS_ERR_OR_NULL()" has been
>> deprecated.
>> Hence done this change.
>
> The intent was to deprecate to *concept* of checking a return value for
> both NULL and an error. Simply removing usage of the macro and replacing
> it with the exact same code that was part of the macro doesn't fulfil
> the intent at all.
Ok, Please drop this patch.
Regards
Manish Badarkhe
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-10-01 16:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-01 4:11 [PATCH] regulator: tps65090: remove usage of IS_ERR_OR_NULL Manish Badarkhe
2013-10-01 9:22 ` Mark Brown
[not found] ` <20131001092258.GJ19304-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-10-01 14:59 ` Manish Badarkhe
[not found] ` <CAKDJKT6kBi_axtn+qDBkwueRGn_zzOAdSstRF=x1OqX-TrO2XQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-01 15:49 ` Stephen Warren
2013-10-01 16:32 ` Manish Badarkhe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox