From: kernel test robot <lkp@intel.com>
To: Wolfram Sang <wsa-dev@sang-engineering.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [wsa:renesas/mfis/hwspinlock 3/8] drivers/i2c/busses/i2c-rcar.c:1230 rcar_i2c_probe() warn: inconsistent indenting
Date: Wed, 24 Jun 2026 03:55:16 +0800 [thread overview]
Message-ID: <202606240307.5lIyLPkw-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/mfis/hwspinlock
head: 84d0247695fc44cfcfaa34335cda86673804e8b0
commit: da42ae7d094d7acf425dbd3faccb5053b723518e [3/8] sparrowhawk/ironhide: hwspinlock testing
config: um-randconfig-r072-20260623 (https://download.01.org/0day-ci/archive/20260624/202606240307.5lIyLPkw-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
smatch: v0.5.0-9185-gbcc58b9c
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/202606240307.5lIyLPkw-lkp@intel.com/
smatch warnings:
drivers/i2c/busses/i2c-rcar.c:1230 rcar_i2c_probe() warn: inconsistent indenting
vim +1230 drivers/i2c/busses/i2c-rcar.c
1118
1119 static int rcar_i2c_probe(struct platform_device *pdev)
1120 {
1121 struct rcar_i2c_priv *priv;
1122 struct i2c_adapter *adap;
1123 struct device *dev = &pdev->dev;
1124 unsigned long irqflags = 0;
1125 irqreturn_t (*irqhandler)(int irq, void *ptr) = rcar_i2c_gen3_irq;
1126 int ret;
1127
1128 /* Otherwise logic will break because some bytes must always use PIO */
1129 BUILD_BUG_ON_MSG(RCAR_MIN_DMA_LEN < 3, "Invalid min DMA length");
1130
1131 priv = devm_kzalloc(dev, sizeof(struct rcar_i2c_priv), GFP_KERNEL);
1132 if (!priv)
1133 return -ENOMEM;
1134
1135 priv->clk = devm_clk_get(dev, NULL);
1136 if (IS_ERR(priv->clk)) {
1137 dev_err(dev, "cannot get clock\n");
1138 return PTR_ERR(priv->clk);
1139 }
1140
1141 priv->io = devm_platform_get_and_ioremap_resource(pdev, 0, &priv->res);
1142 if (IS_ERR(priv->io))
1143 return PTR_ERR(priv->io);
1144
1145 priv->devtype = (kernel_ulong_t)of_device_get_match_data(dev);
1146 init_waitqueue_head(&priv->wait);
1147
1148 adap = &priv->adap;
1149 adap->nr = pdev->id;
1150 adap->algo = &rcar_i2c_algo;
1151 adap->class = I2C_CLASS_DEPRECATED;
1152 adap->retries = 3;
1153 adap->dev.parent = dev;
1154 adap->dev.of_node = dev->of_node;
1155 adap->bus_recovery_info = &rcar_i2c_bri;
1156 adap->quirks = &rcar_i2c_quirks;
1157 i2c_set_adapdata(adap, priv);
1158 strscpy(adap->name, pdev->name, sizeof(adap->name));
1159
1160 /* Init DMA */
1161 sg_init_table(&priv->sg, 1);
1162 priv->dma_direction = DMA_NONE;
1163 priv->dma_rx = priv->dma_tx = ERR_PTR(-EPROBE_DEFER);
1164
1165 /* Activate device for clock calculation */
1166 pm_runtime_enable(dev);
1167 pm_runtime_get_sync(dev);
1168 ret = rcar_i2c_clock_calculate(priv);
1169 if (ret < 0) {
1170 pm_runtime_put(dev);
1171 goto out_pm_disable;
1172 }
1173
1174 /* Bring hardware to known state */
1175 rcar_i2c_init(priv);
1176 rcar_i2c_reset_slave(priv);
1177
1178 /* Stay always active when multi-master to keep arbitration working */
1179 if (of_property_read_bool(dev->of_node, "multi-master"))
1180 priv->flags |= ID_P_PM_BLOCKED;
1181 else
1182 pm_runtime_put(dev);
1183
1184 if (of_property_read_bool(dev->of_node, "smbus"))
1185 priv->flags |= ID_P_HOST_NOTIFY;
1186
1187 if (priv->devtype < I2C_RCAR_GEN3) {
1188 irqflags |= IRQF_NO_THREAD;
1189 irqhandler = rcar_i2c_gen2_irq;
1190 } else {
1191 /* R-Car Gen3+ needs a reset before every transfer */
1192 priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
1193 if (IS_ERR(priv->rstc)) {
1194 ret = PTR_ERR(priv->rstc);
1195 goto out_pm_put;
1196 }
1197
1198 ret = reset_control_status(priv->rstc);
1199 if (ret < 0)
1200 goto out_pm_put;
1201
1202 /* hard reset disturbs HostNotify local target, so disable it */
1203 priv->flags &= ~ID_P_HOST_NOTIFY;
1204 }
1205
1206 ret = platform_get_irq(pdev, 0);
1207 if (ret < 0)
1208 goto out_pm_put;
1209 priv->irq = ret;
1210 ret = devm_request_irq(dev, priv->irq, irqhandler, irqflags, dev_name(dev), priv);
1211 if (ret < 0) {
1212 dev_err(dev, "cannot get irq %d\n", priv->irq);
1213 goto out_pm_put;
1214 }
1215
1216 platform_set_drvdata(pdev, priv);
1217
1218 ret = i2c_add_numbered_adapter(adap);
1219 if (ret < 0)
1220 goto out_pm_put;
1221
1222 if (priv->flags & ID_P_HOST_NOTIFY) {
1223 priv->host_notify_client = i2c_new_slave_host_notify_device(adap);
1224 if (IS_ERR(priv->host_notify_client)) {
1225 ret = PTR_ERR(priv->host_notify_client);
1226 goto out_del_device;
1227 }
1228 }
1229
> 1230 int lock_id;
1231 struct hwspinlock *lock;
1232 for (int j = 0; j < 2; j++) {
1233 lock_id = of_hwspin_lock_get_id(dev->of_node, j);
1234 if (lock_id == -EPROBE_DEFER) return lock_id;
1235 if (lock_id < 0) continue;
1236 lock = hwspin_lock_request_specific(lock_id);
1237
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-06-23 19:56 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=202606240307.5lIyLPkw-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=wsa-dev@sang-engineering.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.