All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/dpll/dpll_core.c:82 dpll_xa_ref_pin_add() warn: iterator 'i' not incremented
@ 2025-12-13  8:51 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-12-13  8:51 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Ivan Vecera <ivecera@redhat.com>
CC: Jakub Kicinski <kuba@kernel.org>
CC: Jiri Pirko <jiri@nvidia.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   a859eca0e4cc96f63ff125dbe5388d961558b0e9
commit: 2df8e64e01c10a4b75ea7797629f9e764a840eb0 dpll: Add basic Microchip ZL3073x support
date:   5 months ago
:::::: branch date: 3 hours ago
:::::: commit date: 5 months ago
config: i386-randconfig-r073-20251212 (https://download.01.org/0day-ci/archive/20251213/202512131625.Exm6CWwW-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0

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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202512131625.Exm6CWwW-lkp@intel.com/

New smatch warnings:
drivers/dpll/dpll_core.c:82 dpll_xa_ref_pin_add() warn: iterator 'i' not incremented

Old smatch warnings:
drivers/dpll/dpll_core.c:134 dpll_xa_ref_pin_del() warn: iterator 'i' not incremented
drivers/dpll/dpll_core.c:163 dpll_xa_ref_dpll_add() warn: iterator 'i' not incremented
drivers/dpll/dpll_core.c:215 dpll_xa_ref_dpll_del() warn: iterator 'i' not incremented
drivers/dpll/dpll_core.c:235 dpll_xa_ref_dpll_first() warn: iterator 'i' not incremented
drivers/dpll/dpll_core.c:568 dpll_pin_get() warn: iterator 'i' not incremented
drivers/dpll/dpll_core.c:670 dpll_pin_ref_sync_pair_del() warn: iterator 'i' not incremented
drivers/dpll/dpll_core.c:764 dpll_pin_on_pin_register() warn: iterator 'i' not incremented
drivers/dpll/dpll_core.c:798 dpll_pin_on_pin_unregister() warn: iterator 'i' not incremented

vim +/i +82 drivers/dpll/dpll_core.c

9431063ad323ac Vadim Fedorenko      2023-09-13   70  
9431063ad323ac Vadim Fedorenko      2023-09-13   71  static int
9431063ad323ac Vadim Fedorenko      2023-09-13   72  dpll_xa_ref_pin_add(struct xarray *xa_pins, struct dpll_pin *pin,
38d7b94e81d068 Arkadiusz Kubalewski 2024-04-24   73  		    const struct dpll_pin_ops *ops, void *priv,
38d7b94e81d068 Arkadiusz Kubalewski 2024-04-24   74  		    void *cookie)
9431063ad323ac Vadim Fedorenko      2023-09-13   75  {
9431063ad323ac Vadim Fedorenko      2023-09-13   76  	struct dpll_pin_registration *reg;
9431063ad323ac Vadim Fedorenko      2023-09-13   77  	struct dpll_pin_ref *ref;
9431063ad323ac Vadim Fedorenko      2023-09-13   78  	bool ref_exists = false;
9431063ad323ac Vadim Fedorenko      2023-09-13   79  	unsigned long i;
9431063ad323ac Vadim Fedorenko      2023-09-13   80  	int ret;
9431063ad323ac Vadim Fedorenko      2023-09-13   81  
9431063ad323ac Vadim Fedorenko      2023-09-13  @82  	xa_for_each(xa_pins, i, ref) {
9431063ad323ac Vadim Fedorenko      2023-09-13   83  		if (ref->pin != pin)
9431063ad323ac Vadim Fedorenko      2023-09-13   84  			continue;
38d7b94e81d068 Arkadiusz Kubalewski 2024-04-24   85  		reg = dpll_pin_registration_find(ref, ops, priv, cookie);
9431063ad323ac Vadim Fedorenko      2023-09-13   86  		if (reg) {
9431063ad323ac Vadim Fedorenko      2023-09-13   87  			refcount_inc(&ref->refcount);
9431063ad323ac Vadim Fedorenko      2023-09-13   88  			return 0;
9431063ad323ac Vadim Fedorenko      2023-09-13   89  		}
9431063ad323ac Vadim Fedorenko      2023-09-13   90  		ref_exists = true;
9431063ad323ac Vadim Fedorenko      2023-09-13   91  		break;
9431063ad323ac Vadim Fedorenko      2023-09-13   92  	}
9431063ad323ac Vadim Fedorenko      2023-09-13   93  
9431063ad323ac Vadim Fedorenko      2023-09-13   94  	if (!ref_exists) {
9431063ad323ac Vadim Fedorenko      2023-09-13   95  		ref = kzalloc(sizeof(*ref), GFP_KERNEL);
9431063ad323ac Vadim Fedorenko      2023-09-13   96  		if (!ref)
9431063ad323ac Vadim Fedorenko      2023-09-13   97  			return -ENOMEM;
9431063ad323ac Vadim Fedorenko      2023-09-13   98  		ref->pin = pin;
9431063ad323ac Vadim Fedorenko      2023-09-13   99  		INIT_LIST_HEAD(&ref->registration_list);
9431063ad323ac Vadim Fedorenko      2023-09-13  100  		ret = xa_insert(xa_pins, pin->pin_idx, ref, GFP_KERNEL);
9431063ad323ac Vadim Fedorenko      2023-09-13  101  		if (ret) {
9431063ad323ac Vadim Fedorenko      2023-09-13  102  			kfree(ref);
9431063ad323ac Vadim Fedorenko      2023-09-13  103  			return ret;
9431063ad323ac Vadim Fedorenko      2023-09-13  104  		}
9431063ad323ac Vadim Fedorenko      2023-09-13  105  		refcount_set(&ref->refcount, 1);
9431063ad323ac Vadim Fedorenko      2023-09-13  106  	}
9431063ad323ac Vadim Fedorenko      2023-09-13  107  
9431063ad323ac Vadim Fedorenko      2023-09-13  108  	reg = kzalloc(sizeof(*reg), GFP_KERNEL);
9431063ad323ac Vadim Fedorenko      2023-09-13  109  	if (!reg) {
9431063ad323ac Vadim Fedorenko      2023-09-13  110  		if (!ref_exists) {
9431063ad323ac Vadim Fedorenko      2023-09-13  111  			xa_erase(xa_pins, pin->pin_idx);
9431063ad323ac Vadim Fedorenko      2023-09-13  112  			kfree(ref);
9431063ad323ac Vadim Fedorenko      2023-09-13  113  		}
9431063ad323ac Vadim Fedorenko      2023-09-13  114  		return -ENOMEM;
9431063ad323ac Vadim Fedorenko      2023-09-13  115  	}
9431063ad323ac Vadim Fedorenko      2023-09-13  116  	reg->ops = ops;
9431063ad323ac Vadim Fedorenko      2023-09-13  117  	reg->priv = priv;
38d7b94e81d068 Arkadiusz Kubalewski 2024-04-24  118  	reg->cookie = cookie;
9431063ad323ac Vadim Fedorenko      2023-09-13  119  	if (ref_exists)
9431063ad323ac Vadim Fedorenko      2023-09-13  120  		refcount_inc(&ref->refcount);
9431063ad323ac Vadim Fedorenko      2023-09-13  121  	list_add_tail(&reg->list, &ref->registration_list);
9431063ad323ac Vadim Fedorenko      2023-09-13  122  
9431063ad323ac Vadim Fedorenko      2023-09-13  123  	return 0;
9431063ad323ac Vadim Fedorenko      2023-09-13  124  }
9431063ad323ac Vadim Fedorenko      2023-09-13  125  

:::::: The code at line 82 was first introduced by commit
:::::: 9431063ad323ac864750aeba4d304389bc42ca4e dpll: core: Add DPLL framework base functions

:::::: TO: Vadim Fedorenko <vadim.fedorenko@linux.dev>
:::::: CC: David S. Miller <davem@davemloft.net>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-12-13  8:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-13  8:51 drivers/dpll/dpll_core.c:82 dpll_xa_ref_pin_add() warn: iterator 'i' not incremented kernel test robot

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.