<div dir="ltr">Final version. Sorry for the spam. Had some problems with git send-email. <div hspace="streak-pt-mark" style="max-height:1px"><img style="width:0px; max-height:0px;" src="https://mailfoogae.appspot.com/t?sender=aZXVAb3ByZWFtYXRlaS5ybw%3D%3D&type=zerocontent&guid=d4b886e2-473f-4cf8-b6ca-225f5b8a59c3"><font color="#ffffff" size="1">ᐧ</font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 17, 2014 at 12:25 AM, Matei Oprea <span dir="ltr"><<a href="mailto:eu@opreamatei.ro" target="_blank">eu@opreamatei.ro</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="im HOEnZb">It's easier to use kcalloc for allocating arrays.<br>
<br>
Signed-off-by: Matei Oprea <<a href="mailto:eu@opreamatei.ro">eu@opreamatei.ro</a>><br>
Cc: ROSEdu Kernel Community <<a href="mailto:firefly@lists.rosedu.org">firefly@lists.rosedu.org</a>><br>
</span><div class="HOEnZb"><div class="h5">---<br>
 drivers/scsi/lpfc/lpfc_init.c |    6 +++---<br>
 1 file changed, 3 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c<br>
index a5769a9..f10a45e 100644<br>
--- a/drivers/scsi/lpfc/lpfc_init.c<br>
+++ b/drivers/scsi/lpfc/lpfc_init.c<br>
@@ -4854,9 +4854,9 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba)<br>
        }<br>
<br>
        if (!phba->sli.ring)<br>
-               phba->sli.ring = (struct lpfc_sli_ring *)<br>
-                       kzalloc(LPFC_SLI3_MAX_RING *<br>
-                       sizeof(struct lpfc_sli_ring), GFP_KERNEL);<br>
+               phba->sli.ring = kcalloc(LPFC_SLI3_MAX_RING,<br>
+                                        sizeof(struct lpfc_sli_ring),<br>
+                                        GFP_KERNEL);<br>
        if (!phba->sli.ring)<br>
                return -ENOMEM;<br>
<br>
--<br>
1.7.10.4<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Oprea Matei<br><div><br></div></div>
</div>