Content-Type: multipart/mixed; boundary="===============5172076227599262044==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH 2/2] usb: typec: rt1719: Add support for Richtek RT1719 Date: Sat, 15 Jan 2022 02:23:46 +0800 Message-ID: <202201150209.qTlXJwWM-lkp@intel.com> In-Reply-To: <1642175929-25337-3-git-send-email-u0084500@gmail.com> List-Id: --===============5172076227599262044== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi cy_huang, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on usb/usb-testing] [also build test WARNING on robh/for-next v5.16 next-20220114] [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] url: https://github.com/0day-ci/linux/commits/cy_huang/Add-Richtek-RT171= 9-USBPD-controller-support/20220115-000058 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-= testing config: alpha-allmodconfig (https://download.01.org/0day-ci/archive/2022011= 5/202201150209.qTlXJwWM-lkp(a)intel.com/config) compiler: alpha-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/20efb31d7403b57c80a61a6c4= 16d780ad561a2bd git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review cy_huang/Add-Richtek-RT1719-USBPD-= controller-support/20220115-000058 git checkout 20efb31d7403b57c80a61a6c416d780ad561a2bd # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dalpha SHELL=3D/bin/bash drivers/usb/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/usb/typec/rt1719.c: In function 'rt1719_usbpd_request_voltage': >> drivers/usb/typec/rt1719.c:492:65: warning: suggest parentheses around a= rithmetic in operand of '|' [-Wparentheses] 492 | RT1719_EVALMODE_MASK | src_sel = + 1); | ~~~~~~~~= ^~~ vim +492 drivers/usb/typec/rt1719.c 437 = 438 static int rt1719_usbpd_request_voltage(struct rt1719_data *data) 439 { 440 u32 src_voltage; 441 int snk_sel, src_sel =3D -1; 442 int i, ret; 443 = 444 if (!data->attached || !data->pd_capable || data->spdo_sel <=3D 0) 445 return -EINVAL; 446 = 447 src_voltage =3D pdo_fixed_voltage(data->spdos[data->spdo_sel - 1]); 448 if (src_voltage =3D=3D data->req_voltage) 449 return 0; 450 = 451 switch (data->req_voltage) { 452 case 5000: 453 snk_sel =3D RT1719_SNKCAP_5V; 454 break; 455 case 9000: 456 snk_sel =3D RT1719_SNKCAP_9V; 457 break; 458 case 12000: 459 snk_sel =3D RT1719_SNKCAP_12V; 460 break; 461 case 15000: 462 snk_sel =3D RT1719_SNKCAP_15V; 463 break; 464 case 20000: 465 snk_sel =3D RT1719_SNKCAP_20V; 466 break; 467 default: 468 return -EINVAL; 469 } 470 = 471 if (!(data->snkcaps[snk_sel] & RT1719_PSEL_SUPPORT)) 472 return -EINVAL; 473 = 474 for (i =3D 0; i < data->spdo_num; i++) { 475 enum pd_pdo_type type =3D pdo_type(data->spdos[i]); 476 = 477 if (type !=3D PDO_TYPE_FIXED) 478 continue; 479 = 480 src_voltage =3D pdo_fixed_voltage(data->spdos[i]); 481 if (src_voltage =3D=3D data->req_voltage) { 482 src_sel =3D i; 483 break; 484 } 485 } 486 = 487 if (src_sel =3D=3D -1) 488 return -ENOTSUPP; 489 = 490 ret =3D regmap_update_bits(data->regmap, RT1719_REG_TXCTRL1, 491 RT1719_EVALMODE_MASK | RT1719_REQSRCPDO_MASK, > 492 RT1719_EVALMODE_MASK | src_sel + 1); 493 ret |=3D regmap_update_bits(data->regmap, RT1719_REG_TXCTRL2, 494 RT1719_TXSPDOREQ_MASK, RT1719_TXSPDOREQ_MASK); 495 if (ret) 496 return ret; 497 = 498 reinit_completion(&data->req_completion); 499 ret =3D wait_for_completion_timeout(&data->req_completion, 500 msecs_to_jiffies(400)); 501 if (!ret) 502 return -ETIMEDOUT; 503 = 504 return 0; 505 } 506 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============5172076227599262044==--