Re: [PATCH RFC 06/13] dmaengine: sdxi: Add error reporting support

Jonathan Cameron
2025-09-16T14:23:31Z

> >> +
> >> + /* 6. Program MMIO_ERR_CFG. */
> >
> > I'm guessing these are numbers steps in some bit of the spec?
> > If not some of these comments like this one provide no value. We can
> > see what is being written from the code! Perhaps add a very specific
> > spec reference if you want to show why the numbering is here.
>
> Perhaps it's understated, but at the beginning of this function:
>
> /* Refer to "Error Log Initialization" */
> int sdxi_error_init(struct sdxi_dev *sdxi)
>
> The numbered steps in the function correspond to the numbered steps in
> that part of the spec.
>
> I could make the comment something like:
>
> /*
> * The numbered steps below correspond to the sequence outlined in 3.4.2
> * "Error Log Initialization".
> */
>
> though I'm unsure how stable the section numbering in the SDXI spec will
> be over time.

Always reference sections by name (which you do!) and version of the spec
for alongside the section number. They are rarely stable for long.

Jonathan