lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAErSpo6r8TH=262JYpUe4_RFdpEy6XA4LdGa8G5jN27pS0i4_A@mail.gmail.com>
Date:	Wed, 8 Jul 2015 08:28:06 -0500
From:	Bjorn Helgaas <bhelgaas@...gle.com>
To:	Hannes Reinecke <hare@...e.de>
Cc:	Kashyap Desai <kashyap.desai@...gotech.com>,
	Uday Lingala <uday.lingala@...gotech.com>,
	Sumit Saxena <sumit.saxena@...gotech.com>,
	"PDL,MEGARAIDLINUX" <megaraidlinux.pdl@...gotech.com>,
	"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
	"James E.J. Bottomley" <JBottomley@...n.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Joe Perches <joe@...ches.com>, Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v3 2/3] megaraid_sas : use dev_printk when possible

On Wed, Jul 8, 2015 at 5:47 AM, Hannes Reinecke <hare@...e.de> wrote:
> On 07/07/2015 10:52 PM, Bjorn Helgaas wrote:
>> Use dev_printk() when possible to make messages more useful.
>>
>> Signed-off-by: Bjorn Helgaas <bhelgaas@...gle.com>
>> ---
>>  drivers/scsi/megaraid/megaraid_sas_base.c   |  304 +++++++++++++--------------
>>  drivers/scsi/megaraid/megaraid_sas_fusion.c |   95 ++++----
>>  2 files changed, 196 insertions(+), 203 deletions(-)
>>
> [ .. ]
>> @@ -1873,8 +1872,8 @@ static int megasas_get_ld_vf_affiliation_111(struct megasas_instance *instance,
>>       cmd = megasas_get_cmd(instance);
>>
>>       if (!cmd) {
>> -             printk(KERN_DEBUG "megasas: megasas_get_ld_vf_affiliation_111:"
>> -                    "Failed to get cmd for scsi%d.\n",
>> +             dev_printk(KERN_DEBUG, &instance->pdev->dev, "megasas_get_ld_vf_affiliation_111:"
>> +                    "Failed to get cmd for scsi%d\n",
>>                       instance->host->host_no);
>>               return -ENOMEM;
>>       }
> Makes one wonder why we don't have a 'dev_debug'; dev_notice() and
> dev_warn() are there ...

There actually is a 'dev_dbg()' but when CONFIG_DYNAMIC_DEBUG is set,
I think dev_dbg() generates no output by default.  So to preserve the
previous behavior of "this message always appears in the dmesg log no
matter what the dynamic debug setting," I used dev_printk(KERN_DEBUG).

Somebody who maintains these drivers could probably go through and
convert these to either dev_info() or dev_dbg() depending on what they
need.  That would require more judgment than I wanted to get into :)

Thanks for taking a look at these!

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ