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: <b980cc2b-5c4f-4293-ba1a-496253ae8049@quicinc.com>
Date: Fri, 14 Feb 2025 14:09:25 +0800
From: Jie Luo <quic_luoj@...cinc.com>
To: Jie Gan <jie.gan@....qualcomm.com>, Andrew Lunn <andrew+netdev@...n.ch>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, "Rob
 Herring" <robh@...nel.org>,
        Krzysztof Kozlowski <krzk+dt@...nel.org>,
        "Conor
 Dooley" <conor+dt@...nel.org>,
        Lei Wei <quic_leiwei@...cinc.com>,
        "Suruchi
 Agarwal" <quic_suruchia@...cinc.com>,
        Pavithra R <quic_pavir@...cinc.com>, Simon Horman <horms@...nel.org>,
        Jonathan Corbet <corbet@....net>, Kees Cook
	<kees@...nel.org>,
        "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        "Philipp
 Zabel" <p.zabel@...gutronix.de>
CC: <linux-arm-msm@...r.kernel.org>, <netdev@...r.kernel.org>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-doc@...r.kernel.org>, <linux-hardening@...r.kernel.org>,
        <quic_kkumarcs@...cinc.com>, <quic_linchen@...cinc.com>,
        <srinivas.kandagatla@...aro.org>, <bartosz.golaszewski@...aro.org>,
        <john@...ozen.org>
Subject: Re: [PATCH net-next v3 03/14] net: ethernet: qualcomm: Add PPE driver
 for IPQ9574 SoC



On 2/12/2025 9:58 AM, Jie Gan wrote:
>>>> +static int qcom_ppe_probe(struct platform_device *pdev)
>>>> +{
>>>> +    struct device *dev = &pdev->dev;
>>>> +    struct ppe_device *ppe_dev;
>>>> +    void __iomem *base;
>>>> +    int ret, num_icc;
>>> I think it's better with:
>>>      int num_icc = ARRAY_SIZE(ppe_icc_data);
>>
>> This will impact the “reverse xmas tree” rule for local variable
>> definitions. Also, the num_icc will vary as per the different SoC,
>> so we will need to initialize the num_icc in a separate statement.
>>
>> (Note: This driver will be extended to support different SoC in
>> the future.)
>>
> Got your point here. So there may have multiple definitions like 
> ppe_icc_data here, right? But the num_icc here is hardcoded.
> Maybe it would be better defined within the ppe_icc_data, if possible?
> Then just directly use ppe_icc_data->num_icc?
> 
> Never mind, that's just my thought on the flexibility.
> 
> Jie

Yes, the num_icc will be moved the SoC specific .data area of struct
of_device_id, when this driver is extended to support multiple SoCs.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ