From: Lucas Faria Mendes <lucas.fariamo08@gmail.com>
To: gregkh@linuxfoundation.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, ovidiu.panait.oss@gmail.com
Cc: devicetree@vger.kernel.org, linux-staging@lists.linux.dev,
Lucas Faria Mendes <lucas.fariamo08@gmail.com>
Subject: [PATCH v2 3/3] staging: axis-fifo: fix alignment and handle boolean properties
Date: Fri, 27 Feb 2026 15:10:45 -0300 [thread overview]
Message-ID: <20260227181051.36207-4-lucas.fariamo08@gmail.com> (raw)
In-Reply-To: <20260227181051.36207-1-lucas.fariamo08@gmail.com>
Signed-off-by: Lucas Faria Mendes <lucas.fariamo08@gmail.com>
---
drivers/staging/axis-fifo/axis-fifo.c | 55 +++++++--------------------
1 file changed, 13 insertions(+), 42 deletions(-)
diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index c64a7249feca..4b2cab2f8357 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -387,66 +387,37 @@ static void axis_fifo_debugfs_init(struct axis_fifo *fifo)
static int axis_fifo_parse_dt(struct axis_fifo *fifo)
{
- int ret;
- unsigned int value;
struct device_node *node = fifo->dt_device->of_node;
-
- ret = of_property_read_u32(node, "xlnx,axi-str-rxd-tdata-width",
- &value);
+ int ret;
+
+ ret = of_property_read_u32(node, "xlnx,axi-str-rxd-tdata-width", &ret);
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;
+ return -EINVAL;
}
- ret = of_property_read_u32(node, "xlnx,axi-str-txd-tdata-width",
- &value);
+ ret = of_property_read_u32(node, "xlnx,axi-str-txd-tdata-width", &ret);
if (ret) {
dev_err(fifo->dt_device, "missing xlnx,axi-str-txd-tdata-width property\n");
- goto end;
- } else if (value != 32) {
- dev_err(fifo->dt_device, "xlnx,axi-str-txd-tdata-width only supports 32 bits\n");
- ret = -EIO;
- goto end;
+ return -EINVAL;
}
- 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) {
dev_err(fifo->dt_device, "missing xlnx,rx-fifo-depth property\n");
- ret = -EIO;
- goto end;
+ return -EINVAL;
}
- ret = of_property_read_u32(node, "xlnx,tx-fifo-depth",
- &fifo->tx_fifo_depth);
+ ret = of_property_read_u32(node, "xlnx,tx-fifo-depth", &fifo->tx_fifo_depth);
if (ret) {
dev_err(fifo->dt_device, "missing xlnx,tx-fifo-depth property\n");
- ret = -EIO;
- goto end;
- }
-
- ret = of_property_read_u32(node, "xlnx,use-rx-data",
- &fifo->has_rx_fifo);
- if (ret) {
- dev_err(fifo->dt_device, "missing xlnx,use-rx-data property\n");
- ret = -EIO;
- goto end;
+ return -EINVAL;
}
- ret = of_property_read_u32(node, "xlnx,use-tx-data",
- &fifo->has_tx_fifo);
- if (ret) {
- dev_err(fifo->dt_device, "missing xlnx,use-tx-data property\n");
- ret = -EIO;
- goto end;
- }
+ fifo->has_rx_fifo = of_property_read_bool(node, "xlnx,use-rx-data");
+ fifo->has_tx_fifo = of_property_read_bool(node, "xlnx,use-tx-data");
-end:
- return ret;
+ return 0;
}
static int axis_fifo_probe(struct platform_device *pdev)
--
2.53.0
next prev parent reply other threads:[~2026-02-27 18:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 17:30 [PATCH] dt-bindings: misc: add schema for xlnx,axi-fifo-mm-s Lucas Faria Mendes
2026-02-27 17:41 ` Conor Dooley
2026-02-27 18:10 ` [PATCH v2 0/3] staging: axis-fifo: convert bindings to YAML and fix style Lucas Faria Mendes
2026-02-27 18:10 ` [PATCH v2 1/3] staging: axis-fifo: fix alignment to match open parenthesis Lucas Faria Mendes
2026-02-27 18:10 ` [PATCH v2 2/3] dt-bindings: misc: xlnx,axi-fifo-mm-s: convert to json-schema Lucas Faria Mendes
2026-02-27 18:29 ` Conor Dooley
2026-02-27 19:27 ` Rob Herring (Arm)
2026-02-27 18:10 ` Lucas Faria Mendes [this message]
2026-02-28 11:22 ` [PATCH v2 3/3] staging: axis-fifo: fix alignment and handle boolean properties Dan Carpenter
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=20260227181051.36207-4-lucas.fariamo08@gmail.com \
--to=lucas.fariamo08@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=krzk+dt@kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=ovidiu.panait.oss@gmail.com \
--cc=robh@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.