Re: PATCH: PMC-Sierra MaxRAID driver to support 6Gb/s SAS RAID controller (fwd)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux