linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Joe Perches <joe@perches.com>, <jejb@linux.vnet.ibm.com>,
	<martin.petersen@oracle.com>
Cc: <hare@suse.com>, <yanaijie@huawei.com>, <linuxarm@huawei.com>,
	<linux-kernel@vger.kernel.org>, <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 4/5] scsi: libsas: Drop SAS_DPRINTK() and revise logs levels
Date: Wed, 14 Nov 2018 15:12:06 +0000	[thread overview]
Message-ID: <6c453baa-71bb-5fe0-28a1-5af097f2e9ae@huawei.com> (raw)
In-Reply-To: <132ba0c903b36d85db30cfebf58fe1f4c3a7c05b.camel@perches.com>

On 14/11/2018 14:53, Joe Perches wrote:
> On Wed, 2018-11-14 at 21:47 +0800, John Garry wrote:
>> Like sas_printk() did previously, SAS_DPRINTK() offers little value now
>> that libsas logs already have the "sas" prefix through pr_fmt(fmt). So it
>> can be dropped.
>>
>> However, after reviewing some logs in libsas, it is noticed that debug
>> level is too low in many instances.
>>
>> So this change drops SAS_DPRINTK() and revises some logs to a more
>> appropriate level. However many stay at debug level, although some
>> are significantly promoted.
> []
>> All the pre-existing checkpatch errors for spanning messages across
>> multiple lines are untouched.
>
> I think coalescing would be useful.

Sorry, I missed that. Do you mean that we stop spanning strings over 
multiple lines?

If yes, I tend to agree. It means we can grep for full strings vs just a 
different checkpatch issue (>80 lines or spanning multiple lines)

>
> Where there are already embedded "sas: "
> prefixes, those should be removed too.

Ah, I missed that guy. File sas_ata.c may also have some.

>
> You could verify this by using
>
> 	$ strings drivers/scsi/libsas/*.o | grep "^[0-7]"
>
>> @@ -186,10 +186,10 @@ int sas_notify_lldd_dev_found(struct domain_device *dev)
>>
>>  	res = i->dft->lldd_dev_found(dev);
>>  	if (res) {
>> -		printk("sas: driver on pcidev %s cannot handle "
>> -		       "device %llx, error:%d\n",
>> -		       dev_name(sas_ha->dev),
>> -		       SAS_ADDR(dev->sas_addr), res);
>> +		pr_warn("sas: driver on pcidev %s cannot handle "
>> +			"device %llx, error:%d\n",
>> +			dev_name(sas_ha->dev),
>> +			SAS_ADDR(dev->sas_addr), res);
>
> e.g.: this now emits "sas: sas: driver etc..."
>
>

Cheers,
John

>
> .
>



  reply	other threads:[~2018-11-14 15:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-14 13:47 [PATCH 0/5] libsas: Some logging tidy-up John Garry
2018-11-14 13:47 ` [PATCH 1/5] scsi: libsas: Delete sas_dump.{c, h} John Garry
2018-11-14 13:47 ` [PATCH 2/5] scsi: libsas: Use pr_fmt(fmt) John Garry
2018-11-14 13:47 ` [PATCH 3/5] scsi: libsas: Drop sas_printk() John Garry
2018-11-14 13:47 ` [PATCH 4/5] scsi: libsas: Drop SAS_DPRINTK() and revise logs levels John Garry
2018-11-14 14:53   ` Joe Perches
2018-11-14 15:12     ` John Garry [this message]
2018-11-14 16:39       ` Joe Perches
2018-11-14 16:41         ` John Garry
2018-11-14 13:47 ` [PATCH 5/5] scsi: libsas: Remove pcidev reference John Garry

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=6c453baa-71bb-5fe0-28a1-5af097f2e9ae@huawei.com \
    --to=john.garry@huawei.com \
    --cc=hare@suse.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=martin.petersen@oracle.com \
    --cc=yanaijie@huawei.com \
    /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;
as well as URLs for NNTP newsgroup(s).