All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pooja Katiyar <pooja.katiyar@intel.com>,
	linux-usb@vger.kernel.org, gregkh@linuxfoundation.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	dmitry.baryshkov@oss.qualcomm.com, pooja.katiyar@intel.com,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>
Subject: Re: [PATCH v3 1/4] usb: typec: ucsi: Update UCSI structure to have message in and message out fields
Date: Sat, 6 Sep 2025 16:30:00 +0800	[thread overview]
Message-ID: <202509061553.9MqCFYMQ-lkp@intel.com> (raw)
In-Reply-To: <109c631547b41ce7af26a7c3e9bfd5ab87fa4587.1757024530.git.pooja.katiyar@intel.com>

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@intel.com/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@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509061553.9MqCFYMQ-lkp@intel.com/

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

  reply	other threads:[~2025-09-06  8:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-06  4:30 [PATCH v3 0/4] usb: typec: ucsi: Add support for SET_PDOS command Pooja Katiyar
2025-09-06  4:30 ` [PATCH v3 1/4] usb: typec: ucsi: Update UCSI structure to have message in and message out fields Pooja Katiyar
2025-09-06  8:30   ` kernel test robot [this message]
2025-09-06  4:30 ` [PATCH v3 2/4] usb: typec: ucsi: Add support for message out data structure Pooja Katiyar
2025-09-06  4:31 ` [PATCH v3 3/4] usb: typec: ucsi: Enable debugfs for message_out " Pooja Katiyar
2025-09-06  4:31 ` [PATCH v3 4/4] usb: typec: ucsi: Add support for SET_PDOS command Pooja Katiyar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202509061553.9MqCFYMQ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pooja.katiyar@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.