linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] auxdisplay: charlcd: Drop unneeded terminator entry
@ 2021-07-15 13:23 Andy Shevchenko
  2021-07-15 14:25 ` Willy Tarreau
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2021-07-15 13:23 UTC (permalink / raw)
  To: Miguel Ojeda, Lars Poeschel, Willy Tarreau, linux-kernel; +Cc: Andy Shevchenko

Besides 0 not being, strictly speaking, a pointer it's redundant after
the actual terminator NULL entry. Drop the former for good.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/auxdisplay/charlcd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c
index 24fd6f369ebe..e9bc5fb4da28 100644
--- a/drivers/auxdisplay/charlcd.c
+++ b/drivers/auxdisplay/charlcd.c
@@ -638,8 +638,7 @@ static int panel_notify_sys(struct notifier_block *this, unsigned long code,
 
 static struct notifier_block panel_notifier = {
 	panel_notify_sys,
-	NULL,
-	0
+	NULL
 };
 
 int charlcd_register(struct charlcd *lcd)
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] auxdisplay: charlcd: Drop unneeded terminator entry
  2021-07-15 13:23 [PATCH v1 1/1] auxdisplay: charlcd: Drop unneeded terminator entry Andy Shevchenko
@ 2021-07-15 14:25 ` Willy Tarreau
  2021-07-15 14:42   ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Willy Tarreau @ 2021-07-15 14:25 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Miguel Ojeda, Lars Poeschel, linux-kernel

Hi Andy,

On Thu, Jul 15, 2021 at 04:23:10PM +0300, Andy Shevchenko wrote:
> Besides 0 not being, strictly speaking, a pointer it's redundant after
> the actual terminator NULL entry. Drop the former for good.

It seems to me that there is confusion caused by the absence of
the field names:

>  static struct notifier_block panel_notifier = {
>  	panel_notify_sys,
=> this is notifier_fn_t notifier_call

> -	NULL,
=> this is struct notifier_block __rcu *next

> -	0
=> this is int priority

> +	NULL

So all values look OK, however they're terribly confusing. wouldn't you
prefer to propose a patch to name them instead ? This would be safer,
especially if the structure evolves in the future.

Thanks!
Willy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] auxdisplay: charlcd: Drop unneeded terminator entry
  2021-07-15 14:25 ` Willy Tarreau
@ 2021-07-15 14:42   ` Andy Shevchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2021-07-15 14:42 UTC (permalink / raw)
  To: Willy Tarreau; +Cc: Andy Shevchenko, Miguel Ojeda, Lars Poeschel, linux-kernel

On Thu, Jul 15, 2021 at 5:27 PM Willy Tarreau <w@1wt.eu> wrote:
> On Thu, Jul 15, 2021 at 04:23:10PM +0300, Andy Shevchenko wrote:
> > Besides 0 not being, strictly speaking, a pointer it's redundant after
> > the actual terminator NULL entry. Drop the former for good.
>
> It seems to me that there is confusion caused by the absence of
> the field names

My gosh, you are right!
v2 on its way, thanks for review!

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-15 14:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15 13:23 [PATCH v1 1/1] auxdisplay: charlcd: Drop unneeded terminator entry Andy Shevchenko
2021-07-15 14:25 ` Willy Tarreau
2021-07-15 14:42   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).