Commit d828e5c6 authored by Colin Ian King's avatar Colin Ian King Committed by Martin K. Petersen

scsi: wd719x: make card_types static const, shrinks object size

Don't populate the read-only array card_types on the stack but instead
make it static and constify it. Makes the object code smaller by over
110 bytes:

Before:
   text	   data	    bss	    dec	    hex	filename
  25625	   5752	      0	  31377	   7a91	drivers/scsi/wd719x.o

After:
   text	   data	    bss	    dec	    hex	filename
  25447	   5816	      0	  31263	   7a1f	drivers/scsi/wd719x.o

(gcc version 7.2.0 x86_64)
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 13f6b610
......@@ -803,7 +803,9 @@ static enum wd719x_card_type wd719x_detect_type(struct wd719x *wd)
static int wd719x_board_found(struct Scsi_Host *sh)
{
struct wd719x *wd = shost_priv(sh);
char *card_types[] = { "Unknown card", "WD7193", "WD7197", "WD7296" };
static const char * const card_types[] = {
"Unknown card", "WD7193", "WD7197", "WD7296"
};
int ret;
INIT_LIST_HEAD(&wd->active_scbs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment