OSDN Git Service

scsi: mpt3sas: Convert uses of pr_<level> with MPT3SAS_FMT to ioc_<level>
authorJoe Perches <joe@perches.com>
Mon, 17 Sep 2018 15:01:09 +0000 (08:01 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 11 Oct 2018 02:00:43 +0000 (22:00 -0400)
commit919d8a3f3fef9910fda7e0549004cbd4243cf744
treef861a9f44dff7d7bd0f4a8536508dfdaf9a0ed42
parent645a20c6821cd1ab58af8a1f99659e619c216efd
scsi: mpt3sas: Convert uses of pr_<level> with MPT3SAS_FMT to ioc_<level>

Use a more common logging style.

Done using the perl script below and some typing

$ git grep --name-only -w MPT3SAS_FMT -- "*.c" | \
  xargs perl -i -e 'local $/; while (<>) { s/\bpr_(info|err|notice|warn)\s*\(\s*MPT3SAS_FMT\s*("[^"]+"(?:\s*\\?\s*"[^"]+"\s*){0,5}\s*),\s*ioc->name\s*/ioc_\1(ioc, \2/g; print;}'

Miscellanea for these conversions:

o Coalesce formats
o Realign arguments
o Remove unnecessary parentheses
o Use casts to u64 instead of unsigned long long where appropriate
o Convert broken pr_info uses to pr_cont
o Fix broken format string concatenation with line continuations and
  excess whitespace

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_base.c
drivers/scsi/mpt3sas/mpt3sas_config.c
drivers/scsi/mpt3sas/mpt3sas_ctl.c
drivers/scsi/mpt3sas/mpt3sas_scsih.c
drivers/scsi/mpt3sas/mpt3sas_transport.c
drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c
drivers/scsi/mpt3sas/mpt3sas_warpdrive.c