* [PATCH] scsi: sd: Remove unused zone append tracepoints
@ 2026-10-25 15:17 Torra Sowmya
2026-10-31 4:52 ` Sowmya Torra
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Torra Sowmya @ 2026-10-25 15:17 UTC (permalink / raw)
To: outreachy; +Cc: rostedt, julianbraha, julia.lawall
Commit 1846f308d66f ("scsi: sd: Use the block layer zone append
emulation") removed the calls to scsi_prepare_zone_append and
scsi_zone_wp_update, but left their definitions in sd_trace.h.
Consequently, sd_zbc.c still generates code and data for events
that have no remaining callers.
Remove sd_trace.h, which contains only these two events, and
remove its include and CREATE_TRACE_POINTS definition from
sd_zbc.c.
Fixes: 1846f308d66f ("scsi: sd: Use the block layer zone append emulation")
Signed-off-by: Torra Sowmya <sowmyatorra@gmail.com>
---
drivers/scsi/sd_trace.h | 84 -----------------------------------------
drivers/scsi/sd_zbc.c | 3 --
2 files changed, 87 deletions(-)
delete mode 100644 drivers/scsi/sd_trace.h
diff --git a/drivers/scsi/sd_trace.h b/drivers/scsi/sd_trace.h
deleted file mode 100644
index cba3c0b825ba..000000000000
--- a/drivers/scsi/sd_trace.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Copyright (C) 2022 Western Digital Corporation or its affiliates.
- */
-#undef TRACE_SYSTEM
-#define TRACE_SYSTEM sd
-
-#undef TRACE_INCLUDE_FILE
-#define TRACE_INCLUDE_FILE sd_trace
-
-#if !defined(_SD_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
-#include <scsi/scsi_cmnd.h>
-#include <scsi/scsi_host.h>
-#include <linux/tracepoint.h>
-
-TRACE_EVENT(scsi_prepare_zone_append,
-
- TP_PROTO(struct scsi_cmnd *cmnd, sector_t lba,
- unsigned int wp_offset),
-
- TP_ARGS(cmnd, lba, wp_offset),
-
- TP_STRUCT__entry(
- __field( unsigned int, host_no )
- __field( unsigned int, channel )
- __field( unsigned int, id )
- __field( unsigned int, lun )
- __field( sector_t, lba )
- __field( unsigned int, wp_offset )
- ),
-
- TP_fast_assign(
- __entry->host_no = cmnd->device->host->host_no;
- __entry->channel = cmnd->device->channel;
- __entry->id = cmnd->device->id;
- __entry->lun = cmnd->device->lun;
- __entry->lba = lba;
- __entry->wp_offset = wp_offset;
- ),
-
- TP_printk("host_no=%u, channel=%u id=%u lun=%u lba=%llu wp_offset=%u",
- __entry->host_no, __entry->channel, __entry->id,
- __entry->lun, __entry->lba, __entry->wp_offset)
-);
-
-TRACE_EVENT(scsi_zone_wp_update,
-
- TP_PROTO(struct scsi_cmnd *cmnd, sector_t rq_sector,
- unsigned int wp_offset, unsigned int good_bytes),
-
- TP_ARGS(cmnd, rq_sector, wp_offset, good_bytes),
-
- TP_STRUCT__entry(
- __field( unsigned int, host_no )
- __field( unsigned int, channel )
- __field( unsigned int, id )
- __field( unsigned int, lun )
- __field( sector_t, rq_sector )
- __field( unsigned int, wp_offset )
- __field( unsigned int, good_bytes )
- ),
-
- TP_fast_assign(
- __entry->host_no = cmnd->device->host->host_no;
- __entry->channel = cmnd->device->channel;
- __entry->id = cmnd->device->id;
- __entry->lun = cmnd->device->lun;
- __entry->rq_sector = rq_sector;
- __entry->wp_offset = wp_offset;
- __entry->good_bytes = good_bytes;
- ),
-
- TP_printk("host_no=%u, channel=%u id=%u lun=%u rq_sector=%llu" \
- " wp_offset=%u good_bytes=%u",
- __entry->host_no, __entry->channel, __entry->id,
- __entry->lun, __entry->rq_sector, __entry->wp_offset,
- __entry->good_bytes)
-);
-#endif /* _SD_TRACE_H */
-
-/* This part must be outside protection */
-#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH ../../drivers/scsi
-#include <trace/define_trace.h>
diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
index 56e455fb5add..a7bdf089e142 100644
--- a/drivers/scsi/sd_zbc.c
+++ b/drivers/scsi/sd_zbc.c
@@ -20,9 +20,6 @@
#include "sd.h"
-#define CREATE_TRACE_POINTS
-#include "sd_trace.h"
-
/* Whether or not a SCSI zone descriptor describes a gap zone. */
static bool sd_zbc_is_gap_zone(const u8 buf[64])
{
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] scsi: sd: Remove unused zone append tracepoints
2026-10-25 15:17 [PATCH] scsi: sd: Remove unused zone append tracepoints Torra Sowmya
@ 2026-10-31 4:52 ` Sowmya Torra
2026-11-07 18:29 ` Steven Rostedt
2026-11-08 6:46 ` Torra Sowmya
2 siblings, 0 replies; 5+ messages in thread
From: Sowmya Torra @ 2026-10-31 4:52 UTC (permalink / raw)
To: outreachy; +Cc: rostedt, julianbraha, julia.lawall
Hello everyone,
I’m following up on this patch. Actually the build passed, and both
unused-tracepoint warnings disappeared after the change I made.
Could you please let me know if anything needs correcting or if I
should do any additional checks? Your feedback actually would help me
take the next steps on this patch.
Thank you for your time and guidance.
Best regards,
Sowmya
On Sun, Oct 25, 2026 at 8:49 PM Torra Sowmya <sowmyatorra@gmail.com> wrote:
>
> Commit 1846f308d66f ("scsi: sd: Use the block layer zone append
> emulation") removed the calls to scsi_prepare_zone_append and
> scsi_zone_wp_update, but left their definitions in sd_trace.h.
> Consequently, sd_zbc.c still generates code and data for events
> that have no remaining callers.
>
> Remove sd_trace.h, which contains only these two events, and
> remove its include and CREATE_TRACE_POINTS definition from
> sd_zbc.c.
>
> Fixes: 1846f308d66f ("scsi: sd: Use the block layer zone append emulation")
> Signed-off-by: Torra Sowmya <sowmyatorra@gmail.com>
> ---
> drivers/scsi/sd_trace.h | 84 -----------------------------------------
> drivers/scsi/sd_zbc.c | 3 --
> 2 files changed, 87 deletions(-)
> delete mode 100644 drivers/scsi/sd_trace.h
>
> diff --git a/drivers/scsi/sd_trace.h b/drivers/scsi/sd_trace.h
> deleted file mode 100644
> index cba3c0b825ba..000000000000
> --- a/drivers/scsi/sd_trace.h
> +++ /dev/null
> @@ -1,84 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -/*
> - * Copyright (C) 2022 Western Digital Corporation or its affiliates.
> - */
> -#undef TRACE_SYSTEM
> -#define TRACE_SYSTEM sd
> -
> -#undef TRACE_INCLUDE_FILE
> -#define TRACE_INCLUDE_FILE sd_trace
> -
> -#if !defined(_SD_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
> -#include <scsi/scsi_cmnd.h>
> -#include <scsi/scsi_host.h>
> -#include <linux/tracepoint.h>
> -
> -TRACE_EVENT(scsi_prepare_zone_append,
> -
> - TP_PROTO(struct scsi_cmnd *cmnd, sector_t lba,
> - unsigned int wp_offset),
> -
> - TP_ARGS(cmnd, lba, wp_offset),
> -
> - TP_STRUCT__entry(
> - __field( unsigned int, host_no )
> - __field( unsigned int, channel )
> - __field( unsigned int, id )
> - __field( unsigned int, lun )
> - __field( sector_t, lba )
> - __field( unsigned int, wp_offset )
> - ),
> -
> - TP_fast_assign(
> - __entry->host_no = cmnd->device->host->host_no;
> - __entry->channel = cmnd->device->channel;
> - __entry->id = cmnd->device->id;
> - __entry->lun = cmnd->device->lun;
> - __entry->lba = lba;
> - __entry->wp_offset = wp_offset;
> - ),
> -
> - TP_printk("host_no=%u, channel=%u id=%u lun=%u lba=%llu wp_offset=%u",
> - __entry->host_no, __entry->channel, __entry->id,
> - __entry->lun, __entry->lba, __entry->wp_offset)
> -);
> -
> -TRACE_EVENT(scsi_zone_wp_update,
> -
> - TP_PROTO(struct scsi_cmnd *cmnd, sector_t rq_sector,
> - unsigned int wp_offset, unsigned int good_bytes),
> -
> - TP_ARGS(cmnd, rq_sector, wp_offset, good_bytes),
> -
> - TP_STRUCT__entry(
> - __field( unsigned int, host_no )
> - __field( unsigned int, channel )
> - __field( unsigned int, id )
> - __field( unsigned int, lun )
> - __field( sector_t, rq_sector )
> - __field( unsigned int, wp_offset )
> - __field( unsigned int, good_bytes )
> - ),
> -
> - TP_fast_assign(
> - __entry->host_no = cmnd->device->host->host_no;
> - __entry->channel = cmnd->device->channel;
> - __entry->id = cmnd->device->id;
> - __entry->lun = cmnd->device->lun;
> - __entry->rq_sector = rq_sector;
> - __entry->wp_offset = wp_offset;
> - __entry->good_bytes = good_bytes;
> - ),
> -
> - TP_printk("host_no=%u, channel=%u id=%u lun=%u rq_sector=%llu" \
> - " wp_offset=%u good_bytes=%u",
> - __entry->host_no, __entry->channel, __entry->id,
> - __entry->lun, __entry->rq_sector, __entry->wp_offset,
> - __entry->good_bytes)
> -);
> -#endif /* _SD_TRACE_H */
> -
> -/* This part must be outside protection */
> -#undef TRACE_INCLUDE_PATH
> -#define TRACE_INCLUDE_PATH ../../drivers/scsi
> -#include <trace/define_trace.h>
> diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
> index 56e455fb5add..a7bdf089e142 100644
> --- a/drivers/scsi/sd_zbc.c
> +++ b/drivers/scsi/sd_zbc.c
> @@ -20,9 +20,6 @@
>
> #include "sd.h"
>
> -#define CREATE_TRACE_POINTS
> -#include "sd_trace.h"
> -
> /* Whether or not a SCSI zone descriptor describes a gap zone. */
> static bool sd_zbc_is_gap_zone(const u8 buf[64])
> {
> --
> 2.47.3
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scsi: sd: Remove unused zone append tracepoints
2026-10-25 15:17 [PATCH] scsi: sd: Remove unused zone append tracepoints Torra Sowmya
2026-10-31 4:52 ` Sowmya Torra
@ 2026-11-07 18:29 ` Steven Rostedt
2026-11-08 6:46 ` Torra Sowmya
2 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2026-11-07 18:29 UTC (permalink / raw)
To: Torra Sowmya; +Cc: outreachy, julianbraha, julia.lawall
On Sun, 25 Oct 2026 20:47:02 +0530
Torra Sowmya <sowmyatorra@gmail.com> wrote:
> Commit 1846f308d66f ("scsi: sd: Use the block layer zone append
> emulation") removed the calls to scsi_prepare_zone_append and
> scsi_zone_wp_update, but left their definitions in sd_trace.h.
> Consequently, sd_zbc.c still generates code and data for events
> that have no remaining callers.
>
> Remove sd_trace.h, which contains only these two events, and
> remove its include and CREATE_TRACE_POINTS definition from
> sd_zbc.c.
>
> Fixes: 1846f308d66f ("scsi: sd: Use the block layer zone append emulation")
> Signed-off-by: Torra Sowmya <sowmyatorra@gmail.com>
> ---
LGTM
-- Steve
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] scsi: sd: Remove unused zone append tracepoints
2026-10-25 15:17 [PATCH] scsi: sd: Remove unused zone append tracepoints Torra Sowmya
2026-10-31 4:52 ` Sowmya Torra
2026-11-07 18:29 ` Steven Rostedt
@ 2026-11-08 6:46 ` Torra Sowmya
2026-11-09 1:56 ` Martin K. Petersen
2 siblings, 1 reply; 5+ messages in thread
From: Torra Sowmya @ 2026-11-08 6:46 UTC (permalink / raw)
To: James.Bottomley, mkp
Cc: johannes.thumshirn, axboe, dlemoal, bvanassche, linux-scsi,
linux-kernel, outreachy, rostedt, julianbraha, julia.lawall
Commit 1846f308d66f ("scsi: sd: Use the block layer zone append
emulation") removed the calls to scsi_prepare_zone_append and
scsi_zone_wp_update, but left their definitions in sd_trace.h.
Consequently, sd_zbc.c still generates code and data for events
that have no remaining callers.
Remove sd_trace.h, which contains only these two events, and
remove its include and CREATE_TRACE_POINTS definition from
sd_zbc.c.
Fixes: 1846f308d66f ("scsi: sd: Use the block layer zone append emulation")
Signed-off-by: Torra Sowmya <sowmyatorra@gmail.com>
---
drivers/scsi/sd_trace.h | 84 -----------------------------------------
drivers/scsi/sd_zbc.c | 3 --
2 files changed, 87 deletions(-)
delete mode 100644 drivers/scsi/sd_trace.h
diff --git a/drivers/scsi/sd_trace.h b/drivers/scsi/sd_trace.h
deleted file mode 100644
index cba3c0b825ba..000000000000
--- a/drivers/scsi/sd_trace.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Copyright (C) 2022 Western Digital Corporation or its affiliates.
- */
-#undef TRACE_SYSTEM
-#define TRACE_SYSTEM sd
-
-#undef TRACE_INCLUDE_FILE
-#define TRACE_INCLUDE_FILE sd_trace
-
-#if !defined(_SD_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
-#include <scsi/scsi_cmnd.h>
-#include <scsi/scsi_host.h>
-#include <linux/tracepoint.h>
-
-TRACE_EVENT(scsi_prepare_zone_append,
-
- TP_PROTO(struct scsi_cmnd *cmnd, sector_t lba,
- unsigned int wp_offset),
-
- TP_ARGS(cmnd, lba, wp_offset),
-
- TP_STRUCT__entry(
- __field( unsigned int, host_no )
- __field( unsigned int, channel )
- __field( unsigned int, id )
- __field( unsigned int, lun )
- __field( sector_t, lba )
- __field( unsigned int, wp_offset )
- ),
-
- TP_fast_assign(
- __entry->host_no = cmnd->device->host->host_no;
- __entry->channel = cmnd->device->channel;
- __entry->id = cmnd->device->id;
- __entry->lun = cmnd->device->lun;
- __entry->lba = lba;
- __entry->wp_offset = wp_offset;
- ),
-
- TP_printk("host_no=%u, channel=%u id=%u lun=%u lba=%llu wp_offset=%u",
- __entry->host_no, __entry->channel, __entry->id,
- __entry->lun, __entry->lba, __entry->wp_offset)
-);
-
-TRACE_EVENT(scsi_zone_wp_update,
-
- TP_PROTO(struct scsi_cmnd *cmnd, sector_t rq_sector,
- unsigned int wp_offset, unsigned int good_bytes),
-
- TP_ARGS(cmnd, rq_sector, wp_offset, good_bytes),
-
- TP_STRUCT__entry(
- __field( unsigned int, host_no )
- __field( unsigned int, channel )
- __field( unsigned int, id )
- __field( unsigned int, lun )
- __field( sector_t, rq_sector )
- __field( unsigned int, wp_offset )
- __field( unsigned int, good_bytes )
- ),
-
- TP_fast_assign(
- __entry->host_no = cmnd->device->host->host_no;
- __entry->channel = cmnd->device->channel;
- __entry->id = cmnd->device->id;
- __entry->lun = cmnd->device->lun;
- __entry->rq_sector = rq_sector;
- __entry->wp_offset = wp_offset;
- __entry->good_bytes = good_bytes;
- ),
-
- TP_printk("host_no=%u, channel=%u id=%u lun=%u rq_sector=%llu" \
- " wp_offset=%u good_bytes=%u",
- __entry->host_no, __entry->channel, __entry->id,
- __entry->lun, __entry->rq_sector, __entry->wp_offset,
- __entry->good_bytes)
-);
-#endif /* _SD_TRACE_H */
-
-/* This part must be outside protection */
-#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH ../../drivers/scsi
-#include <trace/define_trace.h>
diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
index 56e455fb5add..a7bdf089e142 100644
--- a/drivers/scsi/sd_zbc.c
+++ b/drivers/scsi/sd_zbc.c
@@ -20,9 +20,6 @@
#include "sd.h"
-#define CREATE_TRACE_POINTS
-#include "sd_trace.h"
-
/* Whether or not a SCSI zone descriptor describes a gap zone. */
static bool sd_zbc_is_gap_zone(const u8 buf[64])
{
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] scsi: sd: Remove unused zone append tracepoints
2026-11-08 6:46 ` Torra Sowmya
@ 2026-11-09 1:56 ` Martin K. Petersen
0 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2026-11-09 1:56 UTC (permalink / raw)
To: Torra Sowmya
Cc: James.Bottomley, mkp, johannes.thumshirn, axboe, dlemoal,
bvanassche, linux-scsi, linux-kernel, outreachy, rostedt,
julianbraha, julia.lawall
Torra,
> Remove sd_trace.h, which contains only these two events, and remove
> its include and CREATE_TRACE_POINTS definition from sd_zbc.c.
Applied to 7.5/scsi-staging, thanks!
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-09 1:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-25 15:17 [PATCH] scsi: sd: Remove unused zone append tracepoints Torra Sowmya
2026-10-31 4:52 ` Sowmya Torra
2026-11-07 18:29 ` Steven Rostedt
2026-11-08 6:46 ` Torra Sowmya
2026-11-09 1:56 ` Martin K. Petersen
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.