Skip to content

Commit

Permalink
scsi: scsi_transport_fc: Use %u for dev_loss_tmo
Browse files Browse the repository at this point in the history
dev_loss_tmo is an unsigned value. Using "%d" as output format causes
irritating negative values to be shown in sysfs.

Link: https://lore.kernel.org/r/20220902131519.16513-1-mwilck@suse.com
Reviewed-by: Steffen Maier <maier@linux.ibm.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Martin Wilck authored and Martin K. Petersen committed Sep 16, 2022
1 parent 9acb9f0 commit 7f615c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/scsi_transport_fc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ static int fc_rport_set_dev_loss_tmo(struct fc_rport *rport,
return 0;
}

fc_rport_show_function(dev_loss_tmo, "%d\n", 20, )
fc_rport_show_function(dev_loss_tmo, "%u\n", 20, )
static ssize_t
store_fc_rport_dev_loss_tmo(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
Expand Down

0 comments on commit 7f615c1

Please sign in to comment.