All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: vadimp@mellanox.com
Cc: kbuild-all@01.org, wsa@the-dreams.de, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org, jiri@resnulli.us,
	Vadim Pasternak <vadimp@mellanox.com>,
	Michael Shych <michaelsh@mellanox.com>
Subject: Re: [patch 2/2] i2c: mux: mellanox: add driver
Date: Mon, 29 Aug 2016 04:42:54 +0800	[thread overview]
Message-ID: <201608290429.5ZB0pvf9%fengguang.wu@intel.com> (raw)
In-Reply-To: <1472403262-139012-1-git-send-email-vadimp@mellanox.com>

[-- Attachment #1: Type: text/plain, Size: 7118 bytes --]

Hi Vadim,

[auto build test WARNING on wsa/i2c/for-next]
[also build test WARNING on v4.8-rc3 next-20160825]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    https://github.com/0day-ci/linux/commits/vadimp-mellanox-com/i2c-add-master-driver-for-mellanox-systems/20160828-225625
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 4.9.0
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=m68k 

All warnings (new ones prefixed by >>):

   In file included from arch/m68k/include/asm/io_mm.h:26:0,
                    from arch/m68k/include/asm/io.h:4,
                    from include/linux/io.h:25,
                    from drivers/i2c/muxes/i2c-mux-mlxcpld.c:42:
   drivers/i2c/muxes/i2c-mux-mlxcpld.c: In function 'mlxcpld_mux_reg_write':
   arch/m68k/include/asm/raw_io.h:43:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define out_8(addr,b) (void)((*(__force volatile u8 *) (addr)) = (b))
                                   ^
   arch/m68k/include/asm/io_mm.h:396:72: note: in expansion of macro 'out_8'
    #define outb(val, port) ((port) < 1024 ? isa_rom_outb((val), (port)) : out_8((port), (val)))
                                                                           ^
>> drivers/i2c/muxes/i2c-mux-mlxcpld.c:164:3: note: in expansion of macro 'outb'
      outb(val, pdata->addr); /* addr = CPLD base + offset */
      ^

vim +/outb +164 drivers/i2c/muxes/i2c-mux-mlxcpld.c

    36	#include <linux/version.h>
    37	#include <linux/init.h>
    38	#include <linux/slab.h>
    39	#include <linux/device.h>
    40	#include <linux/i2c.h>
    41	#include <linux/i2c-mux.h>
  > 42	#include <linux/io.h>
    43	#include <linux/platform_device.h>
    44	#include <linux/i2c/mlxcpld.h>
    45	
    46	#define CPLD_MUX_MAX_NCHANS	8
    47	#define CPLD_MUX_EXT_MAX_NCHANS	24
    48	
    49	/*
    50	 * mlxcpld_mux types - kind of mux supported by driver:
    51	 * @mlxcpld_mux_tor - LPC access; 8 channels.
    52	 * @mlxcpld_mux_mgmt - LPC access; 8 channels.
    53	 * @mlxcpld_mux_mgmt_ext - LPC access; 24 channels.
    54	 * @mlxcpld_mux_module - I2C access; 8 channels/legs.
    55	 */
    56	enum mlxcpld_mux_type {
    57		mlxcpld_mux_tor,
    58		mlxcpld_mux_mgmt,
    59		mlxcpld_mux_mgmt_ext,
    60		mlxcpld_mux_module,
    61	};
    62	
    63	/* mlxcpld_mux_type - underlying physical bus, to which device is connected:
    64	 * @lpc_access - LPC connected CPLD device
    65	 * @i2c_access - I2C connected CPLD device
    66	 */
    67	enum mlxcpld_mux_access_type {
    68		lpc_access,
    69		i2c_access,
    70	};
    71	
    72	/* mlxcpld_mux - mux control structure:
    73	 * @type - mux type
    74	 * @last_chan - last register value
    75	 * @client - I2C device client
    76	 */
    77	struct mlxcpld_mux {
    78		enum mlxcpld_mux_type type;
    79		u8 last_chan;
    80		struct i2c_client *client;
    81	};
    82	
    83	/* mlxcpld_mux_desc - mux descriptor structure:
    84	 * @nchans - number of channels
    85	 * @muxtype - physical mux type (LPC or I2C)
    86	 */
    87	struct mlxcpld_mux_desc {
    88		u8 nchans;
    89		enum mlxcpld_mux_access_type muxtype;
    90	};
    91	
    92	/* MUX logic description.
    93	 * This logic can be applied for LPC attached CPLD and fro I2C attached CPLD.
    94	 * Driver can support different mux control logic, according to CPLD
    95	 * implementation.
    96	 *
    97	 * Connectivity schema.
    98	 *
    99	 * i2c-mlxcpld                                 Digital               Analog
   100	 * driver
   101	 * *--------*                                 * -> mux1 (virt bus2) -> mux -> |
   102	 * | I2CLPC | i2c physical                    * -> mux2 (virt bus3) -> mux -> |
   103	 * | bridge | bus 1                 *---------*                               |
   104	 * | logic  |---------------------> * mux reg *                               |
   105	 * | in CPLD|                       *---------*                               |
   106	 * *--------*   i2c-mux-mlxpcld          ^    * -> muxn (virt busn) -> mux -> |
   107	 *     |        driver                   |                                    |
   108	 *     |        *---------------*        |                              Devices
   109	 *     |        * CPLD (LPC bus)* select |
   110	 *     |        * registers for *--------*
   111	 *     |        * mux selection * deselect
   112	 *     |        *---------------*
   113	 *     |                 |
   114	 * <-------->     <----------->
   115	 * i2c cntrl      Board cntrl reg
   116	 * reg space      space (mux select,
   117	 *     |          IO, LED, WD, info)
   118	 *     |                 |                  *-----*   *-----*
   119	 *     *------------- LPC bus --------------| PCH |---| CPU |
   120	 *                                          *-----*   *-----*
   121	 *
   122	 */
   123	static const struct mlxcpld_mux_desc muxes[] = {
   124		[mlxcpld_mux_tor] = {
   125			.nchans = CPLD_MUX_MAX_NCHANS,
   126			.muxtype = lpc_access,
   127		},
   128		[mlxcpld_mux_mgmt] = {
   129			.nchans = CPLD_MUX_MAX_NCHANS,
   130			.muxtype = lpc_access,
   131		},
   132		[mlxcpld_mux_mgmt_ext] = {
   133			.nchans = CPLD_MUX_EXT_MAX_NCHANS,
   134			.muxtype = lpc_access,
   135		},
   136		[mlxcpld_mux_module] = {
   137			.nchans = CPLD_MUX_MAX_NCHANS,
   138			.muxtype = i2c_access,
   139		},
   140	};
   141	
   142	static const struct i2c_device_id mlxcpld_mux_id[] = {
   143		{ "mlxcpld_mux_tor", mlxcpld_mux_tor },
   144		{ "mlxcpld_mux_mgmt", mlxcpld_mux_mgmt },
   145		{ "mlxcpld_mux_mgmt_ext", mlxcpld_mux_mgmt_ext },
   146		{ "mlxcpld_mux_module", mlxcpld_mux_module },
   147		{ }
   148	};
   149	MODULE_DEVICE_TABLE(i2c, mlxcpld_mux_id);
   150	
   151	/* Write to mux register. Don't use i2c_transfer() and
   152	 * i2c_smbus_xfer() for this as they will try to lock adapter a second time
   153	 */
   154	static int mlxcpld_mux_reg_write(struct i2c_adapter *adap,
   155					 struct i2c_client *client, u8 val,
   156					 enum mlxcpld_mux_access_type muxtype)
   157	{
   158		struct mlxcpld_mux_platform_data *pdata =
   159							dev_get_platdata(&client->dev);
   160		int ret = -ENODEV;
   161	
   162		switch (muxtype) {
   163		case lpc_access:
 > 164			outb(val, pdata->addr); /* addr = CPLD base + offset */
   165			ret = 1;
   166			break;
   167	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 37480 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, wsa@the-dreams.de, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org, jiri@resnulli.us,
	Vadim Pasternak <vadimp@mellanox.com>,
	Michael Shych <michaelsh@mellanox.com>
Subject: Re: [patch 2/2] i2c: mux: mellanox: add driver
Date: Mon, 29 Aug 2016 04:42:54 +0800	[thread overview]
Message-ID: <201608290429.5ZB0pvf9%fengguang.wu@intel.com> (raw)
In-Reply-To: <1472403262-139012-1-git-send-email-vadimp@mellanox.com>

[-- Attachment #1: Type: text/plain, Size: 7118 bytes --]

Hi Vadim,

[auto build test WARNING on wsa/i2c/for-next]
[also build test WARNING on v4.8-rc3 next-20160825]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    https://github.com/0day-ci/linux/commits/vadimp-mellanox-com/i2c-add-master-driver-for-mellanox-systems/20160828-225625
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 4.9.0
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=m68k 

All warnings (new ones prefixed by >>):

   In file included from arch/m68k/include/asm/io_mm.h:26:0,
                    from arch/m68k/include/asm/io.h:4,
                    from include/linux/io.h:25,
                    from drivers/i2c/muxes/i2c-mux-mlxcpld.c:42:
   drivers/i2c/muxes/i2c-mux-mlxcpld.c: In function 'mlxcpld_mux_reg_write':
   arch/m68k/include/asm/raw_io.h:43:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define out_8(addr,b) (void)((*(__force volatile u8 *) (addr)) = (b))
                                   ^
   arch/m68k/include/asm/io_mm.h:396:72: note: in expansion of macro 'out_8'
    #define outb(val, port) ((port) < 1024 ? isa_rom_outb((val), (port)) : out_8((port), (val)))
                                                                           ^
>> drivers/i2c/muxes/i2c-mux-mlxcpld.c:164:3: note: in expansion of macro 'outb'
      outb(val, pdata->addr); /* addr = CPLD base + offset */
      ^

vim +/outb +164 drivers/i2c/muxes/i2c-mux-mlxcpld.c

    36	#include <linux/version.h>
    37	#include <linux/init.h>
    38	#include <linux/slab.h>
    39	#include <linux/device.h>
    40	#include <linux/i2c.h>
    41	#include <linux/i2c-mux.h>
  > 42	#include <linux/io.h>
    43	#include <linux/platform_device.h>
    44	#include <linux/i2c/mlxcpld.h>
    45	
    46	#define CPLD_MUX_MAX_NCHANS	8
    47	#define CPLD_MUX_EXT_MAX_NCHANS	24
    48	
    49	/*
    50	 * mlxcpld_mux types - kind of mux supported by driver:
    51	 * @mlxcpld_mux_tor - LPC access; 8 channels.
    52	 * @mlxcpld_mux_mgmt - LPC access; 8 channels.
    53	 * @mlxcpld_mux_mgmt_ext - LPC access; 24 channels.
    54	 * @mlxcpld_mux_module - I2C access; 8 channels/legs.
    55	 */
    56	enum mlxcpld_mux_type {
    57		mlxcpld_mux_tor,
    58		mlxcpld_mux_mgmt,
    59		mlxcpld_mux_mgmt_ext,
    60		mlxcpld_mux_module,
    61	};
    62	
    63	/* mlxcpld_mux_type - underlying physical bus, to which device is connected:
    64	 * @lpc_access - LPC connected CPLD device
    65	 * @i2c_access - I2C connected CPLD device
    66	 */
    67	enum mlxcpld_mux_access_type {
    68		lpc_access,
    69		i2c_access,
    70	};
    71	
    72	/* mlxcpld_mux - mux control structure:
    73	 * @type - mux type
    74	 * @last_chan - last register value
    75	 * @client - I2C device client
    76	 */
    77	struct mlxcpld_mux {
    78		enum mlxcpld_mux_type type;
    79		u8 last_chan;
    80		struct i2c_client *client;
    81	};
    82	
    83	/* mlxcpld_mux_desc - mux descriptor structure:
    84	 * @nchans - number of channels
    85	 * @muxtype - physical mux type (LPC or I2C)
    86	 */
    87	struct mlxcpld_mux_desc {
    88		u8 nchans;
    89		enum mlxcpld_mux_access_type muxtype;
    90	};
    91	
    92	/* MUX logic description.
    93	 * This logic can be applied for LPC attached CPLD and fro I2C attached CPLD.
    94	 * Driver can support different mux control logic, according to CPLD
    95	 * implementation.
    96	 *
    97	 * Connectivity schema.
    98	 *
    99	 * i2c-mlxcpld                                 Digital               Analog
   100	 * driver
   101	 * *--------*                                 * -> mux1 (virt bus2) -> mux -> |
   102	 * | I2CLPC | i2c physical                    * -> mux2 (virt bus3) -> mux -> |
   103	 * | bridge | bus 1                 *---------*                               |
   104	 * | logic  |---------------------> * mux reg *                               |
   105	 * | in CPLD|                       *---------*                               |
   106	 * *--------*   i2c-mux-mlxpcld          ^    * -> muxn (virt busn) -> mux -> |
   107	 *     |        driver                   |                                    |
   108	 *     |        *---------------*        |                              Devices
   109	 *     |        * CPLD (LPC bus)* select |
   110	 *     |        * registers for *--------*
   111	 *     |        * mux selection * deselect
   112	 *     |        *---------------*
   113	 *     |                 |
   114	 * <-------->     <----------->
   115	 * i2c cntrl      Board cntrl reg
   116	 * reg space      space (mux select,
   117	 *     |          IO, LED, WD, info)
   118	 *     |                 |                  *-----*   *-----*
   119	 *     *------------- LPC bus --------------| PCH |---| CPU |
   120	 *                                          *-----*   *-----*
   121	 *
   122	 */
   123	static const struct mlxcpld_mux_desc muxes[] = {
   124		[mlxcpld_mux_tor] = {
   125			.nchans = CPLD_MUX_MAX_NCHANS,
   126			.muxtype = lpc_access,
   127		},
   128		[mlxcpld_mux_mgmt] = {
   129			.nchans = CPLD_MUX_MAX_NCHANS,
   130			.muxtype = lpc_access,
   131		},
   132		[mlxcpld_mux_mgmt_ext] = {
   133			.nchans = CPLD_MUX_EXT_MAX_NCHANS,
   134			.muxtype = lpc_access,
   135		},
   136		[mlxcpld_mux_module] = {
   137			.nchans = CPLD_MUX_MAX_NCHANS,
   138			.muxtype = i2c_access,
   139		},
   140	};
   141	
   142	static const struct i2c_device_id mlxcpld_mux_id[] = {
   143		{ "mlxcpld_mux_tor", mlxcpld_mux_tor },
   144		{ "mlxcpld_mux_mgmt", mlxcpld_mux_mgmt },
   145		{ "mlxcpld_mux_mgmt_ext", mlxcpld_mux_mgmt_ext },
   146		{ "mlxcpld_mux_module", mlxcpld_mux_module },
   147		{ }
   148	};
   149	MODULE_DEVICE_TABLE(i2c, mlxcpld_mux_id);
   150	
   151	/* Write to mux register. Don't use i2c_transfer() and
   152	 * i2c_smbus_xfer() for this as they will try to lock adapter a second time
   153	 */
   154	static int mlxcpld_mux_reg_write(struct i2c_adapter *adap,
   155					 struct i2c_client *client, u8 val,
   156					 enum mlxcpld_mux_access_type muxtype)
   157	{
   158		struct mlxcpld_mux_platform_data *pdata =
   159							dev_get_platdata(&client->dev);
   160		int ret = -ENODEV;
   161	
   162		switch (muxtype) {
   163		case lpc_access:
 > 164			outb(val, pdata->addr); /* addr = CPLD base + offset */
   165			ret = 1;
   166			break;
   167	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 37480 bytes --]

  reply	other threads:[~2016-08-28 20:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-28 16:54 [patch 2/2] i2c: mux: mellanox: add driver vadimp
2016-08-28 20:42 ` kbuild test robot [this message]
2016-08-28 20:42   ` kbuild test robot
  -- strict thread matches above, loose matches on Subject: below --
2016-08-29 17:36 vadimp
2016-09-02 12:16 ` Peter Rosin
2016-09-02 12:16   ` Peter Rosin
2016-09-06 11:00 ` Peter Rosin
2016-09-06 11:00   ` Peter Rosin
2016-08-24 13:56 vadimp
2016-08-24 13:54 ` Peter Rosin
2016-08-24 13:54   ` Peter Rosin
2016-08-24 16:20   ` Vadim Pasternak
2016-08-25  8:53     ` Peter Rosin
2016-08-25 10:08       ` Vadim Pasternak
2016-08-25  6:50 ` kbuild test robot
2016-08-25  6:50   ` kbuild test robot

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=201608290429.5ZB0pvf9%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=jiri@resnulli.us \
    --cc=kbuild-all@01.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michaelsh@mellanox.com \
    --cc=vadimp@mellanox.com \
    --cc=wsa@the-dreams.de \
    /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.