From patchwork Mon Dec 7 10:47:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 7781881 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B4F549F350 for ; Mon, 7 Dec 2015 10:48:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D9E9B20392 for ; Mon, 7 Dec 2015 10:48:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D017A2041A for ; Mon, 7 Dec 2015 10:48:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755389AbbLGKsd (ORCPT ); Mon, 7 Dec 2015 05:48:33 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:35420 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755462AbbLGKsC (ORCPT ); Mon, 7 Dec 2015 05:48:02 -0500 Received: by pacej9 with SMTP id ej9so123532685pac.2; Mon, 07 Dec 2015 02:48:01 -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=F0DRB7guJpUYRM0ir8vOuyuuhSE8y0N+231uFCoTHNk=; b=EBV6c+tUQfpesiZRLOk5w++w3Ze+gPzStgsk6L43ZN3tCxiAciwJLl8vaMmnrPqFUV XOtBStYtjqD6l3gwW1B4ynJvn6sY/gAstUerdMU3U6Dzr4AEdh1dA3USXe2uv+mW4tj+ HDg2ul5h0DOqdW2aj7poZyS4FHePno/Xe5qBkITszEGowhgFPz6oivWysadVbwjedjZc 8TsSNh4A2THmkTlxxTl8UDwyS98C2jn3hvDZx2mKFdMwbIXFnhk6+AvCs52weQjgC67D JHP6HeefcXh/r3EOalHfrBXxqyOOZFuhMUgdRpt3fVjJNmCnjjJECZCAVBhg/WiJ6Rma k7og== X-Received: by 10.66.232.170 with SMTP id tp10mr42357954pac.38.1449485281363; Mon, 07 Dec 2015 02:48:01 -0800 (PST) Received: from sudip-pc.vectortproxy.org ([122.169.145.251]) by smtp.gmail.com with ESMTPSA id 6sm33768892pfm.58.2015.12.07.02.47.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Dec 2015 02:48:00 -0800 (PST) From: Sudip Mukherjee To: Mark Brown Cc: linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Sudip Mukherjee Subject: [PATCH v2 8/8] spi: lm70llp: remove printk Date: Mon, 7 Dec 2015 16:17:35 +0530 Message-Id: <1449485255-1103-8-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1449485255-1103-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1449485255-1103-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=ham 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 | 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 #include #include @@ -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)