From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Bhagyashri Dighole <digholebhagyashri@gmail.com>
Cc: Outreachy <outreachy-kernel@googlegroups.com>
Subject: Re: [PATCH v4 2/2] staging: fbtft: convert a macro to a function.
Date: Thu, 7 Mar 2019 20:30:50 +0100 [thread overview]
Message-ID: <20190307193050.GA16807@kroah.com> (raw)
In-Reply-To: <20190306111512.GA11718@bhagyashri-Lenovo-G570>
On Wed, Mar 06, 2019 at 04:45:12PM +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 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 | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/fbtft/fb_watterott.c b/drivers/staging/fbtft/fb_watterott.c
> index 502d67f..40e5427 100644
> --- a/drivers/staging/fbtft/fb_watterott.c
> +++ b/drivers/staging/fbtft/fb_watterott.c
> @@ -90,9 +90,10 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
> return 0;
> }
>
> -#define RGB565toRGB332(c) ((((c) & 0xE000) >> 8) |\
> - (((c) & 000700) >> 6) |\
> - (((c) & 0x0018) >> 3))
> +inline int rgb565_to_rgb332(u16 c)
> +{
> + return ((c & 0xE000) >> 8)| ((c & 000700) >> 6)| ((c & 0x0018) >> 3);
Odd placement of '|' right? checkpatch.pl didn't complain about this?
Please put a space on both sides of that operator.
thanks,
greg k-h
next prev parent reply other threads:[~2019-03-07 19:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-06 11:15 [PATCH v4 2/2] staging: fbtft: convert a macro to a function Bhagyashri Dighole
2019-03-07 19:30 ` Greg Kroah-Hartman [this message]
2019-03-08 6:05 ` Bhagyashri Dighole
2019-03-08 6:21 ` Greg Kroah-Hartman
2019-03-08 6:29 ` Bhagyashri Dighole
2019-03-08 7:28 ` [Outreachy kernel] " Julia Lawall
-- strict thread matches above, loose matches on Subject: below --
2019-03-08 15:31 Bhagyashri Dighole
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190307193050.GA16807@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=digholebhagyashri@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.