Netdev List
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org,
	kernel@pengutronix.de, Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH net-next 6/9] can: gs_usb: add support for context analysis
Date: Mon, 30 Nov 2026 10:15:32 +0100	[thread overview]
Message-ID: <20261130092003.1946901-7-mkl@pengutronix.de> (raw)
In-Reply-To: <20261130092003.1946901-1-mkl@pengutronix.de>

Enable context analysis for the gs_usb driver.

Tag the hardware timestamp counter infrastructure in struct gs_usb as
guarded by the tc_lock.

This has been tested on Debian testing with clang-23 and clang-24.

| Debian clang version 23.1.5 (2)
| Debian clang version 24.0.0 (++20261119065354+16721c9d8e82-1~exp1)

Link: https://patch.msgid.link/20261130-gs_usb-fixes-v12-6-9ba1f84c179a@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/usb/Makefile | 2 ++
 drivers/net/can/usb/gs_usb.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/can/usb/Makefile b/drivers/net/can/usb/Makefile
index fcafb1ac262e..b2e1539f1d52 100644
--- a/drivers/net/can/usb/Makefile
+++ b/drivers/net/can/usb/Makefile
@@ -3,6 +3,8 @@
 #  Makefile for the Linux Controller Area Network USB drivers.
 #
 
+CONTEXT_ANALYSIS_gs_usb.o := y
+
 obj-$(CONFIG_CAN_8DEV_USB) += usb_8dev.o
 obj-$(CONFIG_CAN_EMS_USB) += ems_usb.o
 obj-$(CONFIG_CAN_ESD_USB) += esd_usb.o
diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c
index ccdcb264c7f5..408ff40389e5 100644
--- a/drivers/net/can/usb/gs_usb.c
+++ b/drivers/net/can/usb/gs_usb.c
@@ -340,7 +340,7 @@ struct gs_usb {
 
 	/* time counter for hardware timestamps */
 	struct gs_usb_timer tc_active;
-	struct gs_usb_timer tc_snapshot;
+	struct gs_usb_timer tc_snapshot __guarded_by(&tc_lock);
 	seqlock_t tc_lock; /* seqlock to guard access tc_snapshot */
 	struct delayed_work timestamp;
 
-- 
2.53.0


  parent reply	other threads:[~2026-11-30  9:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  9:15 [PATCH net-next 0/9] pull-request: can-next 2026-11-30 Marc Kleine-Budde
2026-11-30  9:15 ` [PATCH net-next 1/9] can: gs_usb: gs_usb_probe(): init netdev completely before register_candev() Marc Kleine-Budde
2026-11-30  9:23   ` netdev-bot+sinfo
2026-11-30  9:15 ` [PATCH net-next 2/9] can: gs_usb: gs_usb_receive_bulk_callback(): update state even if SKB allocations fails Marc Kleine-Budde
2026-11-30  9:15 ` [PATCH net-next 3/9] can: gs_usb: gs_usb_receive_bulk_callback(): check for overflow flag if SKB allocation fails Marc Kleine-Budde
2026-11-30  9:15 ` [PATCH net-next 4/9] can: gs_usb: gs_usb_receive_bulk_callback(): add missing call to can_rx_offload_irq_finish Marc Kleine-Budde
2026-11-30  9:15 ` [PATCH net-next 5/9] can: gs_usb: fix hardware timestamp state for mixed channels Marc Kleine-Budde
2026-11-30  9:15 ` Marc Kleine-Budde [this message]
2026-11-30  9:15 ` [PATCH net-next 7/9] can: gs_usb: gs_make_candev(): check can_rx_offload_add_manual() return value Marc Kleine-Budde
2026-11-30  9:15 ` [PATCH net-next 8/9] can: gs_usb: gs_usb_receive_bulk_callback(): use dev_info_ratelimited() to print re-submit info messages Marc Kleine-Budde
2026-11-30  9:15 ` [PATCH net-next 9/9] can: gs_usb: gs_usb_receive_bulk_callback(): emit error message on invalid channel instead of disconnecting interfaces Marc Kleine-Budde

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=20261130092003.1946901-7-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=davem@davemloft.net \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=netdev@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox