From: kernel test robot <lkp@intel.com>
To: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Dmitry Baryshkov <lumag@kernel.org>,
Fedor Pchelkin <boddah8794@gmail.com>,
Andrei Kuchynski <akuchynski@chromium.org>,
Venkat Jayaraman <venkat.jayaraman@intel.com>,
Myrrh Periwinkle <myrrhperiwinkle@qtmlabs.xyz>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v2 2/3] usb: typec: ucsi: Add duplicate detection to nvidia registration path
Date: Wed, 12 Nov 2025 00:54:40 +0800 [thread overview]
Message-ID: <202511120044.i2blPN85-lkp@intel.com> (raw)
In-Reply-To: <20251111010541.145421-2-acelan.kao@canonical.com>
Hi Chia-Lin,
kernel test robot noticed the following build errors:
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on usb/usb-next usb/usb-linus linus/master v6.18-rc5 next-20251111]
[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/Chia-Lin-Kao-AceLan/usb-typec-ucsi-Add-duplicate-detection-to-nvidia-registration-path/20251111-092153
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link: https://lore.kernel.org/r/20251111010541.145421-2-acelan.kao%40canonical.com
patch subject: [PATCH v2 2/3] usb: typec: ucsi: Add duplicate detection to nvidia registration path
config: x86_64-randconfig-072-20251111 (https://download.01.org/0day-ci/archive/20251112/202511120044.i2blPN85-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/20251112/202511120044.i2blPN85-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/202511120044.i2blPN85-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/usb/typec/ucsi/ucsi.c:547:7: error: call to undeclared function 'ucsi_altmode_is_duplicate'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
547 | if (ucsi_altmode_is_duplicate(con, recipient, altmode_array, i,
| ^
drivers/usb/typec/ucsi/ucsi.c:570:13: error: static declaration of 'ucsi_altmode_is_duplicate' follows non-static declaration
570 | static bool ucsi_altmode_is_duplicate(struct ucsi_connector *con, u8 recipient,
| ^
drivers/usb/typec/ucsi/ucsi.c:547:7: note: previous implicit declaration is here
547 | if (ucsi_altmode_is_duplicate(con, recipient, altmode_array, i,
| ^
2 errors generated.
vim +/ucsi_altmode_is_duplicate +547 drivers/usb/typec/ucsi/ucsi.c
483
484 static int
485 ucsi_register_altmodes_nvidia(struct ucsi_connector *con, u8 recipient)
486 {
487 int max_altmodes = UCSI_MAX_ALTMODES;
488 struct typec_altmode_desc desc;
489 struct ucsi_altmode alt;
490 struct ucsi_altmode orig[UCSI_MAX_ALTMODES];
491 struct ucsi_altmode updated[UCSI_MAX_ALTMODES];
492 struct ucsi *ucsi = con->ucsi;
493 bool multi_dp = false;
494 u64 command;
495 int ret;
496 int len;
497 int i;
498 int k = 0;
499
500 if (recipient == UCSI_RECIPIENT_CON)
501 max_altmodes = con->ucsi->cap.num_alt_modes;
502
503 memset(orig, 0, sizeof(orig));
504 memset(updated, 0, sizeof(updated));
505
506 /* First get all the alternate modes */
507 for (i = 0; i < max_altmodes; i++) {
508 memset(&alt, 0, sizeof(alt));
509 command = UCSI_GET_ALTERNATE_MODES;
510 command |= UCSI_GET_ALTMODE_RECIPIENT(recipient);
511 command |= UCSI_GET_ALTMODE_CONNECTOR_NUMBER(con->num);
512 command |= UCSI_GET_ALTMODE_OFFSET(i);
513 len = ucsi_send_command(con->ucsi, command, &alt, sizeof(alt));
514 /*
515 * We are collecting all altmodes first and then registering.
516 * Some type-C device will return zero length data beyond last
517 * alternate modes. We should not return if length is zero.
518 */
519 if (len < 0)
520 return len;
521
522 /* We got all altmodes, now break out and register them */
523 if (!len || !alt.svid)
524 break;
525
526 orig[k].mid = alt.mid;
527 orig[k].svid = alt.svid;
528 k++;
529 }
530 /*
531 * Update the original altmode table as some ppms may report
532 * multiple DP altmodes.
533 */
534 multi_dp = ucsi->ops->update_altmodes(ucsi, recipient, orig, updated);
535
536 /* now register altmodes */
537 for (i = 0; i < max_altmodes; i++) {
538 struct ucsi_altmode *altmode_array = multi_dp ? updated : orig;
539
540 if (!altmode_array[i].svid)
541 return 0;
542
543 /*
544 * Check for duplicates in current array and already
545 * registered altmodes. Skip if duplicate found.
546 */
> 547 if (ucsi_altmode_is_duplicate(con, recipient, altmode_array, i,
548 altmode_array[i].svid,
549 altmode_array[i].mid, i))
550 continue;
551
552 memset(&desc, 0, sizeof(desc));
553 desc.svid = altmode_array[i].svid;
554 desc.vdo = altmode_array[i].mid;
555 desc.roles = TYPEC_PORT_DRD;
556
557 ret = ucsi_register_altmode(con, &desc, recipient);
558 if (ret)
559 return ret;
560 }
561
562 return 0;
563 }
564
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-11-11 16:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-11 1:05 [PATCH v2 1/3] usb: typec: ucsi: Detect and skip duplicate altmodes from buggy firmware Chia-Lin Kao (AceLan)
2025-11-11 1:05 ` [PATCH v2 2/3] usb: typec: ucsi: Add duplicate detection to nvidia registration path Chia-Lin Kao (AceLan)
2025-11-11 16:54 ` kernel test robot [this message]
2025-11-11 1:05 ` [PATCH v2 3/3] usb: typec: ucsi: yoga_c630: Remove redundant duplicate altmode handling Chia-Lin Kao (AceLan)
2025-11-17 9:00 ` [PATCH v2 1/3] usb: typec: ucsi: Detect and skip duplicate altmodes from buggy firmware Heikki Krogerus
2025-12-04 3:08 ` Chia-Lin Kao (AceLan)
2025-12-23 9:43 ` Heikki Krogerus
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=202511120044.i2blPN85-lkp@intel.com \
--to=lkp@intel.com \
--cc=acelan.kao@canonical.com \
--cc=akuchynski@chromium.org \
--cc=boddah8794@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=lumag@kernel.org \
--cc=myrrhperiwinkle@qtmlabs.xyz \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=venkat.jayaraman@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox