Message ID | 20190906163945.3889-1-colin.king@canonical.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | b23c640c33b8ab10060b8d243d1aa817e5eb00dc |
Headers | show |
Series | scsi: fnic: make array dev_cmd_err static const, makes object smaller | expand |
Colin, > Don't populate the array dev_cmd_err on the stack but instead make it > static const. Makes the object code smaller by 80 bytes. Applied to 5.5/scsi-queue, thanks!
diff --git a/drivers/scsi/fnic/vnic_dev.c b/drivers/scsi/fnic/vnic_dev.c index 78af9cc2009b..f7f445c6b4fc 100644 --- a/drivers/scsi/fnic/vnic_dev.c +++ b/drivers/scsi/fnic/vnic_dev.c @@ -259,7 +259,7 @@ int vnic_dev_cmd1(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd, int wait) struct vnic_devcmd __iomem *devcmd = vdev->devcmd; int delay; u32 status; - int dev_cmd_err[] = { + static const int dev_cmd_err[] = { /* convert from fw's version of error.h to host's version */ 0, /* ERR_SUCCESS */ EINVAL, /* ERR_EINVAL */