lib/zstd/compress.c:1393:1: warning: the frame size of 1436 bytes is larger than 1280 bytes
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0da0a8a0a0e1845f495431c3d8d733d2bbf9e9e5
commit: 6d25a633ea68a103c7293d16eb69a7d4689075ad lib: Prepare zstd for preboot environment, improve performance
date: 6 months ago
config: parisc-randconfig-r026-20210117 (attached as .config)
compiler: hppa-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/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6d25a633ea68a103c7293d16eb69a7d4689075ad
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
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 >>):
lib/zstd/compress.c:434:8: warning: no previous prototype for 'ZSTD_noCompressBlock' [-Wmissing-prototypes]
434 | size_t ZSTD_noCompressBlock(void *dst, size_t dstCapacity, const void *src, size_t srcSize)
| ^~~~~~~~~~~~~~~~~~~~
lib/zstd/compress.c:2252:6: warning: no previous prototype for 'ZSTD_compressBlock_greedy_extDict' [-Wmissing-prototypes]
2252 | void ZSTD_compressBlock_greedy_extDict(ZSTD_CCtx *ctx, const void *src, size_t srcSize) { ZSTD_compressBlock_lazy_extDict_generic(ctx, src, srcSize, 0, 0); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/zstd/compress.c:2982:15: warning: no previous prototype for 'ZSTD_createCStream_advanced' [-Wmissing-prototypes]
2982 | ZSTD_CStream *ZSTD_createCStream_advanced(ZSTD_customMem customMem)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from lib/zstd/compress.c:23:
lib/zstd/zstd_internal.h:83:21: warning: 'ZSTD_did_fieldSize' defined but not used [-Wunused-const-variable=]
83 | static const size_t ZSTD_did_fieldSize[4] = {0, 1, 2, 4};
| ^~~~~~~~~~~~~~~~~~
lib/zstd/zstd_internal.h:82:21: warning: 'ZSTD_fcs_fieldSize' defined but not used [-Wunused-const-variable=]
82 | static const size_t ZSTD_fcs_fieldSize[4] = {0, 2, 4, 8};
| ^~~~~~~~~~~~~~~~~~
In file included from lib/zstd/error_private.h:26,
from lib/zstd/bitstream.h:53,
from lib/zstd/fse.h:228,
from lib/zstd/compress.c:20:
include/linux/zstd.h:798:21: warning: 'ZSTD_skippableHeaderSize' defined but not used [-Wunused-const-variable=]
798 | static const size_t ZSTD_skippableHeaderSize = 8;
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/zstd.h:795:21: warning: 'ZSTD_frameHeaderSize_min' defined but not used [-Wunused-const-variable=]
795 | static const size_t ZSTD_frameHeaderSize_min = ZSTD_FRAMEHEADERSIZE_MIN;
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/zstd.h:794:21: warning: 'ZSTD_frameHeaderSize_prefix' defined but not used [-Wunused-const-variable=]
794 | static const size_t ZSTD_frameHeaderSize_prefix = 5;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/zstd/compress.c: In function 'ZSTD_compressBlock_doubleFast':
>> lib/zstd/compress.c:1393:1: warning: the frame size of 1436 bytes is larger than 1280 bytes [-Wframe-larger-than=]
1393 | }
| ^
vim +1393 lib/zstd/compress.c
73f3d1b48f5069d4 Nick Terrell 2017-08-09 1382
73f3d1b48f5069d4 Nick Terrell 2017-08-09 1383 static void ZSTD_compressBlock_doubleFast(ZSTD_CCtx *ctx, const void *src, size_t srcSize)
73f3d1b48f5069d4 Nick Terrell 2017-08-09 1384 {
73f3d1b48f5069d4 Nick Terrell 2017-08-09 1385 const U32 mls = ctx->params.cParams.searchLength;
73f3d1b48f5069d4 Nick Terrell 2017-08-09 1386 switch (mls) {
73f3d1b48f5069d4 Nick Terrell 2017-08-09 1387 default: /* includes case 3 */
73f3d1b48f5069d4 Nick Terrell 2017-08-09 1388 case 4: ZSTD_compressBlock_doubleFast_generic(ctx, src, srcSize, 4); return;
73f3d1b48f5069d4 Nick Terrell 2017-08-09 1389 case 5: ZSTD_compressBlock_doubleFast_generic(ctx, src, srcSize, 5); return;
73f3d1b48f5069d4 Nick Terrell 2017-08-09 1390 case 6: ZSTD_compressBlock_doubleFast_generic(ctx, src, srcSize, 6); return;
73f3d1b48f5069d4 Nick Terrell 2017-08-09 1391 case 7: ZSTD_compressBlock_doubleFast_generic(ctx, src, srcSize, 7); return;
73f3d1b48f5069d4 Nick Terrell 2017-08-09 1392 }
73f3d1b48f5069d4 Nick Terrell 2017-08-09 @1393 }
73f3d1b48f5069d4 Nick Terrell 2017-08-09 1394
:::::: The code at line 1393 was first introduced by commit
:::::: 73f3d1b48f5069d46ba48aa28c2898dc93185560 lib: Add zstd modules
:::::: TO: Nick Terrell <terrelln(a)fb.com>
:::::: CC: Chris Mason <clm(a)fb.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
Re: [PATCH v8 3/7] mfd: Add base driver for Netronix embedded controller
by kernel test robot
Hi "Jonathan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on lee-mfd/for-mfd-next]
[also build test WARNING on robh/for-next pwm/for-next abelloni/rtc-next linus/master v5.11-rc3 next-20210115]
[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/Jonathan-Neusch-fer/Netronix-emb...
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
config: mips-randconfig-r001-20210117 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 2082b10d100e8dbaffc2ba8f497db5d2ab61beb2)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/0day-ci/linux/commit/eee80e6b3b7cc2c733bd3f10d8e2ec23d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jonathan-Neusch-fer/Netronix-embedded-controller-driver-for-Kobo-and-Tolino-ebook-readers/20210117-050203
git checkout eee80e6b3b7cc2c733bd3f10d8e2ec23dda2fe26
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
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 >>):
>> drivers/mfd/ntxec.c:127:10: warning: variable 'res' is uninitialized when used here [-Wuninitialized]
return res;
^~~
drivers/mfd/ntxec.c:116:9: note: initialize the variable 'res' to silence this warning
int res;
^
= 0
1 warning generated.
vim +/res +127 drivers/mfd/ntxec.c
111
112 static int ntxec_probe(struct i2c_client *client)
113 {
114 struct ntxec *ec;
115 unsigned int version;
116 int res;
117
118 ec = devm_kmalloc(&client->dev, sizeof(*ec), GFP_KERNEL);
119 if (!ec)
120 return -ENOMEM;
121
122 ec->dev = &client->dev;
123
124 ec->regmap = devm_regmap_init_i2c(client, ®map_config);
125 if (IS_ERR(ec->regmap)) {
126 dev_err(ec->dev, "Failed to set up regmap for device\n");
> 127 return res;
128 }
129
130 /* Determine the firmware version */
131 res = regmap_read(ec->regmap, NTXEC_REG_VERSION, &version);
132 if (res < 0) {
133 dev_err(ec->dev, "Failed to read firmware version number\n");
134 return res;
135 }
136
137 /* Bail out if we encounter an unknown firmware version */
138 switch (version) {
139 case NTXEC_VERSION_KOBO_AURA:
140 break;
141 default:
142 dev_err(ec->dev,
143 "Netronix embedded controller version %04x is not supported.\n",
144 version);
145 return -ENODEV;
146 }
147
148 dev_info(ec->dev,
149 "Netronix embedded controller version %04x detected.\n", version);
150
151 if (of_device_is_system_power_controller(ec->dev->of_node)) {
152 /*
153 * Set the 'powerkeep' bit. This is necessary on some boards
154 * in order to keep the system running.
155 */
156 res = regmap_write(ec->regmap, NTXEC_REG_POWERKEEP,
157 NTXEC_POWERKEEP_VALUE);
158 if (res < 0)
159 return res;
160
161 if (poweroff_restart_client)
162 /*
163 * Another instance of the driver already took
164 * poweroff/restart duties.
165 */
166 dev_err(ec->dev, "poweroff_restart_client already assigned\n");
167 else
168 poweroff_restart_client = client;
169
170 if (pm_power_off)
171 /* Another driver already registered a poweroff handler. */
172 dev_err(ec->dev, "pm_power_off already assigned\n");
173 else
174 pm_power_off = ntxec_poweroff;
175
176 res = register_restart_handler(&ntxec_restart_handler);
177 if (res)
178 dev_err(ec->dev,
179 "Failed to register restart handler: %d\n", res);
180 }
181
182 i2c_set_clientdata(client, ec);
183
184 res = devm_mfd_add_devices(ec->dev, PLATFORM_DEVID_NONE, ntxec_subdevices,
185 ARRAY_SIZE(ntxec_subdevices), NULL, 0, NULL);
186 if (res)
187 dev_err(ec->dev, "Failed to add subdevices: %d\n", res);
188
189 return res;
190 }
191
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
arch/arm64/include/asm/cmpxchg.h:88:1: sparse: sparse: cast truncates bits from constant value (ffff becomes ff)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0da0a8a0a0e1845f495431c3d8d733d2bbf9e9e5
commit: 4beba9486abd2f86d125271d6946f7c38ed0fe77 mm: Add PG_arch_2 page flag
date: 5 months ago
config: arm64-randconfig-s031-20210117 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-208-g46a52ca4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 4beba9486abd2f86d125271d6946f7c38ed0fe77
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
mm/migrate.c: note: in included file (through arch/arm64/include/asm/atomic.h, include/linux/atomic.h, include/asm-generic/bitops/atomic.h, ...):
>> arch/arm64/include/asm/cmpxchg.h:88:1: sparse: sparse: cast truncates bits from constant value (ffff becomes ff)
--
>> mm/memory.c:89:2: sparse: sparse: Unfortunate NUMA and NUMA Balancing config, growing page-frame for last_cpupid.
mm/memory.c:829:17: sparse: sparse: context imbalance in 'copy_pte_range' - different lock contexts for basic block
mm/memory.c:1450:16: sparse: sparse: context imbalance in '__get_locked_pte' - different lock contexts for basic block
mm/memory.c:1499:9: sparse: sparse: context imbalance in 'insert_page' - different lock contexts for basic block
mm/memory.c:2001:17: sparse: sparse: context imbalance in 'remap_pte_range' - different lock contexts for basic block
mm/memory.c:2242:17: sparse: sparse: context imbalance in 'apply_to_pte_range' - unexpected unlock
mm/memory.c:2491:17: sparse: sparse: context imbalance in 'wp_page_copy' - unexpected unlock
mm/memory.c: note: in included file (through arch/arm64/include/asm/atomic.h, include/linux/atomic.h, include/asm-generic/bitops/atomic.h, ...):
>> arch/arm64/include/asm/cmpxchg.h:88:1: sparse: sparse: cast truncates bits from constant value (ffff becomes ff)
>> arch/arm64/include/asm/cmpxchg.h:88:1: sparse: sparse: cast truncates bits from constant value (ffff becomes ff)
mm/memory.c:2835:17: sparse: sparse: context imbalance in 'wp_pfn_shared' - unexpected unlock
>> arch/arm64/include/asm/cmpxchg.h:88:1: sparse: sparse: cast truncates bits from constant value (ffff becomes ff)
>> arch/arm64/include/asm/cmpxchg.h:88:1: sparse: sparse: cast truncates bits from constant value (ffff becomes ff)
>> arch/arm64/include/asm/cmpxchg.h:88:1: sparse: sparse: cast truncates bits from constant value (ffff becomes ff)
mm/memory.c:2898:19: sparse: sparse: context imbalance in 'do_wp_page' - different lock contexts for basic block
mm/memory.c:3495:19: sparse: sparse: context imbalance in 'pte_alloc_one_map' - different lock contexts for basic block
mm/memory.c:3721:17: sparse: sparse: context imbalance in 'finish_fault' - unexpected unlock
mm/memory.c:3830:9: sparse: sparse: context imbalance in 'do_fault_around' - unexpected unlock
mm/memory.c:4549:12: sparse: sparse: context imbalance in '__follow_pte_pmd' - different lock contexts for basic block
mm/memory.c:4635:16: sparse: sparse: context imbalance in 'follow_pte_pmd' - different lock contexts for basic block
vim +88 arch/arm64/include/asm/cmpxchg.h
10b663aef1c24794 Catalin Marinas 2012-03-05 84
305d454aaa292be3 Will Deacon 2015-10-08 85 __XCHG_GEN()
305d454aaa292be3 Will Deacon 2015-10-08 86 __XCHG_GEN(_acq)
305d454aaa292be3 Will Deacon 2015-10-08 87 __XCHG_GEN(_rel)
305d454aaa292be3 Will Deacon 2015-10-08 @88 __XCHG_GEN(_mb)
305d454aaa292be3 Will Deacon 2015-10-08 89
:::::: The code at line 88 was first introduced by commit
:::::: 305d454aaa292be3a09a9d674e6c35f5b4249a13 arm64: atomics: implement native {relaxed, acquire, release} atomics
:::::: TO: Will Deacon <will.deacon(a)arm.com>
:::::: CC: Catalin Marinas <catalin.marinas(a)arm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
drivers/dma/ppc4xx/adma.c:688:38: sparse: sparse: incorrect type in argument 2 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0da0a8a0a0e1845f495431c3d8d733d2bbf9e9e5
commit: 894fa235eb4ca0bfa692dbe4932c2f940cdc8c1e powerpc: inline iomap accessors
date: 6 weeks ago
config: powerpc-randconfig-s031-20210117 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-208-g46a52ca4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 894fa235eb4ca0bfa692dbe4932c2f940cdc8c1e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
drivers/dma/ppc4xx/adma.c:73:1: sparse: sparse: symbol 'ppc440spe_adma_chan_list' was not declared. Should it be static?
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:543:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sg1l @@ got restricted __le32 [usertype] @@
drivers/dma/ppc4xx/adma.c:543:35: sparse: expected unsigned int [usertype] sg1l
drivers/dma/ppc4xx/adma.c:543:35: sparse: got restricted __le32 [usertype]
drivers/dma/ppc4xx/adma.c:544:35: sparse: sparse: invalid assignment: |=
drivers/dma/ppc4xx/adma.c:544:35: sparse: left side has type unsigned int
drivers/dma/ppc4xx/adma.c:544:35: sparse: right side has type restricted __le32
drivers/dma/ppc4xx/adma.c:590:23: sparse: sparse: invalid assignment: |=
drivers/dma/ppc4xx/adma.c:590:23: sparse: left side has type unsigned int
drivers/dma/ppc4xx/adma.c:590:23: sparse: right side has type restricted __le32
drivers/dma/ppc4xx/adma.c:629:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@
drivers/dma/ppc4xx/adma.c:629:23: sparse: expected unsigned int [usertype]
drivers/dma/ppc4xx/adma.c:629:23: sparse: got restricted __le32 [usertype]
drivers/dma/ppc4xx/adma.c:630:23: sparse: sparse: invalid assignment: |=
drivers/dma/ppc4xx/adma.c:630:23: sparse: left side has type unsigned int
drivers/dma/ppc4xx/adma.c:630:23: sparse: right side has type restricted __le32
drivers/dma/ppc4xx/adma.c:655:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] cnt @@ got restricted __le32 [usertype] @@
drivers/dma/ppc4xx/adma.c:655:34: sparse: expected unsigned int [usertype] cnt
drivers/dma/ppc4xx/adma.c:655:34: sparse: got restricted __le32 [usertype]
>> drivers/dma/ppc4xx/adma.c:688:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:688:38: sparse: expected void volatile [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:688:38: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:689:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:689:38: sparse: expected void volatile [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:689:38: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:690:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:690:38: sparse: expected void volatile [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:690:38: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:691:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:691:39: sparse: expected void volatile [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:691:39: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:738:69: sparse: sparse: Using plain integer as NULL pointer
drivers/dma/ppc4xx/adma.c:1187:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct dma_regs *dma_reg @@ got struct dma_regs [noderef] __iomem *dma_reg @@
drivers/dma/ppc4xx/adma.c:1187:25: sparse: expected struct dma_regs *dma_reg
drivers/dma/ppc4xx/adma.c:1187:25: sparse: got struct dma_regs [noderef] __iomem *dma_reg
>> drivers/dma/ppc4xx/adma.c:1188:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1188:34: sparse: expected void const volatile [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1188:34: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1190:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct xor_regs *xor_reg @@ got struct xor_regs [noderef] __iomem *xor_reg @@
drivers/dma/ppc4xx/adma.c:1190:25: sparse: expected struct xor_regs *xor_reg
drivers/dma/ppc4xx/adma.c:1190:25: sparse: got struct xor_regs [noderef] __iomem *xor_reg
>> drivers/dma/ppc4xx/adma.c:1191:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1191:36: sparse: expected void const [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1191:36: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1138:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct xor_regs *xor_reg @@ got struct xor_regs [noderef] __iomem *xor_reg @@
drivers/dma/ppc4xx/adma.c:1138:25: sparse: expected struct xor_regs *xor_reg
drivers/dma/ppc4xx/adma.c:1138:25: sparse: got struct xor_regs [noderef] __iomem *xor_reg
drivers/dma/ppc4xx/adma.c:1147:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1147:35: sparse: expected void const [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1147:35: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1157:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1157:49: sparse: expected void const [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1157:49: sparse: got unsigned int *
>> drivers/dma/ppc4xx/adma.c:1159:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1159:38: sparse: expected void [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1159:38: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:911:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct dma_regs *dma_reg @@ got struct dma_regs [noderef] __iomem *dma_reg @@
drivers/dma/ppc4xx/adma.c:911:25: sparse: expected struct dma_regs *dma_reg
drivers/dma/ppc4xx/adma.c:911:25: sparse: got struct dma_regs [noderef] __iomem *dma_reg
drivers/dma/ppc4xx/adma.c:912:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:912:40: sparse: expected void const volatile [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:912:40: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:929:37: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:929:37: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:929:37: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:929:37: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:929:37: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:929:37: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:974:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:974:32: sparse: expected void const volatile [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:974:32: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:979:40: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:979:40: sparse: expected void volatile [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:979:40: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:984:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct xor_regs *xor_reg @@ got struct xor_regs [noderef] __iomem *xor_reg @@
drivers/dma/ppc4xx/adma.c:984:25: sparse: expected struct xor_regs *xor_reg
drivers/dma/ppc4xx/adma.c:984:25: sparse: got struct xor_regs [noderef] __iomem *xor_reg
drivers/dma/ppc4xx/adma.c:985:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:985:34: sparse: expected void const [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:985:34: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:986:34: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:986:34: sparse: expected void [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:986:34: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:993:55: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:993:55: sparse: expected void const [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:993:55: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:995:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:995:51: sparse: expected void [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:995:51: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:997:51: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:997:51: sparse: expected void const [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:997:51: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:999:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:999:46: sparse: expected void [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:999:46: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1008:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1008:35: sparse: expected void const [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1008:35: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1027:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct dma_regs *dma_reg @@ got struct dma_regs [noderef] __iomem *dma_reg @@
drivers/dma/ppc4xx/adma.c:1027:25: sparse: expected struct dma_regs *dma_reg
drivers/dma/ppc4xx/adma.c:1027:25: sparse: got struct dma_regs [noderef] __iomem *dma_reg
>> drivers/dma/ppc4xx/adma.c:1031:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned short * @@
drivers/dma/ppc4xx/adma.c:1031:31: sparse: expected void const volatile [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1031:31: sparse: got unsigned short *
drivers/dma/ppc4xx/adma.c:1031:60: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned short * @@
drivers/dma/ppc4xx/adma.c:1031:60: sparse: expected void const volatile [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1031:60: sparse: got unsigned short *
drivers/dma/ppc4xx/adma.c:1032:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned short * @@
drivers/dma/ppc4xx/adma.c:1032:31: sparse: expected void const volatile [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1032:31: sparse: got unsigned short *
drivers/dma/ppc4xx/adma.c:1032:60: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned short * @@
drivers/dma/ppc4xx/adma.c:1032:60: sparse: expected void const volatile [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1032:60: sparse: got unsigned short *
drivers/dma/ppc4xx/adma.c:1038:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct xor_regs *xor_reg @@ got struct xor_regs [noderef] __iomem *xor_reg @@
drivers/dma/ppc4xx/adma.c:1038:25: sparse: expected struct xor_regs *xor_reg
drivers/dma/ppc4xx/adma.c:1038:25: sparse: got struct xor_regs [noderef] __iomem *xor_reg
drivers/dma/ppc4xx/adma.c:1039:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1039:37: sparse: expected void const [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1039:37: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1053:48: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct xor_regs *xor_reg @@ got struct xor_regs [noderef] __iomem *xor_reg @@
drivers/dma/ppc4xx/adma.c:1053:48: sparse: expected struct xor_regs *xor_reg
drivers/dma/ppc4xx/adma.c:1053:48: sparse: got struct xor_regs [noderef] __iomem *xor_reg
drivers/dma/ppc4xx/adma.c:1055:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1055:25: sparse: expected void const [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1055:25: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1062:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1062:41: sparse: expected void [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1062:41: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1064:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1064:39: sparse: expected void [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1064:39: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1065:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1065:25: sparse: expected void [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1065:25: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1066:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1066:33: sparse: expected void const [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1066:33: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1067:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1067:22: sparse: expected void [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1067:22: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1080:48: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct dma_regs *dma_reg @@ got struct dma_regs [noderef] __iomem *dma_reg @@
drivers/dma/ppc4xx/adma.c:1080:48: sparse: expected struct dma_regs *dma_reg
drivers/dma/ppc4xx/adma.c:1080:48: sparse: got struct dma_regs [noderef] __iomem *dma_reg
drivers/dma/ppc4xx/adma.c:1090:26: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1090:26: sparse: expected void volatile [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1090:26: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1210:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct xor_regs *xor_reg @@ got struct xor_regs [noderef] __iomem *xor_reg @@
drivers/dma/ppc4xx/adma.c:1210:25: sparse: expected struct xor_regs *xor_reg
drivers/dma/ppc4xx/adma.c:1210:25: sparse: got struct xor_regs [noderef] __iomem *xor_reg
drivers/dma/ppc4xx/adma.c:1214:30: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1214:30: sparse: expected void [noderef] __iomem *addr
drivers/dma/ppc4xx/adma.c:1214:30: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:2777:62: sparse: sparse: Using plain integer as NULL pointer
drivers/dma/ppc4xx/adma.c:4094:14: sparse: sparse: too many warnings
vim +688 drivers/dma/ppc4xx/adma.c
12458ea06efd7b Anatolij Gustschin 2009-12-11 675
12458ea06efd7b Anatolij Gustschin 2009-12-11 676 /**
12458ea06efd7b Anatolij Gustschin 2009-12-11 677 * ppc440spe_desc_set_dcheck - set CHECK pattern
12458ea06efd7b Anatolij Gustschin 2009-12-11 678 */
12458ea06efd7b Anatolij Gustschin 2009-12-11 679 static void ppc440spe_desc_set_dcheck(struct ppc440spe_adma_desc_slot *desc,
12458ea06efd7b Anatolij Gustschin 2009-12-11 680 struct ppc440spe_adma_chan *chan, u8 *qword)
12458ea06efd7b Anatolij Gustschin 2009-12-11 681 {
12458ea06efd7b Anatolij Gustschin 2009-12-11 682 struct dma_cdb *dma_hw_desc;
12458ea06efd7b Anatolij Gustschin 2009-12-11 683
12458ea06efd7b Anatolij Gustschin 2009-12-11 684 switch (chan->device->id) {
12458ea06efd7b Anatolij Gustschin 2009-12-11 685 case PPC440SPE_DMA0_ID:
12458ea06efd7b Anatolij Gustschin 2009-12-11 686 case PPC440SPE_DMA1_ID:
12458ea06efd7b Anatolij Gustschin 2009-12-11 687 dma_hw_desc = desc->hw_desc;
12458ea06efd7b Anatolij Gustschin 2009-12-11 @688 iowrite32(qword[0], &dma_hw_desc->sg3l);
12458ea06efd7b Anatolij Gustschin 2009-12-11 689 iowrite32(qword[4], &dma_hw_desc->sg3u);
12458ea06efd7b Anatolij Gustschin 2009-12-11 690 iowrite32(qword[8], &dma_hw_desc->sg2l);
12458ea06efd7b Anatolij Gustschin 2009-12-11 691 iowrite32(qword[12], &dma_hw_desc->sg2u);
12458ea06efd7b Anatolij Gustschin 2009-12-11 692 break;
12458ea06efd7b Anatolij Gustschin 2009-12-11 693 default:
12458ea06efd7b Anatolij Gustschin 2009-12-11 694 BUG();
12458ea06efd7b Anatolij Gustschin 2009-12-11 695 }
12458ea06efd7b Anatolij Gustschin 2009-12-11 696 }
12458ea06efd7b Anatolij Gustschin 2009-12-11 697
:::::: The code at line 688 was first introduced by commit
:::::: 12458ea06efd7b44281e68fe59c950ec7d59c649 ppc440spe-adma: adds updated ppc440spe adma driver
:::::: TO: Anatolij Gustschin <agust(a)denx.de>
:::::: CC: Dan Williams <dan.j.williams(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
drivers/dma/ppc4xx/adma.c:4094:14: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0da0a8a0a0e1845f495431c3d8d733d2bbf9e9e5
commit: 68f35add4ba4c850a33878633e10c02d7ba32d84 dmaengine: ppc4xx: make ppc440spe_adma_chan_list static
date: 3 months ago
config: powerpc-randconfig-s031-20210117 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-208-g46a52ca4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 68f35add4ba4c850a33878633e10c02d7ba32d84
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
drivers/dma/ppc4xx/adma.c:1159:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1159:38: sparse: expected void [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:1159:38: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:911:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct dma_regs *dma_reg @@ got struct dma_regs [noderef] __iomem *dma_reg @@
drivers/dma/ppc4xx/adma.c:911:25: sparse: expected struct dma_regs *dma_reg
drivers/dma/ppc4xx/adma.c:911:25: sparse: got struct dma_regs [noderef] __iomem *dma_reg
drivers/dma/ppc4xx/adma.c:912:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:912:40: sparse: expected void const [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:912:40: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:929:37: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:929:37: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:929:37: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:929:37: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:929:37: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:929:37: sparse: sparse: cast to restricted __le32
drivers/dma/ppc4xx/adma.c:974:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:974:32: sparse: expected void const [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:974:32: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:979:40: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:979:40: sparse: expected void [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:979:40: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:984:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct xor_regs *xor_reg @@ got struct xor_regs [noderef] __iomem *xor_reg @@
drivers/dma/ppc4xx/adma.c:984:25: sparse: expected struct xor_regs *xor_reg
drivers/dma/ppc4xx/adma.c:984:25: sparse: got struct xor_regs [noderef] __iomem *xor_reg
drivers/dma/ppc4xx/adma.c:985:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:985:34: sparse: expected void const [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:985:34: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:986:34: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:986:34: sparse: expected void [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:986:34: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:993:55: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:993:55: sparse: expected void const [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:993:55: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:995:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:995:51: sparse: expected void [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:995:51: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:997:51: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:997:51: sparse: expected void const [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:997:51: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:999:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:999:46: sparse: expected void [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:999:46: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1008:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1008:35: sparse: expected void const [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:1008:35: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1027:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct dma_regs *dma_reg @@ got struct dma_regs [noderef] __iomem *dma_reg @@
drivers/dma/ppc4xx/adma.c:1027:25: sparse: expected struct dma_regs *dma_reg
drivers/dma/ppc4xx/adma.c:1027:25: sparse: got struct dma_regs [noderef] __iomem *dma_reg
drivers/dma/ppc4xx/adma.c:1031:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned short * @@
drivers/dma/ppc4xx/adma.c:1031:31: sparse: expected void const [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:1031:31: sparse: got unsigned short *
drivers/dma/ppc4xx/adma.c:1031:60: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned short * @@
drivers/dma/ppc4xx/adma.c:1031:60: sparse: expected void const [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:1031:60: sparse: got unsigned short *
drivers/dma/ppc4xx/adma.c:1032:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned short * @@
drivers/dma/ppc4xx/adma.c:1032:31: sparse: expected void const [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:1032:31: sparse: got unsigned short *
drivers/dma/ppc4xx/adma.c:1032:60: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned short * @@
drivers/dma/ppc4xx/adma.c:1032:60: sparse: expected void const [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:1032:60: sparse: got unsigned short *
drivers/dma/ppc4xx/adma.c:1038:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct xor_regs *xor_reg @@ got struct xor_regs [noderef] __iomem *xor_reg @@
drivers/dma/ppc4xx/adma.c:1038:25: sparse: expected struct xor_regs *xor_reg
drivers/dma/ppc4xx/adma.c:1038:25: sparse: got struct xor_regs [noderef] __iomem *xor_reg
drivers/dma/ppc4xx/adma.c:1039:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1039:37: sparse: expected void const [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:1039:37: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1053:48: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct xor_regs *xor_reg @@ got struct xor_regs [noderef] __iomem *xor_reg @@
drivers/dma/ppc4xx/adma.c:1053:48: sparse: expected struct xor_regs *xor_reg
drivers/dma/ppc4xx/adma.c:1053:48: sparse: got struct xor_regs [noderef] __iomem *xor_reg
drivers/dma/ppc4xx/adma.c:1055:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1055:25: sparse: expected void const [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:1055:25: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1062:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1062:41: sparse: expected void [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:1062:41: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1064:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1064:39: sparse: expected void [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:1064:39: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1065:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1065:25: sparse: expected void [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:1065:25: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1066:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1066:33: sparse: expected void const [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:1066:33: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1067:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1067:22: sparse: expected void [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:1067:22: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1080:48: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct dma_regs *dma_reg @@ got struct dma_regs [noderef] __iomem *dma_reg @@
drivers/dma/ppc4xx/adma.c:1080:48: sparse: expected struct dma_regs *dma_reg
drivers/dma/ppc4xx/adma.c:1080:48: sparse: got struct dma_regs [noderef] __iomem *dma_reg
drivers/dma/ppc4xx/adma.c:1090:26: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1090:26: sparse: expected void [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:1090:26: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:1210:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct xor_regs *xor_reg @@ got struct xor_regs [noderef] __iomem *xor_reg @@
drivers/dma/ppc4xx/adma.c:1210:25: sparse: expected struct xor_regs *xor_reg
drivers/dma/ppc4xx/adma.c:1210:25: sparse: got struct xor_regs [noderef] __iomem *xor_reg
drivers/dma/ppc4xx/adma.c:1214:30: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/dma/ppc4xx/adma.c:1214:30: sparse: expected void [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:1214:30: sparse: got unsigned int *
drivers/dma/ppc4xx/adma.c:2777:62: sparse: sparse: Using plain integer as NULL pointer
>> drivers/dma/ppc4xx/adma.c:4094:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *regs @@ got void [noderef] __iomem * @@
drivers/dma/ppc4xx/adma.c:4094:14: sparse: expected void *regs
drivers/dma/ppc4xx/adma.c:4094:14: sparse: got void [noderef] __iomem *
drivers/dma/ppc4xx/adma.c:4102:31: sparse: sparse: too many warnings
vim +4094 drivers/dma/ppc4xx/adma.c
12458ea06efd7b Anatolij Gustschin 2009-12-11 4003
12458ea06efd7b Anatolij Gustschin 2009-12-11 4004 /**
12458ea06efd7b Anatolij Gustschin 2009-12-11 4005 * ppc440spe_adma_probe - probe the asynch device
12458ea06efd7b Anatolij Gustschin 2009-12-11 4006 */
463a1f8b3ceebe Bill Pemberton 2012-11-19 4007 static int ppc440spe_adma_probe(struct platform_device *ofdev)
12458ea06efd7b Anatolij Gustschin 2009-12-11 4008 {
05c02542c20aa0 Anatolij Gustschin 2010-06-03 4009 struct device_node *np = ofdev->dev.of_node;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4010 struct resource res;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4011 struct ppc440spe_adma_device *adev;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4012 struct ppc440spe_adma_chan *chan;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4013 struct ppc_dma_chan_ref *ref, *_ref;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4014 int ret = 0, initcode = PPC_ADMA_INIT_OK;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4015 const u32 *idx;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4016 int len;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4017 void *regs;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4018 u32 id, pool_size;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4019
12458ea06efd7b Anatolij Gustschin 2009-12-11 4020 if (of_device_is_compatible(np, "amcc,xor-accelerator")) {
12458ea06efd7b Anatolij Gustschin 2009-12-11 4021 id = PPC440SPE_XOR_ID;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4022 /* As far as the XOR engine is concerned, it does not
12458ea06efd7b Anatolij Gustschin 2009-12-11 4023 * use FIFOs but uses linked list. So there is no dependency
12458ea06efd7b Anatolij Gustschin 2009-12-11 4024 * between pool size to allocate and the engine configuration.
12458ea06efd7b Anatolij Gustschin 2009-12-11 4025 */
12458ea06efd7b Anatolij Gustschin 2009-12-11 4026 pool_size = PAGE_SIZE << 1;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4027 } else {
12458ea06efd7b Anatolij Gustschin 2009-12-11 4028 /* it is DMA0 or DMA1 */
12458ea06efd7b Anatolij Gustschin 2009-12-11 4029 idx = of_get_property(np, "cell-index", &len);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4030 if (!idx || (len != sizeof(u32))) {
c6c93048baff25 Rob Herring 2017-07-18 4031 dev_err(&ofdev->dev, "Device node %pOF has missing "
12458ea06efd7b Anatolij Gustschin 2009-12-11 4032 "or invalid cell-index property\n",
c6c93048baff25 Rob Herring 2017-07-18 4033 np);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4034 return -EINVAL;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4035 }
12458ea06efd7b Anatolij Gustschin 2009-12-11 4036 id = *idx;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4037 /* DMA0,1 engines use FIFO to maintain CDBs, so we
12458ea06efd7b Anatolij Gustschin 2009-12-11 4038 * should allocate the pool accordingly to size of this
12458ea06efd7b Anatolij Gustschin 2009-12-11 4039 * FIFO. Thus, the pool size depends on the FIFO depth:
12458ea06efd7b Anatolij Gustschin 2009-12-11 4040 * how much CDBs pointers the FIFO may contain then so
12458ea06efd7b Anatolij Gustschin 2009-12-11 4041 * much CDBs we should provide in the pool.
12458ea06efd7b Anatolij Gustschin 2009-12-11 4042 * That is
12458ea06efd7b Anatolij Gustschin 2009-12-11 4043 * CDB size = 32B;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4044 * CDBs number = (DMA0_FIFO_SIZE >> 3);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4045 * Pool size = CDBs number * CDB size =
12458ea06efd7b Anatolij Gustschin 2009-12-11 4046 * = (DMA0_FIFO_SIZE >> 3) << 5 = DMA0_FIFO_SIZE << 2.
12458ea06efd7b Anatolij Gustschin 2009-12-11 4047 */
12458ea06efd7b Anatolij Gustschin 2009-12-11 4048 pool_size = (id == PPC440SPE_DMA0_ID) ?
12458ea06efd7b Anatolij Gustschin 2009-12-11 4049 DMA0_FIFO_SIZE : DMA1_FIFO_SIZE;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4050 pool_size <<= 2;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4051 }
12458ea06efd7b Anatolij Gustschin 2009-12-11 4052
12458ea06efd7b Anatolij Gustschin 2009-12-11 4053 if (of_address_to_resource(np, 0, &res)) {
12458ea06efd7b Anatolij Gustschin 2009-12-11 4054 dev_err(&ofdev->dev, "failed to get memory resource\n");
12458ea06efd7b Anatolij Gustschin 2009-12-11 4055 initcode = PPC_ADMA_INIT_MEMRES;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4056 ret = -ENODEV;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4057 goto out;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4058 }
12458ea06efd7b Anatolij Gustschin 2009-12-11 4059
12458ea06efd7b Anatolij Gustschin 2009-12-11 4060 if (!request_mem_region(res.start, resource_size(&res),
12458ea06efd7b Anatolij Gustschin 2009-12-11 4061 dev_driver_string(&ofdev->dev))) {
a584bff5efae8c Joe Perches 2010-11-12 4062 dev_err(&ofdev->dev, "failed to request memory region %pR\n",
a584bff5efae8c Joe Perches 2010-11-12 4063 &res);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4064 initcode = PPC_ADMA_INIT_MEMREG;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4065 ret = -EBUSY;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4066 goto out;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4067 }
12458ea06efd7b Anatolij Gustschin 2009-12-11 4068
12458ea06efd7b Anatolij Gustschin 2009-12-11 4069 /* create a device */
12458ea06efd7b Anatolij Gustschin 2009-12-11 4070 adev = kzalloc(sizeof(*adev), GFP_KERNEL);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4071 if (!adev) {
12458ea06efd7b Anatolij Gustschin 2009-12-11 4072 initcode = PPC_ADMA_INIT_ALLOC;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4073 ret = -ENOMEM;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4074 goto err_adev_alloc;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4075 }
12458ea06efd7b Anatolij Gustschin 2009-12-11 4076
12458ea06efd7b Anatolij Gustschin 2009-12-11 4077 adev->id = id;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4078 adev->pool_size = pool_size;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4079 /* allocate coherent memory for hardware descriptors */
12458ea06efd7b Anatolij Gustschin 2009-12-11 4080 adev->dma_desc_pool_virt = dma_alloc_coherent(&ofdev->dev,
12458ea06efd7b Anatolij Gustschin 2009-12-11 4081 adev->pool_size, &adev->dma_desc_pool,
12458ea06efd7b Anatolij Gustschin 2009-12-11 4082 GFP_KERNEL);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4083 if (adev->dma_desc_pool_virt == NULL) {
12458ea06efd7b Anatolij Gustschin 2009-12-11 4084 dev_err(&ofdev->dev, "failed to allocate %d bytes of coherent "
12458ea06efd7b Anatolij Gustschin 2009-12-11 4085 "memory for hardware descriptors\n",
12458ea06efd7b Anatolij Gustschin 2009-12-11 4086 adev->pool_size);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4087 initcode = PPC_ADMA_INIT_COHERENT;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4088 ret = -ENOMEM;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4089 goto err_dma_alloc;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4090 }
d73111c6d43f08 Masanari Iida 2012-08-04 4091 dev_dbg(&ofdev->dev, "allocated descriptor pool virt 0x%p phys 0x%llx\n",
12458ea06efd7b Anatolij Gustschin 2009-12-11 4092 adev->dma_desc_pool_virt, (u64)adev->dma_desc_pool);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4093
12458ea06efd7b Anatolij Gustschin 2009-12-11 @4094 regs = ioremap(res.start, resource_size(&res));
12458ea06efd7b Anatolij Gustschin 2009-12-11 4095 if (!regs) {
12458ea06efd7b Anatolij Gustschin 2009-12-11 4096 dev_err(&ofdev->dev, "failed to ioremap regs!\n");
f3b77727e82722 Julia Lawall 2013-12-29 4097 ret = -ENOMEM;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4098 goto err_regs_alloc;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4099 }
12458ea06efd7b Anatolij Gustschin 2009-12-11 4100
12458ea06efd7b Anatolij Gustschin 2009-12-11 4101 if (adev->id == PPC440SPE_XOR_ID) {
12458ea06efd7b Anatolij Gustschin 2009-12-11 4102 adev->xor_reg = regs;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4103 /* Reset XOR */
12458ea06efd7b Anatolij Gustschin 2009-12-11 4104 iowrite32be(XOR_CRSR_XASR_BIT, &adev->xor_reg->crsr);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4105 iowrite32be(XOR_CRSR_64BA_BIT, &adev->xor_reg->crrr);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4106 } else {
12458ea06efd7b Anatolij Gustschin 2009-12-11 4107 size_t fifo_size = (adev->id == PPC440SPE_DMA0_ID) ?
12458ea06efd7b Anatolij Gustschin 2009-12-11 4108 DMA0_FIFO_SIZE : DMA1_FIFO_SIZE;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4109 adev->dma_reg = regs;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4110 /* DMAx_FIFO_SIZE is defined in bytes,
12458ea06efd7b Anatolij Gustschin 2009-12-11 4111 * <fsiz> - is defined in number of CDB pointers (8byte).
12458ea06efd7b Anatolij Gustschin 2009-12-11 4112 * DMA FIFO Length = CSlength + CPlength, where
12458ea06efd7b Anatolij Gustschin 2009-12-11 4113 * CSlength = CPlength = (fsiz + 1) * 8.
12458ea06efd7b Anatolij Gustschin 2009-12-11 4114 */
12458ea06efd7b Anatolij Gustschin 2009-12-11 4115 iowrite32(DMA_FIFO_ENABLE | ((fifo_size >> 3) - 2),
12458ea06efd7b Anatolij Gustschin 2009-12-11 4116 &adev->dma_reg->fsiz);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4117 /* Configure DMA engine */
12458ea06efd7b Anatolij Gustschin 2009-12-11 4118 iowrite32(DMA_CFG_DXEPR_HP | DMA_CFG_DFMPP_HP | DMA_CFG_FALGN,
12458ea06efd7b Anatolij Gustschin 2009-12-11 4119 &adev->dma_reg->cfg);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4120 /* Clear Status */
12458ea06efd7b Anatolij Gustschin 2009-12-11 4121 iowrite32(~0, &adev->dma_reg->dsts);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4122 }
12458ea06efd7b Anatolij Gustschin 2009-12-11 4123
12458ea06efd7b Anatolij Gustschin 2009-12-11 4124 adev->dev = &ofdev->dev;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4125 adev->common.dev = &ofdev->dev;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4126 INIT_LIST_HEAD(&adev->common.channels);
dd3daca162f741 Jingoo Han 2013-05-24 4127 platform_set_drvdata(ofdev, adev);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4128
12458ea06efd7b Anatolij Gustschin 2009-12-11 4129 /* create a channel */
12458ea06efd7b Anatolij Gustschin 2009-12-11 4130 chan = kzalloc(sizeof(*chan), GFP_KERNEL);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4131 if (!chan) {
12458ea06efd7b Anatolij Gustschin 2009-12-11 4132 initcode = PPC_ADMA_INIT_CHANNEL;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4133 ret = -ENOMEM;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4134 goto err_chan_alloc;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4135 }
12458ea06efd7b Anatolij Gustschin 2009-12-11 4136
12458ea06efd7b Anatolij Gustschin 2009-12-11 4137 spin_lock_init(&chan->lock);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4138 INIT_LIST_HEAD(&chan->chain);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4139 INIT_LIST_HEAD(&chan->all_slots);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4140 chan->device = adev;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4141 chan->common.device = &adev->common;
8ac695463f37af Russell King - ARM Linux 2012-03-06 4142 dma_cookie_init(&chan->common);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4143 list_add_tail(&chan->common.device_node, &adev->common.channels);
7f8281765f9949 Allen Pais 2020-08-31 4144 tasklet_setup(&chan->irq_tasklet, ppc440spe_adma_tasklet);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4145
12458ea06efd7b Anatolij Gustschin 2009-12-11 4146 /* allocate and map helper pages for async validation or
12458ea06efd7b Anatolij Gustschin 2009-12-11 4147 * async_mult/async_sum_product operations on DMA0/1.
12458ea06efd7b Anatolij Gustschin 2009-12-11 4148 */
12458ea06efd7b Anatolij Gustschin 2009-12-11 4149 if (adev->id != PPC440SPE_XOR_ID) {
12458ea06efd7b Anatolij Gustschin 2009-12-11 4150 chan->pdest_page = alloc_page(GFP_KERNEL);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4151 chan->qdest_page = alloc_page(GFP_KERNEL);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4152 if (!chan->pdest_page ||
12458ea06efd7b Anatolij Gustschin 2009-12-11 4153 !chan->qdest_page) {
12458ea06efd7b Anatolij Gustschin 2009-12-11 4154 if (chan->pdest_page)
12458ea06efd7b Anatolij Gustschin 2009-12-11 4155 __free_page(chan->pdest_page);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4156 if (chan->qdest_page)
12458ea06efd7b Anatolij Gustschin 2009-12-11 4157 __free_page(chan->qdest_page);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4158 ret = -ENOMEM;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4159 goto err_page_alloc;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4160 }
12458ea06efd7b Anatolij Gustschin 2009-12-11 4161 chan->pdest = dma_map_page(&ofdev->dev, chan->pdest_page, 0,
12458ea06efd7b Anatolij Gustschin 2009-12-11 4162 PAGE_SIZE, DMA_BIDIRECTIONAL);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4163 chan->qdest = dma_map_page(&ofdev->dev, chan->qdest_page, 0,
12458ea06efd7b Anatolij Gustschin 2009-12-11 4164 PAGE_SIZE, DMA_BIDIRECTIONAL);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4165 }
12458ea06efd7b Anatolij Gustschin 2009-12-11 4166
12458ea06efd7b Anatolij Gustschin 2009-12-11 4167 ref = kmalloc(sizeof(*ref), GFP_KERNEL);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4168 if (ref) {
12458ea06efd7b Anatolij Gustschin 2009-12-11 4169 ref->chan = &chan->common;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4170 INIT_LIST_HEAD(&ref->node);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4171 list_add_tail(&ref->node, &ppc440spe_adma_chan_list);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4172 } else {
12458ea06efd7b Anatolij Gustschin 2009-12-11 4173 dev_err(&ofdev->dev, "failed to allocate channel reference!\n");
12458ea06efd7b Anatolij Gustschin 2009-12-11 4174 ret = -ENOMEM;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4175 goto err_ref_alloc;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4176 }
12458ea06efd7b Anatolij Gustschin 2009-12-11 4177
12458ea06efd7b Anatolij Gustschin 2009-12-11 4178 ret = ppc440spe_adma_setup_irqs(adev, chan, &initcode);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4179 if (ret)
12458ea06efd7b Anatolij Gustschin 2009-12-11 4180 goto err_irq;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4181
12458ea06efd7b Anatolij Gustschin 2009-12-11 4182 ppc440spe_adma_init_capabilities(adev);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4183
12458ea06efd7b Anatolij Gustschin 2009-12-11 4184 ret = dma_async_device_register(&adev->common);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4185 if (ret) {
12458ea06efd7b Anatolij Gustschin 2009-12-11 4186 initcode = PPC_ADMA_INIT_REGISTER;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4187 dev_err(&ofdev->dev, "failed to register dma device\n");
12458ea06efd7b Anatolij Gustschin 2009-12-11 4188 goto err_dev_reg;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4189 }
12458ea06efd7b Anatolij Gustschin 2009-12-11 4190
12458ea06efd7b Anatolij Gustschin 2009-12-11 4191 goto out;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4192
12458ea06efd7b Anatolij Gustschin 2009-12-11 4193 err_dev_reg:
12458ea06efd7b Anatolij Gustschin 2009-12-11 4194 ppc440spe_adma_release_irqs(adev, chan);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4195 err_irq:
12458ea06efd7b Anatolij Gustschin 2009-12-11 4196 list_for_each_entry_safe(ref, _ref, &ppc440spe_adma_chan_list, node) {
12458ea06efd7b Anatolij Gustschin 2009-12-11 4197 if (chan == to_ppc440spe_adma_chan(ref->chan)) {
12458ea06efd7b Anatolij Gustschin 2009-12-11 4198 list_del(&ref->node);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4199 kfree(ref);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4200 }
12458ea06efd7b Anatolij Gustschin 2009-12-11 4201 }
12458ea06efd7b Anatolij Gustschin 2009-12-11 4202 err_ref_alloc:
12458ea06efd7b Anatolij Gustschin 2009-12-11 4203 if (adev->id != PPC440SPE_XOR_ID) {
12458ea06efd7b Anatolij Gustschin 2009-12-11 4204 dma_unmap_page(&ofdev->dev, chan->pdest,
12458ea06efd7b Anatolij Gustschin 2009-12-11 4205 PAGE_SIZE, DMA_BIDIRECTIONAL);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4206 dma_unmap_page(&ofdev->dev, chan->qdest,
12458ea06efd7b Anatolij Gustschin 2009-12-11 4207 PAGE_SIZE, DMA_BIDIRECTIONAL);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4208 __free_page(chan->pdest_page);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4209 __free_page(chan->qdest_page);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4210 }
12458ea06efd7b Anatolij Gustschin 2009-12-11 4211 err_page_alloc:
12458ea06efd7b Anatolij Gustschin 2009-12-11 4212 kfree(chan);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4213 err_chan_alloc:
12458ea06efd7b Anatolij Gustschin 2009-12-11 4214 if (adev->id == PPC440SPE_XOR_ID)
12458ea06efd7b Anatolij Gustschin 2009-12-11 4215 iounmap(adev->xor_reg);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4216 else
12458ea06efd7b Anatolij Gustschin 2009-12-11 4217 iounmap(adev->dma_reg);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4218 err_regs_alloc:
12458ea06efd7b Anatolij Gustschin 2009-12-11 4219 dma_free_coherent(adev->dev, adev->pool_size,
12458ea06efd7b Anatolij Gustschin 2009-12-11 4220 adev->dma_desc_pool_virt,
12458ea06efd7b Anatolij Gustschin 2009-12-11 4221 adev->dma_desc_pool);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4222 err_dma_alloc:
12458ea06efd7b Anatolij Gustschin 2009-12-11 4223 kfree(adev);
12458ea06efd7b Anatolij Gustschin 2009-12-11 4224 err_adev_alloc:
12458ea06efd7b Anatolij Gustschin 2009-12-11 4225 release_mem_region(res.start, resource_size(&res));
12458ea06efd7b Anatolij Gustschin 2009-12-11 4226 out:
12458ea06efd7b Anatolij Gustschin 2009-12-11 4227 if (id < PPC440SPE_ADMA_ENGINES_NUM)
12458ea06efd7b Anatolij Gustschin 2009-12-11 4228 ppc440spe_adma_devices[id] = initcode;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4229
12458ea06efd7b Anatolij Gustschin 2009-12-11 4230 return ret;
12458ea06efd7b Anatolij Gustschin 2009-12-11 4231 }
12458ea06efd7b Anatolij Gustschin 2009-12-11 4232
:::::: The code at line 4094 was first introduced by commit
:::::: 12458ea06efd7b44281e68fe59c950ec7d59c649 ppc440spe-adma: adds updated ppc440spe adma driver
:::::: TO: Anatolij Gustschin <agust(a)denx.de>
:::::: CC: Dan Williams <dan.j.williams(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
Re: [PATCH net-next] net: mdio: access c22 registers via debugfs
by kernel test robot
Hi "Pavel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Pavel-imerda/net-mdio-access-c22...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 9ab7e76aefc97a9aa664accb59d6e8dc5e52514a
config: s390-randconfig-r015-20210117 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 2082b10d100e8dbaffc2ba8f497db5d2ab61beb2)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://github.com/0day-ci/linux/commit/22d74f4896850840331d36d6867f7bc5c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Pavel-imerda/net-mdio-access-c22-registers-via-debugfs/20210117-053409
git checkout 22d74f4896850840331d36d6867f7bc5ce728bbd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
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 >>):
^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from drivers/net/phy/mdio-debugfs.c:3:
In file included from include/linux/phy.h:16:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from drivers/net/phy/mdio-debugfs.c:3:
In file included from include/linux/phy.h:16:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/net/phy/mdio-debugfs.c:3:
In file included from include/linux/phy.h:16:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/net/phy/mdio-debugfs.c:3:
In file included from include/linux/phy.h:16:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> drivers/net/phy/mdio-debugfs.c:170:6: warning: no previous prototype for function 'mdio_debugfs_add' [-Wmissing-prototypes]
void mdio_debugfs_add(struct mii_bus *bus)
^
drivers/net/phy/mdio-debugfs.c:170:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void mdio_debugfs_add(struct mii_bus *bus)
^
static
>> drivers/net/phy/mdio-debugfs.c:177:6: warning: no previous prototype for function 'mdio_debugfs_remove' [-Wmissing-prototypes]
void mdio_debugfs_remove(struct mii_bus *bus)
^
drivers/net/phy/mdio-debugfs.c:177:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void mdio_debugfs_remove(struct mii_bus *bus)
^
static
>> drivers/net/phy/mdio-debugfs.c:184:12: warning: no previous prototype for function 'mdio_debugfs_init' [-Wmissing-prototypes]
int __init mdio_debugfs_init(void)
^
drivers/net/phy/mdio-debugfs.c:184:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __init mdio_debugfs_init(void)
^
static
>> drivers/net/phy/mdio-debugfs.c:192:13: warning: no previous prototype for function 'mdio_debugfs_exit' [-Wmissing-prototypes]
void __exit mdio_debugfs_exit(void)
^
drivers/net/phy/mdio-debugfs.c:192:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __exit mdio_debugfs_exit(void)
^
static
24 warnings generated.
vim +/mdio_debugfs_add +170 drivers/net/phy/mdio-debugfs.c
169
> 170 void mdio_debugfs_add(struct mii_bus *bus)
171 {
172 bus->debugfs_dentry = debugfs_create_dir(dev_name(&bus->dev), mdio_debugfs_dentry);
173 debugfs_create_file("control", 0600, bus->debugfs_dentry, bus, &mdio_debug_fops);
174 }
175 EXPORT_SYMBOL_GPL(mdio_debugfs_add);
176
> 177 void mdio_debugfs_remove(struct mii_bus *bus)
178 {
179 debugfs_remove(bus->debugfs_dentry);
180 bus->debugfs_dentry = NULL;
181 }
182 EXPORT_SYMBOL_GPL(mdio_debugfs_remove);
183
> 184 int __init mdio_debugfs_init(void)
185 {
186 mdio_debugfs_dentry = debugfs_create_dir("mdio", NULL);
187
188 return PTR_ERR_OR_ZERO(mdio_debugfs_dentry);
189 }
190 module_init(mdio_debugfs_init);
191
> 192 void __exit mdio_debugfs_exit(void)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[RFC PATCH] net: mdio: mdio_debug_fops can be static
by kernel test robot
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
mdio-debugfs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/phy/mdio-debugfs.c b/drivers/net/phy/mdio-debugfs.c
index abed40052c20a1d..f1c9a3c604714c2 100644
--- a/drivers/net/phy/mdio-debugfs.c
+++ b/drivers/net/phy/mdio-debugfs.c
@@ -151,7 +151,7 @@ static unsigned int mdio_debug_poll(struct file *file, poll_table *wait)
return data->value == -1 ? POLLOUT : POLLIN;
}
-struct file_operations mdio_debug_fops = {
+static struct file_operations mdio_debug_fops = {
.owner = THIS_MODULE,
.open = mdio_debug_open,
.release = mdio_debug_release,
@@ -181,7 +181,7 @@ void mdio_debugfs_remove(struct mii_bus *bus)
}
EXPORT_SYMBOL_GPL(mdio_debugfs_remove);
-int __init mdio_debugfs_init(void)
+static int __init mdio_debugfs_init(void)
{
mdio_debugfs_dentry = debugfs_create_dir("mdio", NULL);
@@ -189,7 +189,7 @@ int __init mdio_debugfs_init(void)
}
module_init(mdio_debugfs_init);
-void __exit mdio_debugfs_exit(void)
+static void __exit mdio_debugfs_exit(void)
{
debugfs_remove(mdio_debugfs_dentry);
}
1 year, 8 months
Re: [PATCH net-next] net: mdio: access c22 registers via debugfs
by kernel test robot
Hi "Pavel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Pavel-imerda/net-mdio-access-c22...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 9ab7e76aefc97a9aa664accb59d6e8dc5e52514a
config: i386-randconfig-s002-20210117 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-208-g46a52ca4-dirty
# https://github.com/0day-ci/linux/commit/22d74f4896850840331d36d6867f7bc5c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Pavel-imerda/net-mdio-access-c22-registers-via-debugfs/20210117-053409
git checkout 22d74f4896850840331d36d6867f7bc5ce728bbd
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/net/phy/mdio-debugfs.c:160:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __poll_t ( *poll )( ... ) @@ got unsigned int ( * )( ... ) @@
drivers/net/phy/mdio-debugfs.c:160:17: sparse: expected restricted __poll_t ( *poll )( ... )
drivers/net/phy/mdio-debugfs.c:160:17: sparse: got unsigned int ( * )( ... )
>> drivers/net/phy/mdio-debugfs.c:154:24: sparse: sparse: symbol 'mdio_debug_fops' was not declared. Should it be static?
>> drivers/net/phy/mdio-debugfs.c:184:12: sparse: sparse: symbol 'mdio_debugfs_init' was not declared. Should it be static?
>> drivers/net/phy/mdio-debugfs.c:192:13: sparse: sparse: symbol 'mdio_debugfs_exit' was not declared. Should it be static?
Please review and possibly fold the followup patch.
vim +160 drivers/net/phy/mdio-debugfs.c
153
> 154 struct file_operations mdio_debug_fops = {
155 .owner = THIS_MODULE,
156 .open = mdio_debug_open,
157 .release = mdio_debug_release,
158 .write = mdio_debug_write,
159 .read = mdio_debug_read,
> 160 .poll = mdio_debug_poll,
161 };
162
163 /*
164 * TODO: This implementation doesn't support module load/unload and has no
165 * error checking.
166 */
167
168 static struct dentry *mdio_debugfs_dentry;
169
170 void mdio_debugfs_add(struct mii_bus *bus)
171 {
172 bus->debugfs_dentry = debugfs_create_dir(dev_name(&bus->dev), mdio_debugfs_dentry);
173 debugfs_create_file("control", 0600, bus->debugfs_dentry, bus, &mdio_debug_fops);
174 }
175 EXPORT_SYMBOL_GPL(mdio_debugfs_add);
176
177 void mdio_debugfs_remove(struct mii_bus *bus)
178 {
179 debugfs_remove(bus->debugfs_dentry);
180 bus->debugfs_dentry = NULL;
181 }
182 EXPORT_SYMBOL_GPL(mdio_debugfs_remove);
183
> 184 int __init mdio_debugfs_init(void)
185 {
186 mdio_debugfs_dentry = debugfs_create_dir("mdio", NULL);
187
188 return PTR_ERR_OR_ZERO(mdio_debugfs_dentry);
189 }
190 module_init(mdio_debugfs_init);
191
> 192 void __exit mdio_debugfs_exit(void)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months