aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wilcox <mawilcox@microsoft.com>2017-09-08 19:14:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-08 21:26:48 -0400
commit1caffba9db4aa27c3e7ebc05668afca1f991ab8d (patch)
treec7301ad6155b02bc2793e30715180ce7ed4c0bf9
parent48ad1abef40226ce809e5b7d3a5898754c4b9a9a (diff)
drivers/scsi/sym53c8xx_2/sym_hipd.c: convert to use memset32
memset32() can be used to initialise these three arrays. Minor code footprint reduction. Link: http://lkml.kernel.org/r/20170720184539.31609-8-willy@infradead.org Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: David Miller <davem@davemloft.net> Cc: Ingo Molnar <mingo@elte.hu> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Matt Turner <mattst88@gmail.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Minchan Kim <minchan@kernel.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Richard Henderson <rth@twiddle.net> Cc: Russell King <rmk+kernel@armlinux.org.uk> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
index 15ff285a9f8f..ca360daa6a25 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -4985,13 +4985,10 @@ struct sym_lcb *sym_alloc_lcb (struct sym_hcb *np, u_char tn, u_char ln)
4985 * Compute the bus address of this table. 4985 * Compute the bus address of this table.
4986 */ 4986 */
4987 if (ln && !tp->luntbl) { 4987 if (ln && !tp->luntbl) {
4988 int i;
4989
4990 tp->luntbl = sym_calloc_dma(256, "LUNTBL"); 4988 tp->luntbl = sym_calloc_dma(256, "LUNTBL");
4991 if (!tp->luntbl) 4989 if (!tp->luntbl)
4992 goto fail; 4990 goto fail;
4993 for (i = 0 ; i < 64 ; i++) 4991 memset32(tp->luntbl, cpu_to_scr(vtobus(&np->badlun_sa)), 64);
4994 tp->luntbl[i] = cpu_to_scr(vtobus(&np->badlun_sa));
4995 tp->head.luntbl_sa = cpu_to_scr(vtobus(tp->luntbl)); 4992 tp->head.luntbl_sa = cpu_to_scr(vtobus(tp->luntbl));
4996 } 4993 }
4997 4994
@@ -5077,8 +5074,7 @@ static void sym_alloc_lcb_tags (struct sym_hcb *np, u_char tn, u_char ln)
5077 /* 5074 /*
5078 * Initialize the task table with invalid entries. 5075 * Initialize the task table with invalid entries.
5079 */ 5076 */
5080 for (i = 0 ; i < SYM_CONF_MAX_TASK ; i++) 5077 memset32(lp->itlq_tbl, cpu_to_scr(np->notask_ba), SYM_CONF_MAX_TASK);
5081 lp->itlq_tbl[i] = cpu_to_scr(np->notask_ba);
5082 5078
5083 /* 5079 /*
5084 * Fill up the tag buffer with tag numbers. 5080 * Fill up the tag buffer with tag numbers.
@@ -5764,8 +5760,7 @@ int sym_hcb_attach(struct Scsi_Host *shost, struct sym_fw *fw, struct sym_nvram
5764 goto attach_failed; 5760 goto attach_failed;
5765 5761
5766 np->badlun_sa = cpu_to_scr(SCRIPTB_BA(np, resel_bad_lun)); 5762 np->badlun_sa = cpu_to_scr(SCRIPTB_BA(np, resel_bad_lun));
5767 for (i = 0 ; i < 64 ; i++) /* 64 luns/target, no less */ 5763 memset32(np->badluntbl, cpu_to_scr(vtobus(&np->badlun_sa)), 64);
5768 np->badluntbl[i] = cpu_to_scr(vtobus(&np->badlun_sa));
5769 5764
5770 /* 5765 /*
5771 * Prepare the bus address array that contains the bus 5766 * Prepare the bus address array that contains the bus