All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Andrey Utkin <andrey_utkin@fastmail.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Andrey Utkin <andrey.utkin@corp.bluecherry.net>,
	Arnd Bergmann <arnd@arndb.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Julia Lawall <Julia.Lawall@lip6.fr>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Junghak Sung <jh1009.sung@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Inki Dae <inki.dae@samsung.com>,
	Wei Yongjun <weiyongjun1@huawei.com>, Sean Young <sean@mess.org>
Subject: Re: [PATCH 08/35] [media] cx88: convert it to use pr_foo() macros
Date: Sat, 19 Nov 2016 10:16:09 -0200	[thread overview]
Message-ID: <20161119101609.4543eac6@vento.lan> (raw)
In-Reply-To: <20161118222742.GG26324@dell-m4800.home>

Em Fri, 18 Nov 2016 22:27:42 +0000
Andrey Utkin <andrey_utkin@fastmail.com> escreveu:

> On Wed, Nov 16, 2016 at 02:42:40PM -0200, Mauro Carvalho Chehab wrote:
> > From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> > 
> > Instead of calling printk() directly, use pr_foo()
> > macros, as suggested at the Kernel's coding style.
> > 
> > Please notice that a conversion to dev_foo() is not trivial,
> > as several parts on this driver uses pr_cont().  
> 
> Haven't followed closely the current discussion about line continuation,
> so commenting on logical part is not up to me, at last I don't see
> anything weird. So I will be an alignment-proofreading monkey :)
> 
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>  
> 
> Reviewed-by: Andrey Utkin <andrey_utkin@fastmail.com>
> 
> > --- a/drivers/media/pci/cx88/cx88-cards.c
> > +++ b/drivers/media/pci/cx88/cx88-cards.c  
> 
> > @@ -3646,8 +3626,8 @@ static int cx88_pci_quirks(const char *name, struct pci_dev *pci)
> >  		pci_write_config_byte(pci, CX88X_DEVCTRL, value);
> >  	}
> >  	if (UNSET != lat) {
> > -		printk(KERN_INFO "%s: setting pci latency timer to %d\n",
> > -		       name, latency);
> > +		pr_info("setting pci latency timer to %d\n",
> > +			latency);  
> 
> Can fit single line.
> This wasn't handled by checkpatch in next patch, so manual fix would be
> nice.
> 
> > --- a/drivers/media/pci/cx88/cx88-core.c
> > +++ b/drivers/media/pci/cx88/cx88-core.c  
> 
> > @@ -60,10 +61,15 @@ static unsigned int nocomb;
> >  module_param(nocomb,int,0644);
> >  MODULE_PARM_DESC(nocomb,"disable comb filter");
> >  
> > -#define dprintk(level,fmt, arg...)	do {				\
> > -	if (cx88_core_debug >= level)					\
> > -		printk(KERN_DEBUG "%s: " fmt, core->name , ## arg);	\
> > -	} while(0)
> > +#define dprintk0(fmt, arg...)				\
> > +	printk(KERN_DEBUG pr_fmt("%s: core:" fmt),	\
> > +		__func__, ##arg)			\
> > +  
> 
> Could fit single line
> 
> > @@ -399,12 +405,12 @@ static int cx88_risc_decode(u32 risc)
> >  	};
> >  	int i;
> >  
> > -	printk(KERN_DEBUG "0x%08x [ %s", risc,
> > +	dprintk0("0x%08x [ %s", risc,
> >  	       instr[risc >> 28] ? instr[risc >> 28] : "INVALID");  
> 
> Alignment got broken here and in quite some similar places :(
> And checkpatch hasn't gone after it. What if you run it with --strict
> --fix-inplace to make it check brace alignment and fix it at once?

Ok, I ran with --strict, with solved some other issues, but caused
others ;)

Anyway, fixed the remaining issues by hand, and made sure that
checkpatch (on non-strict mode) would make sense. Patch sent.

Please review.

Thanks,
Mauro

  reply	other threads:[~2016-11-19 12:16 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16 16:42 [PATCH 00/35] Some printk fixups and improvements Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 01/35] [media] stb0899_drv: get rid of continuation lines Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 02/35] [media] stv090x: " Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 03/35] [media] bt8xx/dst: use a more standard way to print messages Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 04/35] [media] bt8xx: use pr_foo() macros instead of printk() Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 05/35] [media] cx23885: use KERN_CONT where needed Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 06/35] [media] cx23885: convert it to use pr_foo() macros Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 07/35] [media] cx88: use KERN_CONT where needed Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 08/35] [media] cx88: convert it to use pr_foo() macros Mauro Carvalho Chehab
2016-11-18 22:27   ` Andrey Utkin
2016-11-19 12:16     ` Mauro Carvalho Chehab [this message]
2016-11-16 16:42 ` [PATCH 09/35] [media] cx88: make checkpatch happier Mauro Carvalho Chehab
2016-11-18 22:25   ` Andrey Utkin
2016-11-19 12:14     ` Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 10/35] [media] pluto2: use KERN_CONT where needed Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 11/35] [media] zoran: " Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 12/35] [media] wl128x: use KERNEL_CONT " Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 13/35] [media] pvrusb2: " Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 14/35] [media] ttusb_dec: " Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 15/35] [media] ttpci: cleanup debug macros and remove dead code Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 16/35] [media] dib0070: use pr_foo() instead of printk() Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 17/35] [media] dib0090: " Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 18/35] [media] dib3000mb: " Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 19/35] [media] dib3000mc: " Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 20/35] [media] dib7000m: " Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 21/35] [media] dib7000p: " Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 22/35] [media] dib8000: " Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 23/35] [media] dib9000: " Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 24/35] [media] dibx000_common: " Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 25/35] [media] af9005: remove a printk that would require a KERN_CONT Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 26/35] [media] tuner-core: use pr_foo, instead of internal printk macros Mauro Carvalho Chehab
2016-11-16 16:42 ` [PATCH 27/35] [media] v4l2-common: add a debug macro to be used with dev_foo() Mauro Carvalho Chehab
2016-11-16 16:43 ` [PATCH 28/35] [media] msp3400-driver: don't use KERN_CONT Mauro Carvalho Chehab
2016-11-16 16:43 ` [PATCH 29/35] [media] msp3400: convert it to use dev_foo() macros Mauro Carvalho Chehab
2016-11-16 16:43 ` [PATCH 30/35] [media] em28xx: convert it from pr_foo() to dev_foo() Mauro Carvalho Chehab
2016-11-16 16:43 ` [PATCH 31/35] [media] tvp5150: convert it to use dev_foo() macros Mauro Carvalho Chehab
2016-11-16 16:43 ` [PATCH 32/35] [media] tvp5150: Get rid of direct calls to printk() Mauro Carvalho Chehab
2016-11-16 16:43 ` [PATCH 33/35] [media] tvp5150: get rid of KERN_CONT Mauro Carvalho Chehab
2016-11-16 16:43 ` [PATCH 34/35] [media] rc-main: use pr_foo() macros Mauro Carvalho Chehab
2016-11-16 16:43 ` [PATCH 35/35] [media] tveeprom: print log messages using pr_foo() Mauro Carvalho Chehab

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=20161119101609.4543eac6@vento.lan \
    --to=mchehab@s-opensource.com \
    --cc=Julia.Lawall@lip6.fr \
    --cc=akpm@linux-foundation.org \
    --cc=andrey.utkin@corp.bluecherry.net \
    --cc=andrey_utkin@fastmail.com \
    --cc=arnd@arndb.de \
    --cc=hans.verkuil@cisco.com \
    --cc=inki.dae@samsung.com \
    --cc=jh1009.sung@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mchehab@kernel.org \
    --cc=mchehab@osg.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.