Re: [PATCH 2/2] hwrng: add support for Airoha EN7581 TRNG

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

 



Hi Christian,

kernel test robot noticed the following build errors:

[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on char-misc/char-misc-next char-misc/char-misc-linus robh/for-next herbert-cryptodev-2.6/master linus/master v6.12-rc3 next-20241016]
[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/Christian-Marangi/hwrng-add-support-for-Airoha-EN7581-TRNG/20241016-232144
base:   char-misc/char-misc-testing
patch link:    https://lore.kernel.org/r/20241016151845.23712-2-ansuelsmth%40gmail.com
patch subject: [PATCH 2/2] hwrng: add support for Airoha EN7581 TRNG
config: arc-randconfig-001-20241017 (https://download.01.org/0day-ci/archive/20241017/202410171822.152Yno42-lkp@xxxxxxxxx/config)
compiler: arceb-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241017/202410171822.152Yno42-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/202410171822.152Yno42-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   In file included from drivers/char/hw_random/airoha-trng.c:9:
   drivers/char/hw_random/airoha-trng.c: In function 'airoha_trng_init':
>> drivers/char/hw_random/airoha-trng.c:115:34: error: implicit declaration of function 'FIELD_GET' [-Werror=implicit-function-declaration]
     115 |                                  FIELD_GET(CNT_TRANS, val) == TRNG_CNT_TRANS_VALID,
         |                                  ^~~~~~~~~
   include/linux/iopoll.h:47:21: note: in definition of macro 'read_poll_timeout'
      47 |                 if (cond) \
         |                     ^~~~
   include/linux/iopoll.h:170:9: note: in expansion of macro 'readx_poll_timeout'
     170 |         readx_poll_timeout(readl, addr, val, cond, delay_us, timeout_us)
         |         ^~~~~~~~~~~~~~~~~~
   drivers/char/hw_random/airoha-trng.c:114:15: note: in expansion of macro 'readl_poll_timeout'
     114 |         ret = readl_poll_timeout(trng->base + TRNG_IP_RDY, val,
         |               ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/FIELD_GET +115 drivers/char/hw_random/airoha-trng.c

    75	
    76	static int airoha_trng_init(struct hwrng *rng)
    77	{
    78		struct airoha_trng *trng = container_of(rng, struct airoha_trng, rng);
    79		int ret;
    80		u32 val;
    81	
    82		val = readl(trng->base + TRNG_NS_SEK_AND_DAT_EN);
    83		val |= RNG_EN;
    84		writel(val, trng->base + TRNG_NS_SEK_AND_DAT_EN);
    85	
    86		/* Set out of SW Reset */
    87		airoha_trng_irq_unmask(trng);
    88		writel(0, trng->base + TRNG_HEALTH_TEST_SW_RST);
    89	
    90		ret = wait_for_completion_timeout(&trng->rng_op_done, BUSY_LOOP_TIMEOUT);
    91		if (ret <= 0) {
    92			dev_err(trng->dev, "Timeout waiting for Health Check\n");
    93			airoha_trng_irq_mask(trng);
    94			return -ENODEV;
    95		}
    96	
    97		/* Check if Health Test Failed */
    98		val = readl(trng->base + TRNG_HEALTH_TEST_STATUS);
    99		if (val & (RST_STARTUP_AP_TEST_FAIL | RST_STARTUP_RC_TEST_FAIL)) {
   100			dev_err(trng->dev, "Health Check fail: %s test fail\n",
   101				val & RST_STARTUP_AP_TEST_FAIL ? "AP" : "RC");
   102			return -ENODEV;
   103		}
   104	
   105		/* Check if IP is ready */
   106		ret = readl_poll_timeout(trng->base + TRNG_IP_RDY, val,
   107					 val & SAMPLE_RDY, 10, 1000);
   108		if (ret < 0) {
   109			dev_err(trng->dev, "Timeout waiting for IP ready");
   110			return -ENODEV;
   111		}
   112	
   113		/* CNT_TRANS must be 0x80 for IP to be considered ready */
   114		ret = readl_poll_timeout(trng->base + TRNG_IP_RDY, val,
 > 115					 FIELD_GET(CNT_TRANS, val) == TRNG_CNT_TRANS_VALID,
   116					 10, 1000);
   117		if (ret < 0) {
   118			dev_err(trng->dev, "Timeout waiting for IP ready");
   119			return -ENODEV;
   120		}
   121	
   122		return 0;
   123	}
   124	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux