auxdisplay: panel: replace struct with union for display configuration
Subsystems (2)
PATCH 1/1 auxdisplay: panel: replace struct with union for display configuration
this patch replaces a struct with a union in the panel.c driver to better represent display configuration as mentioned in TODO
--- drivers/auxdisplay/panel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/auxdisplay/panel.c +1 -2
@@ -204,8 +204,7 @@ static struct {int charset;int proto; -/* TODO: use union here? */ -struct { +union {int e;int rs;int rw;
Signature · 1 line
2.39.5
Hello!
Quoted 13 lines · Atharva Tiwari
this patch replaces a struct with a union in the
panel.cdriver to better represent display configuration as mentioned in TODOSigned-off-by Atharva Tiwari <[email protected]>--- drivers/auxdisplay/panel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/auxdisplay/panel.c +0
-0
drivers/auxdisplay/panel.c static struct { · line 210
Quoted 9 lines
drivers/auxdisplay/panel.c +1
-2@@ -204,8 +204,7 @@ static struct {int charset;int proto; -/* TODO: use union here? */ -struct { +union {int e;int rs;int rw;
Have you tested this patch ? I guess not. The TODO here is not just to change a language keyword but to see if it would be better achieved using a different construct and representation of the different signals. Here what you've done is merge all the signals into a single one.
I think that a better patch would be to just remove the TODO comment that has been there for about 20 years without making any progress, and which is no longer relevant since that code will not change now.
regards,
Willy
PATCH 1/1 auxdisplay: panel: replace struct with union for display configuration
Well as you said it was better to just remove the todo that just what i did :)
--- drivers/auxdisplay/panel.c | 1 +-- 1 file changed, 1 deletions(-)
drivers/auxdisplay/panel.c +0 -1
@@ -204,8 +204,7 @@ static struct {int charset;int proto; -/* TODO: use union here? */ int e;int rs;int rw;
Signature · 1 line
2.39.5
Quoted 3 lines · Atharva Tiwari
Well as you said it was better to just remove the todo that just what i did :)
Please, follow the "Submitting Patches" and "Linux Kernel patch submission checklist" documentation and try again after studying that.
Signature · 2 lines
With Best Regards, Andy Shevchenko