* [PATCH -next] scsi: fnic: Remove unused function fnic_scsi_host_start/end_tag()
@ 2023-08-29 1:02 Yang Li
2023-08-29 2:42 ` Karan Tilak Kumar (kartilak)
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yang Li @ 2023-08-29 1:02 UTC (permalink / raw)
To: jejb, martin.petersen, satishkh, sebaddel, kartilak
Cc: linux-scsi, linux-kernel, Yang Li
The function fnic_scsi_host_start_tag() and fnic_scsi_host_end_tag()
are not used anywhere, so remove them.
silence the warnings:
drivers/scsi/fnic/fnic_scsi.c:2175:1: warning: unused function 'fnic_scsi_host_start_tag'
drivers/scsi/fnic/fnic_scsi.c:2196:1: warning: unused function 'fnic_scsi_host_end_tag'
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/scsi/fnic/fnic_scsi.c | 33 ---------------------------------
1 file changed, 33 deletions(-)
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index 185142efee3d..9761b2c9db48 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -2167,39 +2167,6 @@ static int fnic_clean_pending_aborts(struct fnic *fnic,
return ret;
}
-/*
- * fnic_scsi_host_start_tag
- * Allocates tagid from host's tag list
- **/
-static inline int
-fnic_scsi_host_start_tag(struct fnic *fnic, struct scsi_cmnd *sc)
-{
- struct request *rq = scsi_cmd_to_rq(sc);
- struct request_queue *q = rq->q;
- struct request *dummy;
-
- dummy = blk_mq_alloc_request(q, REQ_OP_WRITE, BLK_MQ_REQ_NOWAIT);
- if (IS_ERR(dummy))
- return SCSI_NO_TAG;
-
- rq->tag = dummy->tag;
- sc->host_scribble = (unsigned char *)dummy;
-
- return dummy->tag;
-}
-
-/*
- * fnic_scsi_host_end_tag
- * frees tag allocated by fnic_scsi_host_start_tag.
- **/
-static inline void
-fnic_scsi_host_end_tag(struct fnic *fnic, struct scsi_cmnd *sc)
-{
- struct request *dummy = (struct request *)sc->host_scribble;
-
- blk_mq_free_request(dummy);
-}
-
/*
* SCSI Eh thread issues a Lun Reset when one or more commands on a LUN
* fail to get aborted. It calls driver's eh_device_reset with a SCSI command
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH -next] scsi: fnic: Remove unused function fnic_scsi_host_start/end_tag()
2023-08-29 1:02 [PATCH -next] scsi: fnic: Remove unused function fnic_scsi_host_start/end_tag() Yang Li
@ 2023-08-29 2:42 ` Karan Tilak Kumar (kartilak)
2023-08-30 19:38 ` Bart Van Assche
2023-08-31 1:12 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Karan Tilak Kumar (kartilak) @ 2023-08-29 2:42 UTC (permalink / raw)
To: Yang Li, jejb@linux.ibm.com, martin.petersen@oracle.com,
Satish Kharat (satishkh), Sesidhar Baddela (sebaddel)
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Hi Yang,
Thanks for the changes. Looks good to me.
Acked-by: Karan Tilak Kumar <kartilak@cisco.com>
Regards,
Karan
-----Original Message-----
From: Yang Li <yang.lee@linux.alibaba.com>
Sent: Monday, August 28, 2023 6:02 PM
To: jejb@linux.ibm.com; martin.petersen@oracle.com; Satish Kharat (satishkh) <satishkh@cisco.com>; Sesidhar Baddela (sebaddel) <sebaddel@cisco.com>; Karan Tilak Kumar (kartilak) <kartilak@cisco.com>
Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org; Yang Li <yang.lee@linux.alibaba.com>
Subject: [PATCH -next] scsi: fnic: Remove unused function fnic_scsi_host_start/end_tag()
The function fnic_scsi_host_start_tag() and fnic_scsi_host_end_tag() are not used anywhere, so remove them.
silence the warnings:
drivers/scsi/fnic/fnic_scsi.c:2175:1: warning: unused function 'fnic_scsi_host_start_tag'
drivers/scsi/fnic/fnic_scsi.c:2196:1: warning: unused function 'fnic_scsi_host_end_tag'
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/scsi/fnic/fnic_scsi.c | 33 ---------------------------------
1 file changed, 33 deletions(-)
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c index 185142efee3d..9761b2c9db48 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -2167,39 +2167,6 @@ static int fnic_clean_pending_aborts(struct fnic *fnic,
return ret;
}
-/*
- * fnic_scsi_host_start_tag
- * Allocates tagid from host's tag list
- **/
-static inline int
-fnic_scsi_host_start_tag(struct fnic *fnic, struct scsi_cmnd *sc) -{
- struct request *rq = scsi_cmd_to_rq(sc);
- struct request_queue *q = rq->q;
- struct request *dummy;
-
- dummy = blk_mq_alloc_request(q, REQ_OP_WRITE, BLK_MQ_REQ_NOWAIT);
- if (IS_ERR(dummy))
- return SCSI_NO_TAG;
-
- rq->tag = dummy->tag;
- sc->host_scribble = (unsigned char *)dummy;
-
- return dummy->tag;
-}
-
-/*
- * fnic_scsi_host_end_tag
- * frees tag allocated by fnic_scsi_host_start_tag.
- **/
-static inline void
-fnic_scsi_host_end_tag(struct fnic *fnic, struct scsi_cmnd *sc) -{
- struct request *dummy = (struct request *)sc->host_scribble;
-
- blk_mq_free_request(dummy);
-}
-
/*
* SCSI Eh thread issues a Lun Reset when one or more commands on a LUN
* fail to get aborted. It calls driver's eh_device_reset with a SCSI command
--
2.20.1.7.g153144c
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] scsi: fnic: Remove unused function fnic_scsi_host_start/end_tag()
2023-08-29 1:02 [PATCH -next] scsi: fnic: Remove unused function fnic_scsi_host_start/end_tag() Yang Li
2023-08-29 2:42 ` Karan Tilak Kumar (kartilak)
@ 2023-08-30 19:38 ` Bart Van Assche
2023-08-31 1:12 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Bart Van Assche @ 2023-08-30 19:38 UTC (permalink / raw)
To: Yang Li, jejb, martin.petersen, satishkh, sebaddel, kartilak
Cc: linux-scsi, linux-kernel
On 8/28/23 18:02, Yang Li wrote:
> The function fnic_scsi_host_start_tag() and fnic_scsi_host_end_tag()
> are not used anywhere, so remove them.
Are you sure? I think the following output shows that these are being
used:
$ git grep -nHEw 'fnic_scsi_host_(start|end)_tag'
drivers/scsi/fnic/fnic_scsi.c:2171: * fnic_scsi_host_start_tag
drivers/scsi/fnic/fnic_scsi.c:2175:fnic_scsi_host_start_tag(struct fnic *fnic, struct scsi_cmnd *sc)
drivers/scsi/fnic/fnic_scsi.c:2192: * fnic_scsi_host_end_tag
drivers/scsi/fnic/fnic_scsi.c:2193: * frees tag allocated by fnic_scsi_host_start_tag.
drivers/scsi/fnic/fnic_scsi.c:2196:fnic_scsi_host_end_tag(struct fnic *fnic, struct scsi_cmnd *sc)
drivers/scsi/fnic/fnic_scsi.c:2262: tag = fnic_scsi_host_start_tag(fnic, sc);
drivers/scsi/fnic/fnic_scsi.c:2439: fnic_scsi_host_end_tag(fnic, sc);
Bart.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] scsi: fnic: Remove unused function fnic_scsi_host_start/end_tag()
2023-08-29 1:02 [PATCH -next] scsi: fnic: Remove unused function fnic_scsi_host_start/end_tag() Yang Li
2023-08-29 2:42 ` Karan Tilak Kumar (kartilak)
2023-08-30 19:38 ` Bart Van Assche
@ 2023-08-31 1:12 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2023-08-31 1:12 UTC (permalink / raw)
To: Yang Li
Cc: jejb, martin.petersen, satishkh, sebaddel, kartilak, linux-scsi,
linux-kernel
Yang,
> The function fnic_scsi_host_start_tag() and fnic_scsi_host_end_tag()
> are not used anywhere, so remove them.
Applied to 6.6/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-08-31 1:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-29 1:02 [PATCH -next] scsi: fnic: Remove unused function fnic_scsi_host_start/end_tag() Yang Li
2023-08-29 2:42 ` Karan Tilak Kumar (kartilak)
2023-08-30 19:38 ` Bart Van Assche
2023-08-31 1:12 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox