Skip to contentSkip to conversation

platform/chrome: cros_ec_lpc: remove redundant pointer request

PATCH In review Colin King 2 participants 2 messages Oct 31, 2017 – Dec 16, 2017

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 platform/chrome: cros_ec_lpc: remove redundant pointer request

From: Colin Ian King <[email protected]>

Pointer request is being assigned but never used, so remove it. Cleans up the clang warning:

drivers/platform/chrome/cros_ec_lpc.c:68:2: warning: Value stored to 'request' is never read

---
 drivers/platform/chrome/cros_ec_lpc.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/platform/chrome/cros_ec_lpc.c +0 -3
index 1baf720faf69..87e9747d229a 100644
@@ -54,7 +54,6 @@ static int ec_response_timed_out(void)
 static int cros_ec_pkt_xfer_lpc(struct cros_ec_device *ec,
 				struct cros_ec_command *msg)
 {
-	struct ec_host_request *request;
 	struct ec_host_response response;
 	u8 sum;
 	int ret = 0;
@@ -65,8 +64,6 @@ static int cros_ec_pkt_xfer_lpc(struct cros_ec_device *ec,
 	/* Write buffer */
 	cros_ec_lpc_write_bytes(EC_LPC_ADDR_HOST_PACKET, ret, ec->dout);
 
-	request = (struct ec_host_request *)ec->dout;
-
 	/* Here we go */
 	sum = EC_COMMAND_PROTOCOL_3;
 	cros_ec_lpc_write_bytes(EC_LPC_ADDR_HOST_CMD, 1, &sum);
Signature · 1 line
2.14.1
#1 lore raw

Hi Colin,

Quoted 9 lines · Colin King

From: Colin Ian King <[email protected]>

Pointer request is being assigned but never used, so remove it. Cleans up the clang warning:

drivers/platform/chrome/cros_ec_lpc.c:68:2: warning: Value stored to 'request' is never read

Thanks for the patch. Sorry for the delay. Applied for v4.16.

Thanks,
Benson

Quoted 28 lines
---
 drivers/platform/chrome/cros_ec_lpc.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/platform/chrome/cros_ec_lpc.c +0 -3
index 1baf720faf69..87e9747d229a 100644
@@ -54,7 +54,6 @@ static int ec_response_timed_out(void)
 static int cros_ec_pkt_xfer_lpc(struct cros_ec_device *ec,
 				struct cros_ec_command *msg)
 {
-	struct ec_host_request *request;
 	struct ec_host_response response;
 	u8 sum;
 	int ret = 0;
@@ -65,8 +64,6 @@ static int cros_ec_pkt_xfer_lpc(struct cros_ec_device *ec,
 	/* Write buffer */
 	cros_ec_lpc_write_bytes(EC_LPC_ADDR_HOST_PACKET, ret, ec->dout);
 
-	request = (struct ec_host_request *)ec->dout;
-
 	/* Here we go */
 	sum = EC_COMMAND_PROTOCOL_3;
 	cros_ec_lpc_write_bytes(EC_LPC_ADDR_HOST_CMD, 1, &sum);
Signature · 1 line
2.14.1
Signature · 7 lines
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
[email protected]
Chromium OS Project
[email protected]