[PATCH] PCI: ibmphp: remove unused variable

Rosen Penev posted 1 patch 6 days ago
drivers/pci/hotplug/ibmphp_hpc.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
[PATCH] PCI: ibmphp: remove unused variable
Posted by Rosen Penev 6 days ago
rc is set but not used. Found with W=1.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/pci/hotplug/ibmphp_hpc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/hotplug/ibmphp_hpc.c b/drivers/pci/hotplug/ibmphp_hpc.c
index 2324167656a6..bb9149798428 100644
--- a/drivers/pci/hotplug/ibmphp_hpc.c
+++ b/drivers/pci/hotplug/ibmphp_hpc.c
@@ -786,7 +786,6 @@ static int poll_hpc(void *data)
 {
 	struct slot myslot;
 	struct slot *pslot = NULL;
-	int rc;
 	int poll_state = POLL_LATCH_REGISTER;
 	u8 oldlatchlow = 0x00;
 	u8 curlatchlow = 0x00;
@@ -810,7 +809,7 @@ static int poll_hpc(void *data)
 				if (pslot->ctrl->ctlr_relative_id == ctrl_count) {
 					ctrl_count++;
 					if (READ_SLOT_LATCH(pslot->ctrl)) {
-						rc = ibmphp_hpc_readslot(pslot,
+						ibmphp_hpc_readslot(pslot,
 									  READ_SLOTLATCHLOWREG,
 									  &curlatchlow);
 						if (oldlatchlow != curlatchlow)
@@ -829,7 +828,7 @@ static int poll_hpc(void *data)
 				// make a copy of the old status
 				memcpy((void *) &myslot, (void *) pslot,
 					sizeof(struct slot));
-				rc = ibmphp_hpc_readslot(pslot, READ_ALLSTAT, NULL);
+				ibmphp_hpc_readslot(pslot, READ_ALLSTAT, NULL);
 				if ((myslot.status != pslot->status)
 				    || (myslot.ext_status != pslot->ext_status))
 					process_changeinstatus(pslot, &myslot);
@@ -842,7 +841,7 @@ static int poll_hpc(void *data)
 				if (pslot->ctrl->ctlr_relative_id == ctrl_count) {
 					ctrl_count++;
 					if (READ_SLOT_LATCH(pslot->ctrl))
-						rc = ibmphp_hpc_readslot(pslot,
+						ibmphp_hpc_readslot(pslot,
 									  READ_SLOTLATCHLOWREG,
 									  &curlatchlow);
 				}
-- 
2.54.0