]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
scsi: ncr53c8xx: Remove unused retrieve_from_waiting_list() function
authorHelge Deller <deller@gmx.de>
Tue, 7 Sep 2021 21:00:44 +0000 (23:00 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 14 Sep 2021 02:15:47 +0000 (22:15 -0400)
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]

Link: https://lore.kernel.org/r/YTfS/LH5vCN6afDW@ls3530
Fixes: 1c22e327545c ("scsi: ncr53c8xx: Remove unused code")
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ncr53c8xx.c

index 7a4f5d4dd6705908434b98c1cf0a4dd69edbddd7..2b8c6fa5e77569511677892831a3caea50a19933 100644 (file)
@@ -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;