lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 8 Jun 2015 09:51:59 -0500
From:	Rob Herring <robherring2@...il.com>
To:	Akinobu Mita <akinobu.mita@...il.com>
Cc:	Yaniv Gardi <ygardi@...eaurora.org>,
	Jej B <James.Bottomley@...senpartnership.com>,
	LKML <linux-kernel@...r.kernel.org>,
	"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
	linux-arm-msm <linux-arm-msm@...r.kernel.org>,
	Santosh Y <santoshsy@...il.com>,
	linux-scsi-owner@...r.kernel.org,
	Subhash Jadavani <subhashj@...eaurora.org>,
	Paul Bolle <pebolle@...cali.nl>,
	Gilad Broner <gbroner@...eaurora.org>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Vinayak Holikatti <vinholikatti@...il.com>,
	"James E.J. Bottomley" <JBottomley@...n.com>,
	Dolev Raviv <draviv@...eaurora.org>,
	Christoph Hellwig <hch@....de>,
	Sujit Reddy Thumma <sthumma@...eaurora.org>,
	Raviv Shvili <rshvili@...eaurora.org>,
	Sahitya Tummala <stummala@...eaurora.org>,
	"open list:OPEN FIRMWARE AND..." <devicetree@...r.kernel.org>
Subject: Re: [PATCH v2 4/4] scsi: ufs: probe and init of variant driver from
 the platform device

On Thu, Jun 4, 2015 at 9:32 AM, Akinobu Mita <akinobu.mita@...il.com> wrote:
> Hi Yaniv,
>
> 2015-06-03 18:37 GMT+09:00 Yaniv Gardi <ygardi@...eaurora.org>:
>> @@ -321,7 +313,22 @@ static int ufshcd_pltfrm_probe(struct platform_device *pdev)
>>                 goto out;
>>         }
>>
>> -       hba->vops = get_variant_ops(&pdev->dev);
>> +       err = of_platform_populate(node, NULL, NULL, &pdev->dev);
>> +       if (err)
>> +               dev_err(&pdev->dev,
>> +                       "%s: of_platform_populate() failed\n", __func__);
>> +
>> +       ufs_variant_node = of_get_next_available_child(node, NULL);
>> +
>> +       if (!ufs_variant_node) {
>> +               dev_dbg(&pdev->dev, "failed to find ufs_variant_node child\n");
>> +       } else {
>> +               ufs_variant_pdev = of_find_device_by_node(ufs_variant_node);
>> +
>> +               if (ufs_variant_pdev)
>> +                       hba->vops = (struct ufs_hba_variant_ops *)
>> +                               dev_get_drvdata(&ufs_variant_pdev->dev);
>> +       }
>
> I have no strong objection to 'ufs_variant' sub-node.  But why can't we
> simply add an of_device_id to ufs_of_match, like below:

But I do have objections on both the naming and having a sub-node.

>
> static const struct of_device_id ufs_of_match[] = {
>         { .compatible = "jedec,ufs-1.1"},
> #if IS_ENABLED(SCSI_UFS_QCOM)
>         { .compatible = "qcom,ufs", .data = &ufs_hba_qcom_vops },

Be more specific: qcom,<socname>-ufs

> #neidf

Drop the ifdef.

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ