From: joe@perches.com (Joe Perches)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 1/4] media: s5p-tv: Replace mxr_ macro by default dev_
Date: Mon, 23 Sep 2013 10:44:42 -0700 [thread overview]
Message-ID: <1379958282.3575.31.camel@joe-AO722> (raw)
In-Reply-To: <13162989.WhfDRzW6dg@amdc1032>
On Mon, 2013-09-23 at 17:48 +0200, Bartlomiej Zolnierkiewicz wrote:
> On Monday, September 23, 2013 04:50:01 PM Tomasz Stanislawski wrote:
> > May I ask what is the rationale for this patch?
> > To reduce a few lines of code?
> This patch makes source code more generic-like and easier to follow (mxd_r*
> macros currently only obfuscate the code and make them harder to read for
> everybody, maybe besides the original driver author ;). Removal of few
> superfluous lines of code is just a bonus.
I don't see any significant issue with this change.
Using generic mechanisms is good.
Few trivial nits:
I'd remove the trailing periods from some of the messages
at the same time.
Function tracing is better done by the function tracing
mechanism built in to the kernel. Removing the
dev_dbg(dev, "%s: enter\n", __func__)
lines would be good too.
Maybe look at the message levels of more of these
logging messages and determine which are actually
useful and what is mostly noise and should be dev_dbg
or deleted altogether.
> > > diff --git a/drivers/media/platform/s5p-tv/mixer_drv.c b/drivers/media/platform/s5p-tv/mixer_drv.c
> > > @@ -59,7 +59,7 @@ void mxr_streamer_get(struct mxr_device *mdev)
> > > {
> > > mutex_lock(&mdev->mutex);
> > > ++mdev->n_streamer;
> > > - mxr_dbg(mdev, "%s(%d)\n", __func__, mdev->n_streamer);
> > > + dev_dbg(mdev->dev, "%s(%d)\n", __func__, mdev->n_streamer);
not too useful
[]
> > > @@ -159,42 +159,42 @@ static int mxr_acquire_plat_resources(struct mxr_device *mdev,
> > >
> > > res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mxr");
> > > if (res == NULL) {
> > > - mxr_err(mdev, "get memory resource failed.\n");
> > > + dev_err(mdev->dev, "get memory resource failed.\n");
dev_err(mdev->dev, "get memory resource failed\n");
etc... because of:
> > > @@ -252,27 +252,27 @@ static int mxr_acquire_clocks(struct mxr_device *mdev)
> > >
> > > res->mixer = clk_get(dev, "mixer");
> > > if (IS_ERR(res->mixer)) {
> > > - mxr_err(mdev, "failed to get clock 'mixer'\n");
> > > + dev_err(mdev->dev, "failed to get clock 'mixer'\n");
Mixed use of messages with/without periods.
> > > @@ -295,13 +295,13 @@ static int mxr_acquire_resources(struct mxr_device *mdev,
> > > if (ret)
> > > goto fail_plat;
> > >
> > > - mxr_info(mdev, "resources acquired\n");
> > > + dev_info(mdev->dev, "resources acquired\n");
This isn't really a useful message so I'd convert it
to dev_dbg
> > > @@ -391,7 +391,6 @@ static int mxr_probe(struct platform_device *pdev)
> > > struct mxr_device *mdev;
> > > int ret;
> > >
> > > - /* mdev does not exist yet so no mxr_dbg is used */
> > > dev_info(dev, "probe start\n");
Same with a lot of these...
Maybe in a separate patch.
next prev parent reply other threads:[~2013-09-23 17:44 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-21 15:00 [PATCH v5 0/4] media: s5p-tv: clean-up and fixes Mateusz Krawczuk
2013-09-21 15:00 ` [PATCH v5 1/4] media: s5p-tv: Replace mxr_ macro by default dev_ Mateusz Krawczuk
2013-09-23 14:50 ` Tomasz Stanislawski
2013-09-23 15:48 ` Bartlomiej Zolnierkiewicz
2013-09-23 17:44 ` Joe Perches [this message]
2013-09-24 12:52 ` Tomasz Stanislawski
2013-09-24 15:35 ` Bartlomiej Zolnierkiewicz
2013-09-24 16:24 ` Joe Perches
2013-09-24 9:43 ` Tomasz Stanislawski
2013-09-24 10:33 ` Bartlomiej Zolnierkiewicz
2013-09-24 13:02 ` Mauro Carvalho Chehab
2013-09-21 15:00 ` [PATCH v5 2/4] media: s5p-tv: Restore vpll clock rate Mateusz Krawczuk
2013-09-25 15:46 ` Tomasz Stanislawski
2013-10-12 10:06 ` Sylwester Nawrocki
2013-09-21 15:00 ` [PATCH v5 3/4] media: s5p-tv: Fix sdo driver to work with CCF Mateusz Krawczuk
2013-09-25 15:59 ` Tomasz Stanislawski
2013-10-12 10:25 ` Sylwester Nawrocki
2013-09-21 15:00 ` [PATCH v5 4/4] media: s5p-tv: Fix mixer " Mateusz Krawczuk
2013-09-23 12:44 ` Sylwester Nawrocki
2013-09-25 16:10 ` Tomasz Stanislawski
2013-09-25 16:09 ` Tomasz Stanislawski
2013-10-12 10:27 ` Sylwester Nawrocki
2013-09-23 3:52 ` [PATCH v5 0/4] media: s5p-tv: clean-up and fixes Sachin Kamat
2013-09-23 12:26 ` Tomasz Figa
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=1379958282.3575.31.camel@joe-AO722 \
--to=joe@perches.com \
--cc=linux-arm-kernel@lists.infradead.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