From: kernel test robot <lkp@intel.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-crypto@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
"Olivia Mackall" <olivia@selenic.com>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"Nicolas Ferre" <nicolas.ferre@microchip.com>,
"Sean Wang" <sean.wang@mediatek.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Avi Fishman" <avifishman70@gmail.com>,
"Tomer Maimon" <tmaimon77@gmail.com>,
"Tali Perry" <tali.perry1@gmail.com>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, openbmc@lists.ozlabs.org
Subject: Re: [PATCH 3/3] hwrng: npcm - Add a local variable for struct device pointer
Date: Thu, 10 Apr 2025 17:59:56 +0800 [thread overview]
Message-ID: <202504101705.PeW9QC3m-lkp@intel.com> (raw)
In-Reply-To: <20250410070623.3676647-4-sakari.ailus@linux.intel.com>
Hi Sakari,
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 herbert-cryptodev-2.6/master linus/master v6.15-rc1 next-20250410]
[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/Sakari-Ailus/hwrng-atmel-Add-a-local-variable-for-struct-device-pointer/20250410-151223
base: char-misc/char-misc-testing
patch link: https://lore.kernel.org/r/20250410070623.3676647-4-sakari.ailus%40linux.intel.com
patch subject: [PATCH 3/3] hwrng: npcm - Add a local variable for struct device pointer
config: csky-randconfig-001-20250410 (https://download.01.org/0day-ci/archive/20250410/202504101705.PeW9QC3m-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250410/202504101705.PeW9QC3m-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/202504101705.PeW9QC3m-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
drivers/char/hw_random/npcm-rng.c: In function 'npcm_rng_read':
>> drivers/char/hw_random/npcm-rng.c:58:9: error: expected ',' or ';' before 'int'
58 | int retval = 0;
| ^~~
>> drivers/char/hw_random/npcm-rng.c:78:17: error: 'retval' undeclared (first use in this function)
78 | retval++;
| ^~~~~~
drivers/char/hw_random/npcm-rng.c:78:17: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/char/hw_random/npcm-rng.c:87:1: warning: control reaches end of non-void function [-Wreturn-type]
87 | }
| ^
vim +58 drivers/char/hw_random/npcm-rng.c
c98429297d8b25a Tomer Maimon 2019-09-12 53
c98429297d8b25a Tomer Maimon 2019-09-12 54 static int npcm_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
c98429297d8b25a Tomer Maimon 2019-09-12 55 {
c98429297d8b25a Tomer Maimon 2019-09-12 56 struct npcm_rng *priv = to_npcm_rng(rng);
11fd03b27c8824f Sakari Ailus 2025-04-10 57 struct device *dev = (struct device *)priv->rng.priv
c98429297d8b25a Tomer Maimon 2019-09-12 @58 int retval = 0;
c98429297d8b25a Tomer Maimon 2019-09-12 59 int ready;
c98429297d8b25a Tomer Maimon 2019-09-12 60
11fd03b27c8824f Sakari Ailus 2025-04-10 61 pm_runtime_get_sync(dev);
c98429297d8b25a Tomer Maimon 2019-09-12 62
c2fb644638ae45c Tomer Maimon 2020-09-24 63 while (max) {
c98429297d8b25a Tomer Maimon 2019-09-12 64 if (wait) {
c2fb644638ae45c Tomer Maimon 2020-09-24 65 if (readb_poll_timeout(priv->base + NPCM_RNGCS_REG,
c98429297d8b25a Tomer Maimon 2019-09-12 66 ready,
c98429297d8b25a Tomer Maimon 2019-09-12 67 ready & NPCM_RNG_DATA_VALID,
c98429297d8b25a Tomer Maimon 2019-09-12 68 NPCM_RNG_POLL_USEC,
c98429297d8b25a Tomer Maimon 2019-09-12 69 NPCM_RNG_TIMEOUT_USEC))
c98429297d8b25a Tomer Maimon 2019-09-12 70 break;
c98429297d8b25a Tomer Maimon 2019-09-12 71 } else {
c2fb644638ae45c Tomer Maimon 2020-09-24 72 if ((readb(priv->base + NPCM_RNGCS_REG) &
c98429297d8b25a Tomer Maimon 2019-09-12 73 NPCM_RNG_DATA_VALID) == 0)
c98429297d8b25a Tomer Maimon 2019-09-12 74 break;
c98429297d8b25a Tomer Maimon 2019-09-12 75 }
c98429297d8b25a Tomer Maimon 2019-09-12 76
c2fb644638ae45c Tomer Maimon 2020-09-24 77 *(u8 *)buf = readb(priv->base + NPCM_RNGD_REG);
c2fb644638ae45c Tomer Maimon 2020-09-24 @78 retval++;
c2fb644638ae45c Tomer Maimon 2020-09-24 79 buf++;
c2fb644638ae45c Tomer Maimon 2020-09-24 80 max--;
c98429297d8b25a Tomer Maimon 2019-09-12 81 }
c98429297d8b25a Tomer Maimon 2019-09-12 82
11fd03b27c8824f Sakari Ailus 2025-04-10 83 pm_runtime_mark_last_busy(dev);
11fd03b27c8824f Sakari Ailus 2025-04-10 84 pm_runtime_put_sync_autosuspend(dev);
c98429297d8b25a Tomer Maimon 2019-09-12 85
c98429297d8b25a Tomer Maimon 2019-09-12 86 return retval || !wait ? retval : -EIO;
c98429297d8b25a Tomer Maimon 2019-09-12 @87 }
c98429297d8b25a Tomer Maimon 2019-09-12 88
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-crypto@vger.kernel.org
Cc: "Herbert Xu" <herbert@gondor.apana.org.au>,
"Avi Fishman" <avifishman70@gmail.com>,
openbmc@lists.ozlabs.org, "Sean Wang" <sean.wang@mediatek.com>,
"Tomer Maimon" <tmaimon77@gmail.com>,
"Nicolas Ferre" <nicolas.ferre@microchip.com>,
"Tali Perry" <tali.perry1@gmail.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
oe-kbuild-all@lists.linux.dev,
"Olivia Mackall" <olivia@selenic.com>,
linux-mediatek@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>
Subject: Re: [PATCH 3/3] hwrng: npcm - Add a local variable for struct device pointer
Date: Thu, 10 Apr 2025 17:59:56 +0800 [thread overview]
Message-ID: <202504101705.PeW9QC3m-lkp@intel.com> (raw)
In-Reply-To: <20250410070623.3676647-4-sakari.ailus@linux.intel.com>
Hi Sakari,
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 herbert-cryptodev-2.6/master linus/master v6.15-rc1 next-20250410]
[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/Sakari-Ailus/hwrng-atmel-Add-a-local-variable-for-struct-device-pointer/20250410-151223
base: char-misc/char-misc-testing
patch link: https://lore.kernel.org/r/20250410070623.3676647-4-sakari.ailus%40linux.intel.com
patch subject: [PATCH 3/3] hwrng: npcm - Add a local variable for struct device pointer
config: csky-randconfig-001-20250410 (https://download.01.org/0day-ci/archive/20250410/202504101705.PeW9QC3m-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250410/202504101705.PeW9QC3m-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/202504101705.PeW9QC3m-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
drivers/char/hw_random/npcm-rng.c: In function 'npcm_rng_read':
>> drivers/char/hw_random/npcm-rng.c:58:9: error: expected ',' or ';' before 'int'
58 | int retval = 0;
| ^~~
>> drivers/char/hw_random/npcm-rng.c:78:17: error: 'retval' undeclared (first use in this function)
78 | retval++;
| ^~~~~~
drivers/char/hw_random/npcm-rng.c:78:17: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/char/hw_random/npcm-rng.c:87:1: warning: control reaches end of non-void function [-Wreturn-type]
87 | }
| ^
vim +58 drivers/char/hw_random/npcm-rng.c
c98429297d8b25a Tomer Maimon 2019-09-12 53
c98429297d8b25a Tomer Maimon 2019-09-12 54 static int npcm_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
c98429297d8b25a Tomer Maimon 2019-09-12 55 {
c98429297d8b25a Tomer Maimon 2019-09-12 56 struct npcm_rng *priv = to_npcm_rng(rng);
11fd03b27c8824f Sakari Ailus 2025-04-10 57 struct device *dev = (struct device *)priv->rng.priv
c98429297d8b25a Tomer Maimon 2019-09-12 @58 int retval = 0;
c98429297d8b25a Tomer Maimon 2019-09-12 59 int ready;
c98429297d8b25a Tomer Maimon 2019-09-12 60
11fd03b27c8824f Sakari Ailus 2025-04-10 61 pm_runtime_get_sync(dev);
c98429297d8b25a Tomer Maimon 2019-09-12 62
c2fb644638ae45c Tomer Maimon 2020-09-24 63 while (max) {
c98429297d8b25a Tomer Maimon 2019-09-12 64 if (wait) {
c2fb644638ae45c Tomer Maimon 2020-09-24 65 if (readb_poll_timeout(priv->base + NPCM_RNGCS_REG,
c98429297d8b25a Tomer Maimon 2019-09-12 66 ready,
c98429297d8b25a Tomer Maimon 2019-09-12 67 ready & NPCM_RNG_DATA_VALID,
c98429297d8b25a Tomer Maimon 2019-09-12 68 NPCM_RNG_POLL_USEC,
c98429297d8b25a Tomer Maimon 2019-09-12 69 NPCM_RNG_TIMEOUT_USEC))
c98429297d8b25a Tomer Maimon 2019-09-12 70 break;
c98429297d8b25a Tomer Maimon 2019-09-12 71 } else {
c2fb644638ae45c Tomer Maimon 2020-09-24 72 if ((readb(priv->base + NPCM_RNGCS_REG) &
c98429297d8b25a Tomer Maimon 2019-09-12 73 NPCM_RNG_DATA_VALID) == 0)
c98429297d8b25a Tomer Maimon 2019-09-12 74 break;
c98429297d8b25a Tomer Maimon 2019-09-12 75 }
c98429297d8b25a Tomer Maimon 2019-09-12 76
c2fb644638ae45c Tomer Maimon 2020-09-24 77 *(u8 *)buf = readb(priv->base + NPCM_RNGD_REG);
c2fb644638ae45c Tomer Maimon 2020-09-24 @78 retval++;
c2fb644638ae45c Tomer Maimon 2020-09-24 79 buf++;
c2fb644638ae45c Tomer Maimon 2020-09-24 80 max--;
c98429297d8b25a Tomer Maimon 2019-09-12 81 }
c98429297d8b25a Tomer Maimon 2019-09-12 82
11fd03b27c8824f Sakari Ailus 2025-04-10 83 pm_runtime_mark_last_busy(dev);
11fd03b27c8824f Sakari Ailus 2025-04-10 84 pm_runtime_put_sync_autosuspend(dev);
c98429297d8b25a Tomer Maimon 2019-09-12 85
c98429297d8b25a Tomer Maimon 2019-09-12 86 return retval || !wait ? retval : -EIO;
c98429297d8b25a Tomer Maimon 2019-09-12 @87 }
c98429297d8b25a Tomer Maimon 2019-09-12 88
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-04-10 11:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 7:06 [PATCH 0/3] Use a local device pointer for hwrng drivers instead of casting constantly Sakari Ailus
2025-04-10 7:06 ` Sakari Ailus
2025-04-10 7:06 ` [PATCH 1/3] hwrng: atmel - Add a local variable for struct device pointer Sakari Ailus
2025-04-10 7:06 ` Sakari Ailus
2025-04-10 7:42 ` Herbert Xu
2025-04-10 7:42 ` Herbert Xu
2025-04-10 15:15 ` Sakari Ailus
2025-04-10 15:15 ` Sakari Ailus
2025-04-10 7:06 ` [PATCH 2/3] hwrng: mtk " Sakari Ailus
2025-04-10 7:06 ` Sakari Ailus
2025-04-10 7:06 ` [PATCH 3/3] hwrng: npcm " Sakari Ailus
2025-04-10 7:06 ` Sakari Ailus
2025-04-10 9:59 ` kernel test robot [this message]
2025-04-10 9:59 ` kernel test robot
2025-04-10 15:55 ` kernel test robot
2025-04-10 15:55 ` kernel test robot
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=202504101705.PeW9QC3m-lkp@intel.com \
--to=lkp@intel.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=avifishman70@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=nicolas.ferre@microchip.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=olivia@selenic.com \
--cc=openbmc@lists.ozlabs.org \
--cc=sakari.ailus@linux.intel.com \
--cc=sean.wang@mediatek.com \
--cc=tali.perry1@gmail.com \
--cc=tmaimon77@gmail.com \
--cc=u.kleine-koenig@baylibre.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.