]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: aic7xxx: Fix 'amount_xferred' set but not used issue
authorLee Jones <lee.jones@linaro.org>
Mon, 13 Jul 2020 08:00:00 +0000 (09:00 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 15 Jul 2020 21:28:26 +0000 (17:28 -0400)
commit3cc4049ef921c13f2353bd8deab58d1e6ecc85df
treeb9fcf60a97c3336ec5b1922c7a618af67148fb20
parent01ccd035bfe5e8564147fd090c12954d91ed00a8
scsi: aic7xxx: Fix 'amount_xferred' set but not used issue

'amount_xferred' is used, but only in certain circumstances.  Place
the same stipulations on the defining/allocating of 'amount_xferred'
as is placed when using it.

We've been careful not to change any of the ordering semantics here.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_done’:
 drivers/scsi/aic7xxx/aic79xx_osm.c:1796:12: warning: variable ‘amount_xferred’ set but not used [-Wunused-but-set-variable]

Link: https://lore.kernel.org/r/20200713080001.128044-24-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@suse.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aic7xxx/aic79xx_osm.c