linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Geordan Neukum <gneukum1@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] staging: kpc2000: kpc_i2c: use %s with __func__ identifier in log messages
Date: Fri, 17 May 2019 19:58:19 -0700	[thread overview]
Message-ID: <9e30f140e314f03057a2941f4d091d8965391c17.camel@perches.com> (raw)
In-Reply-To: <ffd66b415e67f6b03483a6ee57b7b3dc0bab388f.1558146549.git.gneukum1@gmail.com>

On Sat, 2019-05-18 at 02:29 +0000, Geordan Neukum wrote:
> Throughout i2c_driver.c, there are instances where the log strings
> contain the function's name hardcoded into the string. Instead, use the
> printk conversion specifier '%s' with the __func__ preprocessor
> identifier to more maintainably print the function's name.

Might as well remove all of these and use the
builtin ftrace function tracing mechanism instead.

> diff --git a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c b/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c
[]
> @@ -142,7 +142,7 @@ static int i801_check_pre(struct i2c_device *priv)
>  {
>  	int status;
>  
> -	dev_dbg(&priv->adapter.dev, "i801_check_pre\n");
> +	dev_dbg(&priv->adapter.dev, "%s\n", __func__);

etc...


  reply	other threads:[~2019-05-18  2:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-18  2:29 [PATCH 0/5] Updates to staging driver: kpc_i2c Geordan Neukum
2019-05-18  2:29 ` [PATCH 1/5] staging: kpc2000: kpc_i2c: reindent i2c_driver.c Geordan Neukum
2019-05-18  2:29 ` [PATCH 2/5] staging: kpc2000: kpc_i2c: reformat copyright for better readability Geordan Neukum
2019-05-18  2:29 ` [PATCH 3/5] staging: kpc2000: kpc_i2c: prevent memory leak in probe() error case Geordan Neukum
2019-05-18  2:29 ` [PATCH 4/5] staging: kpc2000: kpc_i2c: use %s with __func__ identifier in log messages Geordan Neukum
2019-05-18  2:58   ` Joe Perches [this message]
2019-05-18  3:28     ` Geordan Neukum
2019-05-18  2:30 ` [PATCH 5/5] staging: kpc2000: kpc_i2c: fixup block comment style in i2c_driver.c Geordan Neukum
2019-05-20  8:30 ` [PATCH 0/5] Updates to staging driver: kpc_i2c Greg Kroah-Hartman
2019-05-21  8:15   ` Geordan Neukum
2019-05-21  8:34     ` Geordan Neukum
2019-05-21  8:37     ` Greg Kroah-Hartman

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=9e30f140e314f03057a2941f4d091d8965391c17.camel@perches.com \
    --to=joe@perches.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gneukum1@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).