From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754484AbbJ0TgB (ORCPT ); Tue, 27 Oct 2015 15:36:01 -0400 Received: from smtprelay0006.hostedemail.com ([216.40.44.6]:34329 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753202AbbJ0TgA (ORCPT ); Tue, 27 Oct 2015 15:36:00 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::,RULES_HIT:41:355:379:541:599:960:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3871:3874:4321:4605:5007:6119:6261:7903:8603:10004:10400:10848:11026:11232:11658:11914:12043:12296:12438:12517:12519:12740:13069:13180:13229:13311:13357:21080:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: drain45_51149506ac515 X-Filterd-Recvd-Size: 2304 Message-ID: <1445974556.2757.47.camel@perches.com> Subject: Re: [PATCH 1/3] megaraid_sas: Convert dev_printk to dev_ From: Joe Perches To: Weidong Wang Cc: kashyap.desai@avagotech.com, sumit.saxena@avagotech.com, uday.lingala@avagotech.com, JBottomley@odin.com, megaraidlinux.pdl@avagotech.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 27 Oct 2015 12:35:56 -0700 In-Reply-To: <1445934375-17784-2-git-send-email-wangweidong1@huawei.com> References: <1445934375-17784-1-git-send-email-wangweidong1@huawei.com> <1445934375-17784-2-git-send-email-wangweidong1@huawei.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2015-10-27 at 16:26 +0800, Weidong Wang wrote: > Reduce object size a little by using dev_ > calls instead of dev_printk(KERN_. This is also not the same output. dev_printk(KERN_DEBUG vs dev_dbg has the same behavior as printk(KERN_DEBUG vs pr_debug > diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c [] > @@ -1884,7 +1884,7 @@ static int megasas_get_ld_vf_affiliation_111(struct megasas_instance *instance, > cmd = megasas_get_cmd(instance); > > if (!cmd) { > - dev_printk(KERN_DEBUG, &instance->pdev->dev, "megasas_get_ld_vf_affiliation_111:" > + dev_dbg(&instance->pdev->dev, "megasas_get_ld_vf_affiliation_111:" > "Failed to get cmd for scsi%d\n", > instance->host->host_no); > return -ENOMEM; [] > @@ -5243,7 +5243,7 @@ static int megasas_probe_one(struct pci_dev *pdev, > &instance->consumer_h); > > if (!instance->producer || !instance->consumer) { > - dev_printk(KERN_DEBUG, &pdev->dev, "Failed to allocate" > + dev_dbg(&pdev->dev, "Failed to allocate" > "memory for producer, consumer\n"); Note the lack of a space between coalesced string segment words. That's one of the reasons to coalesce them.