فهرست منبع

ata: sata_mv: remove a redundant assignment to pointer ehi

The pointer ehi is being assigned to a value that is never read
and is redundant.  Clean up the code and move the ehi declaration
and initialization to the code block where it is used. Cleans up
clang warning: Value stored to 'ehi' is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Colin Ian King 7 سال پیش
والد
کامیت
14d7045c7f
1فایلهای تغییر یافته به همراه1 افزوده شده و 3 حذف شده
  1. 1 3
      drivers/ata/sata_mv.c

+ 1 - 3
drivers/ata/sata_mv.c

@@ -2478,20 +2478,18 @@ static unsigned int mv_get_err_pmp_map(struct ata_port *ap)
 
 
 static void mv_pmp_eh_prep(struct ata_port *ap, unsigned int pmp_map)
 static void mv_pmp_eh_prep(struct ata_port *ap, unsigned int pmp_map)
 {
 {
-	struct ata_eh_info *ehi;
 	unsigned int pmp;
 	unsigned int pmp;
 
 
 	/*
 	/*
 	 * Initialize EH info for PMPs which saw device errors
 	 * Initialize EH info for PMPs which saw device errors
 	 */
 	 */
-	ehi = &ap->link.eh_info;
 	for (pmp = 0; pmp_map != 0; pmp++) {
 	for (pmp = 0; pmp_map != 0; pmp++) {
 		unsigned int this_pmp = (1 << pmp);
 		unsigned int this_pmp = (1 << pmp);
 		if (pmp_map & this_pmp) {
 		if (pmp_map & this_pmp) {
 			struct ata_link *link = &ap->pmp_link[pmp];
 			struct ata_link *link = &ap->pmp_link[pmp];
+			struct ata_eh_info *ehi = &link->eh_info;
 
 
 			pmp_map &= ~this_pmp;
 			pmp_map &= ~this_pmp;
-			ehi = &link->eh_info;
 			ata_ehi_clear_desc(ehi);
 			ata_ehi_clear_desc(ehi);
 			ata_ehi_push_desc(ehi, "dev err");
 			ata_ehi_push_desc(ehi, "dev err");
 			ehi->err_mask |= AC_ERR_DEV;
 			ehi->err_mask |= AC_ERR_DEV;