From patchwork Thu Nov 8 19:54:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Toshiaki Yamane X-Patchwork-Id: 1717331 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 1AB96DF280 for ; Thu, 8 Nov 2012 19:54:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756723Ab2KHTyZ (ORCPT ); Thu, 8 Nov 2012 14:54:25 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:38724 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756783Ab2KHTyW (ORCPT ); Thu, 8 Nov 2012 14:54:22 -0500 Received: by mail-pa0-f46.google.com with SMTP id hz1so2226108pad.19 for ; Thu, 08 Nov 2012 11:54:21 -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:x-mailer; bh=DLXJejf2CHWDf9f8ilz6/BTPW9jQ/gRFg8BFFEk9wmY=; b=mZ791DQccP2HdPA53U7IpDPzk3nOf95+crsTW8Ulebi35pOBLSvFhIcQg5r+olbAkq vC6PpytsLRIvGnp/WtS3o/1qzOGVY7FZ1YavoHc1vFqBAs/axaCojPfnPTfSA25BDZpJ u3h42m9QvJ1oWg+uzgiVnSSIUB2y6ikRS2Dlo4vKiq9PNC8wRAD1rAOp+Pskyh05Gcsb VgdUDWs4YFADUdq2crUzUB6KU7u8Ur0oZtVsoDIKZhGQu5AgaJ3ioZf0EL61LlfBls/w o3deAuzoPGkMMmA+oTpt1QxN6IlyC9Dkahk/lYntAfkXb8GB6Y4Q3270LyYWCZIhe3pj +TQw== Received: by 10.69.1.35 with SMTP id bd3mr12299115pbd.141.1352404461778; Thu, 08 Nov 2012 11:54:21 -0800 (PST) Received: from localhost (softbank220057059032.bbtec.net. [220.57.59.32]) by mx.google.com with ESMTPS id ru4sm16394727pbc.25.2012.11.08.11.54.17 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 08 Nov 2012 11:54:21 -0800 (PST) From: YAMANE Toshiaki To: Jarod Wilson , Mauro Carvalho Chehab Cc: Greg Kroah-Hartman , Ben Hutchings , Sean Young , Rusty Russell , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, YAMANE Toshiaki Subject: [PATCH] staging/media: Use pr_ printks in lirc/lirc_bt829.c Date: Fri, 9 Nov 2012 04:54:09 +0900 Message-Id: <1352404449-7666-1-git-send-email-yamanetoshi@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org fixed below checkpatch warnings. - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... - WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... and add pr_fmt. Signed-off-by: YAMANE Toshiaki --- drivers/staging/media/lirc/lirc_bt829.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_bt829.c b/drivers/staging/media/lirc/lirc_bt829.c index 951007a..4a3b1f5 100644 --- a/drivers/staging/media/lirc/lirc_bt829.c +++ b/drivers/staging/media/lirc/lirc_bt829.c @@ -18,6 +18,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -72,20 +74,19 @@ static struct pci_dev *do_pci_probe(void) my_dev = pci_get_device(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_264VT, NULL); if (my_dev) { - printk(KERN_ERR DRIVER_NAME ": Using device: %s\n", - pci_name(my_dev)); + pr_err("Using device: %s\n", pci_name(my_dev)); pci_addr_phys = 0; if (my_dev->resource[0].flags & IORESOURCE_MEM) { pci_addr_phys = my_dev->resource[0].start; - printk(KERN_INFO DRIVER_NAME ": memory at 0x%08X\n", + pr_info("memory at 0x%08X\n", (unsigned int)pci_addr_phys); } if (pci_addr_phys == 0) { - printk(KERN_ERR DRIVER_NAME ": no memory resource ?\n"); + pr_err("no memory resource ?\n"); return NULL; } } else { - printk(KERN_ERR DRIVER_NAME ": pci_probe failed\n"); + pr_err("pci_probe failed\n"); return NULL; } return my_dev; @@ -140,7 +141,7 @@ int init_module(void) atir_minor = lirc_register_driver(&atir_driver); if (atir_minor < 0) { - printk(KERN_ERR DRIVER_NAME ": failed to register driver!\n"); + pr_err("failed to register driver!\n"); return atir_minor; } dprintk("driver is registered on minor %d\n", atir_minor); @@ -159,7 +160,7 @@ static int atir_init_start(void) { pci_addr_lin = ioremap(pci_addr_phys + DATA_PCI_OFF, 0x400); if (pci_addr_lin == 0) { - printk(KERN_INFO DRIVER_NAME ": pci mem must be mapped\n"); + pr_info("pci mem must be mapped\n"); return 0; } return 1;