From: kbuild test robot <lkp@intel.com> To: Corentin Chary <corentin.chary@gmail.com> Cc: kbuild-all@01.org, Darren Hart <dvhart@infradead.org>, Andy Shevchenko <andy@infradead.org>, corentin.chary@gmail.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] drivers/x86: fix ptr_ret.cocci warnings Date: Thu, 7 Sep 2017 18:02:24 +0800 [thread overview] Message-ID: <20170907100224.GA79024@lkp-wsx02> (raw) In-Reply-To: <20170904082110.30925-1-corentin.chary@gmail.com> drivers/platform/x86/thinkpad-wmi.c:1205:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: 3af63e23450d ("drivers/x86: add thinkpad-wmi") CC: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> --- thinkpad-wmi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/platform/x86/thinkpad-wmi.c +++ b/drivers/platform/x86/thinkpad-wmi.c @@ -1202,9 +1202,7 @@ static int __init thinkpad_wmi_init(void platform_device = platform_create_bundle(&platform_driver, thinkpad_wmi_probe, NULL, 0, NULL, 0); - if (IS_ERR(platform_device)) - return PTR_ERR(platform_device); - return 0; + return PTR_ERR_OR_ZERO(platform_device); } static void __exit thinkpad_wmi_exit(void)
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com> Cc: kbuild-all@01.org, Darren Hart <dvhart@infradead.org>, Andy Shevchenko <andy@infradead.org>, corentin.chary@gmail.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] drivers/x86: fix ptr_ret.cocci warnings Date: Thu, 7 Sep 2017 18:02:24 +0800 [thread overview] Message-ID: <20170907100224.GA79024@lkp-wsx02> (raw) In-Reply-To: <20170904082110.30925-1-corentin.chary@gmail.com> drivers/platform/x86/thinkpad-wmi.c:1205:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: 3af63e23450d ("drivers/x86: add thinkpad-wmi") CC: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> --- thinkpad-wmi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/platform/x86/thinkpad-wmi.c +++ b/drivers/platform/x86/thinkpad-wmi.c @@ -1202,9 +1202,7 @@ static int __init thinkpad_wmi_init(void platform_device = platform_create_bundle(&platform_driver, thinkpad_wmi_probe, NULL, 0, NULL, 0); - if (IS_ERR(platform_device)) - return PTR_ERR(platform_device); - return 0; + return PTR_ERR_OR_ZERO(platform_device); } static void __exit thinkpad_wmi_exit(void)
next prev parent reply other threads:[~2017-09-07 10:02 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-09-07 10:02 [PATCH] drivers/x86: add thinkpad-wmi kbuild test robot 2017-09-07 10:02 ` kbuild test robot 2017-09-04 8:21 ` Corentin Chary 2017-09-04 17:15 ` Andy Shevchenko [not found] ` <CAHR064i+x=MeuHxTfDNRUr1C_p2dW8+nORqtGQUcYE4Dcbyppg@mail.gmail.com> 2017-09-05 7:07 ` Corentin Chary 2017-10-05 2:49 ` Darren Hart 2017-10-06 19:06 ` Corentin Chary 2017-10-06 19:50 ` Darren Hart 2017-09-07 10:02 ` kbuild test robot [this message] 2017-09-07 10:02 ` [PATCH] drivers/x86: fix ptr_ret.cocci warnings kbuild test robot 2017-09-07 10:02 ` [PATCH] drivers/x86: fix platform_no_drv_owner.cocci warnings kbuild test robot 2017-09-07 10:02 ` kbuild test robot 2017-10-21 6:41 ` [PATCH] drivers/x86: add thinkpad-wmi Corentin Chary 2017-10-24 20:59 ` Mario Limonciello 2017-11-04 15:23 ` Corentin Chary 2017-11-04 15:23 ` Corentin Chary 2017-11-06 18:16 ` Mario.Limonciello 2017-11-06 18:16 ` Mario.Limonciello 2017-11-07 12:46 ` Andy Shevchenko 2017-11-08 21:31 ` Darren Hart 2017-11-08 21:31 ` Darren Hart 2017-11-10 13:43 ` Corentin Chary 2017-11-15 10:02 ` [PATCH] " Pavel Machek 2020-11-05 16:44 ` Andy Shevchenko 2020-11-06 16:32 ` [External] " Mark Pearson
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=20170907100224.GA79024@lkp-wsx02 \ --to=lkp@intel.com \ --cc=andy@infradead.org \ --cc=corentin.chary@gmail.com \ --cc=dvhart@infradead.org \ --cc=kbuild-all@01.org \ --cc=linux-kernel@vger.kernel.org \ --cc=platform-driver-x86@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.