From patchwork Thu Dec 3 12:59:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 7759741 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 76E8EBEEE1 for ; Thu, 3 Dec 2015 13:01:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A3F1F205B7 for ; Thu, 3 Dec 2015 13:01:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5CB642058C for ; Thu, 3 Dec 2015 13:01:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757539AbbLCNBK (ORCPT ); Thu, 3 Dec 2015 08:01:10 -0500 Received: from mail-pa0-f53.google.com ([209.85.220.53]:36216 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760092AbbLCNAS (ORCPT ); Thu, 3 Dec 2015 08:00:18 -0500 Received: by pacdm15 with SMTP id dm15so68851976pac.3; Thu, 03 Dec 2015 05:00:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=udCW3a4swW4MXRokPAFnQ1ww6aTSyvJAluX4NYh6SOc=; b=EUXlX4eGZH3DYLmUyBXxKCMsrzPQW5ok6ptdiuyOaVVjzOI34zkZB/7+CFx5Pr+wvq +UvbSMKpMmA9jgQkNwAOgavK+i/IHM/4/m47D+4yjBL1PVkNmSDs/JUxQTLItjM/ggzu FhGjVB6ULryD4qpBYEZf5+wZ2IYwl3e+zvtCdReNLxgDnXSngx09/aNdscAH90G//mej ZalUiNbBOiErW0QuUi7iPRdXlHZGt4wP845pLZrkZXh6e2gWs8ufNMM5Mlw7Xc5++dW+ 1TNPR8zrKi3Zegmas2OBTXTGP5ZU6naCiRJ36pS4b6L6+yM34yovh8QBPbttjQWfU93t iQ1Q== X-Received: by 10.66.160.70 with SMTP id xi6mr12804542pab.54.1449147617859; Thu, 03 Dec 2015 05:00:17 -0800 (PST) Received: from sudip-pc.vectortproxy.org ([49.206.241.12]) by smtp.gmail.com with ESMTPSA id 82sm10717689pfn.76.2015.12.03.05.00.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Dec 2015 05:00:17 -0800 (PST) From: Sudip Mukherjee To: Mark Brown Cc: linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Sudip Mukherjee Subject: [PATCH 6/7] spi: lm70llp: remove printk Date: Thu, 3 Dec 2015 18:29:58 +0530 Message-Id: <1449147599-26705-6-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1449147599-26705-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1449147599-26705-1-git-send-email-sudipm.mukherjee@gmail.com> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/spi/spi-lm70llp.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-lm70llp.c b/drivers/spi/spi-lm70llp.c index 62d0f6d..39cf5dc 100644 --- a/drivers/spi/spi-lm70llp.c +++ b/drivers/spi/spi-lm70llp.c @@ -13,6 +13,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include #include @@ -199,9 +200,7 @@ static void spi_lm70llp_attach(struct parport *p) int status; if (lm70llp) { - printk(KERN_WARNING - "%s: spi_lm70llp instance already loaded. Aborting.\n", - DRVNAME); + pr_warn("spi_lm70llp instance already loaded. Aborting.\n"); return; } @@ -246,9 +245,7 @@ static void spi_lm70llp_attach(struct parport *p) */ status = spi_bitbang_start(&pp->bitbang); if (status < 0) { - printk(KERN_WARNING - "%s: spi_bitbang_start failed with status %d\n", - DRVNAME, status); + pr_warn("spi_bitbang_start failed with status %d\n", status); goto out_off_and_release; } @@ -275,7 +272,7 @@ static void spi_lm70llp_attach(struct parport *p) dev_dbg(&pp->spidev_lm70->dev, "spidev_lm70 at %s\n", dev_name(&pp->spidev_lm70->dev)); else { - printk(KERN_WARNING "%s: spi_new_device failed\n", DRVNAME); + pr_warn("spi_new_device failed\n"); status = -ENODEV; goto out_bitbang_stop; } @@ -296,7 +293,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)