From: Dan Carpenter <dan.carpenter@linaro.org>
To: Gustavo Piaz da Silva <gustavopiazdasilva2102@gmail.com>
Cc: gregkh@linuxfoundation.org, ovidiu.panait.oss@gmail.com,
gshahrouzi@gmail.com, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 2/2] staging: axis-fifo: refactor device tree parsing
Date: Mon, 2 Feb 2026 22:43:20 +0300 [thread overview]
Message-ID: <aYD-WAtKfZrmCuDB@stanley.mountain> (raw)
In-Reply-To: <20260202142047.30704-3-gustavopiazdasilva2102@gmail.com>
On Mon, Feb 02, 2026 at 11:20:47AM -0300, Gustavo Piaz da Silva wrote:
> static int axis_fifo_parse_dt(struct axis_fifo *fifo)
> {
> - int ret;
> - unsigned int value;
> struct device_node *node = fifo->dt_device->of_node;
> + int ret;
> + u32 width;
>
> - ret = of_property_read_u32(node, "xlnx,axi-str-rxd-tdata-width",
> - &value);
In the original commit then there were a bunch of changes and it kind of
was fine to rename "value" to "width" because you were also changing the
commit message and it was nice that the error message matched the code.
But in this patch you're just deleting error messages and changing the
goto end to a direct return.
At that point, I would prefer to see a really minimal diff. No function
renames. No changes to the line breaks.
> - if (ret) {
> - dev_err(fifo->dt_device, "missing xlnx,axi-str-rxd-tdata-width property\n");
> - goto end;
> - } else if (value != 32) {
> - dev_err(fifo->dt_device, "xlnx,axi-str-rxd-tdata-width only supports 32 bits\n");
> - ret = -EIO;
> - goto end;
> - }
> + ret = of_property_read_u32(node, "xlnx,axi-str-rxd-tdata-width", &width);
>
> + if (ret)
Delete the blank between the function call and the error checking.
[ snip ]
> - ret = of_property_read_u32(node, "xlnx,rx-fifo-depth",
> - &fifo->rx_fifo_depth);
> + ret = of_property_read_u32(node, "xlnx,rx-fifo-depth", &fifo->rx_fifo_depth);
> + if (ret)
> + return ret;
This is an example of changing the white space. It's unrelated.
Whey you were changing to use a helper then it was related, but once
we delete the helper it's not.
regards,
dan carpenter
next prev parent reply other threads:[~2026-02-02 19:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-02 14:20 [PATCH v6 0/2] staging: axis-fifo: refactor and cleanup Gustavo Piaz da Silva
2026-02-02 14:20 ` [PATCH v6 1/2] staging: axis-fifo: align fifo depth types with OF API Gustavo Piaz da Silva
2026-02-03 8:19 ` Greg KH
2026-02-02 14:20 ` [PATCH v6 2/2] staging: axis-fifo: refactor device tree parsing Gustavo Piaz da Silva
2026-02-02 19:43 ` Dan Carpenter [this message]
2026-02-03 8:19 ` [PATCH v6 0/2] staging: axis-fifo: refactor and cleanup Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aYD-WAtKfZrmCuDB@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=gshahrouzi@gmail.com \
--cc=gustavopiazdasilva2102@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=ovidiu.panait.oss@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox