From: Mitali Borkar <mitaliborkar810@gmail.com>
To: Julia Lawall <julia.lawall@inria.fr>
Cc: clabbe@baylibre.com, mchehab@kernel.org,
gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com,
mitali_s@me.iitr.ac.in
Subject: Re: [Outreachy kernel] [PATCH 2/2] media: zoran: replace bit shifts by BIT() macro
Date: Fri, 9 Apr 2021 03:15:59 +0530 [thread overview]
Message-ID: <YG95l9b++d+RFrDa@kali> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2104082314090.21785@hadrien>
On Thu, Apr 08, 2021 at 11:15:07PM +0200, Julia Lawall wrote:
>
>
> On Fri, 9 Apr 2021, Mitali Borkar wrote:
>
> > Added #include <linux/bitops.h> and replaced bit shifts by BIT() macro.
> > This BIT() macro from linux/bitops.h is used to define ZR36057_VFESPFR_* bitmasks.
> > Use of macro is better and neater. It maintains consistency.
> > Reported by checkpatch.
> >
> > Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
> > ---
> > drivers/staging/media/zoran/zr36057.h | 10 ++++++----
> > 1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/staging/media/zoran/zr36057.h b/drivers/staging/media/zoran/zr36057.h
> > index a2a75fd9f535..93075459f910 100644
> > --- a/drivers/staging/media/zoran/zr36057.h
> > +++ b/drivers/staging/media/zoran/zr36057.h
> > @@ -8,6 +8,8 @@
> > #ifndef _ZR36057_H_
> > #define _ZR36057_H_
> >
> > +#include <linux/bitops.h>
> > +
> > /* Zoran ZR36057 registers */
> >
> > #define ZR36057_VFEHCR 0x000 /* Video Front End, Horizontal Configuration Register */
> > @@ -31,12 +33,12 @@
> > #define ZR36057_VFESPFR_VER_DCM 8
> > #define ZR36057_VFESPFR_DISP_MODE 6
> > #define ZR36057_VFESPFR_YUV422 (0 << 3)
> > -#define ZR36057_VFESPFR_RGB888 (1 << 3)
> > +#define ZR36057_VFESPFR_RGB888 BIT(3)
>
> Uniformity is generally considered to be more important than using BIT.
> Having only a few constants defined using BIT is a bit strange.
>
Okay Ma'am. Can you please tell me on how to proceed now? I am not sure
how to proceed.
> julia
>
> > #define ZR36057_VFESPFR_RGB565 (2 << 3)
> > #define ZR36057_VFESPFR_RGB555 (3 << 3)
> > -#define ZR36057_VFESPFR_ERR_DIF (1 << 2)
> > -#define ZR36057_VFESPFR_PACK24 (1 << 1)
> > -#define ZR36057_VFESPFR_LITTLE_ENDIAN (1 << 0)
> > +#define ZR36057_VFESPFR_ERR_DIF BIT(2)
> > +#define ZR36057_VFESPFR_PACK24 BIT(1)
> > +#define ZR36057_VFESPFR_LITTLE_ENDIAN BIT(0)
> >
> > #define ZR36057_VDTR 0x00c /* Video Display "Top" Register */
> >
> > --
> > 2.30.2
> >
> > --
> > 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 view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/ac8ec2b70ac2cc7c541c05a1d9a8db1fe79df793.1617912177.git.mitaliborkar810%40gmail.com.
> >
next prev parent reply other threads:[~2021-04-08 21:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-08 20:38 [PATCH 0/2] media: zoran: clean up style issues Mitali Borkar
2021-04-08 20:38 ` [PATCH 1/2] media: zoran: add spaces around '<<' Mitali Borkar
2021-04-08 21:16 ` [Outreachy kernel] " Julia Lawall
2021-04-08 21:34 ` Mitali Borkar
2021-04-09 7:23 ` Hans Verkuil
2021-04-09 15:11 ` Mitali Borkar
2021-04-09 15:29 ` [Outreachy kernel] " Julia Lawall
2021-04-09 15:48 ` Hans Verkuil
2021-04-09 16:49 ` Mitali Borkar
2021-04-09 17:26 ` [Outreachy kernel] " Julia Lawall
2021-04-08 20:39 ` [PATCH 2/2] media: zoran: replace bit shifts by BIT() macro Mitali Borkar
2021-04-08 21:15 ` [Outreachy kernel] " Julia Lawall
2021-04-08 21:45 ` Mitali Borkar [this message]
2021-04-08 22:10 ` Julia Lawall
2021-04-08 23:15 ` Mitali Borkar
2021-04-09 7:00 ` Julia Lawall
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=YG95l9b++d+RFrDa@kali \
--to=mitaliborkar810@gmail.com \
--cc=clabbe@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=julia.lawall@inria.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=mitali_s@me.iitr.ac.in \
--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 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).