From nobody Sun Feb 8 15:53:40 2026 Received: from mail-yx1-f47.google.com (mail-yx1-f47.google.com [74.125.224.47]) (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 03B4E36CDE0 for ; Mon, 2 Feb 2026 14:20:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770042060; cv=none; b=duVpFtBdvWVroE3KUohnfmMQoRniG3xAqyecafz8PH+Gv3pQnicmni76Q2xAM0dl9kmicANhfS+FL2fyLeZKQS/IS9rWHpcWXNUYmUyB0g7RG8C2aCk5/6JR3bxJPn0o7/o9feqmdNcSOsL/AsHdg5gGm/Td2oEcM/cApXg9XUg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770042060; c=relaxed/simple; bh=W2hxUyR+35Rw2olK3FN/5Jb/T0bLDoMDTHlXDnADF3I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RZ2HDr8cpJjNmSYR7kzySGp/TfmZGKNEoPULezVxC976nusvv/Olc5Y3iONzKqg+jrWIyzEZcDlzeHR2pm0TaRJbmXDw91ins4wlVHxq6eNI3pcHrgCKc8XWnYZsC4fYytnYE6rQ4rJ6/sDInW5wjD4f/FwkWM/xUtfeK1nv/Kw= 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=FfjgwYcS; arc=none smtp.client-ip=74.125.224.47 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="FfjgwYcS" Received: by mail-yx1-f47.google.com with SMTP id 956f58d0204a3-649655f14daso4014040d50.0 for ; Mon, 02 Feb 2026 06:20:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770042058; x=1770646858; 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=whJcqFN99SnIpMlyUzptiqrHlyZNnsZ70N0Oxvwa4w0=; b=FfjgwYcSInYFgRx373n0RYelN2fpG4F8JKIDOcuXznhfAkByeshfdkePI9in53ZVwW ciS602EC5dc9/VURUB4LAV/zHWCj86f1+z7K4GO3QGPRkGKAlj7F3Ui2AI1tCUya2XV9 x86l7+/lDWfmljMKcbpUQsANqdofLMCfBfwVhuL+TVmrMAJ60PCKTUCOPI2Z4StDGsvN Z1oabTJpbwB4L38El/w59mMWgBlWIXdcGOoINoDCvRb+p4r+7RrBaTMyd9PnYs4tgAK2 3BamgXwpRZB528ti0nicvTqUehfGrtgVbKJ0B3wO7XpJOCjUr/j7vOgB7JPnpv0szoYf NlHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770042058; x=1770646858; 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=whJcqFN99SnIpMlyUzptiqrHlyZNnsZ70N0Oxvwa4w0=; b=e0mS4h9bQDfQD97s7yKVlsmzD+v6qSQt7Y9EsSGgVpCncjAcvAVtMvjmxwdJXYY/8b EP81z2KgzimxREuLY5ahYv6FuYWEg6fuhwalbPaqSeOGGEOYdTkktPKSmo1FRlF52rXE ncRlMN+v7hkZEAMwKdcHkw0WlFdZh60YEuOaldJQhExCovk2Z4zfEeeWy7zuHRItXkqP e8tDY6nbjwBqQzmd9knsziB3oFGvCH3TJfRtESHMxEiQmHOKuQFmE/DB5IDx6iREVGN3 ThOLoWXXIN23pHxwd8+iirjSM3b2Q+YZws1eqqb2e5PBSKuhN9UbDAbeEpjogJffd8a0 ENfw== X-Forwarded-Encrypted: i=1; AJvYcCVwCjnPY66jQtN+9qMtZjngLWB3VxJEavzBw255V/IDwBdKTCK2QPjfNi6NnUUmFfZB7VcOz/RrcvypIaE=@vger.kernel.org X-Gm-Message-State: AOJu0YwGliKONL4+8mCjmRkZ6lpL9LzIkaINw2hZaY9rA7mASMwOpsRK mamaIOmS+45NZ3+T3J+u1fvHbjkV2JW8KedzCKGfFNgQ++MureQJAro0 X-Gm-Gg: AZuq6aKfAFMYhOxiYKnVgQn2+fPNESSMIvGcXTJS6Qx0rCL9OdrsbcB1D10hdL1xY1T qVsiRRP8Uw8yO/rtK1rjhhXiWgCQLMsmZrMNqkXN1txMwgJmzlNWW/kciendyCXn5vyCZVGEE1H CY0fSiJs6U/YAVrWz1fiW7y0fGW0Cr9EZek3yCWQjd76/5C/o2lucl+0Lpx5qAHqIUcFyTWtxlF jLTSB/F/TQaMAV2LQM5Nvq/UC5zvA/pvmKhLFnt8N2HXo3tQ4E3auff0j/6bphmWq3dPzRZfDxi R/cmd5xicJ8QgbDUYXt4rPxYrRVI88TJBWzJZ0edEHP8dRkXotkQ6SIifWHv0I0t8y6aKZmBagj 5FUth9FYkDkY+At5Vu6YXwqdGwoxgtE8yOj1jgfSsWas4QGTIbz7QDN0YPd28IqgtcsqcA5psQI cO0yWH/RRl+NFtqn1L5su+cyvixODzOO9695clx60/UflcUOalxEMe6G7tsc09MbJj X-Received: by 2002:a05:690e:d4c:b0:649:5c78:3158 with SMTP id 956f58d0204a3-649a83a438fmr9435542d50.8.1770042057852; Mon, 02 Feb 2026 06:20:57 -0800 (PST) Received: from gustavo-arch ([2804:14c:f25a:845f:5b8d:2e7c:d238:2d28]) by smtp.gmail.com with ESMTPSA id 00721157ae682-794b2468901sm47292927b3.22.2026.02.02.06.20.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Feb 2026 06:20:57 -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 v6 1/2] staging: axis-fifo: align fifo depth types with OF API Date: Mon, 2 Feb 2026 11:20:46 -0300 Message-ID: <20260202142047.30704-2-gustavopiazdasilva2102@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260202142047.30704-1-gustavopiazdasilva2102@gmail.com> References: <20260202142047.30704-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" Change has_rx_fifo and has_tx_fifo types from int to u32 in struct axis_fifo. The of_property_read_u32() function expects a u32 pointer. While the current code might work, aligning the types avoids potential mixed-type issues and clarifies the data structure. Signed-off-by: Gustavo Piaz da Silva --- Changes in v6: - No changes. Changes in v5: - No changes. Changes in v4: - Removed extra blank lines in the commit message. Changes in v3: - Split the original v2 patch into two separate patches. =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 15:53:40 2026 Received: from mail-yx1-f49.google.com (mail-yx1-f49.google.com [74.125.224.49]) (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 06A9536C599 for ; Mon, 2 Feb 2026 14:21:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770042063; cv=none; b=txPQ1sVEKfLmcssLbrhhYSDZLqggByHy6vDI6vOtReM1xSDn8vJsOMRFXnoo7r/tX42jFxoeSM0zO/ohmp2RNsc/J8N8Ch377hfaFROf+bGx+3PDDQL919SBP1FH6+a/zWHVOlCfp7cNZQ3xn/ndEeSn4qGgPwxWnPodMiH5NEg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770042063; c=relaxed/simple; bh=XYdJGA7GUD+1E1EflZYDYVUKm5sLrTgH7OZ/r89xzFM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bDeAuorPS40cExPUIvsrPiePZBCYFQrKMRIqWwkuz4tB5NTFGaAznHG16m2ydaaC37kGMoxn/qewImfKn5E38O2sN228JRoYif2VR5dQNADX6SNdce7aDGUuC/vVmqejILzTZKbqRl3qbdOnRMm6jyHy7Rmp9J34cWWBF9BH11U= 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=BR7avs/3; arc=none smtp.client-ip=74.125.224.49 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="BR7avs/3" Received: by mail-yx1-f49.google.com with SMTP id 956f58d0204a3-649ae700ba0so2429158d50.1 for ; Mon, 02 Feb 2026 06:21:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770042061; x=1770646861; 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=X2DDMn/HUt5Co9aCezWdd+kTD6C/zFxK/AKWJd/nkuU=; b=BR7avs/3I9S6i7pBO48o6vlJxoEoXNx+IMuZI14RLRnIHCPbE1xvoWLynBxGJXvOfb 1hjAT+4Kivv/aAtti0w1IJlhCPPM4R8rgwkBIA57SUbS6RzGWXXOTng2IGTlAYSmwaJk nK2Cbm31YMI9gZu0NbtFlosx040Xe94Wm0n67dr/LdalhdrD48pxas/QY7kufLn/vNSg g6VONehGPCeco8y0OjmDb7t+mnVdKaxrBrT0BZrRufzPLfpUSq1JzsUQQ0ieS9Ij+mh3 LSnA+vVREeJEff2lYD9vicnDhZ7XAxPdSpzFKf4fkXvvBuiI2rSwzDkzeeYfiUX5vFXe d8CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770042061; x=1770646861; 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=X2DDMn/HUt5Co9aCezWdd+kTD6C/zFxK/AKWJd/nkuU=; b=afY4Ht7EX3yozzxTEvzos2QTJsce/1+S2NJUCggxIa+e9rHzQL/8F8yHa+s2aSUd24 mpIX8aeMpw9BK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:73dc with SMTP id 00721157ae682-794c2fc7de4mr107452687b3.64.1770042060840; Mon, 02 Feb 2026 06:21:00 -0800 (PST) Received: from gustavo-arch ([2804:14c:f25a:845f:5b8d:2e7c:d238:2d28]) by smtp.gmail.com with ESMTPSA id 00721157ae682-794b2468901sm47292927b3.22.2026.02.02.06.20.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Feb 2026 06:21:00 -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 v6 2/2] staging: axis-fifo: refactor device tree parsing Date: Mon, 2 Feb 2026 11:20:47 -0300 Message-ID: <20260202142047.30704-3-gustavopiazdasilva2102@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260202142047.30704-1-gustavopiazdasilva2102@gmail.com> References: <20260202142047.30704-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 v6: - Removed axis_fifo_get_u32() helper function entirely. - Kept 'node' local variable to avoid checkpatch line length warnings. - Removed dev_err() calls in parse_dt as requested by Greg KH. - Fixed checkpatch style warning (missing blank line after declarations). - Ensured newline at end of file. Changes in v5: - Added missing newline at the end of the file. Changes in v4: - Removed extra blank lines in the commit message. - Added "rx" and "tx" prefixes to error messages (now removed in v6). Changes in v3: - Split the original v2 patch into two separate patches. =20 drivers/staging/axis-fifo/axis-fifo.c | 78 +++++++++------------------ 1 file changed, 26 insertions(+), 52 deletions(-) diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-f= ifo/axis-fifo.c index 7bc7bf191250..c482611bbde7 100644 --- a/drivers/staging/axis-fifo/axis-fifo.c +++ b/drivers/staging/axis-fifo/axis-fifo.c @@ -484,66 +484,40 @@ static void axis_fifo_debugfs_init(struct axis_fifo *= fifo) =20 static int axis_fifo_parse_dt(struct axis_fifo *fifo) { - int ret; - unsigned int value; struct device_node *node =3D fifo->dt_device->of_node; + int ret; + u32 width; =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", &width= ); =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; - } + if (ret) + return ret; + if (width !=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,axi-str-txd-tdata-width", &width= ); + if (ret) + return ret; + if (width !=3D 32) + return -EINVAL; =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,rx-fifo-depth", &fifo->rx_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,tx-fifo-depth", &fifo->tx_fifo_d= epth); + 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-rx-data", &fifo->has_rx_fifo= ); + if (ret) + return ret; =20 -end: - return ret; + ret =3D of_property_read_u32(node, "xlnx,use-tx-data", &fifo->has_tx_fifo= ); + if (ret) + return ret; + + return 0; } =20 static int axis_fifo_probe(struct platform_device *pdev) --=20 2.52.0