[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ec17a9f8-0a5b-4d93-ca9c-a3755ff027ec@amd.com>
Date: Mon, 26 Jun 2017 17:22:10 -0500
From: Brijesh Singh <brijesh.singh@....com>
To: Tom Lendacky <thomas.lendacky@....com>,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: brijesh.singh@....com, gary.hook@....com,
herbert@...dor.apana.org.au, davem@...emloft.net
Subject: Re: [PATCH v2 1/3] crypto: ccp - Use devres interface to allocate
PCI/iomap and cleanup
On 06/26/2017 04:17 PM, Tom Lendacky wrote:
>> +const struct ccp_vdata ccpv3_platform = {
>> + .version = CCP_VERSION(3, 0),
>> + .setup = NULL,
>> + .perform = &ccp3_actions,
>> + .bar = 2,
>
> Platform devices don't use BARs so should probably delete this (unless
> you want to make it more generic and then use this value for the
> IORESOURCE_MEM entry).
>
Yep, we don't need bar for platform device, it was copy paste from existing
ccpv3 structure. I will fix it in v3. thanks
>> +}
>> #endif
>> +int ccp_dev_init(struct ccp_device *ccp)
>> +{
>> + if (ccp->vdata->setup)
>> + ccp->vdata->setup(ccp);
>> +
>> + ccp->io_regs = ccp->io_map + ccp->vdata->offset;
>
> This should be before the above call to setup().
>
Good catch, actually the second patch takes care of it. But I agree with your
feedback, I will make sure that io_regs is set before invoking the setup() in
the first patch itself.
Thanks
Brijesh
Powered by blists - more mailing lists