mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] auxdisplay: panel: replace struct with union for display configuration
@ 2024-12-25 17:41 Atharva Tiwari
  2024-12-25 17:46 ` Willy TARREAU
  0 siblings, 1 reply; 4+ messages in thread
From: Atharva Tiwari @ 2024-12-25 17:41 UTC (permalink / raw)
  Cc: evepolonium, Willy Tarreau, Ksenija Stanojevic, Andy Shevchenko,
	Geert Uytterhoeven, Sudip Mukherjee, Dr. David Alan Gilbert,
	Greg Kroah-Hartman, linux-kernel

this patch replaces a struct with a union in the panel.c driver 
to better represent display configuration as mentioned in TODO

Signed-off-by: Atharva Tiwari <evepolonium@gmail.com>
---
 drivers/auxdisplay/panel.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
index a731f28455b4..4662f763dac7 100644
--- a/drivers/auxdisplay/panel.c
+++ b/drivers/auxdisplay/panel.c
@@ -204,8 +204,7 @@ static struct {
 	int charset;
 	int proto;
 
-	/* TODO: use union here? */
-	struct {
+	union {
 		int e;
 		int rs;
 		int rw;
-- 
2.39.5


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

* Re: [PATCH] auxdisplay: panel: replace struct with union for display configuration
  2024-12-25 17:41 [PATCH] auxdisplay: panel: replace struct with union for display configuration Atharva Tiwari
@ 2024-12-25 17:46 ` Willy TARREAU
  2024-12-25 18:06   ` Atharva Tiwari
  0 siblings, 1 reply; 4+ messages in thread
From: Willy TARREAU @ 2024-12-25 17:46 UTC (permalink / raw)
  To: Atharva Tiwari
  Cc: Ksenija Stanojevic, Andy Shevchenko, Geert Uytterhoeven,
	Sudip Mukherjee, Dr. David Alan Gilbert, Greg Kroah-Hartman,
	linux-kernel

Hello!

On Wed, Dec 25, 2024 at 11:11:18PM +0530, Atharva Tiwari wrote:
> this patch replaces a struct with a union in the panel.c driver 
> to better represent display configuration as mentioned in TODO
> 
> Signed-off-by: Atharva Tiwari <evepolonium@gmail.com>
> ---
>  drivers/auxdisplay/panel.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
> index a731f28455b4..4662f763dac7 100644
> --- a/drivers/auxdisplay/panel.c
> +++ b/drivers/auxdisplay/panel.c
> @@ -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

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

* [PATCH] auxdisplay: panel: replace struct with union for display configuration
  2024-12-25 17:46 ` Willy TARREAU
@ 2024-12-25 18:06   ` Atharva Tiwari
  2024-12-25 22:22     ` Andy Shevchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Atharva Tiwari @ 2024-12-25 18:06 UTC (permalink / raw)
  To: wtarreau
  Cc: andy, evepolonium, geert, gregkh, ksenija.stanojevic,
	linux-kernel, linux, sudipm.mukherjee

Well as you said it was better to just remove the todo that just what i
did :)

Signed-off-by: Atharva Tiwari <evepolonium@gmail.com>
---
 drivers/auxdisplay/panel.c | 1 +--
 1 file changed, 1 deletions(-)

diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
index a731f28455b4..4662f763dac7 100644
--- a/drivers/auxdisplay/panel.c
+++ b/drivers/auxdisplay/panel.c
@@ -204,8 +204,7 @@ static struct {
 	int charset;
 	int proto;
 
-	/* TODO: use union here? */
 		int e;
 		int rs;
 		int rw;
-- 
2.39.5


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

* Re: [PATCH] auxdisplay: panel: replace struct with union for display configuration
  2024-12-25 18:06   ` Atharva Tiwari
@ 2024-12-25 22:22     ` Andy Shevchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2024-12-25 22:22 UTC (permalink / raw)
  To: Atharva Tiwari
  Cc: wtarreau, andy, geert, gregkh, ksenija.stanojevic, linux-kernel,
	linux, sudipm.mukherjee

On Wed, Dec 25, 2024 at 8:06 PM Atharva Tiwari <evepolonium@gmail.com> wrote:
>
> 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.

-- 
With Best Regards,
Andy Shevchenko

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

end of thread, other threads:[~2024-12-25 22:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-25 17:41 [PATCH] auxdisplay: panel: replace struct with union for display configuration Atharva Tiwari
2024-12-25 17:46 ` Willy TARREAU
2024-12-25 18:06   ` Atharva Tiwari
2024-12-25 22:22     ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®