FAILED: patch "[PATCH] usb: typec: tcpm: Use LE to CPU conversion when accessing" failed to apply to 5.10-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From c58bbe3477f75deb7883983e6cf428404a107555 Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <[email protected]>
Date: Wed, 19 May 2021 13:03:58 +0300
Subject: [PATCH] usb: typec: tcpm: Use LE to CPU conversion when accessing
msg->header
Sparse is not happy about strict type handling:
.../typec/tcpm/tcpm.c:2720:27: warning: restricted __le16 degrades to integer .../typec/tcpm/tcpm.c:2814:32: warning: restricted __le16 degrades to integer
Fix this by converting LE to CPU before use.
drivers/usb/typec/tcpm/tcpm.c +2 -2
@@ -2717,7 +2717,7 @@ static void tcpm_pd_ext_msg_request(struct tcpm_port *port,enum pd_ext_msg_type type =pd_header_type_le (msg->header);unsigned int data_size =pd_ext_header_data_size_le (msg->ext_msg.header); -if (!(msg->ext_msg.header &PD_EXT_HDR_CHUNKED )) { +if (!(le16_to_cpu (msg->ext_msg.header) &PD_EXT_HDR_CHUNKED )) {tcpm_pd_handle_msg (port,PD_MSG_CTRL_NOT_SUPP ,NONE_AMS );tcpm_log (port,"Unchunked extended messages unsupported" );return ;
@@ -2811,7 +2811,7 @@ static void tcpm_pd_rx_handler(struct kthread_work *work) "Data role mismatch, initiating error recovery");tcpm_set_state (port,ERROR_RECOVERY ,0 ); }else { -if (msg->header &PD_HEADER_EXT_HDR ) +if (le16_to_cpu (msg->header) &PD_HEADER_EXT_HDR )tcpm_pd_ext_msg_request (port, msg);else if (cnt)tcpm_pd_data_request (port, msg);