From: Bradley Grove Date: Tue, 1 Oct 2013 18:26:04 +0000 (-0400) Subject: [SCSI] esas2r: Cleanup snprinf formatting of firmware version X-Git-Tag: firefly_0821_release~176^2~4986^2~13 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0f3c7b99f33f7a9c743a752bba2414615c48e270;p=firefly-linux-kernel-4.4.55.git [SCSI] esas2r: Cleanup snprinf formatting of firmware version Signed-off-by: Bradley Grove Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/esas2r/esas2r_vda.c b/drivers/scsi/esas2r/esas2r_vda.c index 27e97215bb2f..30028e56df63 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));