From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3858072021826150221==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v4 03/11] hte: Add tegra194 HTE kernel provider Date: Wed, 02 Feb 2022 18:16:07 +0800 Message-ID: <202202021845.LbAV0BRC-lkp@intel.com> In-Reply-To: <20220201222630.21246-4-dipenp@nvidia.com> List-Id: --===============3858072021826150221== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Dipen, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on 07f8c60fe60f84977dc815ec8a6b1100827c34dd] url: https://github.com/0day-ci/linux/commits/Dipen-Patel/Intro-to-Hardw= are-timestamping-engine/20220202-062447 base: 07f8c60fe60f84977dc815ec8a6b1100827c34dd config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/2022020= 2/202202021845.LbAV0BRC-lkp(a)intel.com/config) compiler: aarch64-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/6a6a517b6866ae7e4b1b878ab= 82312a9a2dc5b90 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Dipen-Patel/Intro-to-Hardware-time= stamping-engine/20220202-062447 git checkout 6a6a517b6866ae7e4b1b878ab82312a9a2dc5b90 # 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=3Darm64 SHELL=3D/bin/bash drivers/hte/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/hte/hte-tegra194.c: In function 'tegra_hte_request': drivers/hte/hte-tegra194.c:379:23: error: implicit declaration of functi= on 'gpiod_enable_hw_timestamp' [-Werror=3Dimplicit-function-declaration] 379 | ret =3D gpiod_enable_hw_timestamp(attr->line_dat= a, | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hte/hte-tegra194.c: In function 'tegra_hte_release': drivers/hte/hte-tegra194.c:405:23: error: implicit declaration of functi= on 'gpiod_disable_hw_timestamp' [-Werror=3Dimplicit-function-declaration] 405 | ret =3D gpiod_disable_hw_timestamp(attr->line_da= ta, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hte/hte-tegra194.c: At top level: >> drivers/hte/hte-tegra194.c:431:5: warning: no previous prototype for 'te= gra_hte_get_level' [-Wmissing-prototypes] 431 | int tegra_hte_get_level(struct tegra_hte_soc *gs, u32 line_id) | ^~~~~~~~~~~~~~~~~~~ >> drivers/hte/hte-tegra194.c:486:6: warning: no previous prototype for 'te= gra_hte_match_from_linedata' [-Wmissing-prototypes] 486 | bool tegra_hte_match_from_linedata(const struct hte_chip *chip, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/tegra_hte_get_level +431 drivers/hte/hte-tegra194.c 430 = > 431 int tegra_hte_get_level(struct tegra_hte_soc *gs, u32 line_id) 432 { 433 struct gpio_desc *desc; 434 = 435 if (gs->prov_data->type =3D=3D HTE_TEGRA_TYPE_GPIO) { 436 desc =3D gs->line_data[line_id].data; 437 if (desc) 438 return gpiod_get_raw_value(desc); 439 } 440 = 441 return -1; 442 } 443 = 444 static void tegra_hte_read_fifo(struct tegra_hte_soc *gs) 445 { 446 u32 tsh, tsl, src, pv, cv, acv, slice, bit_index, line_id; 447 u64 tsc; 448 struct hte_ts_data el; 449 = 450 while ((tegra_hte_readl(gs, HTE_TESTATUS) >> 451 HTE_TESTATUS_OCCUPANCY_SHIFT) & 452 HTE_TESTATUS_OCCUPANCY_MASK) { 453 tsh =3D tegra_hte_readl(gs, HTE_TETSCH); 454 tsl =3D tegra_hte_readl(gs, HTE_TETSCL); 455 tsc =3D (((u64)tsh << 32) | tsl); 456 = 457 src =3D tegra_hte_readl(gs, HTE_TESRC); 458 slice =3D (src >> HTE_TESRC_SLICE_SHIFT) & 459 HTE_TESRC_SLICE_DEFAULT_MASK; 460 = 461 pv =3D tegra_hte_readl(gs, HTE_TEPCV); 462 cv =3D tegra_hte_readl(gs, HTE_TECCV); 463 acv =3D pv ^ cv; 464 while (acv) { 465 bit_index =3D __builtin_ctz(acv); 466 line_id =3D bit_index + (slice << 5); 467 el.tsc =3D tsc << HTE_TS_NS_SHIFT; 468 el.raw_level =3D tegra_hte_get_level(gs, line_id); 469 hte_push_ts_ns(gs->chip, line_id, &el); 470 acv &=3D ~BIT(bit_index); 471 } 472 tegra_hte_writel(gs, HTE_TECMD, HTE_TECMD_CMD_POP); 473 } 474 } 475 = 476 static irqreturn_t tegra_hte_isr(int irq, void *dev_id) 477 { 478 struct tegra_hte_soc *gs =3D dev_id; 479 (void)irq; 480 = 481 tegra_hte_read_fifo(gs); 482 = 483 return IRQ_HANDLED; 484 } 485 = > 486 bool tegra_hte_match_from_linedata(const struct hte_chip *chip, 487 const struct hte_ts_desc *hdesc) 488 { 489 struct tegra_hte_soc *hte_dev =3D chip->data; 490 = 491 if (!hte_dev || (hte_dev->prov_data->type !=3D HTE_TEGRA_TYPE_GPIO)) 492 return false; 493 = 494 return hte_dev->c =3D=3D gpiod_to_chip(hdesc->attr.line_data); 495 } 496 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============3858072021826150221==--