* [PATCH -next] auxdisplay: Convert list_for_each to entry variant
@ 2017-04-25 16:13 Wei Yongjun
2017-04-25 18:15 ` Andy Shevchenko
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2017-04-25 16:13 UTC (permalink / raw)
To: Miguel Ojeda Sandonis, Andy Shevchenko, Greg Kroah-Hartman
Cc: Wei Yongjun, linux-kernel
From: Wei Yongjun <weiyongjun1@huawei.com>
convert list_for_each() to list_for_each_entry() where
applicable.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] auxdisplay: Convert list_for_each to entry variant
2017-04-25 16:13 [PATCH -next] auxdisplay: Convert list_for_each to entry variant Wei Yongjun
@ 2017-04-25 18:15 ` Andy Shevchenko
0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2017-04-25 18:15 UTC (permalink / raw)
To: Wei Yongjun, Miguel Ojeda Sandonis, Greg Kroah-Hartman
Cc: Wei Yongjun, linux-kernel
On Tue, 2017-04-25 at 16:13 +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.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@linux.intel.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.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@linux.intel.com>
Intel Finland Oy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-25 18:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-25 16:13 [PATCH -next] auxdisplay: Convert list_for_each to entry variant Wei Yongjun
2017-04-25 18:15 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox