Re: [PATCH v2 07/22] scsi: hisi_sas: create hisi_sas_get_fw_info()

From: Arnd Bergmann
Date: Mon May 29 2017 - 07:23:05 EST


On Mon, May 29, 2017 at 1:18 PM, John Garry <john.garry@xxxxxxxxxx> wrote:
> On 29/05/2017 11:53, Arnd Bergmann wrote:
>> On Thu, May 25, 2017 at 2:04 PM, John Garry <john.garry@xxxxxxxxxx> wrote:
>
> So we only require these properties for platform device with DT firmware.
> This code is same as before (apart from adding the comments), but I'll
> consider adding a verbose comment.
>
> As for the check, effectively I already have what you recommend in how np is
> evaluated:
> + struct platform_device *pdev = hisi_hba->platform_dev;
> + struct device_node *np = pdev ? pdev->dev.of_node : NULL;
> struct clk *refclk;

Ah, very good. Thanks for checking.

Arnd