From patchwork Tue Oct 27 08:26:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangweidong X-Patchwork-Id: 7494531 Return-Path: X-Original-To: patchwork-linux-scsi@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 F3C02BEEA4 for ; Tue, 27 Oct 2015 08:27:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 28A382086C for ; Tue, 27 Oct 2015 08:27:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 422D7205B6 for ; Tue, 27 Oct 2015 08:27:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932229AbbJ0I1V (ORCPT ); Tue, 27 Oct 2015 04:27:21 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:17886 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752375AbbJ0I1T (ORCPT ); Tue, 27 Oct 2015 04:27:19 -0400 Received: from 172.24.1.51 (EHLO SZXEML429-HUB.china.huawei.com) ([172.24.1.51]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BPU06358; Tue, 27 Oct 2015 16:27:13 +0800 (CST) Received: from localhost (10.177.21.100) by SZXEML429-HUB.china.huawei.com (10.82.67.184) with Microsoft SMTP Server id 14.3.235.1; Tue, 27 Oct 2015 16:26:16 +0800 From: Weidong Wang To: , , , CC: , , , Subject: [PATCH 2/3] megaraid_sas: Convert printk to printk_ Date: Tue, 27 Oct 2015 16:26:14 +0800 Message-ID: <1445934375-17784-3-git-send-email-wangweidong1@huawei.com> X-Mailer: git-send-email 1.8.1.msysgit.1 In-Reply-To: <1445934375-17784-1-git-send-email-wangweidong1@huawei.com> References: <1445934375-17784-1-git-send-email-wangweidong1@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.21.100] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.562F3562.002B, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 4712e4a2d891774e0de6601161be8796 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Reduce object size a little by using pr_ calls instead of printk(KERN_. Signed-off-by: Weidong Wang Reviewed-by: Johannes Thumshirn --- drivers/scsi/megaraid/megaraid_sas_base.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index ed9846d..2287aa1 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -5889,7 +5889,7 @@ static int megasas_mgmt_fasync(int fd, struct file *filep, int mode) return 0; } - printk(KERN_DEBUG "megasas: fasync_helper failed [%d]\n", rc); + pr_debug("megasas: fasync_helper failed [%d]\n", rc); return rc; } @@ -6233,7 +6233,7 @@ static int megasas_mgmt_ioctl_aen(struct file *file, unsigned long arg) u32 wait_time = MEGASAS_RESET_WAIT_TIME; if (file->private_data != file) { - printk(KERN_DEBUG "megasas: fasync_helper was not " + pr_debug("megasas: fasync_helper was not " "called first\n"); return -EINVAL; } @@ -6355,7 +6355,7 @@ static int megasas_mgmt_compat_ioctl_fw(struct file *file, unsigned long arg) if (copy_in_user(&cioc->frame.hdr.cmd_status, &ioc->frame.hdr.cmd_status, sizeof(u8))) { - printk(KERN_DEBUG "megasas: error copy_in_user cmd_status\n"); + pr_debug("megasas: error copy_in_user cmd_status\n"); return -EFAULT; } return error; @@ -6455,7 +6455,7 @@ megasas_sysfs_set_dbg_lvl(struct device_driver *dd, const char *buf, size_t coun int retval = count; if (sscanf(buf, "%u", &megasas_dbg_lvl) < 1) { - printk(KERN_ERR "megasas: could not set dbg_lvl\n"); + pr_err("megasas: could not set dbg_lvl\n"); retval = -EINVAL; } return retval; @@ -6480,7 +6480,7 @@ megasas_aen_polling(struct work_struct *work) int error; if (!instance) { - printk(KERN_ERR "invalid instance!\n"); + pr_err("invalid instance!\n"); kfree(ev); return; } @@ -6740,7 +6740,7 @@ static int __init megasas_init(void) rval = register_chrdev(0, "megaraid_sas_ioctl", &megasas_mgmt_fops); if (rval < 0) { - printk(KERN_DEBUG "megasas: failed to open device node\n"); + pr_debug("megasas: failed to open device node\n"); return rval; } @@ -6752,7 +6752,7 @@ static int __init megasas_init(void) rval = pci_register_driver(&megasas_pci_driver); if (rval) { - printk(KERN_DEBUG "megasas: PCI hotplug registration failed \n"); + pr_debug("megasas: PCI hotplug registration failed \n"); goto err_pcidrv; }