* [PATCH] scsi: ncr53c8xx: Remove unused retrieve_from_waiting_list() function
@ 2021-09-07 21:00 Helge Deller
2021-09-08 18:13 ` Guenter Roeck
2021-09-14 3:43 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Helge Deller @ 2021-09-07 21:00 UTC (permalink / raw)
To: James E.J. Bottomley, Martin K. Petersen, linux-scsi, linux-kernel
Cc: Hannes Reinecke, linux-parisc
Drop retrieve_from_waiting_list() to avoid this warning:
drivers/scsi/ncr53c8xx.c:8000:26: warning: ‘retrieve_from_waiting_list’ defined but not used [-Wunused-function]
Fixes: 1c22e327545c ("scsi: ncr53c8xx: Remove unused code")
Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c
index 7a4f5d4dd670..2b8c6fa5e775 100644
--- a/drivers/scsi/ncr53c8xx.c
+++ b/drivers/scsi/ncr53c8xx.c
@@ -1939,11 +1939,8 @@ static void ncr_start_next_ccb (struct ncb *np, struct lcb * lp, int maxn);
static void ncr_put_start_queue(struct ncb *np, struct ccb *cp);
static void insert_into_waiting_list(struct ncb *np, struct scsi_cmnd *cmd);
-static struct scsi_cmnd *retrieve_from_waiting_list(int to_remove, struct ncb *np, struct scsi_cmnd *cmd);
static void process_waiting_list(struct ncb *np, int sts);
-#define remove_from_waiting_list(np, cmd) \
- retrieve_from_waiting_list(1, (np), (cmd))
#define requeue_waiting_list(np) process_waiting_list((np), DID_OK)
#define reset_waiting_list(np) process_waiting_list((np), DID_RESET)
@@ -7997,26 +7994,6 @@ static void insert_into_waiting_list(struct ncb *np, struct scsi_cmnd *cmd)
}
}
-static struct scsi_cmnd *retrieve_from_waiting_list(int to_remove, struct ncb *np, struct scsi_cmnd *cmd)
-{
- struct scsi_cmnd **pcmd = &np->waiting_list;
-
- while (*pcmd) {
- if (cmd == *pcmd) {
- if (to_remove) {
- *pcmd = (struct scsi_cmnd *) cmd->next_wcmd;
- cmd->next_wcmd = NULL;
- }
-#ifdef DEBUG_WAITING_LIST
- printk("%s: cmd %lx retrieved from waiting list\n", ncr_name(np), (u_long) cmd);
-#endif
- return cmd;
- }
- pcmd = (struct scsi_cmnd **) &(*pcmd)->next_wcmd;
- }
- return NULL;
-}
-
static void process_waiting_list(struct ncb *np, int sts)
{
struct scsi_cmnd *waiting_list, *wcmd;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ncr53c8xx: Remove unused retrieve_from_waiting_list() function
2021-09-07 21:00 [PATCH] scsi: ncr53c8xx: Remove unused retrieve_from_waiting_list() function Helge Deller
@ 2021-09-08 18:13 ` Guenter Roeck
2021-09-14 3:43 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2021-09-08 18:13 UTC (permalink / raw)
To: Helge Deller
Cc: James E.J. Bottomley, Martin K. Petersen, linux-scsi,
linux-kernel, Hannes Reinecke, linux-parisc
On Tue, Sep 07, 2021 at 11:00:44PM +0200, Helge Deller wrote:
> Drop retrieve_from_waiting_list() to avoid this warning:
> drivers/scsi/ncr53c8xx.c:8000:26: warning: ‘retrieve_from_waiting_list’ defined but not used [-Wunused-function]
>
> Fixes: 1c22e327545c ("scsi: ncr53c8xx: Remove unused code")
> Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
>
> diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c
> index 7a4f5d4dd670..2b8c6fa5e775 100644
> --- a/drivers/scsi/ncr53c8xx.c
> +++ b/drivers/scsi/ncr53c8xx.c
> @@ -1939,11 +1939,8 @@ static void ncr_start_next_ccb (struct ncb *np, struct lcb * lp, int maxn);
> static void ncr_put_start_queue(struct ncb *np, struct ccb *cp);
>
> static void insert_into_waiting_list(struct ncb *np, struct scsi_cmnd *cmd);
> -static struct scsi_cmnd *retrieve_from_waiting_list(int to_remove, struct ncb *np, struct scsi_cmnd *cmd);
> static void process_waiting_list(struct ncb *np, int sts);
>
> -#define remove_from_waiting_list(np, cmd) \
> - retrieve_from_waiting_list(1, (np), (cmd))
> #define requeue_waiting_list(np) process_waiting_list((np), DID_OK)
> #define reset_waiting_list(np) process_waiting_list((np), DID_RESET)
>
> @@ -7997,26 +7994,6 @@ static void insert_into_waiting_list(struct ncb *np, struct scsi_cmnd *cmd)
> }
> }
>
> -static struct scsi_cmnd *retrieve_from_waiting_list(int to_remove, struct ncb *np, struct scsi_cmnd *cmd)
> -{
> - struct scsi_cmnd **pcmd = &np->waiting_list;
> -
> - while (*pcmd) {
> - if (cmd == *pcmd) {
> - if (to_remove) {
> - *pcmd = (struct scsi_cmnd *) cmd->next_wcmd;
> - cmd->next_wcmd = NULL;
> - }
> -#ifdef DEBUG_WAITING_LIST
> - printk("%s: cmd %lx retrieved from waiting list\n", ncr_name(np), (u_long) cmd);
> -#endif
> - return cmd;
> - }
> - pcmd = (struct scsi_cmnd **) &(*pcmd)->next_wcmd;
> - }
> - return NULL;
> -}
> -
> static void process_waiting_list(struct ncb *np, int sts)
> {
> struct scsi_cmnd *waiting_list, *wcmd;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ncr53c8xx: Remove unused retrieve_from_waiting_list() function
2021-09-07 21:00 [PATCH] scsi: ncr53c8xx: Remove unused retrieve_from_waiting_list() function Helge Deller
2021-09-08 18:13 ` Guenter Roeck
@ 2021-09-14 3:43 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-09-14 3:43 UTC (permalink / raw)
To: linux-scsi, linux-kernel, James E.J. Bottomley, Helge Deller
Cc: Martin K . Petersen, Hannes Reinecke, linux-parisc
On Tue, 7 Sep 2021 23:00:44 +0200, Helge Deller wrote:
> Drop retrieve_from_waiting_list() to avoid this warning:
> drivers/scsi/ncr53c8xx.c:8000:26: warning: ‘retrieve_from_waiting_list’ defined but not used [-Wunused-function]
>
>
Applied to 5.15/scsi-fixes, thanks!
[1/1] scsi: ncr53c8xx: Remove unused retrieve_from_waiting_list() function
https://git.kernel.org/mkp/scsi/c/1f97c29beee7
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-14 3:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 21:00 [PATCH] scsi: ncr53c8xx: Remove unused retrieve_from_waiting_list() function Helge Deller
2021-09-08 18:13 ` Guenter Roeck
2021-09-14 3:43 ` 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.