[PATCH] ufs: make const array setup_attrs static to shink object code size
From: Colin King
Date: Sat Sep 16 2017 - 12:14:24 EST
From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Don't populate const array setup_attrs on the stack, instead make it
static. Makes the object code smaller by over 120 bytes:
Before:
text data bss dec hex filename
1588 208 0 1796 704 drivers/scsi/ufs/ufshcd-dwc.o
After:
text data bss dec hex filename
1371 304 0 1675 68b drivers/scsi/ufs/ufshcd-dwc.o
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
---
drivers/scsi/ufs/ufshcd-dwc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/ufs/ufshcd-dwc.c b/drivers/scsi/ufs/ufshcd-dwc.c
index 5fd16c72207f..f061609c424d 100644
--- a/drivers/scsi/ufs/ufshcd-dwc.c
+++ b/drivers/scsi/ufs/ufshcd-dwc.c
@@ -83,7 +83,7 @@ static int ufshcd_dwc_link_is_up(struct ufs_hba *hba)
*/
static int ufshcd_dwc_connection_setup(struct ufs_hba *hba)
{
- const struct ufshcd_dme_attr_val setup_attrs[] = {
+ static const struct ufshcd_dme_attr_val setup_attrs[] = {
{ UIC_ARG_MIB(T_CONNECTIONSTATE), 0, DME_LOCAL },
{ UIC_ARG_MIB(N_DEVICEID), 0, DME_LOCAL },
{ UIC_ARG_MIB(N_DEVICEID_VALID), 0, DME_LOCAL },
--
2.14.1