mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Tomas Winkler <tomas.winkler@intel.com>
Cc: gregkh@linuxfoundation.org, arnd@arndb.de, linux-kernel@vger.kernel.org
Subject: Re: [char-misc-next 2/5] mei: use cl_dbg where appropriate
Date: Sun, 16 Mar 2014 09:36:21 -0700	[thread overview]
Message-ID: <1394987781.5689.23.camel@joe-AO722> (raw)
In-Reply-To: <1394973358-21690-3-git-send-email-tomas.winkler@intel.com>

On Sun, 2014-03-16 at 14:35 +0200, Tomas Winkler wrote:
> use cl_dbg for debug log messages in cl context

I think all the uses of cl_dbg and cl_err are odd.

from: client.h

#define cl_dbg(dev, cl, format, arg...) \
	dev_dbg(&(dev)->pdev->dev, MEI_CL_FMT format, MEI_CL_PRM(cl), ##arg)

#define cl_err(dev, cl, format, arg...) \
	dev_err(&(dev)->pdev->dev, MEI_CL_FMT format, MEI_CL_PRM(cl), ##arg)

dev is always passed separately from cl but
dev is set like:

	struct mei_device *dev;
[]
	dev = cl->dev;

So I think these should be converted to:

#define cl_dbg(cl, format, ...) \
	dev_dbg(&(cl)->dev)->pdev->dev, MEI_CL_FMT format, MEI_CL_PRM(cl), ##__VA_ARGS__)

and the uses from (as an example):

client.c:942:			cl_dbg(dev, cl, "Waking up reading client!\n");

to

client.c:942:			cl_dbg(cl, "Waking up reading client!\n");

This can also remove some used once declarations of dev


  reply	other threads:[~2014-03-16 16:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-16 12:35 [char-misc-next 0/5] mei: cleanup some checkpatch issues Tomas Winkler
2014-03-16 12:35 ` [char-misc-next 1/5] mei: fix Unnecessary space after function pointer name Tomas Winkler
2014-03-16 12:35 ` [char-misc-next 2/5] mei: use cl_dbg where appropriate Tomas Winkler
2014-03-16 16:36   ` Joe Perches [this message]
2014-03-16 22:19     ` Winkler, Tomas
2014-03-16 23:09       ` Joe Perches
2014-03-16 12:35 ` [char-misc-next 3/5] mei: client.h fix checkpetch errors Tomas Winkler
2014-03-16 12:35 ` [char-misc-next 4/5] mei: amthif: fix checkpatch error Tomas Winkler
2014-03-16 12:35 ` [char-misc-next 5/5] mei: don't use deprecated DEFINE_PCI_DEVICE_TABLE macro Tomas Winkler

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=1394987781.5689.23.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tomas.winkler@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®