From: Antti Palosaari <crope@iki.fi>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Linux Media Mailing List <linux-media@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
Hans Verkuil <hans.verkuil@cisco.com>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Ramakrishnan Muthukrishnan <ramakrmu@cisco.com>,
Takashi Iwai <tiwai@suse.de>,
Matthias Schwarzott <zzam@gentoo.org>,
Peter Senna Tschudin <peter.senna@gmail.com>
Subject: Re: [PATCH 3/7] [media] cx231xx: Cleanup printk at the driver
Date: Sat, 01 Nov 2014 16:01:12 +0200 [thread overview]
Message-ID: <5454E7A8.40707@iki.fi> (raw)
In-Reply-To: <c347502e632c69c80dcf5d4df1396cb59973af2f.1414849031.git.mchehab@osg.samsung.com>
On 11/01/2014 03:38 PM, Mauro Carvalho Chehab wrote:
> There are lots of debug printks printed with pr_info. Also, the
> printk's data are not too coherent:
>
> - there are duplicated driver name at the print format;
> - function name format string differs from function to function;
> - long strings broken into multiple lines;
> - some printks just produce ugly reports, being almost useless
> as-is.
>
> Do a cleanup on that.
>
> Still, there are much to be done in order to do a better printk
> job on this driver, but, at least it will now be a way less
> verbose, if debug printks are disabled, and some logs might
> actually be useful.
As you do that kind of cleanup, why don't just use a bit more time and
do it properly using dev_foo() logging. Basically all device drivers
should use dev_foo() logging, it prints module name, bus number etc.
automatically in a standard manner. pr_foo() is worse, which should be
only used for cases where pointer to device is not available (like library).
regards
Antti
--
http://palosaari.fi/
next prev parent reply other threads:[~2014-11-01 14:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1414849139-29609-1-git-send-email-mchehab@osg.samsung.com>
[not found] ` <cover.1414849031.git.mchehab@osg.samsung.com>
2014-11-01 13:38 ` [PATCH 1/7] [media] cx231xx: get rid of driver-defined printk macros Mauro Carvalho Chehab
2014-11-01 13:38 ` [PATCH 2/7] [media] cx231xx: Fix identation Mauro Carvalho Chehab
2014-11-01 13:38 ` [PATCH 3/7] [media] cx231xx: Cleanup printk at the driver Mauro Carvalho Chehab
2014-11-01 14:01 ` Antti Palosaari [this message]
2014-11-01 14:08 ` Mauro Carvalho Chehab
2014-11-02 11:46 ` Mauro Carvalho Chehab
2014-11-01 13:38 ` [PATCH 4/7] [media] cx25840: Don't report an error if max size is adjusted Mauro Carvalho Chehab
2014-11-01 13:38 ` [PATCH 5/7] [media] cx25840: convert max_buf_size var to lowercase Mauro Carvalho Chehab
2014-11-01 13:38 ` [PATCH 6/7] [media] cx231xx-i2c: fix i2c_scan modprobe parameter Mauro Carvalho Chehab
2014-11-01 16:46 ` Matthias Schwarzott
2014-11-01 20:19 ` [PATCH] cx231xx: use 1 byte read for i2c scan Matthias Schwarzott
2014-11-02 1:24 ` [PATCH 6/7] [media] cx231xx-i2c: fix i2c_scan modprobe parameter Mauro Carvalho Chehab
2014-11-01 13:38 ` [PATCH 7/7] [media] cx231xx: disable I2C errors during i2c_scan 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=5454E7A8.40707@iki.fi \
--to=crope@iki.fi \
--cc=hans.verkuil@cisco.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=mchehab@osg.samsung.com \
--cc=peter.senna@gmail.com \
--cc=ramakrmu@cisco.com \
--cc=sakari.ailus@linux.intel.com \
--cc=tiwai@suse.de \
--cc=zzam@gentoo.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 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.