Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2110516rdb; Thu, 7 Dec 2023 20:17:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IFNMOMob49kHY2XecOlMMSes/uNtBQJfYkgXBYhknPD9Sg0Ply772RYUudLQY9lOp+tzlis X-Received: by 2002:a17:90a:d40e:b0:282:d080:feed with SMTP id r14-20020a17090ad40e00b00282d080feedmr3305326pju.40.1702009068495; Thu, 07 Dec 2023 20:17:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702009068; cv=none; d=google.com; s=arc-20160816; b=kDhP7MvKBmWuQ8B+mKtcvBIyEyXNXK0FIIm8Hn8Ri+AlY+/NyC+h5+LlKhO/eeEY7i 9nKWGfy+Ign+s+IL3ucJXw0vGsO5usXmp/vqop3XJ1BZ6rZXlYnKjQAR9IsAEbbv1uKG 9SeFUMi4GqeHX1+TkdnyyiR5mwb648BIqZjfHwDmiJ4TxmCBdjBUfxAj5uuYOumNBOZB CzZJiy/bDb794AaYO7TZOqja7jLCPrm+QZfEPXmw4YMyH9arQLECWy2CtaJZkfC0n8ms CuXB6jFZe7q8+mgUoWTLl9xL0ei8wMx2r8qd6v6suLyEa2PKE39kQjyFCjmjd6KNmXY8 CsIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kblyTgEArk55h1XkrFb6dR+hk6/MAogYDQzM+Geidvs=; fh=WbWbfQRzupGvKfMFsNFQUpsz/0YUUeEZ26VLuzxksLQ=; b=qK+/bOvv7fD0O3EtUsEqPgpw0N6x5ifwShrwTh9kJQSgxijMMvjAUwuBDGBaQZjHIh Ye3I3mkOCY7TscHlo06DXyg9f52275QxxjpuiCgbp8zcu3qFJ1WVFIY4SgdQ2AjUaE3y rVuYym/zBeplJlwrOx1G50hdohOaP7e8FNtqVQ8b0uLtliI8T6fFBarUIZmFqbCkBZbL HV3odgj4kfHxc7TZbBm4TdUvj2K7qMp6np6p20fOszEVabLW8kZr2yX7Ivo45JvUPqkH HhxP4a2xbQN5Kf8VUjiziJVUKOPecFWOsCITQXoWZILWeyVlTZRzv2FO6ohfZon8qMq5 lKGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="UW/QgOZT"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id c8-20020a170903234800b001d09013a13csi875233plh.329.2023.12.07.20.17.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 20:17:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="UW/QgOZT"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id AD9708061B53; Thu, 7 Dec 2023 20:16:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231892AbjLHEQM (ORCPT + 99 others); Thu, 7 Dec 2023 23:16:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbjLHEQL (ORCPT ); Thu, 7 Dec 2023 23:16:11 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 743421718; Thu, 7 Dec 2023 20:16:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702008977; x=1733544977; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=SxevhwPvl1dlX54v2YDQvnciLdpmAuA4/R+k34yhueQ=; b=UW/QgOZTwTX4Bu5Rp8NgE/VBmc1fS7HYj0POBM/RFFFK85zrW1B5WNrW RZB5nOczK9//6r8wOznLz0BkFuWrx6ylIDUxziljSS8NqiE+VcFarXJ2n 7eOseytMsQ1xDJ5+56LYMbiYkk70ofvOrtq4wG/ypw5a+ReWrCAZL+28J 8+vFBGQyE3QztTy6s1rBJm8ccCWgujyDqufYamIjRWf/wTN0rr+aXV3SW 24C1rbqlaMlet6axpRXAh55bXwtun+LpGbx5t0WVLegiUeWVsWBskUvRf ME0C/oD63obijaOG5xMzeyF+5rduBC7LC/d6wGDsHYm2Uh80KZ+CoeIGA Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10917"; a="374519751" X-IronPort-AV: E=Sophos;i="6.04,259,1695711600"; d="scan'208";a="374519751" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2023 20:16:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,259,1695711600"; d="scan'208";a="19953059" Received: from lkp-server02.sh.intel.com (HELO b07ab15da5fe) ([10.239.97.151]) by orviesa001.jf.intel.com with ESMTP; 07 Dec 2023 20:16:15 -0800 Received: from kbuild by b07ab15da5fe with local (Exim 4.96) (envelope-from ) id 1rBSHc-000DEh-0s; Fri, 08 Dec 2023 04:16:12 +0000 Date: Fri, 8 Dec 2023 12:15:44 +0800 From: kernel test robot To: Elad Nachman , gregory.clement@bootlin.com, andi.shyti@kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, enachman@marvell.com, cyuval@marvell.com Subject: Re: [PATCH v2 1/1] i2c: busses: i2c-mv64xxx: fix arb-loss i2c lock Message-ID: <202312081143.38GWJJ2J-lkp@intel.com> References: <20231207165027.2628302-2-enachman@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231207165027.2628302-2-enachman@marvell.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 07 Dec 2023 20:16:25 -0800 (PST) Hi Elad, kernel test robot noticed the following build warnings: [auto build test WARNING on wsa/i2c/for-next] [also build test WARNING on linus/master v6.7-rc4 next-20231207] [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/Elad-Nachman/i2c-busses-i2c-mv64xxx-fix-arb-loss-i2c-lock/20231208-005406 base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next patch link: https://lore.kernel.org/r/20231207165027.2628302-2-enachman%40marvell.com patch subject: [PATCH v2 1/1] i2c: busses: i2c-mv64xxx: fix arb-loss i2c lock config: i386-buildonly-randconfig-004-20231208 (https://download.01.org/0day-ci/archive/20231208/202312081143.38GWJJ2J-lkp@intel.com/config) compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231208/202312081143.38GWJJ2J-lkp@intel.com/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 | Closes: https://lore.kernel.org/oe-kbuild-all/202312081143.38GWJJ2J-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/i2c/busses/i2c-mv64xxx.c:440:9: warning: variable 'ret' is uninitialized when used here [-Wuninitialized] if (!ret) { ^~~ drivers/i2c/busses/i2c-mv64xxx.c:372:12: note: initialize the variable 'ret' to silence this warning int i, ret; ^ = 0 1 warning generated. vim +/ret +440 drivers/i2c/busses/i2c-mv64xxx.c 367 368 static void 369 mv64xxx_i2c_do_action(struct mv64xxx_i2c_data *drv_data) 370 { 371 struct pinctrl *pc; 372 int i, ret; 373 374 switch(drv_data->action) { 375 case MV64XXX_I2C_ACTION_SEND_RESTART: 376 /* We should only get here if we have further messages */ 377 BUG_ON(drv_data->num_msgs == 0); 378 379 drv_data->msgs++; 380 drv_data->num_msgs--; 381 mv64xxx_i2c_send_start(drv_data); 382 383 if (drv_data->errata_delay) 384 udelay(5); 385 386 /* 387 * We're never at the start of the message here, and by this 388 * time it's already too late to do any protocol mangling. 389 * Thankfully, do not advertise support for that feature. 390 */ 391 drv_data->send_stop = drv_data->num_msgs == 1; 392 break; 393 394 case MV64XXX_I2C_ACTION_CONTINUE: 395 writel(drv_data->cntl_bits, 396 drv_data->reg_base + drv_data->reg_offsets.control); 397 break; 398 399 case MV64XXX_I2C_ACTION_SEND_ADDR_1: 400 writel(drv_data->addr1, 401 drv_data->reg_base + drv_data->reg_offsets.data); 402 writel(drv_data->cntl_bits, 403 drv_data->reg_base + drv_data->reg_offsets.control); 404 break; 405 406 case MV64XXX_I2C_ACTION_SEND_ADDR_2: 407 writel(drv_data->addr2, 408 drv_data->reg_base + drv_data->reg_offsets.data); 409 writel(drv_data->cntl_bits, 410 drv_data->reg_base + drv_data->reg_offsets.control); 411 break; 412 413 case MV64XXX_I2C_ACTION_SEND_DATA: 414 writel(drv_data->msg->buf[drv_data->byte_posn++], 415 drv_data->reg_base + drv_data->reg_offsets.data); 416 writel(drv_data->cntl_bits, 417 drv_data->reg_base + drv_data->reg_offsets.control); 418 break; 419 420 case MV64XXX_I2C_ACTION_RCV_DATA: 421 drv_data->msg->buf[drv_data->byte_posn++] = 422 readl(drv_data->reg_base + drv_data->reg_offsets.data); 423 writel(drv_data->cntl_bits, 424 drv_data->reg_base + drv_data->reg_offsets.control); 425 break; 426 427 case MV64XXX_I2C_ACTION_UNLOCK_BUS: 428 if (!drv_data->soft_reset) 429 break; 430 431 pc = devm_pinctrl_get(drv_data->adapter.dev.parent); 432 if (IS_ERR(pc)) { 433 dev_err(&drv_data->adapter.dev, 434 "failed to get pinctrl for bus unlock!\n"); 435 break; 436 } 437 438 /* Change i2c MPPs state to act as GPIOs: */ 439 if (pinctrl_select_state(pc, drv_data->i2c_gpio_state) >= 0) { > 440 if (!ret) { 441 /* 442 * Toggle i2c scl (serial clock) 10 times. 443 * 10 clocks are enough to transfer a full 444 * byte plus extra as seen from tests with 445 * Ubiquity SFP module causing the issue. 446 * This allows the slave that occupies 447 * the bus to transmit its remaining data, 448 * so it can release the i2c bus: 449 */ 450 for (i = 0; i < 10; i++) { 451 gpio_set_value(drv_data->scl_gpio, 1); 452 udelay(100); 453 gpio_set_value(drv_data->scl_gpio, 0); 454 }; 455 } 456 457 /* restore i2c pin state to MPPs: */ 458 pinctrl_select_state(pc, drv_data->i2c_mpp_state); 459 } 460 461 /* 462 * Trigger controller soft reset 463 * This register is write only, with none of the bits defined. 464 * So any value will do. 465 * 0x1 just seems more intuitive than 0x0 ... 466 */ 467 writel(0x1, drv_data->reg_base + drv_data->reg_offsets.soft_reset); 468 /* wait for i2c controller to complete reset: */ 469 udelay(100); 470 /* 471 * need to proceed to the data stop condition generation clause. 472 * This is needed after clock toggling to put the i2c slave 473 * in the correct state. 474 */ 475 fallthrough; 476 477 case MV64XXX_I2C_ACTION_RCV_DATA_STOP: 478 drv_data->msg->buf[drv_data->byte_posn++] = 479 readl(drv_data->reg_base + drv_data->reg_offsets.data); 480 if (!drv_data->atomic) 481 drv_data->cntl_bits &= ~MV64XXX_I2C_REG_CONTROL_INTEN; 482 writel(drv_data->cntl_bits | MV64XXX_I2C_REG_CONTROL_STOP, 483 drv_data->reg_base + drv_data->reg_offsets.control); 484 drv_data->block = 0; 485 if (drv_data->errata_delay) 486 udelay(5); 487 488 wake_up(&drv_data->waitq); 489 break; 490 491 case MV64XXX_I2C_ACTION_INVALID: 492 default: 493 dev_err(&drv_data->adapter.dev, 494 "mv64xxx_i2c_do_action: Invalid action: %d\n", 495 drv_data->action); 496 drv_data->rc = -EIO; 497 fallthrough; 498 case MV64XXX_I2C_ACTION_SEND_STOP: 499 if (!drv_data->atomic) 500 drv_data->cntl_bits &= ~MV64XXX_I2C_REG_CONTROL_INTEN; 501 writel(drv_data->cntl_bits | MV64XXX_I2C_REG_CONTROL_STOP, 502 drv_data->reg_base + drv_data->reg_offsets.control); 503 drv_data->block = 0; 504 wake_up(&drv_data->waitq); 505 break; 506 } 507 } 508 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki