瀏覽代碼

usb: typec: tcpc: Make it compile

Change-Id: I40140af175568aa30dc717c2bdcc82edf533cf14
Signed-off-by: Jens Reidel <[email protected]>
Jens Reidel 1 年之前
父節點
當前提交
e9cb800785

+ 1 - 2
drivers/usb/typec/platform/external/tcpc/pd_dpm_alt_mode_dp.c

@@ -370,7 +370,7 @@ static inline uint8_t dp_dfp_u_select_mode(struct pd_port *pd_port,
 	struct svdm_mode *remote, *local;
 	int i, j;
 	int match_score, best_match_score = 0;
-	int local_index = -1, remote_index = -1;
+	int remote_index = -1;
 	struct tcpc_device __maybe_unused *tcpc = pd_port->tcpc;
 
 	local = &svid_data->local_mode;
@@ -390,7 +390,6 @@ static inline uint8_t dp_dfp_u_select_mode(struct pd_port *pd_port,
 							  &local_dp_config,
 							  &remote_dp_config);
 			if (match_score > best_match_score) {
-				local_index = j;
 				remote_index = i;
 				dp_data->local_config = local_dp_config;
 				dp_data->remote_config = remote_dp_config;

+ 1 - 3
drivers/usb/typec/platform/external/tcpc/tcpc_rt1711h.c

@@ -758,10 +758,8 @@ static inline int rt1711_fault_status_vconn_ov(struct tcpc_device *tcpc)
 
 int rt1711_fault_status_clear(struct tcpc_device *tcpc, uint8_t status)
 {
-	int ret;
-
 	if (status & TCPC_V10_REG_FAULT_STATUS_VCONN_OV)
-		ret = rt1711_fault_status_vconn_ov(tcpc);
+		rt1711_fault_status_vconn_ov(tcpc);
 
 	rt1711_i2c_write8(tcpc, TCPC_V10_REG_FAULT_STATUS, status);
 	return 0;

+ 4 - 5
include/linux/usb/tcpc/rt1711h.h

@@ -190,11 +190,10 @@
 /* timeout = (tout+1) * 12.5ms */
 #define RT1711H_REG_I2CRST_SET(en, tout) ((en << 7) | (tout & 0x0f))
 
-#if ENABLE_RT1711_DBG
 #define RT1711_INFO(format, args...)                                           \
-	pd_dbg_info("%s() line-%d: " format, __func__, __LINE__, ##args)
-#else
-#define RT1711_INFO(foramt, args...)
-#endif
+	{                                                                          \
+		if (ENABLE_RT1711_DBG)                                                \
+			pd_dbg_info("%s() line-%d: " format, __func__, __LINE__, ##args);  \
+	}
 
 #endif /* #ifndef __LINUX_RT1711H_H */