linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: [PATCH v2 8/8] spi: lm70llp: remove printk
Date: Mon,  7 Dec 2015 16:17:35 +0530	[thread overview]
Message-ID: <1449485255-1103-8-git-send-email-sudipm.mukherjee@gmail.com> (raw)
In-Reply-To: <1449485255-1103-1-git-send-email-sudipm.mukherjee@gmail.com>

Using pr_* macros are more prefferable than using printk. Start using
pr_* family of macros and define pr_fmt to be used with it.
While at it remove DRVNAME from an existing pr_info() as the name is now
being printed by pr_fmt.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/spi/spi-lm70llp.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi-lm70llp.c b/drivers/spi/spi-lm70llp.c
index 393eb2b..8fe83d0 100644
--- a/drivers/spi/spi-lm70llp.c
+++ b/drivers/spi/spi-lm70llp.c
@@ -14,6 +14,8 @@
  * GNU General Public License for more details.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
@@ -200,9 +202,7 @@ static void spi_lm70llp_attach(struct parport *p)
 	struct pardev_cb        lm70llp_cb;
 
 	if (lm70llp) {
-		printk(KERN_WARNING
-			"%s: spi_lm70llp instance already loaded. Aborting.\n",
-			DRVNAME);
+		pr_warn("spi_lm70llp instance already loaded. Aborting.\n");
 		return;
 	}
 
@@ -298,7 +298,7 @@ out_parport_unreg:
 out_free_master:
 	spi_master_put(master);
 out_fail:
-	pr_info("%s: spi_lm70llp probe fail, status %d\n", DRVNAME, status);
+	pr_info("spi_lm70llp probe fail, status %d\n", status);
 }
 
 static void spi_lm70llp_detach(struct parport *p)
-- 
1.9.1


  parent reply	other threads:[~2015-12-07 10:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-07 10:47 [PATCH v2 1/8] spi: lm70llp: remove multiple blank lines Sudip Mukherjee
2015-12-07 10:47 ` [PATCH v2 2/8] spi: lm70llp: add blank line after declaration Sudip Mukherjee
2015-12-07 10:47 ` [PATCH v2 3/8] spi: lm70llp: remove cast to void Sudip Mukherjee
2015-12-07 10:47 ` [PATCH v2 4/8] spi: lm70llp: correct alignment Sudip Mukherjee
2015-12-07 10:47 ` [PATCH v2 5/8] spi: lm70llp: remove space Sudip Mukherjee
2015-12-07 10:47 ` [PATCH v2 6/8] spi: lm70llp: use new parport device model Sudip Mukherjee
2015-12-07 10:47 ` [PATCH v2 7/8] spi: lm70llp: use dev_warn Sudip Mukherjee
2015-12-07 10:47 ` Sudip Mukherjee [this message]
2015-12-07 20:07 ` [PATCH v2 1/8] spi: lm70llp: remove multiple blank lines Mark Brown
2015-12-08  4:33   ` Sudip Mukherjee
2015-12-08 12:49     ` Mark Brown
2015-12-08 14:30       ` Sudip Mukherjee

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=1449485255-1103-8-git-send-email-sudipm.mukherjee@gmail.com \
    --to=sudipm.mukherjee@gmail.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@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).