[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<PSAPR06MB494913DA3070724B76606F6C89D12@PSAPR06MB4949.apcprd06.prod.outlook.com>
Date: Tue, 11 Mar 2025 00:17:46 +0000
From: Kevin Chen <kevin_chen@...eedtech.com>
To: Krzysztof Kozlowski <krzk@...nel.org>, "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 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.
Agree, I fixed it in my v3 patch, and I already submitted.
Thanks for your detailed explanation.
Sorry for my misunderstanding.
>
> Best regards,
> Krzysztof
Powered by blists - more mailing lists