linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ryan Chen <ryan_chen@aspeedtech.com>,
	benh@kernel.crashing.org, joel@jms.id.au, andi.shyti@kernel.org,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	andrew@codeconstruct.com.au, p.zabel@pengutronix.de,
	andriy.shevchenko@linux.intel.com, linux-i2c@vger.kernel.org,
	openbmc@lists.ozlabs.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v16 2/3] i2c: aspeed: support AST2600 i2c new register mode driver
Date: Fri, 28 Feb 2025 09:28:59 +0800	[thread overview]
Message-ID: <202502280902.U0gLDhve-lkp@intel.com> (raw)
In-Reply-To: <20250224055936.1804279-3-ryan_chen@aspeedtech.com>

Hi Ryan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on andi-shyti/i2c/i2c-host]
[also build test WARNING on linus/master v6.14-rc4 next-20250227]
[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/Ryan-Chen/dt-bindings-i2c-aspeed-support-for-AST2600-i2cv2/20250224-140221
base:   https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git i2c/i2c-host
patch link:    https://lore.kernel.org/r/20250224055936.1804279-3-ryan_chen%40aspeedtech.com
patch subject: [PATCH v16 2/3] i2c: aspeed: support AST2600 i2c new register mode driver
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20250228/202502280902.U0gLDhve-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250228/202502280902.U0gLDhve-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502280902.U0gLDhve-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/i2c/busses/i2c-ast2600.c: In function 'ast2600_i2c_recover_bus':
>> drivers/i2c/busses/i2c-ast2600.c:345:32: warning: unsigned conversion from 'int' to 'u8' {aka 'unsigned char'} changes value from '-145' to '111' [-Woverflow]
     345 |                         return -ETIMEDOUT;
         |                                ^


vim +345 drivers/i2c/busses/i2c-ast2600.c

   315	
   316	static u8 ast2600_i2c_recover_bus(struct ast2600_i2c_bus *i2c_bus)
   317	{
   318		u32 state = readl(i2c_bus->reg_base + AST2600_I2CC_STS_AND_BUFF);
   319		int ret = 0;
   320		u32 ctrl;
   321		int r;
   322	
   323		dev_dbg(i2c_bus->dev, "%d-bus recovery bus [%x]\n", i2c_bus->adap.nr, state);
   324	
   325		ctrl = readl(i2c_bus->reg_base + AST2600_I2CC_FUN_CTRL);
   326	
   327		/* Disable controller */
   328		writel(ctrl & ~(AST2600_I2CC_MASTER_EN | AST2600_I2CC_SLAVE_EN),
   329		       i2c_bus->reg_base + AST2600_I2CC_FUN_CTRL);
   330	
   331		writel(readl(i2c_bus->reg_base + AST2600_I2CC_FUN_CTRL) | AST2600_I2CC_MASTER_EN,
   332		       i2c_bus->reg_base + AST2600_I2CC_FUN_CTRL);
   333	
   334		reinit_completion(&i2c_bus->cmd_complete);
   335		i2c_bus->cmd_err = 0;
   336	
   337		/* Check 0x14's SDA and SCL status */
   338		state = readl(i2c_bus->reg_base + AST2600_I2CC_STS_AND_BUFF);
   339		if (!(state & AST2600_I2CC_SDA_LINE_STS) && (state & AST2600_I2CC_SCL_LINE_STS)) {
   340			writel(AST2600_I2CM_RECOVER_CMD_EN, i2c_bus->reg_base + AST2600_I2CM_CMD_STS);
   341			r = wait_for_completion_timeout(&i2c_bus->cmd_complete, i2c_bus->adap.timeout);
   342			if (r == 0) {
   343				dev_dbg(i2c_bus->dev, "recovery timed out\n");
   344				writel(ctrl, i2c_bus->reg_base + AST2600_I2CC_FUN_CTRL);
 > 345				return -ETIMEDOUT;
   346			} else if (i2c_bus->cmd_err) {
   347				dev_dbg(i2c_bus->dev, "recovery error\n");
   348				ret = -EPROTO;
   349			}
   350		}
   351	
   352		/* Recovery done */
   353		state = readl(i2c_bus->reg_base + AST2600_I2CC_STS_AND_BUFF);
   354		if (state & AST2600_I2CC_BUS_BUSY_STS) {
   355			dev_dbg(i2c_bus->dev, "Can't recover bus [%x]\n", state);
   356			ret = -EPROTO;
   357		}
   358	
   359		/* restore original controller setting */
   360		writel(ctrl, i2c_bus->reg_base + AST2600_I2CC_FUN_CTRL);
   361		return ret;
   362	}
   363	

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


  parent reply	other threads:[~2025-02-28  1:31 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24  5:59 [PATCH v16 0/3] Add ASPEED AST2600 I2Cv2 controller driver Ryan Chen
2025-02-24  5:59 ` [PATCH v16 1/3] dt-bindings: i2c: aspeed: support for AST2600-i2cv2 Ryan Chen
2025-02-24  7:16   ` Rob Herring (Arm)
2025-02-24  9:11   ` Krzysztof Kozlowski
2025-02-24  9:12     ` Krzysztof Kozlowski
2025-02-26  9:28     ` Ryan Chen
2025-02-26  9:56       ` Krzysztof Kozlowski
2025-02-27  8:19         ` Ryan Chen
2025-02-27 20:04           ` Krzysztof Kozlowski
2025-03-05  9:35             ` Ryan Chen
2025-03-17  7:45               ` Krzysztof Kozlowski
2025-03-17  9:21                 ` Ryan Chen
2025-03-19  7:44                   ` Krzysztof Kozlowski
2025-03-19 11:12                     ` Ryan Chen
2025-03-24  7:21                       ` Krzysztof Kozlowski
2025-03-24  8:30                         ` Ryan Chen
2025-03-24  9:07                           ` Krzysztof Kozlowski
2025-03-24 10:01                             ` Ryan Chen
2025-03-24 11:10                               ` Krzysztof Kozlowski
2025-03-25  9:52                                 ` Ryan Chen
2025-03-25 10:18                                   ` Krzysztof Kozlowski
2025-09-10  7:25                                     ` Jeremy Kerr
2025-09-10  7:44                                       ` Krzysztof Kozlowski
2025-09-10  8:31                                         ` Jeremy Kerr
2025-09-11  1:27                                           ` Ryan Chen
2025-09-11  1:38                                             ` Jeremy Kerr
2025-09-11  9:03                                               ` Jeremy Kerr
2025-09-12  6:37                                                 ` Krzysztof Kozlowski
2025-09-12  7:13                                                   ` Ryan Chen
2025-02-24  5:59 ` [PATCH v16 2/3] i2c: aspeed: support AST2600 i2c new register mode driver Ryan Chen
2025-02-24  8:54   ` Philipp Zabel
2025-02-24  9:04     ` Ryan Chen
2025-02-24  9:32       ` Philipp Zabel
2025-02-28  1:28   ` kernel test robot [this message]
2025-02-28 12:38     ` Andy Shevchenko
2025-03-17  7:48       ` Krzysztof Kozlowski
2025-03-17  8:00         ` Andy Shevchenko
2025-03-17  8:51           ` Ryan Chen
2025-03-17  8:57             ` Krzysztof Kozlowski
2025-02-24  5:59 ` [PATCH v16 3/3] i2c: aspeed: support AST2600 i2c new register target " Ryan Chen

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=202502280902.U0gLDhve-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andi.shyti@kernel.org \
    --cc=andrew@codeconstruct.com.au \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=benh@kernel.crashing.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=joel@jms.id.au \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=openbmc@lists.ozlabs.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=ryan_chen@aspeedtech.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).