summaryrefslogtreecommitdiff
path: root/drivers/scsi/hpsa.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-12-19 19:09:59 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2018-01-08 10:53:39 -0500
commitf4d0ad1f27a95d86f3e42251f7c1c575538248bb (patch)
tree025cdcb536f14f5b59533603d08c54d5cf4212a6 /drivers/scsi/hpsa.c
parent85e75175fab8cd17aa2d39214dc44d9895a15dbf (diff)
downloadlwn-f4d0ad1f27a95d86f3e42251f7c1c575538248bb.tar.gz
lwn-f4d0ad1f27a95d86f3e42251f7c1c575538248bb.zip
scsi: hpsa: Use vsnprintf extension %phN
Using this extension reduces the object size. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Don Brace <don.brace@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r--drivers/scsi/hpsa.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 3bb819109a39..87b260e403ec 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -4619,21 +4619,13 @@ sglist_finished:
return 0;
}
-#define BUFLEN 128
static inline void warn_zero_length_transfer(struct ctlr_info *h,
u8 *cdb, int cdb_len,
const char *func)
{
- char buf[BUFLEN];
- int outlen;
- int i;
-
- outlen = scnprintf(buf, BUFLEN,
- "%s: Blocking zero-length request: CDB:", func);
- for (i = 0; i < cdb_len; i++)
- outlen += scnprintf(buf+outlen, BUFLEN - outlen,
- "%02hhx", cdb[i]);
- dev_warn(&h->pdev->dev, "%s\n", buf);
+ dev_warn(&h->pdev->dev,
+ "%s: Blocking zero-length request: CDB:%*phN\n",
+ func, cdb_len, cdb);
}
#define IO_ACCEL_INELIGIBLE 1