public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Anil Ravindranath <anil_ravindranath@pmc-sierra.com>
Cc: Brian King <brking@linux.vnet.ibm.com>,
	linux-scsi@vger.kernel.org, gregkh@suse.de
Subject: Re: PATCH: PMC-Sierra MaxRAID driver to support 6Gb/s SAS RAID controller (fwd)
Date: Sat, 05 Sep 2009 10:00:56 -0500	[thread overview]
Message-ID: <1252162856.3882.80.camel@mulgrave.site> (raw)
In-Reply-To: <alpine.LNX.1.10.0909031637330.11364@rslab159.pmc-sierra.bc.ca>

On Thu, 2009-09-03 at 16:43 -0700, Anil Ravindranath wrote:
> 
> On Thu, 3 Sep 2009, Brian King wrote:
> 
> > Anil Ravindranath wrote:
> > > Hi Brian,
> > > 
> > > 
> > > On Thu, 3 Sep 2009, Brian King wrote:
> > > 
> > >> Anil,
> > >>
> > >> Taking a quick scan through the driver, I would suggest you audit your
> > >> logging. Looks like there is a lot of dev_err, where sdev_printk might be
> > >> better,
> > > 
> > > I hope I am understanding this correct...
> > > 
> > > I don't see a difference in using dev_err Vs. sdev_printk. B'coz both call
> > > dev_printk except the prefix of KERN_ERR. But I guess even if we use
> > > sdev_printk we will use KERN_ERR anyways. Also both refer "Generic device
> > > interface".
> > > 
> > > #define dev_err(dev, format, arg...)            \   
> > >         dev_printk(KERN_ERR , dev , format , ## arg)
> > > 
> > > #define sdev_printk(prefix, sdev, fmt, a...)    \
> > >         dev_printk(prefix, &(sdev)->sdev_gendev, fmt, ##a)
> > 
> > The difference is the dev pointer that gets passed to dev_printk. When calling
> > sdev_printk, the dev pointer for the scsi device gets passed, so the printk
> > ends up getting prefixed with the SCSI location: 0:0:0:0, for example where
> > you have SCSI Host:Bus:Target:LUN. The dev_err calls I see in the driver
> > generally pass the dev pointer of the PCI device, resulting in the PCI location
> > of the adapter being logged. Its just a matter of scoping the printk to the
> > device.
> >
> 
> Sure. We will make this change wherever its applicable like places where 
> we need scsi device location in the prints.
>  
> > > 
> > > struct scsi_device {
> > > 
> > > struct device           sdev_gendev;
> > >  
> > > }
> > > 
> > >  and pmcraid_info where sdev_info might be better, etc.
> > > Where/what is this sdev_info?
> > 
> > There isn't one... I meant to say dev_info, sdev_printk, scmd_printk, etc... 
> > 
> 
> We will change this accordingly wherever applicable. There will be places 
> where we still want to call pmcraid_info prints which we want to 
> control using debug flag parameter.

These patches are mainly cosmetic.  I'll put the current driver in as-is
on the understanding that you'll submit this lot as an update patch.

James



      reply	other threads:[~2009-09-05 15:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-03  0:08 PATCH: PMC-Sierra MaxRAID driver to support 6Gb/s SAS RAID controller (fwd) Anil Ravindranath
2009-09-03 15:08 ` Brian King
2009-09-03 20:25   ` Anil Ravindranath
2009-09-03 21:33     ` Brian King
2009-09-03 23:43       ` Anil Ravindranath
2009-09-05 15:00         ` James Bottomley [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1252162856.3882.80.camel@mulgrave.site \
    --to=james.bottomley@hansenpartnership.com \
    --cc=anil_ravindranath@pmc-sierra.com \
    --cc=brking@linux.vnet.ibm.com \
    --cc=gregkh@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox