All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ata: sata_mv: remove a redundant assignment to pointer ehi
@ 2017-10-16 11:00 ` Colin King
  0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2017-10-16 11:00 UTC (permalink / raw)
  To: Tejun Heo, linux-ide; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

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>
---
 drivers/ata/sata_mv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 3b2246dded74..dbb62b508213 100644
--- a/drivers/ata/sata_mv.c
+++ b/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)
 {
-	struct ata_eh_info *ehi;
 	unsigned int pmp;
 
 	/*
 	 * Initialize EH info for PMPs which saw device errors
 	 */
-	ehi = &ap->link.eh_info;
 	for (pmp = 0; pmp_map != 0; pmp++) {
 		unsigned int this_pmp = (1 << pmp);
 		if (pmp_map & this_pmp) {
 			struct ata_link *link = &ap->pmp_link[pmp];
+			struct ata_eh_info *ehi = &link->eh_info;
 
 			pmp_map &= ~this_pmp;
-			ehi = &link->eh_info;
 			ata_ehi_clear_desc(ehi);
 			ata_ehi_push_desc(ehi, "dev err");
 			ehi->err_mask |= AC_ERR_DEV;
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ata: sata_mv: remove a redundant assignment to pointer ehi
@ 2017-10-16 11:00 ` Colin King
  0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2017-10-16 11:00 UTC (permalink / raw)
  To: Tejun Heo, linux-ide; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

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>
---
 drivers/ata/sata_mv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 3b2246dded74..dbb62b508213 100644
--- a/drivers/ata/sata_mv.c
+++ b/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)
 {
-	struct ata_eh_info *ehi;
 	unsigned int pmp;
 
 	/*
 	 * Initialize EH info for PMPs which saw device errors
 	 */
-	ehi = &ap->link.eh_info;
 	for (pmp = 0; pmp_map != 0; pmp++) {
 		unsigned int this_pmp = (1 << pmp);
 		if (pmp_map & this_pmp) {
 			struct ata_link *link = &ap->pmp_link[pmp];
+			struct ata_eh_info *ehi = &link->eh_info;
 
 			pmp_map &= ~this_pmp;
-			ehi = &link->eh_info;
 			ata_ehi_clear_desc(ehi);
 			ata_ehi_push_desc(ehi, "dev err");
 			ehi->err_mask |= AC_ERR_DEV;
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ata: sata_mv: remove a redundant assignment to pointer ehi
  2017-10-16 11:00 ` Colin King
@ 2017-10-21 16:25   ` Tejun Heo
  -1 siblings, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2017-10-21 16:25 UTC (permalink / raw)
  To: Colin King; +Cc: linux-ide, kernel-janitors, linux-kernel

On Mon, Oct 16, 2017 at 12:00:11PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> 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>

Applied to libata/for-4.15.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ata: sata_mv: remove a redundant assignment to pointer ehi
@ 2017-10-21 16:25   ` Tejun Heo
  0 siblings, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2017-10-21 16:25 UTC (permalink / raw)
  To: Colin King; +Cc: linux-ide, kernel-janitors, linux-kernel

On Mon, Oct 16, 2017 at 12:00:11PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> 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>

Applied to libata/for-4.15.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-21 16:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-16 11:00 [PATCH] ata: sata_mv: remove a redundant assignment to pointer ehi Colin King
2017-10-16 11:00 ` Colin King
2017-10-21 16:25 ` Tejun Heo
2017-10-21 16:25   ` Tejun Heo

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.