From nobody Sun Feb 8 10:43:42 2026 Received: from mail-yx1-f54.google.com (mail-yx1-f54.google.com [74.125.224.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EDC7F36C593 for ; Fri, 6 Feb 2026 13:11:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770383520; cv=none; b=oTPW7uLEHVY+aGcOThcvjYZdPe2bo7yin+8BPMacwuqj3qI0Xwi7EXCOBA6mZmPYxN8u5YoSbDucgo7rfKX6Wg+7c3D+bGRGsCWmF+Pfou/j25QEVC6lQt6pWbdBaJyxG11PsPHqRV7ZDxhUL28K6cYDspmewiPt9AxUVqxQ9nA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770383520; c=relaxed/simple; bh=zLe8YPVGtEm735zQ5/84d3c2e57a2WTS6Cc0G9vqxcU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bFcesBs79evksCnoKj1iObr36BljBVOusAFi8ld0HQ5TFs5VqPUsT6vz24oC3EohHlmwh1P1O2qCPF6rPAco//ydSL9iF8hy1SSs1ulWXeJ0kdwtdEcy7VfNO8VMUKgMsblVOK28cDARRVoi9vwkCsFAEoCkWJzyp7c5jsTJzAU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Hc5kkaN6; arc=none smtp.client-ip=74.125.224.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Hc5kkaN6" Received: by mail-yx1-f54.google.com with SMTP id 956f58d0204a3-649f0af4fbcso1231101d50.3 for ; Fri, 06 Feb 2026 05:11:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770383519; x=1770988319; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=75r+vLv29nvZ3dM+W+pTo1X4ga8rRb9wG3DUEW4UJ1w=; b=Hc5kkaN6xpau+LAvLi5LQNmXNUgLUkTYKm551hngbhLWCnY3G13b9zkCVrHQXqV6DN Zbfi3rYYTL4f7Ij/duHKqJVF40s6ho7qrjT8pR0VAi0DTjfiv4acV1xa/OW/kzwZHDeW HmDZnhiSJkHXN2kUXDJt0gTOGX6meZGj1NgBHDMyTMB6YQ5HIjOZXPZWzY2iw0AjKS3D /OfsrGC+y4qf8Mrte6FIWuHTvUJA3dQ8FO5M4AqEzpRPAxCYdrW84ZmV6OvCa/LYdCzQ jHBlVYBNZJb261urYZ6GQQ6Hunl5AVyjfVfVV0b3qu31LZAIyIUi4MGVpr/QY7mU7JyN wKAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770383519; x=1770988319; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=75r+vLv29nvZ3dM+W+pTo1X4ga8rRb9wG3DUEW4UJ1w=; b=ftSJKu5RhmV/gd2l0b09z7NVWwJSCRKWOAm9CTbJm2MSAM2uhth9CgSh/ca2w8xj9M n9Vpqt7d93y10FjZ0HsO8hbh3WSz4xtXwD6uGYQDVWcgnH2KA782d19LWJXfoPfWymTd yTWLrlp+uOo/O7f6FNxQoqDKHuV5+tZMF8UH0+qxtM20l7S4GpbEoUf5q9QwWEoF3NdT CE8LiO2/+jo9fEhS2dLThajpgymKPWT2OGLa95JMBkxQALdQQUT/f3HN1asXuTd45bSV Fru4gWiu+gZj5L9iDoFIQ8GmrJM+bZ8YntpKvcW/aG8yp1c8Fze8MfvWicyogw9suCdD gvPA== X-Forwarded-Encrypted: i=1; AJvYcCUF3mF/YOySJq0KyrIXPn42dfvWisj6WmXyyTMx6OKnfEk4AMSXYXSJYBz5xW4eqO1kDKLdCAGM72ApFss=@vger.kernel.org X-Gm-Message-State: AOJu0Yy/Em+UkFQ3e37FxuSpeBkhMim+wXX+zxZCZRs8g/LQcyUzur0/ 8uMBUHn+kczrbYHsEzlrjaqVQ8TOJ2brsgQXuhPnDhKQkvFrX1DryktOxsxpbw== X-Gm-Gg: AZuq6aKvXEILeHpxlWh/x72f4kxo+gW1MIc3Zpr8qMwe9Zjl/qTPs/yRaeF9t6znGF+ pfnauH+apUo1X3MisXYnHGXkKVqHWlSnovDzPu9RFHDXhKiRgOT9I2LohelcIRgbNFLnKyCODDX TTMDlCKbYR2zcbJts11Ygh6Q8oN3W9qp7F0o9bWfAyhPqPpEEVBULlfY6qVjvK/g7HXlJXOFkCq GByXZky+IOiMZBFF3HBFzea9tzQ7dcwswT4Q2T1OUZuxLgV2K7asa0GKGOlColicv9UCKhU+2ny qLpj8tJWS8eTV/mE9Xvc2RPNtZ5ajYl/6KoOUryQK4ZUUAT3zbnU+S5WQLyRjVU7JntyW5yvf+C d/GPzJP833JCPZ6C0NnZ40GgOhV6POaawjMBEm7rxfp3UFmSBP9Q5yYalhRNAmxqpU/lIhAWeEo 2r3WN+eQaL825v+XsNnmbju4C7mjfaq6vn1iHev6RU9zhCTr1pfBlGhMUzMcqXeFaN X-Received: by 2002:a05:690e:1686:b0:640:ddf5:254f with SMTP id 956f58d0204a3-649f2058f4fmr2772452d50.62.1770383518787; Fri, 06 Feb 2026 05:11:58 -0800 (PST) Received: from gustavo-arch ([2804:14c:f25a:845f:5b8d:2e7c:d238:2d28]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-649f255ea1asm2160559d50.18.2026.02.06.05.11.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Feb 2026 05:11:58 -0800 (PST) From: Gustavo Piaz da Silva To: gregkh@linuxfoundation.org, dan.carpenter@linaro.org Cc: ovidiu.panait.oss@gmail.com, gshahrouzi@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Gustavo Piaz da Silva Subject: [PATCH v7 1/2] staging: axis-fifo: use u32 for fifo depth flags Date: Fri, 6 Feb 2026 10:11:47 -0300 Message-ID: <20260206131148.13643-2-gustavopiazdasilva2102@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260206131148.13643-1-gustavopiazdasilva2102@gmail.com> References: <20260206131148.13643-1-gustavopiazdasilva2102@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Update has_rx_fifo and has_tx_fifo types from int to u32 in struct axis_fifo. The of_property_read_u32() function expects a pointer to u32. Although the current code works correctly with int, using u32 aligns the data structure with the Device Tree API and prevents potential type-mismatch issues. Signed-off-by: Gustavo Piaz da Silva --- Changes in v7: - Rewrote description for better clarity and explicitly acknowledged=20 that the original code works correctly. Changes in v6: - Added missing "---" line after Signed-off-by. - Updated subject prefix to staging: axis-fifo. Changes in v3: - Split from a single patch into a two-patch series. =20 drivers/staging/axis-fifo/axis-fifo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-f= ifo/axis-fifo.c index 509d620d6ce7..7bc7bf191250 100644 --- a/drivers/staging/axis-fifo/axis-fifo.c +++ b/drivers/staging/axis-fifo/axis-fifo.c @@ -121,8 +121,8 @@ struct axis_fifo { =20 unsigned int rx_fifo_depth; /* max words in the receive fifo */ unsigned int tx_fifo_depth; /* max words in the transmit fifo */ - int has_rx_fifo; /* whether the IP has the rx fifo enabled */ - int has_tx_fifo; /* whether the IP has the tx fifo enabled */ + u32 has_rx_fifo; /* whether the IP has the rx fifo enabled */ + u32 has_tx_fifo; /* whether the IP has the tx fifo enabled */ =20 wait_queue_head_t read_queue; /* wait queue for asynchronos read */ struct mutex read_lock; /* lock for reading */ --=20 2.52.0 From nobody Sun Feb 8 10:43:42 2026 Received: from mail-yx1-f43.google.com (mail-yx1-f43.google.com [74.125.224.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1A08339B43 for ; Fri, 6 Feb 2026 13:12:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770383523; cv=none; b=hNHs6KIEBYKCmdhGb8v9r0Ei4lHKcZf5rEgfF/afE+2b0zeyquRykfRweatkzFsPvAG0xzDpzPgTcwcRpWl/beO3tjaZ76D9cIOVnnV3hVzUfxaENUJJzvwJh6SB2UZllqI5tPHNOVP/e1La8dsToYeujPMh3JWyHhnt1q16xQU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770383523; c=relaxed/simple; bh=HqoehNkmR2zJmggy5jrXv8U+G6IF+67l8VlplDzGlIY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gSNr5Z7GDZK2O23UQjZFRTnMOyd2vb9Eveymn+GhbHK3ZFmB3YWWqVBayiI9SZOTbPiIOtQhT6KRLurXY3Tnbi7lIfqT/Le4ZuIJqdQ7g0nu/IpcjxmMQSNa9XPqkHLz0mNzubantVTrYQTK1gRznqknSUTsvgnwKGVPXrmUv6g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Og5Hjs/6; arc=none smtp.client-ip=74.125.224.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Og5Hjs/6" Received: by mail-yx1-f43.google.com with SMTP id 956f58d0204a3-649f2d9fe31so691064d50.1 for ; Fri, 06 Feb 2026 05:12:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770383523; x=1770988323; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EUiGz5BYm72YfGXfMKvcmFPxgFmLy9shGbceZIko3io=; b=Og5Hjs/6Phyq8VJ4PVy1C/al3tja/hGTEbvyd7bgB2dNrss+FctxoUNqX8ecIqJJsV LqYuSIrl8J+dxZIeBQqvztwzR6z4kkE1z1ROWIn1LYfuy+iiGd0u8R2jSfBpD66iO+fg V7j9rJujxexPcJzr0RHAHyffSJ7V3LHz8/HbMgVL0QOYtpYrEg6uIUE0pKjegvDsGhyC 1EsVb0P4Ek36AMuzWlzaCkJZmf0w79eWHZg1Rru/uzo3o/Xo0U/Vwwe2QDP0H2hVqg1g y6OmhX4xsi9OWYc5fJz2YdOXLhViylclF4XsHbzlyc6+27nCS9b/Hs5ZInRO0MAwwyh9 JPdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770383523; x=1770988323; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=EUiGz5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Zhi I+IJzw/QO1ROBqaW09t5C71qedqgMLeWb6VyKlh7IEA32MtPhMfRKMMv6nlbD813bv X-Received: by 2002:a53:c710:0:b0:649:dae7:dd65 with SMTP id 956f58d0204a3-649f21b975amr1696668d50.96.1770383522376; Fri, 06 Feb 2026 05:12:02 -0800 (PST) Received: from gustavo-arch ([2804:14c:f25a:845f:5b8d:2e7c:d238:2d28]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-649f255ea1asm2160559d50.18.2026.02.06.05.11.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Feb 2026 05:12:01 -0800 (PST) From: Gustavo Piaz da Silva To: gregkh@linuxfoundation.org, dan.carpenter@linaro.org Cc: ovidiu.panait.oss@gmail.com, gshahrouzi@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Gustavo Piaz da Silva Subject: [PATCH v7 2/2] staging: axis-fifo: refactor device tree parsing Date: Fri, 6 Feb 2026 10:11:48 -0300 Message-ID: <20260206131148.13643-3-gustavopiazdasilva2102@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260206131148.13643-1-gustavopiazdasilva2102@gmail.com> References: <20260206131148.13643-1-gustavopiazdasilva2102@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Refactor the device tree parsing logic in axis_fifo_probe() to reduce verbosity and simplify error handling. Remove the verbose error logging and goto logic. Instead, check of_property_read_u32() return values directly and propagate error codes immediately. This aligns the driver with modern kernel standards by removing unnecessary error messages during probe. Signed-off-by: Gustavo Piaz da Silva --- Changes in v7: - Reverted variable name and type from 'u32 width' back to the=20 original 'unsigned int value' to minimize unnecessary diff noise. - Removed extra blank lines between function calls and error=20 checks to keep the diff as compact as possible. Changes in v6: - Removed the axis_fifo_get_u32() helper function entirely. - Removed all dev_err() calls in axis_fifo_parse_dt() as the=20 driver core already reports probe failures. - Kept the 'node' local variable to avoid checkpatch line=20 length warnings. - Fixed checkpatch style warning (missing blank line after=20 declarations). - Ensured a newline exists at the end of the file. Changes in v5: - Added missing newline at the end of axis-fifo.c. Changes in v4: - Removed extra blank lines in the commit message. - Added "rx" and "tx" prefixes to error messages (these=20 messages were later removed in v6). Changes in v3: - Split the original monolithic v2 patch into two separate=20 patches to isolate logic refactoring from type alignment. Changes in v2: - Fixed checkpatch.pl coding style issues regarding=20 indents and line formatting. Changes in v1: - Initial submission. drivers/staging/axis-fifo/axis-fifo.c | 73 +++++++++------------------ 1 file changed, 23 insertions(+), 50 deletions(-) diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-f= ifo/axis-fifo.c index 7bc7bf191250..8141f8d02a98 100644 --- a/drivers/staging/axis-fifo/axis-fifo.c +++ b/drivers/staging/axis-fifo/axis-fifo.c @@ -488,62 +488,35 @@ static int axis_fifo_parse_dt(struct axis_fifo *fifo) unsigned int value; struct device_node *node =3D fifo->dt_device->of_node; =20 - ret =3D of_property_read_u32(node, "xlnx,axi-str-rxd-tdata-width", - &value); - if (ret) { - dev_err(fifo->dt_device, "missing xlnx,axi-str-rxd-tdata-width property\= n"); - goto end; - } else if (value !=3D 32) { - dev_err(fifo->dt_device, "xlnx,axi-str-rxd-tdata-width only supports 32 = bits\n"); - ret =3D -EIO; - goto end; - } + ret =3D of_property_read_u32(node, "xlnx,axi-str-rxd-tdata-width", &value= ); + if (ret) + return ret; + if (value !=3D 32) + return -EINVAL; =20 - ret =3D of_property_read_u32(node, "xlnx,axi-str-txd-tdata-width", - &value); - if (ret) { - dev_err(fifo->dt_device, "missing xlnx,axi-str-txd-tdata-width property\= n"); - goto end; - } else if (value !=3D 32) { - dev_err(fifo->dt_device, "xlnx,axi-str-txd-tdata-width only supports 32 = bits\n"); - ret =3D -EIO; - goto end; - } + ret =3D of_property_read_u32(node, "xlnx,axi-str-txd-tdata-width", &value= ); + if (ret) + return ret; + if (value !=3D 32) + return -EINVAL; =20 - ret =3D 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 =3D -EIO; - goto end; - } + ret =3D of_property_read_u32(node, "xlnx,rx-fifo-depth", &fifo->rx_fifo_d= epth); + if (ret) + return ret; =20 - ret =3D 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 =3D -EIO; - goto end; - } + ret =3D of_property_read_u32(node, "xlnx,tx-fifo-depth", &fifo->tx_fifo_d= epth); + if (ret) + return ret; =20 - ret =3D 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 =3D -EIO; - goto end; - } + ret =3D of_property_read_u32(node, "xlnx,use-rx-data", &fifo->has_rx_fifo= ); + if (ret) + return ret; =20 - ret =3D 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 =3D -EIO; - goto end; - } + ret =3D of_property_read_u32(node, "xlnx,use-tx-data", &fifo->has_tx_fifo= ); + if (ret) + return ret; =20 -end: - return ret; + return 0; } =20 static int axis_fifo_probe(struct platform_device *pdev) --=20 2.52.0