Hi Frank, kernel test robot noticed the following build warnings: [auto build test WARNING on tty/tty-testing] [also build test WARNING on tty/tty-next tty/tty-linus robh/for-next linus/master v6.7 next-20240111] [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/Frank-Li/i3c-add-target-mode-support/20240111-015711 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing patch link: https://lore.kernel.org/r/20240110175221.2335480-5-Frank.Li%40nxp.com patch subject: [PATCH v2 4/7] i3c: target: add svc target controller support config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20240111/202401112149.TbWJpRfM-lkp@xxxxxxxxx/config) compiler: ClangBuiltLinux clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240111/202401112149.TbWJpRfM-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202401112149.TbWJpRfM-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): >> drivers/i3c/target/svc-i3c-target.c:211:40: warning: no previous prototype for function 'svc_i3c_get_features' [-Wmissing-prototypes] 211 | const struct i3c_target_ctrl_features *svc_i3c_get_features(struct i3c_target_ctrl *ctrl) | ^ drivers/i3c/target/svc-i3c-target.c:211:7: note: declare 'static' if the function is not intended to be used outside of this translation unit 211 | const struct i3c_target_ctrl_features *svc_i3c_get_features(struct i3c_target_ctrl *ctrl) | ^ | static >> drivers/i3c/target/svc-i3c-target.c:268:63: warning: omitting the parameter name in a function definition is a C2x extension [-Wc2x-extensions] 268 | static int svc_i3c_target_queue(struct i3c_request *req, gfp_t) | ^ >> drivers/i3c/target/svc-i3c-target.c:666:5: warning: no previous prototype for function 'svc_i3c_fifo_status' [-Wmissing-prototypes] 666 | int svc_i3c_fifo_status(struct i3c_target_ctrl *ctrl, bool tx) | ^ drivers/i3c/target/svc-i3c-target.c:666:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 666 | int svc_i3c_fifo_status(struct i3c_target_ctrl *ctrl, bool tx) | ^ | static 3 warnings generated. vim +/svc_i3c_get_features +211 drivers/i3c/target/svc-i3c-target.c 210 > 211 const struct i3c_target_ctrl_features *svc_i3c_get_features(struct i3c_target_ctrl *ctrl) 212 { 213 struct svc_i3c_target *svc; 214 215 svc = dev_get_drvdata(&ctrl->dev); 216 217 if (!svc) 218 return NULL; 219 220 return &svc->features; 221 } 222 223 static void svc_i3c_queue_complete(struct svc_i3c_target *svc, struct i3c_request *complete) 224 { 225 unsigned long flags; 226 227 spin_lock_irqsave(&svc->cq_lock, flags); 228 list_add_tail(&complete->list, &svc->cq); 229 spin_unlock_irqrestore(&svc->cq_lock, flags); 230 queue_work(svc->workqueue, &svc->work); 231 } 232 233 static void svc_i3c_fill_txfifo(struct svc_i3c_target *svc) 234 { 235 struct i3c_request *req, *complete = NULL; 236 unsigned long flags; 237 int val; 238 239 spin_lock_irqsave(&svc->txq_lock, flags); 240 while ((!!(req = list_first_entry_or_null(&svc->txq, struct i3c_request, list))) && 241 !((readl_relaxed(svc->regs + I3C_SDATACTRL) & I3C_SDATACTRL_TXFULL_MASK))) { 242 while (!(readl_relaxed(svc->regs + I3C_SDATACTRL) 243 & I3C_SDATACTRL_TXFULL_MASK)) { 244 val = *(u8 *)(req->buf + req->actual); 245 246 if (req->actual + 1 == req->length) 247 writel_relaxed(val, svc->regs + I3C_SWDATAE); 248 else 249 writel_relaxed(val, svc->regs + I3C_SWDATAB); 250 251 req->actual++; 252 253 if (req->actual == req->length) { 254 list_del(&req->list); 255 complete = req; 256 spin_unlock_irqrestore(&svc->txq_lock, flags); 257 258 svc_i3c_queue_complete(svc, complete); 259 260 spin_lock_irqsave(&svc->txq_lock, flags); 261 break; 262 } 263 } 264 } 265 spin_unlock_irqrestore(&svc->txq_lock, flags); 266 } 267 > 268 static int svc_i3c_target_queue(struct i3c_request *req, gfp_t) 269 { 270 struct svc_i3c_target *svc; 271 struct list_head *q; 272 unsigned long flags; 273 spinlock_t *lk; 274 275 svc = dev_get_drvdata(&req->ctrl->dev); 276 if (!svc) 277 return -EINVAL; 278 279 if (req->tx) { 280 q = &svc->txq; 281 lk = &svc->txq_lock; 282 } else { 283 q = &svc->rxq; 284 lk = &svc->rxq_lock; 285 } 286 287 spin_lock_irqsave(lk, flags); 288 list_add_tail(&req->list, q); 289 spin_unlock_irqrestore(lk, flags); 290 291 if (req->tx) 292 svc_i3c_fill_txfifo(svc); 293 294 if (req->tx) 295 writel_relaxed(I3C_SINT_TXSEND, svc->regs + I3C_SINTSET); 296 else 297 writel_relaxed(I3C_SINT_RXPEND, svc->regs + I3C_SINTSET); 298 299 return 0; 300 } 301 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki