[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <558D8EF5.9030701@users.sourceforge.net>
Date: Fri, 26 Jun 2015 19:42:13 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: Alexander Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org
CC: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH] fs-eventpoll: Deletion of unnecessary checks before the
function call "__pm_stay_awake"
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Tue, 18 Nov 2014 09:27:16 +0100
>
> The __pm_stay_awake() function tests whether its argument is NULL and then
> returns immediately. Thus the test around the call is not needed.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
> fs/eventpoll.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/fs/eventpoll.c b/fs/eventpoll.c
> index 7bcfff9..eec2e85 100644
> --- a/fs/eventpoll.c
> +++ b/fs/eventpoll.c
> @@ -555,8 +555,7 @@ static inline void ep_pm_stay_awake(struct epitem *epi)
> {
> struct wakeup_source *ws = ep_wakeup_source(epi);
>
> - if (ws)
> - __pm_stay_awake(ws);
> + __pm_stay_awake(ws);
> }
>
> static inline bool ep_has_wakeup_source(struct epitem *epi)
> @@ -571,8 +570,7 @@ static inline void ep_pm_stay_awake_rcu(struct epitem *epi)
>
> rcu_read_lock();
> ws = rcu_dereference(epi->ws);
> - if (ws)
> - __pm_stay_awake(ws);
> + __pm_stay_awake(ws);
> rcu_read_unlock();
> }
>
>
How are the chances to integrate this update suggestion
into another source code repository?
Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists