From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: Andrey Utkin <andrey_utkin@fastmail.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hans.verkuil@cisco.com>,
Andrew Morton <akpm@linux-foundation.org>,
Julia Lawall <Julia.Lawall@lip6.fr>,
Andrey Utkin <andrey.utkin@corp.bluecherry.net>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Junghak Sung <jh1009.sung@samsung.com>,
Geunyoung Kim <nenggun.kim@samsung.com>,
Seung-Woo Kim <sw0312.kim@samsung.com>,
Markus Elfring <elfring@users.sourceforge.net>,
Wei Yongjun <weiyongjun1@huawei.com>, Sean Young <sean@mess.org>
Subject: Re: [PATCH] [media] cx88: make checkpatch.pl happy
Date: Sat, 19 Nov 2016 19:29:10 -0200 [thread overview]
Message-ID: <20161119192910.51183aa5@vento.lan> (raw)
In-Reply-To: <20161119191839.36a22f2c@vento.lan>
Em Sat, 19 Nov 2016 19:18:39 -0200
Mauro Carvalho Chehab <mchehab@s-opensource.com> escreveu:
> Em Sat, 19 Nov 2016 19:58:50 +0000
> Andrey Utkin <andrey_utkin@fastmail.com> escreveu:
>
> > This is from checkpatch run on cx88 source files with "-f", not your
> > patch files, right? I guess it might produce less changes if run on
> > patches.
>
> Yes, I know.
>
> > On Sat, Nov 19, 2016 at 10:14:05AM -0200, Mauro Carvalho Chehab wrote:
> > > Usually, I don't like fixing coding style issues on non-staging
> > > drivers, as it could be a mess pretty easy, and could become like
> > > a snow ball. That's the case of recent changes on two changesets:
> > > they disalign some statements.
> >
> > In my understanding, commits dedicated to style fixes on non-staging are
> > discouraged because they clutter git log and "git blame" view. But new
> > commits are encouraged to be style-perfect.
>
> Yes, that's the usual policy. The main reason is not due to git log:
> when you do lots of changes on a file, the maintainer's live become
> very hard, as he needs to fix conflicts of patches affecting the file,
> or ask everybody to rebase their patches.
>
> However, when we do large reformats for some other reason, though,
> it sometimes makes sense to take the opportunity and fix the style
> on the file, as bisect, blame and patch handling will be affected
> anyway.
>
> >
> > And in case of discussed alignment breakage, I expected that you make
> > this your fixup (the current patch) really a git-ish fixup and just
> > merge it into 09/35 patch.
>
> Too late for that, as your review came after applying the patch
> reached media upstream. I don't rebase the main media development
> tree (except when something really bad happened at the tree, and
> if I notice a few minutes after pushing something).
>
> > As I see it's published in media tree master
> > already and you are not going to force-push there; maybe a bit of
> > latency in pushing patches to media tree after publishing them for
> > review would prevent this sort of inconvenience.
>
> I usually wait for some time before applying upstream. The time
> I wait is based on my own good sense if either people will comment
> the patch or silently ignore.
>
> >
> > P. S. (Running away from rotten tomatoes) another way to avoid such
> > painful alignment issues is to legalize "one-more-tab" indentation for
> > trailing parts of lines, alignment on opening brace is brittle IMHO.
> >
> >
> > > --- a/drivers/media/pci/cx88/cx88-blackbird.c
> > > +++ b/drivers/media/pci/cx88/cx88-blackbird.c
> >
> > > @@ -1061,7 +1092,8 @@ static int cx8802_blackbird_advise_acquire(struct cx8802_driver *drv)
> > >
> > > switch (core->boardnr) {
> > > case CX88_BOARD_HAUPPAUGE_HVR1300:
> > > - /* By default, core setup will leave the cx22702 out of reset, on the bus.
> > > + /* By default, core setup will leave the cx22702 out of reset,
> > > + * on the bus.
> > > * We left the hardware on power up with the cx22702 active.
> > > * We're being given access to re-arrange the GPIOs.
> > > * Take the bus off the cx22702 and put the cx23416 on it.
> >
> > Let first line with "/*" be empty :)
> >
> > > --- a/drivers/media/pci/cx88/cx88-core.c
> > > +++ b/drivers/media/pci/cx88/cx88-core.c
> >
> > > @@ -102,28 +104,29 @@ static __le32 *cx88_risc_field(__le32 *rp, struct scatterlist *sglist,
> > > sol = RISC_SOL | RISC_IRQ1 | RISC_CNT_INC;
> > > else
> > > sol = RISC_SOL;
> > > - if (bpl <= sg_dma_len(sg)-offset) {
> > > + if (bpl <= sg_dma_len(sg) - offset) {
> > > /* fits into current chunk */
> > > - *(rp++) = cpu_to_le32(RISC_WRITE|sol|RISC_EOL|bpl);
> > > - *(rp++) = cpu_to_le32(sg_dma_address(sg)+offset);
> > > + *(rp++) = cpu_to_le32(RISC_WRITE | sol |
> > > + RISC_EOL | bpl);
> > > + *(rp++) = cpu_to_le32(sg_dma_address(sg) + offset);
> > > offset += bpl;
> > > } else {
> > > /* scanline needs to be split */
> > > todo = bpl;
> > > - *(rp++) = cpu_to_le32(RISC_WRITE|sol|
> > > - (sg_dma_len(sg)-offset));
> > > - *(rp++) = cpu_to_le32(sg_dma_address(sg)+offset);
> > > - todo -= (sg_dma_len(sg)-offset);
> > > + *(rp++) = cpu_to_le32(RISC_WRITE | sol |
> > > + (sg_dma_len(sg) - offset));
> >
> > This is strange, but checkpatch --strict is really happy on this,
> > however there is a misalignment in added lines. Going to look into this
> > later.
> >
> > > --- a/drivers/media/pci/cx88/cx88-input.c
> > > +++ b/drivers/media/pci/cx88/cx88-input.c
> > > @@ -62,11 +62,15 @@ static int ir_debug;
> > > module_param(ir_debug, int, 0644); /* debug level [IR] */
> > > MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]");
> > >
> > > -#define ir_dprintk(fmt, arg...) if (ir_debug) \
> > > - printk(KERN_DEBUG "%s IR: " fmt, ir->core->name, ##arg)
> > > +#define ir_dprintk(fmt, arg...) do { \
> >
> > Backslash stands out.
>
> Sorry, but I didn't understand what you're meaning here.
>
> ...
> > Everything else seems fine.
>
> The other comments are OK. I'm sending a version 2 of this patch.
> To make easier to review, I'm enclosing the diff against version 1
> here.
I actually added two more hunks, removing FSF address and converting
the initial comment to the new format.
Thanks,
Mauro
prev parent reply other threads:[~2016-11-19 21:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-19 12:14 [PATCH] [media] cx88: make checkpatch.pl happy Mauro Carvalho Chehab
2016-11-19 19:58 ` Andrey Utkin
2016-11-19 21:18 ` Mauro Carvalho Chehab
2016-11-19 21:29 ` Mauro Carvalho Chehab [this message]
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=20161119192910.51183aa5@vento.lan \
--to=mchehab@infradead.org \
--cc=Julia.Lawall@lip6.fr \
--cc=akpm@linux-foundation.org \
--cc=andrey.utkin@corp.bluecherry.net \
--cc=andrey_utkin@fastmail.com \
--cc=elfring@users.sourceforge.net \
--cc=hans.verkuil@cisco.com \
--cc=jh1009.sung@samsung.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=nenggun.kim@samsung.com \
--cc=sean@mess.org \
--cc=sw0312.kim@samsung.com \
--cc=weiyongjun1@huawei.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.