[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <58466532-3e17-4968-bade-210f478ccc76@kernel.org>
Date: Mon, 10 Mar 2025 12:43:29 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Kevin Chen <kevin_chen@...eedtech.com>, "lee@...nel.org"
<lee@...nel.org>, "robh@...nel.org" <robh@...nel.org>,
"krzk+dt@...nel.org" <krzk+dt@...nel.org>,
"conor+dt@...nel.org" <conor+dt@...nel.org>, "joel@....id.au"
<joel@....id.au>, "andrew@...econstruct.com.au"
<andrew@...econstruct.com.au>, "derek.kiernan@....com"
<derek.kiernan@....com>, "dragan.cvetic@....com" <dragan.cvetic@....com>,
"arnd@...db.de" <arnd@...db.de>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-aspeed@...ts.ozlabs.org" <linux-aspeed@...ts.ozlabs.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 3/3] soc: aspeed: lpc-pcc: Add PCC controller support
On 10/03/2025 11:05, Kevin Chen wrote:
>> On 04/03/2025 11:44, Kevin Chen wrote:
>>> +
>>> +static int aspeed_pcc_probe(struct platform_device *pdev) {
>>> + int rc;
>>> + struct aspeed_pcc_ctrl *pcc;
>>> + struct device *dev;
>>> + uint32_t fifo_size = PAGE_SIZE;
>>> +
>>> + dev = &pdev->dev;
>>
>> This goes to declaration.
> OK. I will move it to declaration.
>
>>
>>> +
>>> + pcc = devm_kzalloc(&pdev->dev, sizeof(*pcc), GFP_KERNEL);
>>
>> Maybe my previous comment was not clear, but you agreed with it. Anyway
>> nothing improved here.
> Could I reserve the pcc variable using for the pcc_ctrl data structure?
> Pcc_ctrl data include the regmap/irq/io_port/dma/kfifo.
> If I change the name to dev, it does not make sense for these data to be.
>
>>
>> If you have 'dev' variable, use it.
> Do you mean just use the pdev->dev not local dev variable?
What is the point of this:
dev = &pdev->dev;
if you do not use 'dev'? If you come with a reason, sure. If you do not
have such, then everything should use 'dev', not pdev->dev.
Best regards,
Krzysztof
Powered by blists - more mailing lists