mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Junhui Liu <junhui.liu@pigmoral.tech>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Philipp Zabel <p.zabel@pengutronix.de>
Subject: drivers/reset/reset-k230.c:221:24-29: WARNING: conversion to bool not needed here
Date: Sun, 12 Jul 2026 11:44:57 +0800	[thread overview]
Message-ID: <202607121116.XW2ODxe6-lkp@intel.com> (raw)

Hi Junhui,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   dd3210c47e8d3ac6b4e9141fc68acc03b38c0ba3
commit: c7a5e01e229d21e0560d78bd645b4f7398667ce4 reset: canaan: k230: drop OF dependency and enable by default
date:   6 months ago
config: hexagon-randconfig-r051-20260709 (https://download.01.org/0day-ci/archive/20260712/202607121116.XW2ODxe6-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project c279890c85da307abe34f10333442bbf72a60644)

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
| Fixes: c7a5e01e229d ("reset: canaan: k230: drop OF dependency and enable by default")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607121116.XW2ODxe6-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/reset/reset-k230.c:221:24-29: WARNING: conversion to bool not needed here
   drivers/reset/reset-k230.c:252:24-29: WARNING: conversion to bool not needed here

vim +221 drivers/reset/reset-k230.c

360a7a64775944 Junhui Liu 2025-06-13  210  
360a7a64775944 Junhui Liu 2025-06-13  211  static int k230_rst_assert(struct reset_controller_dev *rcdev, unsigned long id)
360a7a64775944 Junhui Liu 2025-06-13  212  {
360a7a64775944 Junhui Liu 2025-06-13  213  	struct k230_rst *rstc = to_k230_rst(rcdev);
360a7a64775944 Junhui Liu 2025-06-13  214  
360a7a64775944 Junhui Liu 2025-06-13  215  	switch (k230_resets[id].type) {
360a7a64775944 Junhui Liu 2025-06-13  216  	case RST_TYPE_CPU1:
360a7a64775944 Junhui Liu 2025-06-13  217  		k230_rst_update(rstc, id, true, true, false);
360a7a64775944 Junhui Liu 2025-06-13  218  		break;
360a7a64775944 Junhui Liu 2025-06-13  219  	case RST_TYPE_SW_DONE:
360a7a64775944 Junhui Liu 2025-06-13  220  		k230_rst_update(rstc, id, true, false,
360a7a64775944 Junhui Liu 2025-06-13 @221  				id == RST_SPI2AXI ? false : true);
360a7a64775944 Junhui Liu 2025-06-13  222  		break;
360a7a64775944 Junhui Liu 2025-06-13  223  	case RST_TYPE_CPU0:
360a7a64775944 Junhui Liu 2025-06-13  224  	case RST_TYPE_FLUSH:
360a7a64775944 Junhui Liu 2025-06-13  225  	case RST_TYPE_HW_DONE:
360a7a64775944 Junhui Liu 2025-06-13  226  		return -EOPNOTSUPP;
360a7a64775944 Junhui Liu 2025-06-13  227  	}
360a7a64775944 Junhui Liu 2025-06-13  228  
360a7a64775944 Junhui Liu 2025-06-13  229  	/*
360a7a64775944 Junhui Liu 2025-06-13  230  	 * The time period when reset is applied but the clock is stopped for
360a7a64775944 Junhui Liu 2025-06-13  231  	 * RST_TYPE_CPU1 and RST_TYPE_SW_DONE can be set up to 3.75us. Delay
360a7a64775944 Junhui Liu 2025-06-13  232  	 * 10us to ensure proper reset timing.
360a7a64775944 Junhui Liu 2025-06-13  233  	 */
360a7a64775944 Junhui Liu 2025-06-13  234  	udelay(10);
360a7a64775944 Junhui Liu 2025-06-13  235  
360a7a64775944 Junhui Liu 2025-06-13  236  	return 0;
360a7a64775944 Junhui Liu 2025-06-13  237  }
360a7a64775944 Junhui Liu 2025-06-13  238  

:::::: The code at line 221 was first introduced by commit
:::::: 360a7a64775944e3a784cb2e3cffb15af5f328e5 reset: canaan: add reset driver for Kendryte K230

:::::: TO: Junhui Liu <junhui.liu@pigmoral.tech>
:::::: CC: Philipp Zabel <p.zabel@pengutronix.de>

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

                 reply	other threads:[~2026-07-12  3:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202607121116.XW2ODxe6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=junhui.liu@pigmoral.tech \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=p.zabel@pengutronix.de \
    /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