aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/typec
diff options
context:
space:
mode:
authorThomas Gardner <tmg@fastmail.com>2017-07-07 10:24:32 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-16 08:40:59 +0200
commitcbe5843e7624b6a468d74faccffec57b5c73200b (patch)
treeb63d6a6ae1d2a12e9ec2aaa0f4488f4437c5dc6a /drivers/staging/typec
parentstaging: rtl8723bs: Place constant at the right. (diff)
downloadlinux-dev-cbe5843e7624b6a468d74faccffec57b5c73200b.tar.xz
linux-dev-cbe5843e7624b6a468d74faccffec57b5c73200b.zip
staging: typec: Fix endianness warning discovered by sparse
The below warning is resolved by removing the cpu_to_le32() call. This call was redundant; vdm_run_state_machine() ensures that SVDM responses have the correct endianness before sending. typec/tcpm.c:1019:49: warning: incorrect type in assignment (different base types) typec/tcpm.c:1019:49: expected unsigned int [unsigned] [usertype] <noident> typec/tcpm.c:1019:49: got restricted __le32 [usertype] <noident> Signed-off-by: Thomas Gardner <tmg@fastmail.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/typec')
-rw-r--r--drivers/staging/typec/tcpm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c
index 20eb4ebcf8c3..2195c80235a1 100644
--- a/drivers/staging/typec/tcpm.c
+++ b/drivers/staging/typec/tcpm.c
@@ -1015,8 +1015,7 @@ static int tcpm_pd_svdm(struct tcpm_port *port, const __le32 *payload, int cnt,
if (port->data_role == TYPEC_DEVICE &&
port->nr_snk_vdo) {
for (i = 0; i < port->nr_snk_vdo; i++)
- response[i + 1]
- = cpu_to_le32(port->snk_vdo[i]);
+ response[i + 1] = port->snk_vdo[i];
rlen = port->nr_snk_vdo + 1;
}
break;