Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_send_async’: drivers/scsi/aic7xxx/aic7xxx_osm.c:1611:28: warning: variable ‘targ’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. In this case scsi_transport_target_data() can be removed because of no caller exist. Signed-off-by: yu kuai <yukuai3@xxxxxxxxxx> --- drivers/scsi/aic7xxx/aic7xxx_osm.c | 2 -- include/scsi/scsi_transport.h | 10 +--------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index 2cda0736c989..33fc55c6b2f4 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c @@ -1600,7 +1600,6 @@ ahc_send_async(struct ahc_softc *ahc, char channel, case AC_TRANSFER_NEG: { struct scsi_target *starget; - struct ahc_linux_target *targ; struct ahc_initiator_tinfo *tinfo; struct ahc_tmode_tstate *tstate; int target_offset; @@ -1634,7 +1633,6 @@ ahc_send_async(struct ahc_softc *ahc, char channel, starget = ahc->platform_data->starget[target_offset]; if (starget == NULL) break; - targ = scsi_transport_target_data(starget); target_ppr_options = (spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0) diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h index a0458bda3148..2cffdb34721d 100644 --- a/include/scsi/scsi_transport.h +++ b/include/scsi/scsi_transport.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -/* +/* * Transport specific attributes. * * Copyright (c) 2003 Silicon Graphics, Inc. All rights reserved. @@ -68,14 +68,6 @@ scsi_transport_reserve_device(struct scsi_transport_template * t, int space) t->device_size = t->device_private_offset + space; } static inline void * -scsi_transport_target_data(struct scsi_target *starget) -{ - struct Scsi_Host *shost = dev_to_shost(&starget->dev); - return (u8 *)starget->starget_data - + shost->transportt->target_private_offset; - -} -static inline void * scsi_transport_device_data(struct scsi_device *sdev) { struct Scsi_Host *shost = sdev->host; -- 2.17.2