<div dir="ltr"><br><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=99fa632b-fee9-4544-b989-cb69ae6151bb"><font color="#ffffff" size="1">ᐧ</font></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 17, 2014 at 12:11 AM, Vlad Dogaru <span dir="ltr"><<a href="mailto:ddvlad@herebedragons.ro" target="_blank">ddvlad@herebedragons.ro</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">On 9/17/2014 12:03 AM, Matei Oprea wrote:<br>
> It's easier to use kcalloc for allocating arrays. While at it<br>
> also remove useless casting value.<br>
><br>
> Signed-off-by: Matei Oprea <<a href="mailto:matei@okapistudio.com">matei@okapistudio.com</a>><br>
> Cc: ROSEdu Kernel Community <<a href="mailto:firefly@lists.rosedu.org">firefly@lists.rosedu.org</a>><br>
> ---<br>
>  drivers/scsi/lpfc/lpfc_init.c |    3 +--<br>
>  1 file changed, 1 insertion(+), 2 deletions(-)<br>
><br>
> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c<br>
> index a5769a9..aac9a90 100644<br>
> --- a/drivers/scsi/lpfc/lpfc_init.c<br>
> +++ b/drivers/scsi/lpfc/lpfc_init.c<br>
> @@ -4854,8 +4854,7 @@ 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>
> +             phba->sli.ring = kcalloc(LPFC_SLI3_MAX_RING,<br>
>                       sizeof(struct lpfc_sli_ring), GFP_KERNEL);<br>
<br>
</div></div>Also align the second line to the opening paranthesis above.  If you're<br>
using vim, use ":set cinoptions=(0" and reindent that line to get a<br>
proper indent.<br>
<div class=""><div class="h5"><br>
>       if (!phba->sli.ring)<br>
>               return -ENOMEM;<br>
<br>
</div></div></blockquote></div><br>I'm using this plugin for coding style [0]. Anyways, will resend</div><div class="gmail_extra"><br></div><div class="gmail_extra">[0] - <a href="http://www.vim.org/scripts/script.php?script_id=4369">http://www.vim.org/scripts/script.php?script_id=4369</a><br clear="all"><div><br></div>-- <br><div dir="ltr">Oprea Matei<br><div><br></div></div>
</div></div>