* [PATCH v2 1/1] auxdisplay: charlcd: Drop unneeded initializers and switch to C99 style
@ 2021-07-15 14:41 Andy Shevchenko
2021-07-15 14:50 ` Willy Tarreau
2021-07-15 23:36 ` Miguel Ojeda
0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2021-07-15 14:41 UTC (permalink / raw)
To: Miguel Ojeda, Lars Poeschel, Willy Tarreau, linux-kernel; +Cc: Andy Shevchenko
For structure initializers the fields are 0 (or NULL) by default, so
there is no need to fill them explicitly. Besides that, much easier
to read when initializers use C99 style. Hence, convert to C99 style
as well.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: completely rewrote patch (Willy)
drivers/auxdisplay/charlcd.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c
index 24fd6f369ebe..304accde365c 100644
--- a/drivers/auxdisplay/charlcd.c
+++ b/drivers/auxdisplay/charlcd.c
@@ -637,9 +637,7 @@ static int panel_notify_sys(struct notifier_block *this, unsigned long code,
}
static struct notifier_block panel_notifier = {
- panel_notify_sys,
- NULL,
- 0
+ .notifier_call = panel_notify_sys,
};
int charlcd_register(struct charlcd *lcd)
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/1] auxdisplay: charlcd: Drop unneeded initializers and switch to C99 style
2021-07-15 14:41 [PATCH v2 1/1] auxdisplay: charlcd: Drop unneeded initializers and switch to C99 style Andy Shevchenko
@ 2021-07-15 14:50 ` Willy Tarreau
2021-07-15 23:36 ` Miguel Ojeda
1 sibling, 0 replies; 3+ messages in thread
From: Willy Tarreau @ 2021-07-15 14:50 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Miguel Ojeda, Lars Poeschel, linux-kernel
On Thu, Jul 15, 2021 at 05:41:52PM +0300, Andy Shevchenko wrote:
> For structure initializers the fields are 0 (or NULL) by default, so
> there is no need to fill them explicitly. Besides that, much easier
> to read when initializers use C99 style. Hence, convert to C99 style
> as well.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Thanks Andy!
Acked-by: Willy Tarreau <w@1wt.eu>
Willy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/1] auxdisplay: charlcd: Drop unneeded initializers and switch to C99 style
2021-07-15 14:41 [PATCH v2 1/1] auxdisplay: charlcd: Drop unneeded initializers and switch to C99 style Andy Shevchenko
2021-07-15 14:50 ` Willy Tarreau
@ 2021-07-15 23:36 ` Miguel Ojeda
1 sibling, 0 replies; 3+ messages in thread
From: Miguel Ojeda @ 2021-07-15 23:36 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Miguel Ojeda, Lars Poeschel, Willy Tarreau, linux-kernel
On Thu, Jul 15, 2021 at 4:41 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> For structure initializers the fields are 0 (or NULL) by default, so
> there is no need to fill them explicitly. Besides that, much easier
> to read when initializers use C99 style. Hence, convert to C99 style
> as well.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Queued, thanks!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-15 23:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-15 14:41 [PATCH v2 1/1] auxdisplay: charlcd: Drop unneeded initializers and switch to C99 style Andy Shevchenko
2021-07-15 14:50 ` Willy Tarreau
2021-07-15 23:36 ` Miguel Ojeda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox