All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5] staging: fbtft: convert a macro to a function.
@ 2019-03-08  6:54 Bhagyashri Dighole
  2019-03-08  6:58 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 7+ messages in thread
From: Bhagyashri Dighole @ 2019-03-08  6:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Outreachy

Convert a macro to an inline function to improve type safety and make
the code simpler.

Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com>
---
Changes in v5:
  -- Add space on both the side of operator.

Changes in v4:
  -- Modify log messages.

Changes in v3:
  -- Change the subject line according to log messages.
  -- Remove extra spaces.
  
Changes in v2:
  -- Make the converion from macro to inline function

 drivers/staging/fbtft/fb_watterott.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/fbtft/fb_watterott.c b/drivers/staging/fbtft/fb_watterott.c
index 0a5206d..7ee8a83 100644
--- a/drivers/staging/fbtft/fb_watterott.c
+++ b/drivers/staging/fbtft/fb_watterott.c
@@ -90,15 +90,10 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
 	return 0;
 }
 
-#define RGB565toRGB323(c) ((((c) & 0xE000) >> 8) |\
-			   (((c) & 000600) >> 6) |\
-			   (((c) & 0x001C) >> 2))
-#define RGB565toRGB332(c) ((((c) & 0xE000) >> 8) |\
-			   (((c) & 000700) >> 6) |\
-			   (((c) & 0x0018) >> 3))
-#define RGB565toRGB233(c) ((((c) & 0xC000) >> 8) |\
-			   (((c) & 000700) >> 5) |\
-			   (((c) & 0x001C) >> 2))
+inline int rgb565_to_rgb332(u16 c)
+{
+	return ((c & 0xE000) >> 8) | ((c & 000700) >> 6) | ((c & 0x0018) >> 3);
+}
 
 static int write_vmem_8bit(struct fbtft_par *par, size_t offset, size_t len)
 {
@@ -122,7 +117,7 @@ static int write_vmem_8bit(struct fbtft_par *par, size_t offset, size_t len)
 	for (i = start_line; i <= end_line; i++) {
 		pos[1] = cpu_to_be16(i);
 		for (j = 0; j < par->info->var.xres; j++) {
-			buf8[j] = RGB565toRGB332(*vmem16);
+			buf8[j] = rgb565_to_rgb332(*vmem16);
 			vmem16++;
 		}
 		ret = par->fbtftops.write(par,
-- 
2.7.4



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

* Re: [PATCH v5] staging: fbtft: convert a macro to a function.
  2019-03-08  6:54 [PATCH v5] staging: fbtft: convert a macro to a function Bhagyashri Dighole
@ 2019-03-08  6:58 ` Greg Kroah-Hartman
  2019-03-08  7:28   ` Bhagyashri Dighole
  0 siblings, 1 reply; 7+ messages in thread
From: Greg Kroah-Hartman @ 2019-03-08  6:58 UTC (permalink / raw)
  To: Bhagyashri Dighole; +Cc: Outreachy

On Fri, Mar 08, 2019 at 12:24:24PM +0530, Bhagyashri Dighole wrote:
> Convert a macro to an inline function to improve type safety and make
> the code simpler.
> 
> Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com>
> ---
> Changes in v5:
>   -- Add space on both the side of operator.
> 
> Changes in v4:
>   -- Modify log messages.
> 
> Changes in v3:
>   -- Change the subject line according to log messages.
>   -- Remove extra spaces.
>   
> Changes in v2:
>   -- Make the converion from macro to inline function
> 
>  drivers/staging/fbtft/fb_watterott.c | 15 +++++----------
>  1 file changed, 5 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/staging/fbtft/fb_watterott.c b/drivers/staging/fbtft/fb_watterott.c
> index 0a5206d..7ee8a83 100644
> --- a/drivers/staging/fbtft/fb_watterott.c
> +++ b/drivers/staging/fbtft/fb_watterott.c
> @@ -90,15 +90,10 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
>  	return 0;
>  }
>  
> -#define RGB565toRGB323(c) ((((c) & 0xE000) >> 8) |\
> -			   (((c) & 000600) >> 6) |\
> -			   (((c) & 0x001C) >> 2))
> -#define RGB565toRGB332(c) ((((c) & 0xE000) >> 8) |\
> -			   (((c) & 000700) >> 6) |\
> -			   (((c) & 0x0018) >> 3))
> -#define RGB565toRGB233(c) ((((c) & 0xC000) >> 8) |\
> -			   (((c) & 000700) >> 5) |\
> -			   (((c) & 0x001C) >> 2))
> +inline int rgb565_to_rgb332(u16 c)
> +{
> +	return ((c & 0xE000) >> 8) | ((c & 000700) >> 6) | ((c & 0x0018) >> 3);
> +}

You also deleted 2 unused macros here, making this patch do multiple
things, and you didn't describe it in the changelog text :(

This should be 2 separate patches, one to remove the unused macros, and
one to turn the macro that is used, into an inline function.

Oh, I also just noticed it needs to be static :)

thanks,

greg k-h


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

* Re: [PATCH v5] staging: fbtft: convert a macro to a function.
  2019-03-08  6:58 ` Greg Kroah-Hartman
@ 2019-03-08  7:28   ` Bhagyashri Dighole
  2019-03-08  7:30     ` [Outreachy kernel] " Julia Lawall
  2019-03-08  7:41     ` Greg Kroah-Hartman
  0 siblings, 2 replies; 7+ messages in thread
From: Bhagyashri Dighole @ 2019-03-08  7:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Outreachy

[-- Attachment #1: Type: text/plain, Size: 2260 bytes --]

On Fri, Mar 8, 2019 at 12:28 PM Greg Kroah-Hartman <
gregkh@linuxfoundation.org> wrote:

> On Fri, Mar 08, 2019 at 12:24:24PM +0530, Bhagyashri Dighole wrote:
> > Convert a macro to an inline function to improve type safety and make
> > the code simpler.
> >
> > Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com>
> > ---
> > Changes in v5:
> >   -- Add space on both the side of operator.
> >
> > Changes in v4:
> >   -- Modify log messages.
> >
> > Changes in v3:
> >   -- Change the subject line according to log messages.
> >   -- Remove extra spaces.
> >
> > Changes in v2:
> >   -- Make the converion from macro to inline function
> >
> >  drivers/staging/fbtft/fb_watterott.c | 15 +++++----------
> >  1 file changed, 5 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/staging/fbtft/fb_watterott.c
> b/drivers/staging/fbtft/fb_watterott.c
> > index 0a5206d..7ee8a83 100644
> > --- a/drivers/staging/fbtft/fb_watterott.c
> > +++ b/drivers/staging/fbtft/fb_watterott.c
> > @@ -90,15 +90,10 @@ static int write_vmem(struct fbtft_par *par, size_t
> offset, size_t len)
> >       return 0;
> >  }
> >
> > -#define RGB565toRGB323(c) ((((c) & 0xE000) >> 8) |\
> > -                        (((c) & 000600) >> 6) |\
> > -                        (((c) & 0x001C) >> 2))
> > -#define RGB565toRGB332(c) ((((c) & 0xE000) >> 8) |\
> > -                        (((c) & 000700) >> 6) |\
> > -                        (((c) & 0x0018) >> 3))
> > -#define RGB565toRGB233(c) ((((c) & 0xC000) >> 8) |\
> > -                        (((c) & 000700) >> 5) |\
> > -                        (((c) & 0x001C) >> 2))
> > +inline int rgb565_to_rgb332(u16 c)
> > +{
> > +     return ((c & 0xE000) >> 8) | ((c & 000700) >> 6) | ((c & 0x0018)
> >> 3);
> > +}
>
> You also deleted 2 unused macros here, making this patch do multiple
> things, and you didn't describe it in the changelog text :(
>
> This should be 2 separate patches, one to remove the unused macros, and
> one to turn the macro that is used, into an inline function.
>

Patch one : to remove the unused macros is added in staging tree.
I thought i need to send only second patch.

>
> Oh, I also just noticed it needs to be static :)
>

I will modify it with the static.

>
> thanks,
>
> greg k-h
>

[-- Attachment #2: Type: text/html, Size: 3525 bytes --]

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

* Re: [Outreachy kernel] Re: [PATCH v5] staging: fbtft: convert a macro to a function.
  2019-03-08  7:28   ` Bhagyashri Dighole
@ 2019-03-08  7:30     ` Julia Lawall
  2019-03-08  7:35       ` Bhagyashri Dighole
  2019-03-08  7:41     ` Greg Kroah-Hartman
  1 sibling, 1 reply; 7+ messages in thread
From: Julia Lawall @ 2019-03-08  7:30 UTC (permalink / raw)
  To: Bhagyashri Dighole; +Cc: Greg Kroah-Hartman, Outreachy

[-- Attachment #1: Type: text/plain, Size: 3517 bytes --]



On Fri, 8 Mar 2019, Bhagyashri Dighole wrote:

>
>
> On Fri, Mar 8, 2019 at 12:28 PM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
>       On Fri, Mar 08, 2019 at 12:24:24PM +0530, Bhagyashri Dighole
>       wrote:
>       > Convert a macro to an inline function to improve type safety
>       and make
>       > the code simpler.
>       >
>       > Signed-off-by: Bhagyashri Dighole
>       <digholebhagyashri@gmail.com>
>       > ---
>       > Changes in v5:
>       >   -- Add space on both the side of operator.
>       >
>       > Changes in v4:
>       >   -- Modify log messages.
>       >
>       > Changes in v3:
>       >   -- Change the subject line according to log messages.
>       >   -- Remove extra spaces.
>       >   
>       > Changes in v2:
>       >   -- Make the converion from macro to inline function
>       >
>       >  drivers/staging/fbtft/fb_watterott.c | 15 +++++----------
>       >  1 file changed, 5 insertions(+), 10 deletions(-)
>       >
>       > diff --git a/drivers/staging/fbtft/fb_watterott.c
>       b/drivers/staging/fbtft/fb_watterott.c
>       > index 0a5206d..7ee8a83 100644
>       > --- a/drivers/staging/fbtft/fb_watterott.c
>       > +++ b/drivers/staging/fbtft/fb_watterott.c
>       > @@ -90,15 +90,10 @@ static int write_vmem(struct fbtft_par
>       *par, size_t offset, size_t len)
>       >       return 0;
>       >  }
>       > 
>       > -#define RGB565toRGB323(c) ((((c) & 0xE000) >> 8) |\
>       > -                        (((c) & 000600) >> 6) |\
>       > -                        (((c) & 0x001C) >> 2))
>       > -#define RGB565toRGB332(c) ((((c) & 0xE000) >> 8) |\
>       > -                        (((c) & 000700) >> 6) |\
>       > -                        (((c) & 0x0018) >> 3))
>       > -#define RGB565toRGB233(c) ((((c) & 0xC000) >> 8) |\
>       > -                        (((c) & 000700) >> 5) |\
>       > -                        (((c) & 0x001C) >> 2))
>       > +inline int rgb565_to_rgb332(u16 c)
>       > +{
>       > +     return ((c & 0xE000) >> 8) | ((c & 000700) >> 6) | ((c &
>       0x0018) >> 3);
>       > +}
>
>       You also deleted 2 unused macros here, making this patch do
>       multiple
>       things, and you didn't describe it in the changelog text :(
>
>       This should be 2 separate patches, one to remove the unused
>       macros, and
>       one to turn the macro that is used, into an inline function.
>
>
> Patch one : to remove the unused macros is added in staging tree.
> I thought i need to send only second patch.

You only need to send the second patch, if the first one is integrated.
But the patch that you sent removes those other macros again.  I guess you
have started from the wrong place.

julia

>
>       Oh, I also just noticed it needs to be static :)
>
>
> I will modify it with the static.
>
>       thanks,
>
>       greg k-h
>
> --
> You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/CAOMPgjhrBxq96-We_5fHqaZ
> ZHxqxVhpuBwCYKAncOCq7XS5ksA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
>

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

* Re: [Outreachy kernel] Re: [PATCH v5] staging: fbtft: convert a macro to a function.
  2019-03-08  7:30     ` [Outreachy kernel] " Julia Lawall
@ 2019-03-08  7:35       ` Bhagyashri Dighole
  0 siblings, 0 replies; 7+ messages in thread
From: Bhagyashri Dighole @ 2019-03-08  7:35 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Greg Kroah-Hartman, Outreachy

[-- Attachment #1: Type: text/plain, Size: 4251 bytes --]

On Fri, Mar 8, 2019 at 1:00 PM Julia Lawall <julia.lawall@lip6.fr> wrote:

>
>
> On Fri, 8 Mar 2019, Bhagyashri Dighole wrote:
>
> >
> >
> > On Fri, Mar 8, 2019 at 12:28 PM Greg Kroah-Hartman
> > <gregkh@linuxfoundation.org> wrote:
> >       On Fri, Mar 08, 2019 at 12:24:24PM +0530, Bhagyashri Dighole
> >       wrote:
> >       > Convert a macro to an inline function to improve type safety
> >       and make
> >       > the code simpler.
> >       >
> >       > Signed-off-by: Bhagyashri Dighole
> >       <digholebhagyashri@gmail.com>
> >       > ---
> >       > Changes in v5:
> >       >   -- Add space on both the side of operator.
> >       >
> >       > Changes in v4:
> >       >   -- Modify log messages.
> >       >
> >       > Changes in v3:
> >       >   -- Change the subject line according to log messages.
> >       >   -- Remove extra spaces.
> >       >
> >       > Changes in v2:
> >       >   -- Make the converion from macro to inline function
> >       >
> >       >  drivers/staging/fbtft/fb_watterott.c | 15 +++++----------
> >       >  1 file changed, 5 insertions(+), 10 deletions(-)
> >       >
> >       > diff --git a/drivers/staging/fbtft/fb_watterott.c
> >       b/drivers/staging/fbtft/fb_watterott.c
> >       > index 0a5206d..7ee8a83 100644
> >       > --- a/drivers/staging/fbtft/fb_watterott.c
> >       > +++ b/drivers/staging/fbtft/fb_watterott.c
> >       > @@ -90,15 +90,10 @@ static int write_vmem(struct fbtft_par
> >       *par, size_t offset, size_t len)
> >       >       return 0;
> >       >  }
> >       >
> >       > -#define RGB565toRGB323(c) ((((c) & 0xE000) >> 8) |\
> >       > -                        (((c) & 000600) >> 6) |\
> >       > -                        (((c) & 0x001C) >> 2))
> >       > -#define RGB565toRGB332(c) ((((c) & 0xE000) >> 8) |\
> >       > -                        (((c) & 000700) >> 6) |\
> >       > -                        (((c) & 0x0018) >> 3))
> >       > -#define RGB565toRGB233(c) ((((c) & 0xC000) >> 8) |\
> >       > -                        (((c) & 000700) >> 5) |\
> >       > -                        (((c) & 0x001C) >> 2))
> >       > +inline int rgb565_to_rgb332(u16 c)
> >       > +{
> >       > +     return ((c & 0xE000) >> 8) | ((c & 000700) >> 6) | ((c &
> >       0x0018) >> 3);
> >       > +}
> >
> >       You also deleted 2 unused macros here, making this patch do
> >       multiple
> >       things, and you didn't describe it in the changelog text :(
> >
> >       This should be 2 separate patches, one to remove the unused
> >       macros, and
> >       one to turn the macro that is used, into an inline function.
> >
> >
> > Patch one : to remove the unused macros is added in staging tree.
> > I thought i need to send only second patch.
>
> You only need to send the second patch, if the first one is integrated.
> But the patch that you sent removes those other macros again.  I guess you
> have started from the wrong place.
>

Oh. Yes.
I understand. Thanks. :)

>
> julia
>
> >
> >       Oh, I also just noticed it needs to be static :)
> >
> >
> > I will modify it with the static.
> >
> >       thanks,
> >
> >       greg k-h
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visithttps://
> groups.google.com/d/msgid/outreachy-kernel/CAOMPgjhrBxq96-We_5fHqaZ
> > ZHxqxVhpuBwCYKAncOCq7XS5ksA%40mail.gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/alpine.DEB.2.21.1903080829250.5073%40hadrien
> .
> For more options, visit https://groups.google.com/d/optout.
>

[-- Attachment #2: Type: text/html, Size: 6847 bytes --]

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

* Re: [PATCH v5] staging: fbtft: convert a macro to a function.
  2019-03-08  7:28   ` Bhagyashri Dighole
  2019-03-08  7:30     ` [Outreachy kernel] " Julia Lawall
@ 2019-03-08  7:41     ` Greg Kroah-Hartman
  2019-03-08  7:54       ` Bhagyashri Dighole
  1 sibling, 1 reply; 7+ messages in thread
From: Greg Kroah-Hartman @ 2019-03-08  7:41 UTC (permalink / raw)
  To: Bhagyashri Dighole; +Cc: Outreachy

On Fri, Mar 08, 2019 at 12:58:24PM +0530, Bhagyashri Dighole wrote:
> On Fri, Mar 8, 2019 at 12:28 PM Greg Kroah-Hartman <
> gregkh@linuxfoundation.org> wrote:
> 
> > On Fri, Mar 08, 2019 at 12:24:24PM +0530, Bhagyashri Dighole wrote:
> > > Convert a macro to an inline function to improve type safety and make
> > > the code simpler.
> > >
> > > Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com>
> > > ---
> > > Changes in v5:
> > >   -- Add space on both the side of operator.
> > >
> > > Changes in v4:
> > >   -- Modify log messages.
> > >
> > > Changes in v3:
> > >   -- Change the subject line according to log messages.
> > >   -- Remove extra spaces.
> > >
> > > Changes in v2:
> > >   -- Make the converion from macro to inline function
> > >
> > >  drivers/staging/fbtft/fb_watterott.c | 15 +++++----------
> > >  1 file changed, 5 insertions(+), 10 deletions(-)
> > >
> > > diff --git a/drivers/staging/fbtft/fb_watterott.c
> > b/drivers/staging/fbtft/fb_watterott.c
> > > index 0a5206d..7ee8a83 100644
> > > --- a/drivers/staging/fbtft/fb_watterott.c
> > > +++ b/drivers/staging/fbtft/fb_watterott.c
> > > @@ -90,15 +90,10 @@ static int write_vmem(struct fbtft_par *par, size_t
> > offset, size_t len)
> > >       return 0;
> > >  }
> > >
> > > -#define RGB565toRGB323(c) ((((c) & 0xE000) >> 8) |\
> > > -                        (((c) & 000600) >> 6) |\
> > > -                        (((c) & 0x001C) >> 2))
> > > -#define RGB565toRGB332(c) ((((c) & 0xE000) >> 8) |\
> > > -                        (((c) & 000700) >> 6) |\
> > > -                        (((c) & 0x0018) >> 3))
> > > -#define RGB565toRGB233(c) ((((c) & 0xC000) >> 8) |\
> > > -                        (((c) & 000700) >> 5) |\
> > > -                        (((c) & 0x001C) >> 2))
> > > +inline int rgb565_to_rgb332(u16 c)
> > > +{
> > > +     return ((c & 0xE000) >> 8) | ((c & 000700) >> 6) | ((c & 0x0018)
> > >> 3);
> > > +}
> >
> > You also deleted 2 unused macros here, making this patch do multiple
> > things, and you didn't describe it in the changelog text :(
> >
> > This should be 2 separate patches, one to remove the unused macros, and
> > one to turn the macro that is used, into an inline function.
> >
> 
> Patch one : to remove the unused macros is added in staging tree.
> I thought i need to send only second patch.

That is correct, but you sent both patches squished together here :)

That means this patch itself would not even apply :(

thanks,

greg k-h


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

* Re: [PATCH v5] staging: fbtft: convert a macro to a function.
  2019-03-08  7:41     ` Greg Kroah-Hartman
@ 2019-03-08  7:54       ` Bhagyashri Dighole
  0 siblings, 0 replies; 7+ messages in thread
From: Bhagyashri Dighole @ 2019-03-08  7:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Outreachy

[-- Attachment #1: Type: text/plain, Size: 2765 bytes --]

On Fri, Mar 8, 2019 at 1:11 PM Greg Kroah-Hartman <
gregkh@linuxfoundation.org> wrote:

> On Fri, Mar 08, 2019 at 12:58:24PM +0530, Bhagyashri Dighole wrote:
> > On Fri, Mar 8, 2019 at 12:28 PM Greg Kroah-Hartman <
> > gregkh@linuxfoundation.org> wrote:
> >
> > > On Fri, Mar 08, 2019 at 12:24:24PM +0530, Bhagyashri Dighole wrote:
> > > > Convert a macro to an inline function to improve type safety and make
> > > > the code simpler.
> > > >
> > > > Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com>
> > > > ---
> > > > Changes in v5:
> > > >   -- Add space on both the side of operator.
> > > >
> > > > Changes in v4:
> > > >   -- Modify log messages.
> > > >
> > > > Changes in v3:
> > > >   -- Change the subject line according to log messages.
> > > >   -- Remove extra spaces.
> > > >
> > > > Changes in v2:
> > > >   -- Make the converion from macro to inline function
> > > >
> > > >  drivers/staging/fbtft/fb_watterott.c | 15 +++++----------
> > > >  1 file changed, 5 insertions(+), 10 deletions(-)
> > > >
> > > > diff --git a/drivers/staging/fbtft/fb_watterott.c
> > > b/drivers/staging/fbtft/fb_watterott.c
> > > > index 0a5206d..7ee8a83 100644
> > > > --- a/drivers/staging/fbtft/fb_watterott.c
> > > > +++ b/drivers/staging/fbtft/fb_watterott.c
> > > > @@ -90,15 +90,10 @@ static int write_vmem(struct fbtft_par *par,
> size_t
> > > offset, size_t len)
> > > >       return 0;
> > > >  }
> > > >
> > > > -#define RGB565toRGB323(c) ((((c) & 0xE000) >> 8) |\
> > > > -                        (((c) & 000600) >> 6) |\
> > > > -                        (((c) & 0x001C) >> 2))
> > > > -#define RGB565toRGB332(c) ((((c) & 0xE000) >> 8) |\
> > > > -                        (((c) & 000700) >> 6) |\
> > > > -                        (((c) & 0x0018) >> 3))
> > > > -#define RGB565toRGB233(c) ((((c) & 0xC000) >> 8) |\
> > > > -                        (((c) & 000700) >> 5) |\
> > > > -                        (((c) & 0x001C) >> 2))
> > > > +inline int rgb565_to_rgb332(u16 c)
> > > > +{
> > > > +     return ((c & 0xE000) >> 8) | ((c & 000700) >> 6) | ((c &
> 0x0018)
> > > >> 3);
> > > > +}
> > >
> > > You also deleted 2 unused macros here, making this patch do multiple
> > > things, and you didn't describe it in the changelog text :(
> > >
> > > This should be 2 separate patches, one to remove the unused macros, and
> > > one to turn the macro that is used, into an inline function.
> > >
> >
> > Patch one : to remove the unused macros is added in staging tree.
> > I thought i need to send only second patch.
>
> That is correct, but you sent both patches squished together here :)
>
> That means this patch itself would not even apply :(
>

I was on another branch, so first patch changes was not reflected.

>
> thanks,
>
> greg k-h
>

[-- Attachment #2: Type: text/html, Size: 4259 bytes --]

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

end of thread, other threads:[~2019-03-08  7:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-08  6:54 [PATCH v5] staging: fbtft: convert a macro to a function Bhagyashri Dighole
2019-03-08  6:58 ` Greg Kroah-Hartman
2019-03-08  7:28   ` Bhagyashri Dighole
2019-03-08  7:30     ` [Outreachy kernel] " Julia Lawall
2019-03-08  7:35       ` Bhagyashri Dighole
2019-03-08  7:41     ` Greg Kroah-Hartman
2019-03-08  7:54       ` Bhagyashri Dighole

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.