From: "Oscar Alejandro Sánchez Lucero via B4 Relay" <devnull+aleszlucero.gmail.com@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
"Oscar Alejandro Sánchez Lucero" <aleszlucero@gmail.com>
Subject: [PATCH 1/2] staging: octeon: avoid void pointer arithmetic in ethernet-rx.c
Date: Sat, 07 Nov 2026 05:06:44 -0600 [thread overview]
Message-ID: <20261107-octeon-rx-fixes-v1-1-f5a21907c8af@gmail.com> (raw)
In-Reply-To: <20261107-octeon-rx-fixes-v1-0-f5a21907c8af@gmail.com>
From: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
Arithmetic on void pointers is a non-standard GCC extension and
triggers -Wpointer-arith warnings. Cast the buffer pointer
returned by cvm_oct_get_buffer_ptr() to u8 * before subtracting
the offset.
Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
---
drivers/staging/octeon/ethernet-rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
index 5be43bbf6a1d..b0463759be39 100644
--- a/drivers/staging/octeon/ethernet-rx.c
+++ b/drivers/staging/octeon/ethernet-rx.c
@@ -243,7 +243,7 @@ static int cvm_oct_poll(struct oct_rx_group *rx_group, int budget)
break;
}
pskb = (struct sk_buff **)
- (cvm_oct_get_buffer_ptr(work->packet_ptr) -
+ ((u8 *)cvm_oct_get_buffer_ptr(work->packet_ptr) -
sizeof(void *));
prefetch(pskb);
--
2.56.0
next prev parent reply other threads:[~2026-11-07 11:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 11:06 [PATCH 0/2] staging: octeon: cleanups and error handling fixes " Oscar Alejandro Sánchez Lucero via B4 Relay
2026-11-07 11:06 ` Oscar Alejandro Sánchez Lucero via B4 Relay [this message]
2026-11-07 11:06 ` [PATCH 2/2] staging: octeon: fix error handling rollback in cvm_oct_rx_initialize() Oscar Alejandro Sánchez Lucero via B4 Relay
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=20261107-octeon-rx-fixes-v1-1-f5a21907c8af@gmail.com \
--to=devnull+aleszlucero.gmail.com@kernel.org \
--cc=aleszlucero@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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
all inboxes | Powered by JetHome®