lkml.org 
[lkml]   [2015]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 04/25] scsi: hisi_sas: add scsi host registration
Date
On Tuesday 13 October 2015 10:16:55 John Garry wrote:
>
> >
> >> + sha = SHOST_TO_SAS_HA(shost) = &hisi_hba->sha;
> >> + platform_set_drvdata(pdev, sha);
> >> +
> >> + phy_nr = port_nr = HISI_SAS_MAX_PHYS;
> >> +
> >> + arr_phy = devm_kcalloc(dev, phy_nr, sizeof(void *), GFP_KERNEL);
> >> + arr_port = devm_kcalloc(dev, port_nr, sizeof(void *), GFP_KERNEL);
> >> + if (!arr_phy || !arr_port)
> >> + return -ENOMEM;
> >
> > And since these are fixed-size arrays, they can be moved in there as well.
> >
> In a later patch we set as follows:
> phy_nr = port_nr = hisi_hba->n_phy;
>
> You did say in our earlier private review that we could add statically
> to hba strcut, but I commented that other vendors do similar so I would
> wait for more input.

Ok, I forgot about that.

Arnd



\
 
 \ /
  Last update: 2015-10-13 14:41    [W:0.053 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site