[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <067150f9-3c8c-3b91-718e-33a4019d2d95@linaro.org>
Date: Thu, 14 Oct 2021 11:42:56 +0300
From: Vladimir Zapolskiy <vladimir.zapolskiy@...aro.org>
To: Bhupesh Sharma <bhupesh.sharma@...aro.org>
Cc: MSM <linux-arm-msm@...r.kernel.org>, linux-crypto@...r.kernel.org,
bhupesh.linux@...il.com,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>,
Rob Herring <robh+dt@...nel.org>,
Andy Gross <agross@...nel.org>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S . Miller" <davem@...emloft.net>,
Thara Gopinath <thara.gopinath@...aro.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>
Subject: Re: [PATCH v4 18/20] crypto: qce: Defer probing if BAM dma channel is
not yet initialized
Hi Bhupesh,
On 10/14/21 10:40 AM, Bhupesh Sharma wrote:
> Hi Vladimir,
>
> On Thu, 14 Oct 2021 at 02:19, Vladimir Zapolskiy
> <vladimir.zapolskiy@...aro.org> wrote:
>>
>> Hi Bhupesh,
>>
>> On 10/13/21 1:55 PM, Bhupesh Sharma wrote:
>>> Since the Qualcomm qce crypto driver needs the BAM dma driver to be
>>> setup first (to allow crypto operations), it makes sense to defer
>>> the qce crypto driver probing in case the BAM dma driver is not yet
>>> probed.
>>>
>>> Move the code leg requesting dma channels earlier in the
>>> probe() flow. This fixes the qce probe failure issues when both qce
>>> and BMA dma are compiled as static part of the kernel.
>>>
>>> Cc: Thara Gopinath <thara.gopinath@...aro.org>
>>> Cc: Bjorn Andersson <bjorn.andersson@...aro.org>
>>> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@...aro.org>
>>> ---
>>> drivers/crypto/qce/core.c | 20 ++++++++++++--------
>>> 1 file changed, 12 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c
>>> index cb8c77709e1e..c6f686126fc9 100644
>>> --- a/drivers/crypto/qce/core.c
>>> +++ b/drivers/crypto/qce/core.c
>>> @@ -209,9 +209,19 @@ static int qce_crypto_probe(struct platform_device *pdev)
>>> if (ret < 0)
>>> return ret;
>>>
>>> + /* qce driver requires BAM dma driver to be setup first.
>>
>> I believe a multi-line block of comments should be started with '/*' line,
>> for reference please take a look at Documentation/process/coding-style.rst
>
> There are exceptions to this rule as well. For e.g. see most of the
> networking drivers and the multi-line comment styles there :) .
>
> There is a very interesting LWN article on the same :
> https://lwn.net/Articles/694755/
> Note that 'crypto/' and 'drivers/crypto' use these non-standard
> multi-line comments quite often as well.
Ah, yes, I agree here, thank you for the reminder! IIRC crypto drivers
kind of belong to netdev domain, at least in relation to the accepted
coding style.
> That said, I have no strong opinion on using either style. Although, I
> found one of the points raised by the networking maintainer during one
> of my patch reviews earlier quite useful - 'keeping the top line in a
> multi-line comment blank, wastes precious screen space while reading
> and reviewing the patch'.
--
Best wishes,
Vladimir
Powered by blists - more mailing lists