devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: nick.hawkins@hpe.com, verdun@hpe.com, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, joel@jms.id.au,
	linux@armlinux.org.uk, linux-i2c@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v3 1/5] i2c: hpe: Add GXP SoC I2C Controller
Date: Sat, 21 Jan 2023 07:02:41 +0800	[thread overview]
Message-ID: <202301210607.KSWIWehq-lkp@intel.com> (raw)
In-Reply-To: <20230120190159.23459-2-nick.hawkins@hpe.com>

Hi,

I love your patch! Perhaps something to improve:

[auto build test WARNING on wsa/i2c/for-next]
[also build test WARNING on robh/for-next linus/master v6.2-rc4 next-20230120]
[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/nick-hawkins-hpe-com/i2c-hpe-Add-GXP-SoC-I2C-Controller/20230121-030628
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
patch link:    https://lore.kernel.org/r/20230120190159.23459-2-nick.hawkins%40hpe.com
patch subject: [PATCH v3 1/5] i2c: hpe: Add GXP SoC I2C Controller
config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20230121/202301210607.KSWIWehq-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/944feebf5cf838fc72fae192e832e5fc96d1cad9
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review nick-hawkins-hpe-com/i2c-hpe-Add-GXP-SoC-I2C-Controller/20230121-030628
        git checkout 944feebf5cf838fc72fae192e832e5fc96d1cad9
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash drivers/i2c/busses/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/i2c/busses/i2c-gxp.c: In function 'gxp_i2c_probe':
>> drivers/i2c/busses/i2c-gxp.c:533:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     533 |         drvdata->engine = ((u32)drvdata->base & 0xf00) >> 8;
         |                            ^


vim +533 drivers/i2c/busses/i2c-gxp.c

   499	
   500	static int gxp_i2c_probe(struct platform_device *pdev)
   501	{
   502		struct gxp_i2c_drvdata *drvdata;
   503		int rc;
   504		struct i2c_adapter *adapter;
   505	
   506		if (!i2c_global_init_done) {
   507			i2cg_map = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
   508								   "hpe,sysreg");
   509			if (IS_ERR(i2cg_map)) {
   510				return dev_err_probe(&pdev->dev, IS_ERR(i2cg_map),
   511						     "failed to map i2cg_handle\n");
   512			}
   513	
   514			/* Disable interrupt */
   515			regmap_update_bits(i2cg_map, GXP_I2CINTEN, 0x00000FFF, 0);
   516			i2c_global_init_done = true;
   517		}
   518	
   519		drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata),
   520				       GFP_KERNEL);
   521		if (!drvdata)
   522			return -ENOMEM;
   523	
   524		platform_set_drvdata(pdev, drvdata);
   525		drvdata->dev = &pdev->dev;
   526		init_completion(&drvdata->completion);
   527	
   528		drvdata->base = devm_platform_ioremap_resource(pdev, 0);
   529		if (IS_ERR(drvdata->base))
   530			return PTR_ERR(drvdata->base);
   531	
   532		/* Use physical memory address to determine which I2C engine this is. */
 > 533		drvdata->engine = ((u32)drvdata->base & 0xf00) >> 8;
   534	
   535		if (drvdata->engine >= GXP_MAX_I2C_ENGINE) {
   536			return dev_err_probe(&pdev->dev, -EINVAL, "i2c engine% is unsupported\n",
   537				drvdata->engine);
   538		}
   539	
   540		rc = platform_get_irq(pdev, 0);
   541		if (rc < 0)
   542			return rc;
   543	
   544		drvdata->irq = rc;
   545		rc = devm_request_irq(&pdev->dev, drvdata->irq, gxp_i2c_irq_handler,
   546				      IRQF_SHARED, gxp_i2c_name[drvdata->engine], drvdata);
   547		if (rc < 0)
   548			return dev_err_probe(&pdev->dev, rc, "irq request failed\n");
   549	
   550		i2c_parse_fw_timings(&pdev->dev, &drvdata->t, true);
   551	
   552		gxp_i2c_init(drvdata);
   553	
   554		/* Enable interrupt */
   555		regmap_update_bits(i2cg_map, GXP_I2CINTEN, BIT(drvdata->engine),
   556				   BIT(drvdata->engine));
   557	
   558		adapter = &drvdata->adapter;
   559		i2c_set_adapdata(adapter, drvdata);
   560	
   561		adapter->owner = THIS_MODULE;
   562		strscpy(adapter->name, "HPE GXP I2C adapter", sizeof(adapter->name));
   563		adapter->algo = &gxp_i2c_algo;
   564		adapter->dev.parent = &pdev->dev;
   565		adapter->dev.of_node = pdev->dev.of_node;
   566	
   567		rc = i2c_add_adapter(adapter);
   568		if (rc)
   569			return dev_err_probe(&pdev->dev, rc, "i2c add adapter failed\n");
   570	
   571		return 0;
   572	}
   573	

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

  reply	other threads:[~2023-01-20 23:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20 19:01 [PATCH v3 0/5] ARM: Add GXP I2C Support nick.hawkins
2023-01-20 19:01 ` [PATCH v3 1/5] i2c: hpe: Add GXP SoC I2C Controller nick.hawkins
2023-01-20 23:02   ` kernel test robot [this message]
2023-01-23  5:11   ` Joel Stanley
2023-01-23 15:41     ` Hawkins, Nick
2023-01-20 19:01 ` [PATCH v3 2/5] dt-bindings: i2c: Add hpe,gxp-i2c nick.hawkins
2023-01-22 14:02   ` Krzysztof Kozlowski
2023-01-23 20:05     ` Hawkins, Nick
2023-01-20 19:01 ` [PATCH v3 3/5] ARM: dts: hpe: Add I2C Topology nick.hawkins
2023-01-20 19:01 ` [PATCH v3 4/5] ARM: multi_v7_defconfig: add gxp i2c module nick.hawkins
2023-01-20 19:01 ` [PATCH v3 5/5] MAINTAINERS: Add HPE GXP I2C Support nick.hawkins

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=202301210607.KSWIWehq-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=joel@jms.id.au \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=nick.hawkins@hpe.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh+dt@kernel.org \
    --cc=verdun@hpe.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).