From: Joe Perches <joe@perches.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
Jonathan Bergh <bergh.jonathan@gmail.com>
Cc: mchehab@kernel.org, gregkh@linuxfoundation.org,
error27@gmail.com, linux-staging@lists.linux.dev,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] staging: media: av7110: Fix various whitespace checkpatch errors
Date: Mon, 23 Oct 2023 08:24:58 -0700 [thread overview]
Message-ID: <15f45bbde3f4289b012db7adb8166cf0d45e4fec.camel@perches.com> (raw)
In-Reply-To: <b301c9a1-7536-46c5-878e-7cd79e3a4742@kadam.mountain>
On Mon, 2023-10-23 at 17:26 +0300, Dan Carpenter wrote:
> On Sat, Oct 21, 2023 at 01:23:29AM +0200, Jonathan Bergh wrote:
[]
> > diff --git a/drivers/staging/media/av7110/av7110_av.c b/drivers/staging/media/av7110/av7110_av.c
[]
> > @@ -241,8 +241,8 @@ int av7110_pes_play(void *dest, struct dvb_ringbuffer *buf, int dlen)
> > sync |= DVB_RINGBUFFER_PEEK(buf, 2) << 8;
> > sync |= DVB_RINGBUFFER_PEEK(buf, 3);
> >
> > - if (((sync &~ 0x0f) == 0x000001e0) ||
> > - ((sync &~ 0x1f) == 0x000001c0) ||
> > + if (((sync &~0x0f) == 0x000001e0) ||
> > + ((sync &~0x1f) == 0x000001c0) ||
>
> These should be:
>
> if (((sync & ~0x0f) == 0x000001e0) ||
> ((sync & ~0x1f) == 0x000001c0) ||
Generally, I believe it would be better to avoid '& ~constant'
and use the positive form instead
if ((sync & 0xfffffff0) == 0x000001e0) ||
(sync & 0xffffffe0) == 0x000001c0)
next prev parent reply other threads:[~2023-10-23 15:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 23:23 [PATCH 0/5] staging: media: av7110: Fix various formatting and small code issues Jonathan Bergh
2023-10-20 23:23 ` [PATCH 1/5] staging: media: av7110: Fix missing newlines after declaration warnings Jonathan Bergh
2023-10-20 23:23 ` [PATCH 2/5] staging: media: av7110: Fix various whitespace checkpatch errors Jonathan Bergh
2023-10-23 14:26 ` Dan Carpenter
2023-10-23 15:24 ` Joe Perches [this message]
2023-10-24 4:12 ` Dan Carpenter
2023-10-20 23:23 ` [PATCH 3/5] staging: media: av7110: Remove unnecessary whitespace before quoted newlines Jonathan Bergh
2023-10-23 14:27 ` Dan Carpenter
2023-10-20 23:23 ` [PATCH 4/5] staging: media: av7110: Fix 'long int' and 'unsigned' variable declarations Jonathan Bergh
2023-10-20 23:23 ` [PATCH 5/5] staging: media: av7110: Fix various formating issues Jonathan Bergh
2023-10-23 14:32 ` Dan Carpenter
2023-11-22 10:57 ` [PATCH 0/5] staging: media: av7110: Fix various formatting and small code issues Hans Verkuil
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=15f45bbde3f4289b012db7adb8166cf0d45e4fec.camel@perches.com \
--to=joe@perches.com \
--cc=bergh.jonathan@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
/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