lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1493144109.24567.197.camel@linux.intel.com>
Date:   Tue, 25 Apr 2017 21:15:09 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Wei Yongjun <weiyj.lk@...il.com>,
        Miguel Ojeda Sandonis <miguel.ojeda.sandonis@...il.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Wei Yongjun <weiyongjun1@...wei.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] auxdisplay: Convert list_for_each to entry variant

On Tue, 2017-04-25 at 16:13 +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@...wei.com>
> 
> convert list_for_each() to list_for_each_entry() where
> applicable.
> 

Here it's safe to do.
FWIW: 
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

> Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
> ---
>  drivers/auxdisplay/panel.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
> index e0c014c..7a8b8fb 100644
> --- a/drivers/auxdisplay/panel.c
> +++ b/drivers/auxdisplay/panel.c
> @@ -1345,14 +1345,11 @@ static inline void input_state_falling(struct
> logical_input *input)
>  
>  static void panel_process_inputs(void)
>  {
> -	struct list_head *item;
>  	struct logical_input *input;
>  
>  	keypressed = 0;
>  	inputs_stable = 1;
> -	list_for_each(item, &logical_inputs) {
> -		input = list_entry(item, struct logical_input, list);
> -
> +	list_for_each_entry(input, &logical_inputs, list) {
>  		switch (input->state) {
>  		case INPUT_ST_LOW:
>  			if ((phys_curr & input->mask) != input-
> >value)
> 

-- 
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ