[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20190819093147.GE4841@zn.tnic>
Date: Mon, 19 Aug 2019 11:31:47 +0200
From: Borislav Petkov <bp@...en8.de>
To: Lei Wang <leiwang_git@...look.com>
Cc: "james.morse@....com" <james.morse@....com>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"mark.rutland@....com" <mark.rutland@....com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"mchehab@...nel.org" <mchehab@...nel.org>,
"linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
"sashal@...nel.org" <sashal@...nel.org>,
"hangl@...rosoft.com" <hangl@...rosoft.com>,
"lewan@...rosoft.com" <lewan@...rosoft.com>,
"ruizhao@...rosoft.com" <ruizhao@...rosoft.com>
Subject: Re: [PATCH v5 2/2] EDAC: add EDAC driver for DMC520
On Tue, Aug 13, 2019 at 01:05:02AM +0000, Lei Wang wrote:
> Added some more comments for the file:
>
> /*
> * dmc520_edac.c, EDAC driver for DMC-520 memory controller
^^^^^^^^^^^^^
Filename is redundant.
> These comments tell how to potentially expand the driver functions to
> support more interrupts besides what are already here.
I can read that - the question is why are they there and for whom? For
your future colleagues who'll take over this driver or what is those
comments' purpose?
> As above comments, this comment is to guide potential future adding to
> this driver to support other interrupts.
See question above.
> After edac_mc_alloc(), if succeeds, the above code updates dmc520_edac
> struct data. If moving edac_mc_alloc as suggested, I will need to use
> local variables to store the data,
Yes, do that pls.
> Do you mean having an array to keep all the irq_id, and then only
> devm_request_irq on them if all of the platform_get_irq are success?
No, move it before edac_mc_alloc().
In general, do *all* initialization of your hardware first and only
then, when it succeeds, allocate the EDAC structures.
Thx.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
Powered by blists - more mailing lists