All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Cc: oe-kbuild-all@lists.linux.dev, Philipp Zabel <p.zabel@pengutronix.de>
Subject: [linux-next:master 4535/4750] drivers/reset/core.c:1218 __fwnode_reset_control_get() warn: inconsistent indenting
Date: Tue, 10 Mar 2026 07:19:45 +0800	[thread overview]
Message-ID: <202603100730.J3pi4xqi-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   343f51842f4ed7143872f3aa116a214a5619a4b9
commit: 9035073d0ef1de813c6335239250248bfe0a64aa [4535/4750] reset: convert reset core to using firmware nodes
config: i386-randconfig-141-20260310 (https://download.01.org/0day-ci/archive/20260310/202603100730.J3pi4xqi-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch: v0.5.0-9004-gb810ac53

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/202603100730.J3pi4xqi-lkp@intel.com/

smatch warnings:
drivers/reset/core.c:1218 __fwnode_reset_control_get() warn: inconsistent indenting

vim +1218 drivers/reset/core.c

c721f189e89c0d Krzysztof Kozlowski 2024-01-29  1136  
1c5e05c23f4a64 Philipp Zabel       2021-03-04  1137  struct reset_control *
ba8dbbb14b7e67 Bartosz Golaszewski 2026-03-06  1138  __fwnode_reset_control_get(struct fwnode_handle *fwnode, const char *id, int index,
dad35f7d2fc14e Philipp Zabel       2024-09-25  1139  			   enum reset_control_flags flags)
61fc41317666be Philipp Zabel       2012-11-19  1140  {
dad35f7d2fc14e Philipp Zabel       2024-09-25  1141  	bool optional = flags & RESET_CONTROL_FLAGS_BIT_OPTIONAL;
c721f189e89c0d Krzysztof Kozlowski 2024-01-29  1142  	bool gpio_fallback = false;
8c91302a29bc1b Bartosz Golaszewski 2026-03-06  1143  	struct reset_control *rstc = ERR_PTR(-EINVAL);
c721f189e89c0d Krzysztof Kozlowski 2024-01-29  1144  	struct reset_controller_dev *rcdev;
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1145  	struct fwnode_reference_args args;
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1146  	struct of_phandle_args of_args;
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1147  	int rstc_id = -EINVAL;
61fc41317666be Philipp Zabel       2012-11-19  1148  	int ret;
61fc41317666be Philipp Zabel       2012-11-19  1149  
ba8dbbb14b7e67 Bartosz Golaszewski 2026-03-06  1150  	if (!fwnode)
6c96f05c8bb8bc Hans de Goede       2016-02-23  1151  		return ERR_PTR(-EINVAL);
6c96f05c8bb8bc Hans de Goede       2016-02-23  1152  
6c96f05c8bb8bc Hans de Goede       2016-02-23  1153  	if (id) {
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1154  		index = fwnode_property_match_string(fwnode, "reset-names", id);
bb475230b8e59a Ramiro Oliveira     2017-01-13  1155  		if (index == -EILSEQ)
bb475230b8e59a Ramiro Oliveira     2017-01-13  1156  			return ERR_PTR(index);
6c96f05c8bb8bc Hans de Goede       2016-02-23  1157  		if (index < 0)
bb475230b8e59a Ramiro Oliveira     2017-01-13  1158  			return optional ? NULL : ERR_PTR(-ENOENT);
6c96f05c8bb8bc Hans de Goede       2016-02-23  1159  	}
6c96f05c8bb8bc Hans de Goede       2016-02-23  1160  
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1161  	ret = fwnode_property_get_reference_args(fwnode, "resets", "#reset-cells",
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1162  						 0, index, &args);
bb475230b8e59a Ramiro Oliveira     2017-01-13  1163  	if (ret == -EINVAL)
61fc41317666be Philipp Zabel       2012-11-19  1164  		return ERR_PTR(ret);
c721f189e89c0d Krzysztof Kozlowski 2024-01-29  1165  	if (ret) {
c721f189e89c0d Krzysztof Kozlowski 2024-01-29  1166  		if (!IS_ENABLED(CONFIG_RESET_GPIO))
c721f189e89c0d Krzysztof Kozlowski 2024-01-29  1167  			return optional ? NULL : ERR_PTR(ret);
c721f189e89c0d Krzysztof Kozlowski 2024-01-29  1168  
c721f189e89c0d Krzysztof Kozlowski 2024-01-29  1169  		/*
c721f189e89c0d Krzysztof Kozlowski 2024-01-29  1170  		 * There can be only one reset-gpio for regular devices, so
c721f189e89c0d Krzysztof Kozlowski 2024-01-29  1171  		 * don't bother with the "reset-gpios" phandle index.
c721f189e89c0d Krzysztof Kozlowski 2024-01-29  1172  		 */
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1173  		ret = fwnode_property_get_reference_args(fwnode, "reset-gpios",
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1174  							 "#gpio-cells", 0, 0, &args);
bb475230b8e59a Ramiro Oliveira     2017-01-13  1175  		if (ret)
bb475230b8e59a Ramiro Oliveira     2017-01-13  1176  			return optional ? NULL : ERR_PTR(ret);
61fc41317666be Philipp Zabel       2012-11-19  1177  
c721f189e89c0d Krzysztof Kozlowski 2024-01-29  1178  		gpio_fallback = true;
c721f189e89c0d Krzysztof Kozlowski 2024-01-29  1179  
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1180  		ret = __reset_add_reset_gpio_device(fwnode, &args);
c721f189e89c0d Krzysztof Kozlowski 2024-01-29  1181  		if (ret) {
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1182  			fwnode_handle_put(args.fwnode);
1f10008aff7190 Bartosz Golaszewski 2026-03-06  1183  			return ERR_PTR(ret);
61fc41317666be Philipp Zabel       2012-11-19  1184  		}
61fc41317666be Philipp Zabel       2012-11-19  1185  	}
61fc41317666be Philipp Zabel       2012-11-19  1186  
1f10008aff7190 Bartosz Golaszewski 2026-03-06  1187  	guard(mutex)(&reset_list_mutex);
1f10008aff7190 Bartosz Golaszewski 2026-03-06  1188  
c721f189e89c0d Krzysztof Kozlowski 2024-01-29  1189  	rcdev = __reset_find_rcdev(&args, gpio_fallback);
61fc41317666be Philipp Zabel       2012-11-19  1190  	if (!rcdev) {
b790c8ea5593d6 Geert Uytterhoeven  2018-10-08  1191  		rstc = ERR_PTR(-EPROBE_DEFER);
1f10008aff7190 Bartosz Golaszewski 2026-03-06  1192  		goto out_put;
61fc41317666be Philipp Zabel       2012-11-19  1193  	}
61fc41317666be Philipp Zabel       2012-11-19  1194  
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1195  	if (WARN_ON(args.nargs != rcdev->fwnode_reset_n_cells)) {
b790c8ea5593d6 Geert Uytterhoeven  2018-10-08  1196  		rstc = ERR_PTR(-EINVAL);
1f10008aff7190 Bartosz Golaszewski 2026-03-06  1197  		goto out_put;
e677774f502635 Maxime Ripard       2016-01-14  1198  	}
e677774f502635 Maxime Ripard       2016-01-14  1199  
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1200  	if (rcdev->of_xlate && is_of_node(fwnode)) {
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1201  		ret = of_parse_phandle_with_args(to_of_node(fwnode),
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1202  					 gpio_fallback ? "reset-gpios" : "resets",
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1203  					 gpio_fallback ? "#gpio-cells" : "#reset-cells",
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1204  					 gpio_fallback ? 0 : index,
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1205  					 &of_args);
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1206  		if (ret) {
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1207  			rstc = ERR_PTR(ret);
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1208  			goto out_put;
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1209  		}
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1210  
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1211  		rstc_id = rcdev->of_xlate(rcdev, &of_args);
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1212  		of_node_put(of_args.np);
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1213  	} else if (rcdev->fwnode_xlate) {
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1214  		rstc_id = rcdev->fwnode_xlate(rcdev, &args);
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1215  	}
61fc41317666be Philipp Zabel       2012-11-19  1216  	if (rstc_id < 0) {
b790c8ea5593d6 Geert Uytterhoeven  2018-10-08  1217  		rstc = ERR_PTR(rstc_id);
1f10008aff7190 Bartosz Golaszewski 2026-03-06 @1218  			goto out_put;
61fc41317666be Philipp Zabel       2012-11-19  1219  	}
61fc41317666be Philipp Zabel       2012-11-19  1220  
dad35f7d2fc14e Philipp Zabel       2024-09-25  1221  	flags &= ~RESET_CONTROL_FLAGS_BIT_OPTIONAL;
dad35f7d2fc14e Philipp Zabel       2024-09-25  1222  
8c91302a29bc1b Bartosz Golaszewski 2026-03-06  1223  	scoped_guard(mutex, &rcdev->lock)
dad35f7d2fc14e Philipp Zabel       2024-09-25  1224  		rstc = __reset_control_get_internal(rcdev, rstc_id, flags);
61fc41317666be Philipp Zabel       2012-11-19  1225  
c721f189e89c0d Krzysztof Kozlowski 2024-01-29  1226  out_put:
9035073d0ef1de Bartosz Golaszewski 2026-03-06  1227  	fwnode_handle_put(args.fwnode);
61fc41317666be Philipp Zabel       2012-11-19  1228  
61fc41317666be Philipp Zabel       2012-11-19  1229  	return rstc;
61fc41317666be Philipp Zabel       2012-11-19  1230  }
ba8dbbb14b7e67 Bartosz Golaszewski 2026-03-06  1231  EXPORT_SYMBOL_GPL(__fwnode_reset_control_get);
61fc41317666be Philipp Zabel       2012-11-19  1232  

:::::: The code at line 1218 was first introduced by commit
:::::: 1f10008aff7190e300e93ed33a0eb2d236c0b87d reset: use lock guards in reset core

:::::: TO: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
:::::: CC: Philipp Zabel <p.zabel@pengutronix.de>

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

                 reply	other threads:[~2026-03-09 23:20 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=202603100730.J3pi4xqi-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --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 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.