* [PATCH -next] class: use IS_ERR_OR_NULL() helper in class_unregister()
@ 2022-08-22 6:19 Yang Yingliang
2022-09-09 14:00 ` [tip: sched/psi] " tip-bot2 for Yang Yingliang
0 siblings, 1 reply; 3+ messages in thread
From: Yang Yingliang @ 2022-08-22 6:19 UTC (permalink / raw)
To: linux-kernel, rafael; +Cc: gregkh
Use IS_ERR_OR_NULL() helper in class_unregister() to simplify code.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/base/class.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 8feb85e186e3..64f7b9a0970f 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -260,7 +260,7 @@ EXPORT_SYMBOL_GPL(__class_create);
*/
void class_destroy(struct class *cls)
{
- if ((cls == NULL) || (IS_ERR(cls)))
+ if (IS_ERR_OR_NULL(cls))
return;
class_unregister(cls);
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip: sched/psi] class: use IS_ERR_OR_NULL() helper in class_unregister()
2022-08-22 6:19 [PATCH -next] class: use IS_ERR_OR_NULL() helper in class_unregister() Yang Yingliang
@ 2022-09-09 14:00 ` tip-bot2 for Yang Yingliang
2022-09-09 18:08 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: tip-bot2 for Yang Yingliang @ 2022-09-09 14:00 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Yang Yingliang, Greg Kroah-Hartman, x86, linux-kernel
The following commit has been merged into the sched/psi branch of tip:
Commit-ID: e9628e015fe205f10766f031f17e217f85650570
Gitweb: https://git.kernel.org/tip/e9628e015fe205f10766f031f17e217f85650570
Author: Yang Yingliang <yangyingliang@huawei.com>
AuthorDate: Mon, 22 Aug 2022 14:19:22 +08:00
Committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CommitterDate: Thu, 01 Sep 2022 18:15:40 +02:00
class: use IS_ERR_OR_NULL() helper in class_unregister()
Use IS_ERR_OR_NULL() helper in class_unregister() to simplify code.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220822061922.3884113-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/base/class.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 8feb85e..64f7b9a 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -260,7 +260,7 @@ EXPORT_SYMBOL_GPL(__class_create);
*/
void class_destroy(struct class *cls)
{
- if ((cls == NULL) || (IS_ERR(cls)))
+ if (IS_ERR_OR_NULL(cls))
return;
class_unregister(cls);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [tip: sched/psi] class: use IS_ERR_OR_NULL() helper in class_unregister()
2022-09-09 14:00 ` [tip: sched/psi] " tip-bot2 for Yang Yingliang
@ 2022-09-09 18:08 ` Greg Kroah-Hartman
0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2022-09-09 18:08 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-tip-commits, Yang Yingliang, x86
On Fri, Sep 09, 2022 at 02:00:22PM -0000, tip-bot2 for Yang Yingliang wrote:
> The following commit has been merged into the sched/psi branch of tip:
>
> Commit-ID: e9628e015fe205f10766f031f17e217f85650570
> Gitweb: https://git.kernel.org/tip/e9628e015fe205f10766f031f17e217f85650570
> Author: Yang Yingliang <yangyingliang@huawei.com>
> AuthorDate: Mon, 22 Aug 2022 14:19:22 +08:00
> Committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> CommitterDate: Thu, 01 Sep 2022 18:15:40 +02:00
>
> class: use IS_ERR_OR_NULL() helper in class_unregister()
>
> Use IS_ERR_OR_NULL() helper in class_unregister() to simplify code.
>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> Link: https://lore.kernel.org/r/20220822061922.3884113-1-yangyingliang@huawei.com
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> drivers/base/class.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/class.c b/drivers/base/class.c
> index 8feb85e..64f7b9a 100644
> --- a/drivers/base/class.c
> +++ b/drivers/base/class.c
> @@ -260,7 +260,7 @@ EXPORT_SYMBOL_GPL(__class_create);
> */
> void class_destroy(struct class *cls)
> {
> - if ((cls == NULL) || (IS_ERR(cls)))
> + if (IS_ERR_OR_NULL(cls))
> return;
>
> class_unregister(cls);
Any specific reason you pulled in my driver-core branch into tip?
confused,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-09 18:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-22 6:19 [PATCH -next] class: use IS_ERR_OR_NULL() helper in class_unregister() Yang Yingliang
2022-09-09 14:00 ` [tip: sched/psi] " tip-bot2 for Yang Yingliang
2022-09-09 18:08 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®