summaryrefslogtreecommitdiff
path: root/drivers/scsi/esas2r
diff options
context:
space:
mode:
authorBradley Grove <bgrove@attotech.com>2013-10-01 18:26:04 (GMT)
committerJames Bottomley <JBottomley@Parallels.com>2013-10-25 08:58:59 (GMT)
commit0f3c7b99f33f7a9c743a752bba2414615c48e270 (patch)
tree79a4bdfcb085805255b95b55e99d4687756ece44 /drivers/scsi/esas2r
parentb1cf7a2bc7c372c856cdf542c41d7fe527e4b5d6 (diff)
downloadlinux-fsl-qoriq-0f3c7b99f33f7a9c743a752bba2414615c48e270.tar.xz
[SCSI] esas2r: Cleanup snprinf formatting of firmware version
Signed-off-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/esas2r')
-rw-r--r--drivers/scsi/esas2r/esas2r_vda.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/esas2r/esas2r_vda.c b/drivers/scsi/esas2r/esas2r_vda.c
index 27e9721..30028e5 100644
--- a/drivers/scsi/esas2r/esas2r_vda.c
+++ b/drivers/scsi/esas2r/esas2r_vda.c
@@ -310,9 +310,9 @@ static void esas2r_complete_vda_ioctl(struct esas2r_adapter *a,
le32_to_cpu(rsp->vda_version);
cfg->data.init.fw_build = rsp->fw_build;
- snprintf(buf, sizeof(buf), "%1d.%02d",
- (int)LOBYTE(le16_to_cpu(rsp->fw_release)),
- (int)HIBYTE(le16_to_cpu(rsp->fw_release)));
+ snprintf(buf, sizeof(buf), "%1.1u.%2.2u",
+ (int)LOBYTE(le16_to_cpu(rsp->fw_release)),
+ (int)HIBYTE(le16_to_cpu(rsp->fw_release)));
memcpy(&cfg->data.init.fw_release, buf,
sizeof(cfg->data.init.fw_release));