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]
Message-ID: <807015d4-c5ed-4e04-9948-fd1ff894a04e@quicinc.com>
Date: Mon, 25 Mar 2024 22:59:49 +0530
From: Krishna Kurapati PSSNV <quic_kriskura@...cinc.com>
To: Johan Hovold <johan@...nel.org>
CC: Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Rob Herring
	<robh+dt@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Wesley Cheng
	<quic_wcheng@...cinc.com>,
        Konrad Dybcio <konrad.dybcio@...aro.org>,
        "Greg
 Kroah-Hartman" <gregkh@...uxfoundation.org>,
        Conor Dooley
	<conor+dt@...nel.org>,
        Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
        Felipe Balbi
	<balbi@...nel.org>, <devicetree@...r.kernel.org>,
        <linux-arm-msm@...r.kernel.org>, <linux-usb@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <quic_ppratap@...cinc.com>,
        <quic_jackp@...cinc.com>
Subject: Re: [PATCH v16 7/9] usb: dwc3: qcom: Refactor IRQ handling in glue
 driver



On 3/25/2024 6:53 PM, Johan Hovold wrote:
> On Mon, Mar 25, 2024 at 06:45:07PM +0530, Krishna Kurapati PSSNV wrote:
>>>> +static int dwc3_qcom_setup_irq(struct platform_device *pdev)
>>>> +{
>>>> +	struct dwc3_qcom *qcom = platform_get_drvdata(pdev);
>>>> +	bool is_multiport;
>>>> +	int ret;
>>>> +	int i;
>>>> +
>>>> +	qcom->num_ports = dwc3_qcom_find_num_ports(pdev);
>>>> +	if (qcom->num_ports < 0)
>>>> +		return -ENOMEM;
>>>
>>> Just return 'ret' directly.
>>
>> Sure, will init ret to -ENOMEM and return ret here. >
Hi Johan,

> I meant that you should return whatever error dwc3_qcom_find_num_ports()
> returns, so perhaps something like:
> 

Got it. Any error that might come up in interrupt reading as well.
> 	
> 	ret = dwc3_qcom_find_num_ports(pdev);
> 	if (ret < 0)
> 		return ret;
> 
> 	qcom->num_ports = ret;
> 
> It looks like dwc3_qcom_find_num_ports() can also return 0 (e.g. on
> malformed DT), which also needs to be handled somehow. I missed that
> earlier.
> 

 From what I remember, Konrad mentioned that we might not need to 
support incomplete or improper DT [1]. Also since this is close to 
getting merged, can we take up any changes for Malformed DT handling 
later given that only one or two devices are present and less likely to 
be given a malformed DT.

[1]: 
https://lore.kernel.org/all/c8d77d4f-6696-4dc9-8030-daf1d10b114b@linaro.org/

Regards,
Krishna,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ