Re: [PATCH v3 1/4] usb: typec: ucsi: Update UCSI structure to have message in and message out fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


(追記) (追記ここまで)



Hi Pooja,
kernel test robot noticed the following build errors:
[auto build test ERROR on usb/usb-linus]
[also build test ERROR on westeri-thunderbolt/next linus/master v6.17-rc4]
[cannot apply to usb/usb-testing usb/usb-next next-20250905]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Pooja-Katiyar/usb-typec-ucsi-Update-UCSI-structure-to-have-message-in-and-message-out-fields/20250906-123240
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-linus
patch link: https://lore.kernel.org/r/109c631547b41ce7af26a7c3e9bfd5ab87fa4587.1757024530.git.pooja.katiyar%40intel.com
patch subject: [PATCH v3 1/4] usb: typec: ucsi: Update UCSI structure to have message in and message out fields
config: x86_64-buildonly-randconfig-004-20250906 (https://download.01.org/0day-ci/archive/20250906/202509061553.9MqCFYMQ-lkp@xxxxxxxxx/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250906/202509061553.9MqCFYMQ-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509061553.9MqCFYMQ-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
>> drivers/usb/typec/ucsi/ucsi_yoga_c630.c:129:53: error: too many arguments to function call, expected 3, have 5
 129 | ret = ucsi_sync_control_common(ucsi, command, cci, data, size);
 | ~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~
 drivers/usb/typec/ucsi/ucsi.h:552:5: note: 'ucsi_sync_control_common' declared here
 552 | int ucsi_sync_control_common(struct ucsi *ucsi, u64 command, u32 *cci);
 | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/usb/typec/ucsi/ucsi_yoga_c630.c:173:18: error: incompatible function pointer types initializing 'int (*)(struct ucsi *, u64, u32 *)' (aka 'int (*)(struct ucsi *, unsigned long long, unsigned int *)') with an expression of type 'int (struct ucsi *, u64, u32 *, void *, size_t)' (aka 'int (struct ucsi *, unsigned long long, unsigned int *, void *, unsigned long)') [-Wincompatible-function-pointer-types]
 173 | .sync_control = yoga_c630_ucsi_sync_control,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
 2 errors generated.
vim +173 drivers/usb/typec/ucsi/ucsi_yoga_c630.c
2ea6d07efe5388 Dmitry Baryshkov 2024年06月24日 88 
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 89 static int yoga_c630_ucsi_sync_control(struct ucsi *ucsi,
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 90 				 u64 command,
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 91 				 u32 *cci,
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 92 				 void *data, size_t size)
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 93 {
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 94 	int ret;
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 95 
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 96 	/*
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 97 	 * EC doesn't return connector's DP mode even though it is supported.
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 98 	 * Fake it.
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 99 	 */
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 100 	if (UCSI_COMMAND(command) == UCSI_GET_ALTERNATE_MODES &&
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 101 	 UCSI_GET_ALTMODE_GET_CONNECTOR_NUMBER(command) == 1 &&
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 102 	 UCSI_ALTMODE_RECIPIENT(command) == UCSI_RECIPIENT_CON &&
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 103 	 UCSI_ALTMODE_OFFSET(command) == 0) {
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 104 		static const struct ucsi_altmode alt = {
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 105 			.svid = USB_TYPEC_DP_SID,
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 106 			.mid = USB_TYPEC_DP_MODE,
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 107 		};
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 108 
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 109 		dev_dbg(ucsi->dev, "faking DP altmode for con1\n");
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 110 		memset(data, 0, size);
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 111 		memcpy(data, &alt, min(sizeof(alt), size));
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 112 		*cci = UCSI_CCI_COMMAND_COMPLETE | UCSI_SET_CCI_LENGTH(sizeof(alt));
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 113 		return 0;
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 114 	}
442392f98d20c5 Dmitry Baryshkov 2025年06月21日 115 
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 116 	/*
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 117 	 * EC can return AltModes present on CON1 (port0, right) for CON2
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 118 	 * (port1, left) too. Ignore all requests going to CON2 (it doesn't
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 119 	 * support DP anyway).
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 120 	 */
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 121 	if (UCSI_COMMAND(command) == UCSI_GET_ALTERNATE_MODES &&
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 122 	 UCSI_GET_ALTMODE_GET_CONNECTOR_NUMBER(command) == 2) {
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 123 		dev_dbg(ucsi->dev, "ignoring altmodes for con2\n");
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 124 		memset(data, 0, size);
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 125 		*cci = UCSI_CCI_COMMAND_COMPLETE;
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 126 		return 0;
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 127 	}
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 128 
e943c93333e305 Dmitry Baryshkov 2025年06月21日 @129 	ret = ucsi_sync_control_common(ucsi, command, cci, data, size);
e943c93333e305 Dmitry Baryshkov 2025年06月21日 130 	if (ret < 0)
e943c93333e305 Dmitry Baryshkov 2025年06月21日 131 		return ret;
e943c93333e305 Dmitry Baryshkov 2025年06月21日 132 
e943c93333e305 Dmitry Baryshkov 2025年06月21日 133 	/* UCSI_GET_CURRENT_CAM is off-by-one on all ports */
e943c93333e305 Dmitry Baryshkov 2025年06月21日 134 	if (UCSI_COMMAND(command) == UCSI_GET_CURRENT_CAM && data)
e943c93333e305 Dmitry Baryshkov 2025年06月21日 135 		((u8 *)data)[0]--;
e943c93333e305 Dmitry Baryshkov 2025年06月21日 136 
e943c93333e305 Dmitry Baryshkov 2025年06月21日 137 	return ret;
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 138 }
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 139 
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 140 static bool yoga_c630_ucsi_update_altmodes(struct ucsi *ucsi,
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 141 					 u8 recipient,
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 142 					 struct ucsi_altmode *orig,
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 143 					 struct ucsi_altmode *updated)
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 144 {
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 145 	int i;
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 146 
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 147 	if (orig[0].svid == 0 || recipient != UCSI_RECIPIENT_SOP)
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 148 		return false;
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 149 
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 150 	/* EC is nice and repeats altmodes again and again. Ignore copies. */
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 151 	for (i = 1; i < UCSI_MAX_ALTMODES; i++) {
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 152 		if (orig[i].svid == orig[0].svid) {
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 153 			dev_dbg(ucsi->dev, "Found duplicate altmodes, starting from %d\n", i);
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 154 			memset(&orig[i], 0, (UCSI_MAX_ALTMODES - i) * sizeof(*orig));
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 155 			break;
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 156 		}
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 157 	}
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 158 
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 159 	return false;
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 160 }
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 161 
49bf6ee89ebadc Dmitry Baryshkov 2025年06月21日 162 static void yoga_c630_ucsi_update_connector(struct ucsi_connector *con)
49bf6ee89ebadc Dmitry Baryshkov 2025年06月21日 163 {
49bf6ee89ebadc Dmitry Baryshkov 2025年06月21日 164 	if (con->num == 1)
49bf6ee89ebadc Dmitry Baryshkov 2025年06月21日 165 		con->typec_cap.orientation_aware = true;
49bf6ee89ebadc Dmitry Baryshkov 2025年06月21日 166 }
49bf6ee89ebadc Dmitry Baryshkov 2025年06月21日 167 
da31486bf23480 Pei Xiao 2024年12月27日 168 static const struct ucsi_operations yoga_c630_ucsi_ops = {
467399d989d799 Dmitry Baryshkov 2024年06月27日 169 	.read_version = yoga_c630_ucsi_read_version,
467399d989d799 Dmitry Baryshkov 2024年06月27日 170 	.read_cci = yoga_c630_ucsi_read_cci,
976e7e9bdc7719 Christian A. Ehrhardt 2025年02月17日 171 	.poll_cci = yoga_c630_ucsi_read_cci,
467399d989d799 Dmitry Baryshkov 2024年06月27日 172 	.read_message_in = yoga_c630_ucsi_read_message_in,
eebd39f8a89985 Dmitry Baryshkov 2025年06月21日 @173 	.sync_control = yoga_c630_ucsi_sync_control,
13f2ec3115c845 Dmitry Baryshkov 2024年06月27日 174 	.async_control = yoga_c630_ucsi_async_control,
e0c48e42d818ab Dmitry Baryshkov 2025年06月21日 175 	.update_altmodes = yoga_c630_ucsi_update_altmodes,
49bf6ee89ebadc Dmitry Baryshkov 2025年06月21日 176 	.update_connector = yoga_c630_ucsi_update_connector,
2ea6d07efe5388 Dmitry Baryshkov 2024年06月24日 177 };
2ea6d07efe5388 Dmitry Baryshkov 2024年06月24日 178 
-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

[Index of Archives] [Linux Media] [Linux Input] [Linux Audio Users] [Yosemite News] [Linux Kernel] [Linux SCSI] [Old Linux USB Devel Archive]

(追記) (追記ここまで)
Powered by Linux

AltStyle によって変換されたページ (->オリジナル) /