[lee-mfd:for-mfd-next 30/32] drivers/mfd/kempld-core.c:556:36: warning: unused variable 'kempld_acpi_table'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
head: 1586d3a964c9b273ca982b750f757fbedcb57afb
commit: e8299c7313af857254bc4304bc37482e9b952481 [30/32] mfd: Add ACPI support to Kontron PLD driver
config: powerpc-randconfig-r004-20200930 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project bcd05599d0e53977a963799d6ee4f6e0bc21331b)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/commit/?id=e8...
git remote add lee-mfd https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git
git fetch --no-tags lee-mfd for-mfd-next
git checkout e8299c7313af857254bc4304bc37482e9b952481
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:75:1: note: expanded from here
__do_outl
^
arch/powerpc/include/asm/io.h:522:62: note: expanded from macro '__do_outl'
#define __do_outl(val, port) writel(val,(PCI_IO_ADDR)_IO_BASE+port);
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/mfd/kempld-core.c:14:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:43:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:89:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:541:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/mfd/kempld-core.c:14:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:91:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/mfd/kempld-core.c:14:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:93:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/mfd/kempld-core.c:14:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:95:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/mfd/kempld-core.c:14:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:97:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/mfd/kempld-core.c:14:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:99:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> drivers/mfd/kempld-core.c:556:36: warning: unused variable 'kempld_acpi_table' [-Wunused-const-variable]
static const struct acpi_device_id kempld_acpi_table[] = {
^
13 warnings generated.
vim +/kempld_acpi_table +556 drivers/mfd/kempld-core.c
555
> 556 static const struct acpi_device_id kempld_acpi_table[] = {
557 { "KEM0001", (kernel_ulong_t)&kempld_platform_data_generic },
558 {}
559 };
560 MODULE_DEVICE_TABLE(acpi, kempld_acpi_table);
561
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
5 months
Re: [PATCH net-next RFC v1 09/10] net/mlx5e: Add NVMEoTCP offload
by kernel test robot
Hi Boris,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Boris-Pismenny/nvme-tcp-receive-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 879456bedbe54f2d38b15c21dc5e3c30232b53e1
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/990254a46f72010830cdf80ed80ed506f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Boris-Pismenny/nvme-tcp-receive-offloads/20201001-002308
git checkout 990254a46f72010830cdf80ed80ed506f268e759
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/bits.h:6,
from include/linux/ratelimit_types.h:5,
from include/linux/ratelimit.h:5,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/rdma/ib_verbs.h:16,
from drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c:33:
include/vdso/bits.h:7:26: warning: left shift count >= width of type [-Wshift-count-overflow]
7 | #define BIT(nr) (UL(1) << (nr))
| ^~
include/linux/mlx5/mlx5_ifc.h:10680:64: note: in expansion of macro 'BIT'
10680 | MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_NVMEOTCP_TAG_BUFFER_TABLE = BIT(0x21),
| ^~~
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c: In function 'mlx5i_grp_sw_update_stats':
>> drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c:143:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=]
143 | }
| ^
vim +143 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
48935bbb7ae8bd4 drivers/net/ethernet/mellanox/mlx5/core/ipoib.c Saeed Mahameed 2017-04-13 117
fbb66ad5dcbebc1 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Wei Yongjun 2018-09-05 118 static void mlx5i_grp_sw_update_stats(struct mlx5e_priv *priv)
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 119 {
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 120 struct mlx5e_sw_stats s = { 0 };
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 121 int i, j;
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 122
694826e366349d5 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Tariq Toukan 2019-07-14 123 for (i = 0; i < priv->max_nch; i++) {
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 124 struct mlx5e_channel_stats *channel_stats;
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 125 struct mlx5e_rq_stats *rq_stats;
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 126
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 127 channel_stats = &priv->channel_stats[i];
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 128 rq_stats = &channel_stats->rq;
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 129
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 130 s.rx_packets += rq_stats->packets;
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 131 s.rx_bytes += rq_stats->bytes;
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 132
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 133 for (j = 0; j < priv->max_opened_tc; j++) {
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 134 struct mlx5e_sq_stats *sq_stats = &channel_stats->sq[j];
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 135
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 136 s.tx_packets += sq_stats->packets;
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 137 s.tx_bytes += sq_stats->bytes;
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 138 s.tx_queue_dropped += sq_stats->dropped;
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 139 }
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 140 }
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 141
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 142 memcpy(&priv->stats.sw, &s, sizeof(s));
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 @143 }
c57d2358ff0dfa0 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 144
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
5 months
Re: [PATCH v11 2/3] drm: bridge: Add support for Cadence MHDP8546 DPI/DP bridge
by kernel test robot
Hi Swapnil,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on robh/for-next]
[also build test ERROR on linus/master v5.9-rc7]
[cannot apply to next-20200930]
[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]
url: https://github.com/0day-ci/linux/commits/Swapnil-Jakhade/drm-Add-support-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/f4ffd924c54d5cb905f14161decf21a54...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Swapnil-Jakhade/drm-Add-support-for-Cadence-MHDP8546-DPI-DP-bridge-and-J721E-wrapper/20200918-201040
git checkout f4ffd924c54d5cb905f14161decf21a549d87615
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c: In function 'cdns_mhdp_fw_activate':
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c:749:10: warning: conversion from 'long unsigned int' to 'unsigned int' changes value from '18446744073709551613' to '4294967293' [-Woverflow]
749 | writel(~CDNS_APB_INT_MASK_SW_EVENT_INT,
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c: In function 'cdns_mhdp_fill_host_caps':
>> drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c:1359:30: error: 'struct phy_attrs' has no member named 'max_link_rate'
1359 | link_rate = mhdp->phy->attrs.max_link_rate;
| ^
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c: In function 'cdns_mhdp_attach':
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c:1690:10: warning: conversion from 'long unsigned int' to 'unsigned int' changes value from '18446744073709551613' to '4294967293' [-Woverflow]
1690 | writel(~CDNS_APB_INT_MASK_SW_EVENT_INT,
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c: In function 'cdns_mhdp_bridge_hpd_enable':
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c:2123:10: warning: conversion from 'long unsigned int' to 'unsigned int' changes value from '18446744073709551613' to '4294967293' [-Woverflow]
2123 | writel(~CDNS_APB_INT_MASK_SW_EVENT_INT,
vim +1359 drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
1348
1349 static void cdns_mhdp_fill_host_caps(struct cdns_mhdp_device *mhdp)
1350 {
1351 unsigned int link_rate;
1352
1353 /* Get source capabilities based on PHY attributes */
1354
1355 mhdp->host.lanes_cnt = mhdp->phy->attrs.bus_width;
1356 if (!mhdp->host.lanes_cnt)
1357 mhdp->host.lanes_cnt = 4;
1358
> 1359 link_rate = mhdp->phy->attrs.max_link_rate;
1360 if (!link_rate)
1361 link_rate = drm_dp_bw_code_to_link_rate(DP_LINK_BW_8_1);
1362 else
1363 /* PHY uses Mb/s, DRM uses tens of kb/s. */
1364 link_rate *= 100;
1365
1366 mhdp->host.link_rate = link_rate;
1367 mhdp->host.volt_swing = CDNS_VOLT_SWING(3);
1368 mhdp->host.pre_emphasis = CDNS_PRE_EMPHASIS(3);
1369 mhdp->host.pattern_supp = CDNS_SUPPORT_TPS(1) |
1370 CDNS_SUPPORT_TPS(2) | CDNS_SUPPORT_TPS(3) |
1371 CDNS_SUPPORT_TPS(4);
1372 mhdp->host.lane_mapping = CDNS_LANE_MAPPING_NORMAL;
1373 mhdp->host.fast_link = false;
1374 mhdp->host.enhanced = true;
1375 mhdp->host.scrambler = true;
1376 mhdp->host.ssc = false;
1377 }
1378
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
5 months
[lee-mfd:for-mfd-next 29/32] drivers/mfd/intel-m10-bmc.c:113:3: error: implicit declaration of function 'devm_regmap_init_spi_avmm'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
head: 1586d3a964c9b273ca982b750f757fbedcb57afb
commit: 876611c493b10cbb59e0e2143d3e744d0442de63 [29/32] mfd: intel-m10-bmc: Add Intel MAX 10 BMC chip support for Intel FPGA PAC
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/commit/?id=87...
git remote add lee-mfd https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git
git fetch --no-tags lee-mfd for-mfd-next
git checkout 876611c493b10cbb59e0e2143d3e744d0442de63
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/mfd/intel-m10-bmc.c: In function 'intel_m10_bmc_spi_probe':
>> drivers/mfd/intel-m10-bmc.c:113:3: error: implicit declaration of function 'devm_regmap_init_spi_avmm'; did you mean 'devm_regmap_init_spmi_base'? [-Werror=implicit-function-declaration]
113 | devm_regmap_init_spi_avmm(spi, &intel_m10bmc_regmap_config);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| devm_regmap_init_spmi_base
drivers/mfd/intel-m10-bmc.c:112:16: warning: assignment to 'struct regmap *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
112 | ddata->regmap =
| ^
cc1: some warnings being treated as errors
vim +113 drivers/mfd/intel-m10-bmc.c
97
98 static int intel_m10_bmc_spi_probe(struct spi_device *spi)
99 {
100 const struct spi_device_id *id = spi_get_device_id(spi);
101 struct device *dev = &spi->dev;
102 struct mfd_cell *cells;
103 struct intel_m10bmc *ddata;
104 int ret, n_cell;
105
106 ddata = devm_kzalloc(dev, sizeof(*ddata), GFP_KERNEL);
107 if (!ddata)
108 return -ENOMEM;
109
110 ddata->dev = dev;
111
112 ddata->regmap =
> 113 devm_regmap_init_spi_avmm(spi, &intel_m10bmc_regmap_config);
114 if (IS_ERR(ddata->regmap)) {
115 ret = PTR_ERR(ddata->regmap);
116 dev_err(dev, "Failed to allocate regmap: %d\n", ret);
117 return ret;
118 }
119
120 spi_set_drvdata(spi, ddata);
121
122 ret = check_m10bmc_version(ddata);
123 if (ret) {
124 dev_err(dev, "Failed to identify m10bmc hardware\n");
125 return ret;
126 }
127
128 switch (id->driver_data) {
129 case M10_N3000:
130 cells = m10bmc_pacn3000_subdevs;
131 n_cell = ARRAY_SIZE(m10bmc_pacn3000_subdevs);
132 break;
133 default:
134 return -ENODEV;
135 }
136
137 ret = devm_mfd_add_devices(dev, PLATFORM_DEVID_AUTO, cells, n_cell,
138 NULL, 0, NULL);
139 if (ret)
140 dev_err(dev, "Failed to register sub-devices: %d\n", ret);
141
142 return ret;
143 }
144
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
5 months