From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753334AbcHQD7a (ORCPT ); Tue, 16 Aug 2016 23:59:30 -0400 Received: from smtprelay0016.hostedemail.com ([216.40.44.16]:44415 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751268AbcHQD73 (ORCPT ); Tue, 16 Aug 2016 23:59:29 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1535:1543:1593:1594:1605:1711:1730:1747:1777:1792:2194:2199:2393:2551:2553:2559:2562:2692:2693:2828:3138:3139:3140:3141:3142:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4321:4552:5007:6248:6691:7576:7903:7904:8660:9545:10004:10400:10848:11026:11232:11473:11658:11783:11914:12043:12048:12050:12296:12517:12519:12555:12740:13095:13148:13161:13229:13230:13436:13439:13868:13894:14181:14659:14721:21063:21080:21324:21433:21451:30012:30022:30054:30063:30064:30070:30090: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: bead16_3543246b21f31 X-Filterd-Recvd-Size: 5145 Message-ID: <1471406364.4075.200.camel@perches.com> Subject: Re: [PATCH] be2iscsi: Use a more current logging style From: Joe Perches To: Jitendra Bhivare , Christophe JAILLET , Jayamohan Kallickal , Ketan Mukadam Cc: Bart Van Assche , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 16 Aug 2016 20:59:24 -0700 In-Reply-To: <6716f28ca4aa8580e87f6ca68ba5199e@mail.gmail.com> References: <1471191843.4075.39.camel@perches.com> <1471343225.4075.153.camel@perches.com> <6716f28ca4aa8580e87f6ca68ba5199e@mail.gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.2-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2016-08-17 at 09:20 +0530, Jitendra Bhivare wrote: > > > > -----Original Message----- > > From: Joe Perches [mailto:joe@perches.com] > > Sent: Tuesday, August 16, 2016 3:57 PM > > To: Jitendra Bhivare; Christophe JAILLET; Jayamohan Kallickal; Ketan > Mukadam > > > > Cc: Bart Van Assche; James E.J. Bottomley; Martin K. Petersen; linux- > > scsi@vger.kernel.org; linux-kernel@vger.kernel.org > > Subject: Re: [PATCH] be2iscsi: Use a more current logging style > > > > On Tue, 2016-08-16 at 11:32 +0530, Jitendra Bhivare wrote: > > > > > > Thanks Joe for taking this up. It has been pending for long time from > > > our side. > > Thanks, not a problem, it took ~10 minutes. > > > > There was a bit of an issue about your reply though. > > > > First there was ~50 k of quoted stuff without any content > > > > > > > > [ hundreds and hundreds of quoted lines ] > > and then this happened: > > > > > > > > > > > > > diff --git a/drivers/scsi/be2iscsi/be_main.h > > > b/drivers/scsi/be2iscsi/be_main.h > > > > > > > > > > > > index aa9c682..7cce6e3 100644 > > > > --- a/drivers/scsi/be2iscsi/be_main.h > > > > +++ b/drivers/scsi/be2iscsi/be_main.h > > > > @@ -1081,15 +1081,19 @@ struct hwi_context_memory { > > > >  #define BEISCSI_LOG_CONFIG 0x0020 /* CONFIG Code Path */ > > > >  #define BEISCSI_LOG_ISCSI 0x0040 /* SCSI/iSCSI Protocol > related > > > > > > > > Logs */ > > > > > > > > > > > > > > > > -#define __beiscsi_log(phba, level, fmt, ...) > \ > > > > > > > > > > > > > - shost_printk(level, phba->shost, fmt, ##__VA_ARGS__) > > > > - > > > > -#define beiscsi_log(phba, level, mask, prefix, fmt, ...) \ > > > > +#define beiscsi_printk(level, phba, mask, fmt, ...) > \ > > > > > > > > > > > > >  do { > > \ > > > > > > > > > > > - uint32_t log_value = phba->attr_log_enable; \ > > > > - if (((mask) & log_value) || (level[1] <= '3')) \ > > > > - __beiscsi_log(phba, level, prefix "_%d: " fmt, \ > > > > -       __LINE__, ##__VA_ARGS__); \ > > > > + if ((mask) & (phba)->attr_log_enable) \ > > > > + shost_printk(level, phba->shost, \ > > > [JB] PCI dev_printk would be more useful with SCSI host_no included by > > > default in the message. > > This is a good note that seems simple enough, but I almost missed this. > > > > Given the reply at the top and the _very_ long uncommented quoted block, > I just > > > > about assumed it was a useless block quote that you didn't bother to > trim. > > > > > > Please make it easier to find your replies and notes by deleting > irrelevant quoted > > > > stuff. > > > > Also, I think I misread the code. > > > > The original code is <= '3' i.e.: show all KERN_ERR. > > That is not correct in the new code. > > > > I don't know the code well and don't have a test bed with the hardware. > > > > Is it possible for a beiscsi_ message to be called before > phba->pcidev is > > > > set to a valid value in beiscsi_hba_alloc?   It appears the code is > careful to only > > > > use dev_ logging calls before probe. > [JB] KERN_ERR messages need to be logged irrespective of the masks. > I understand, that in some places, mask is unnecessarily passed. > I had made sure to call __beiscsi_log in some places. I did as well. > Can we please keep it that way? So beiscsi_err calls dev_err directly or > is replaced with dev_err. No worries, I'll respin the series after Christophe's patches are applied. > It's safe to assume pcidev will be valid for all beiscsi_log calls. > Will test your change on my setup before ack'ing. Don't bother until you get another patchset. I suggest you fix your email client when sending replies to me and to lkml. What I received is very difficult to read due to the odd line wrapping.