[hnaz-linux-mm:master 412/421] drivers/mailbox/bcm-pdc-mailbox.c:682:28: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://github.com/hnaz/linux-mm master
head: 2932a9e66c580f3c8d95ec27716d437198fb4c94
commit: 07b12d9b4d4dfc2f4708b795d5abeab3131278f0 [412/421] iomap: constify ioreadX() iomem argument (as in generic implementation)
config: x86_64-randconfig-s022-20201019 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-dirty
# https://github.com/hnaz/linux-mm/commit/07b12d9b4d4dfc2f4708b795d5abeab31...
git remote add hnaz-linux-mm https://github.com/hnaz/linux-mm
git fetch --no-tags hnaz-linux-mm master
git checkout 07b12d9b4d4dfc2f4708b795d5abeab3131278f0
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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/mailbox/bcm-pdc-mailbox.c:682:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@
>> drivers/mailbox/bcm-pdc-mailbox.c:682:28: sparse: expected void const [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:682:28: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:792:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:792:42: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:792:42: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:793:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:793:42: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:793:42: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1031:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1031:32: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1031:32: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1033:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1033:20: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1033:20: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1034:23: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1034:23: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1034:23: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1035:23: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1035:23: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1035:23: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1039:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1039:20: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1039:20: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1041:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1041:20: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1041:20: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1044:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1044:20: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1044:20: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1046:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1046:20: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1046:20: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1049:48: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1049:48: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1049:48: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1051:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1051:20: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1051:20: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1058:48: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1058:48: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1058:48: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1062:63: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1062:63: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1062:63: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1068:48: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1068:48: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1068:48: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1072:48: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1072:48: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1072:48: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1296:23: sparse: sparse: cast removes address space '__iomem' of expression
drivers/mailbox/bcm-pdc-mailbox.c:1298:16: sparse: sparse: cast removes address space '__iomem' of expression
drivers/mailbox/bcm-pdc-mailbox.c:1301:16: sparse: sparse: cast removes address space '__iomem' of expression
drivers/mailbox/bcm-pdc-mailbox.c:1308:27: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1308:27: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1308:27: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1313:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1313:32: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1313:32: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1316:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1316:20: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1316:20: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1319:23: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1319:23: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1319:23: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1320:23: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1320:23: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1320:23: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1337:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1337:32: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1337:32: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:1339:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@
drivers/mailbox/bcm-pdc-mailbox.c:1339:20: sparse: expected void [noderef] __iomem *
drivers/mailbox/bcm-pdc-mailbox.c:1339:20: sparse: got unsigned int *
drivers/mailbox/bcm-pdc-mailbox.c:558:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] addrlow @@ got restricted __le32 [usertype] @@
drivers/mailbox/bcm-pdc-mailbox.c:558:22: sparse: expected unsigned int [usertype] addrlow
drivers/mailbox/bcm-pdc-mailbox.c:558:22: sparse: got restricted __le32 [usertype]
drivers/mailbox/bcm-pdc-mailbox.c:559:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] addrhigh @@ got restricted __le32 [usertype] @@
drivers/mailbox/bcm-pdc-mailbox.c:559:23: sparse: expected unsigned int [usertype] addrhigh
drivers/mailbox/bcm-pdc-mailbox.c:559:23: sparse: got restricted __le32 [usertype]
drivers/mailbox/bcm-pdc-mailbox.c:560:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] ctrl1 @@ got restricted __le32 [usertype] @@
drivers/mailbox/bcm-pdc-mailbox.c:560:20: sparse: expected unsigned int [usertype] ctrl1
drivers/mailbox/bcm-pdc-mailbox.c:560:20: sparse: got restricted __le32 [usertype]
drivers/mailbox/bcm-pdc-mailbox.c:561:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] ctrl2 @@ got restricted __le32 [usertype] @@
drivers/mailbox/bcm-pdc-mailbox.c:561:20: sparse: expected unsigned int [usertype] ctrl2
drivers/mailbox/bcm-pdc-mailbox.c:561:20: sparse: got restricted __le32 [usertype]
drivers/mailbox/bcm-pdc-mailbox.c:558:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] addrlow @@ got restricted __le32 [usertype] @@
drivers/mailbox/bcm-pdc-mailbox.c:558:22: sparse: expected unsigned int [usertype] addrlow
drivers/mailbox/bcm-pdc-mailbox.c:558:22: sparse: got restricted __le32 [usertype]
drivers/mailbox/bcm-pdc-mailbox.c:559:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] addrhigh @@ got restricted __le32 [usertype] @@
drivers/mailbox/bcm-pdc-mailbox.c:559:23: sparse: expected unsigned int [usertype] addrhigh
drivers/mailbox/bcm-pdc-mailbox.c:559:23: sparse: got restricted __le32 [usertype]
drivers/mailbox/bcm-pdc-mailbox.c:560:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] ctrl1 @@ got restricted __le32 [usertype] @@
drivers/mailbox/bcm-pdc-mailbox.c:560:20: sparse: expected unsigned int [usertype] ctrl1
drivers/mailbox/bcm-pdc-mailbox.c:560:20: sparse: got restricted __le32 [usertype]
drivers/mailbox/bcm-pdc-mailbox.c:561:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] ctrl2 @@ got restricted __le32 [usertype] @@
drivers/mailbox/bcm-pdc-mailbox.c:561:20: sparse: expected unsigned int [usertype] ctrl2
drivers/mailbox/bcm-pdc-mailbox.c:561:20: sparse: got restricted __le32 [usertype]
drivers/mailbox/bcm-pdc-mailbox.c:530:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] addrlow @@ got restricted __le32 [usertype] @@
drivers/mailbox/bcm-pdc-mailbox.c:530:22: sparse: expected unsigned int [usertype] addrlow
drivers/mailbox/bcm-pdc-mailbox.c:530:22: sparse: got restricted __le32 [usertype]
vim +682 drivers/mailbox/bcm-pdc-mailbox.c
e004c7e7d3b873a Rob Rice 2016-11-14 667
e004c7e7d3b873a Rob Rice 2016-11-14 668 /**
e004c7e7d3b873a Rob Rice 2016-11-14 669 * pdc_receive() - Process as many responses as are available in the rx ring.
e004c7e7d3b873a Rob Rice 2016-11-14 670 * @pdcs: PDC state
e004c7e7d3b873a Rob Rice 2016-11-14 671 *
e004c7e7d3b873a Rob Rice 2016-11-14 672 * Called within the hard IRQ.
e004c7e7d3b873a Rob Rice 2016-11-14 673 * Return:
e004c7e7d3b873a Rob Rice 2016-11-14 674 */
e004c7e7d3b873a Rob Rice 2016-11-14 675 static int
e004c7e7d3b873a Rob Rice 2016-11-14 676 pdc_receive(struct pdc_state *pdcs)
e004c7e7d3b873a Rob Rice 2016-11-14 677 {
e004c7e7d3b873a Rob Rice 2016-11-14 678 int rx_status;
e004c7e7d3b873a Rob Rice 2016-11-14 679
e004c7e7d3b873a Rob Rice 2016-11-14 680 /* read last_rx_curr from register once */
e004c7e7d3b873a Rob Rice 2016-11-14 681 pdcs->last_rx_curr =
cf17581340d7301 Rob Rice 2016-11-14 @682 (ioread32(&pdcs->rxregs_64->status0) &
e004c7e7d3b873a Rob Rice 2016-11-14 683 CRYPTO_D64_RS0_CD_MASK) / RING_ENTRY_SIZE;
e004c7e7d3b873a Rob Rice 2016-11-14 684
e004c7e7d3b873a Rob Rice 2016-11-14 685 do {
e004c7e7d3b873a Rob Rice 2016-11-14 686 /* Could be many frames ready */
e004c7e7d3b873a Rob Rice 2016-11-14 687 rx_status = pdc_receive_one(pdcs);
e004c7e7d3b873a Rob Rice 2016-11-14 688 } while (rx_status == PDC_SUCCESS);
e004c7e7d3b873a Rob Rice 2016-11-14 689
e004c7e7d3b873a Rob Rice 2016-11-14 690 return 0;
a24532f8d17b721 Rob Rice 2016-06-30 691 }
a24532f8d17b721 Rob Rice 2016-06-30 692
:::::: The code at line 682 was first introduced by commit
:::::: cf17581340d730175f1f3f4ce6e90ae434154e37 mailbox: bcm-pdc: Remove unnecessary void* casts
:::::: TO: Rob Rice <rob.rice(a)broadcom.com>
:::::: CC: Jassi Brar <jaswinder.singh(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
Re: [PATCH v2 2/2] ext4: print quota journalling mode on (re-)mount
by kernel test robot
Hi Roman,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on ext4/dev]
[also build test ERROR on v5.9 next-20201016]
[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/Roman-Anufriev/ext4-add-helpers-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
config: i386-randconfig-m021-20201018 (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/9ee2e9dad32135b665f733b714c75ff22...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Roman-Anufriev/ext4-add-helpers-for-checking-whether-quota-can-be-enabled-is-journalled/20201018-100410
git checkout 9ee2e9dad32135b665f733b714c75ff22731bbcd
# 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 errors (new ones prefixed by >>):
fs/ext4/super.c: In function 'ext4_quota_mode':
>> fs/ext4/super.c:3999:19: error: expected ';' before '}' token
3999 | return "disabled"
| ^
| ;
4000 | #endif
4001 | }
| ~
fs/ext4/super.c: In function 'ext4_remount':
fs/ext4/super.c:5738:6: warning: variable 'enable_quota' set but not used [-Wunused-but-set-variable]
5738 | int enable_quota = 0;
| ^~~~~~~~~~~~
vim +3999 fs/ext4/super.c
3987
3988 static const char *ext4_quota_mode(struct super_block *sb)
3989 {
3990 #ifdef CONFIG_QUOTA
3991 if (!ext4_quota_capable(sb))
3992 return "none";
3993
3994 if (ext4_is_quota_journalled(sb))
3995 return "journalled";
3996 else
3997 return "writeback";
3998 #else
> 3999 return "disabled"
4000 #endif
4001 }
4002
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[arnd-playground:Wextra 31/32] drivers/mtd/maps/sun_uflash.c:46:18: warning: trigraph ignored, use -trigraphs to enable
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git Wextra
head: 5d0c476a9aa8d83304ee40320c1533a7443c6af5
commit: 51d8bbf29f744fc470126e3b0a5a64fd5c155f0d [31/32] kbuild: consolidate extra warnings in scripts/Makefile.extrawarn
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-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/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground Wextra
git checkout 51d8bbf29f744fc470126e3b0a5a64fd5c155f0d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
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/mtd/maps/sun_uflash.c:46:18: warning: trigraph ??- ignored, use -trigraphs to enable [-Wtrigraphs]
46 | .name = "SUNW,???-????",
|
drivers/mtd/maps/sun_uflash.c:51:5: warning: no previous prototype for 'uflash_devinit' [-Wmissing-prototypes]
51 | int uflash_devinit(struct platform_device *op, struct device_node *dp)
| ^~~~~~~~~~~~~~
--
>> drivers/tty/serial/sunsu.c:56:34: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
56 | static char *su_typev[] = { "su(???)", "su(mouse)", "su(kbd)", "su(serial)" };
|
vim +46 drivers/mtd/maps/sun_uflash.c
^1da177e4c3f415 Linus Torvalds 2005-04-16 44
^1da177e4c3f415 Linus Torvalds 2005-04-16 45 struct map_info uflash_map_templ = {
^1da177e4c3f415 Linus Torvalds 2005-04-16 @46 .name = "SUNW,???-????",
^1da177e4c3f415 Linus Torvalds 2005-04-16 47 .size = UFLASH_WINDOW_SIZE,
^1da177e4c3f415 Linus Torvalds 2005-04-16 48 .bankwidth = UFLASH_BUSWIDTH,
^1da177e4c3f415 Linus Torvalds 2005-04-16 49 };
^1da177e4c3f415 Linus Torvalds 2005-04-16 50
:::::: The code at line 46 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[linux-review:UPDATE-20201019-144130/Shay-Bar/mac80211-160MHz-support-per-IEEE802-11ax-standard/20201012-221911 1/1] net/mac80211/spectmgmt.c:232:42: sparse: sparse: cast to restricted __le16
by kernel test robot
tree: https://github.com/0day-ci/linux/commits/UPDATE-20201019-144130/Shay-Bar/...
head: 0ede483fb5b54c0e7af13f36bd07f399c84c0d1c
commit: 0ede483fb5b54c0e7af13f36bd07f399c84c0d1c [1/1] mac80211: 160MHz support per IEEE802.11ax standard
config: powerpc64-randconfig-s032-20201019 (attached as .config)
compiler: powerpc64-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-dirty
# https://github.com/0day-ci/linux/commit/0ede483fb5b54c0e7af13f36bd07f399c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review UPDATE-20201019-144130/Shay-Bar/mac80211-160MHz-support-per-IEEE802-11ax-standard/20201012-221911
git checkout 0ede483fb5b54c0e7af13f36bd07f399c84c0d1c
# 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=powerpc64
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 >>)"
>> net/mac80211/spectmgmt.c:232:42: sparse: sparse: cast to restricted __le16
>> net/mac80211/spectmgmt.c:232:42: sparse: sparse: cast to restricted __le16
>> net/mac80211/spectmgmt.c:232:42: sparse: sparse: cast to restricted __le16
>> net/mac80211/spectmgmt.c:232:42: sparse: sparse: cast to restricted __le16
>> net/mac80211/spectmgmt.c:231:48: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] operation_mode @@ got int @@
>> net/mac80211/spectmgmt.c:231:48: sparse: expected restricted __le16 [usertype] operation_mode
>> net/mac80211/spectmgmt.c:231:48: sparse: got int
vim +232 net/mac80211/spectmgmt.c
96
97 int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,
98 struct ieee802_11_elems *elems,
99 enum nl80211_band current_band,
100 u32 vht_cap_info,
101 u32 sta_flags, u8 *bssid,
102 struct ieee80211_csa_ie *csa_ie)
103 {
104 enum nl80211_band new_band = current_band;
105 int new_freq;
106 u8 new_chan_no;
107 struct ieee80211_channel *new_chan;
108 struct cfg80211_chan_def new_vht_chandef = {};
109 const struct ieee80211_sec_chan_offs_ie *sec_chan_offs;
110 const struct ieee80211_wide_bw_chansw_ie *wide_bw_chansw_ie;
111 int secondary_channel_offset = -1;
112
113 memset(csa_ie, 0, sizeof(*csa_ie));
114
115 sec_chan_offs = elems->sec_chan_offs;
116 wide_bw_chansw_ie = elems->wide_bw_chansw_ie;
117
118 if (sta_flags & (IEEE80211_STA_DISABLE_HT |
119 IEEE80211_STA_DISABLE_40MHZ)) {
120 sec_chan_offs = NULL;
121 wide_bw_chansw_ie = NULL;
122 }
123
124 if (sta_flags & IEEE80211_STA_DISABLE_VHT)
125 wide_bw_chansw_ie = NULL;
126
127 if (elems->ext_chansw_ie) {
128 if (!ieee80211_operating_class_to_band(
129 elems->ext_chansw_ie->new_operating_class,
130 &new_band)) {
131 sdata_info(sdata,
132 "cannot understand ECSA IE operating class, %d, ignoring\n",
133 elems->ext_chansw_ie->new_operating_class);
134 }
135 new_chan_no = elems->ext_chansw_ie->new_ch_num;
136 csa_ie->count = elems->ext_chansw_ie->count;
137 csa_ie->mode = elems->ext_chansw_ie->mode;
138 } else if (elems->ch_switch_ie) {
139 new_chan_no = elems->ch_switch_ie->new_ch_num;
140 csa_ie->count = elems->ch_switch_ie->count;
141 csa_ie->mode = elems->ch_switch_ie->mode;
142 } else {
143 /* nothing here we understand */
144 return 1;
145 }
146
147 /* Mesh Channel Switch Parameters Element */
148 if (elems->mesh_chansw_params_ie) {
149 csa_ie->ttl = elems->mesh_chansw_params_ie->mesh_ttl;
150 csa_ie->mode = elems->mesh_chansw_params_ie->mesh_flags;
151 csa_ie->pre_value = le16_to_cpu(
152 elems->mesh_chansw_params_ie->mesh_pre_value);
153
154 if (elems->mesh_chansw_params_ie->mesh_flags &
155 WLAN_EID_CHAN_SWITCH_PARAM_REASON)
156 csa_ie->reason_code = le16_to_cpu(
157 elems->mesh_chansw_params_ie->mesh_reason);
158 }
159
160 new_freq = ieee80211_channel_to_frequency(new_chan_no, new_band);
161 new_chan = ieee80211_get_channel(sdata->local->hw.wiphy, new_freq);
162 if (!new_chan || new_chan->flags & IEEE80211_CHAN_DISABLED) {
163 sdata_info(sdata,
164 "BSS %pM switches to unsupported channel (%d MHz), disconnecting\n",
165 bssid, new_freq);
166 return -EINVAL;
167 }
168
169 if (sec_chan_offs) {
170 secondary_channel_offset = sec_chan_offs->sec_chan_offs;
171 } else if (!(sta_flags & IEEE80211_STA_DISABLE_HT)) {
172 /* If the secondary channel offset IE is not present,
173 * we can't know what's the post-CSA offset, so the
174 * best we can do is use 20MHz.
175 */
176 secondary_channel_offset = IEEE80211_HT_PARAM_CHA_SEC_NONE;
177 }
178
179 switch (secondary_channel_offset) {
180 default:
181 /* secondary_channel_offset was present but is invalid */
182 case IEEE80211_HT_PARAM_CHA_SEC_NONE:
183 cfg80211_chandef_create(&csa_ie->chandef, new_chan,
184 NL80211_CHAN_HT20);
185 break;
186 case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
187 cfg80211_chandef_create(&csa_ie->chandef, new_chan,
188 NL80211_CHAN_HT40PLUS);
189 break;
190 case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
191 cfg80211_chandef_create(&csa_ie->chandef, new_chan,
192 NL80211_CHAN_HT40MINUS);
193 break;
194 case -1:
195 cfg80211_chandef_create(&csa_ie->chandef, new_chan,
196 NL80211_CHAN_NO_HT);
197 /* keep width for 5/10 MHz channels */
198 switch (sdata->vif.bss_conf.chandef.width) {
199 case NL80211_CHAN_WIDTH_5:
200 case NL80211_CHAN_WIDTH_10:
201 csa_ie->chandef.width =
202 sdata->vif.bss_conf.chandef.width;
203 break;
204 default:
205 break;
206 }
207 break;
208 }
209
210 if (wide_bw_chansw_ie) {
211 u8 new_channel_width = wide_bw_chansw_ie->new_channel_width;
212 u8 new_seg0 = wide_bw_chansw_ie->new_center_freq_seg0;
213 u8 new_seg1 = wide_bw_chansw_ie->new_center_freq_seg1;
214 enum ieee80211_vht_chanwidth act_chanwidth =
215 ieee80211_vht_get_actual_chwidth(
216 new_channel_width, new_seg0, new_seg1);
217 enum ieee80211_center_freq_seg1 seg1_location =
218 ieee80211_get_center_freq_seg1_location(sdata,
219 vht_cap_info,
220 act_chanwidth);
221 struct ieee80211_vht_operation vht_oper = {
222 .chan_width = new_channel_width,
223 .center_freq_seg0_idx = new_seg0,
224 /* .basic_mcs_set doesn't matter */
225 };
226 struct ieee80211_ht_operation ht_oper = {};
227
228 if (seg1_location == IEEE80211_CENTER_FREQ_SEG1_VHT_OPER)
229 vht_oper.center_freq_seg1_idx = new_seg1;
230 else if (seg1_location == IEEE80211_CENTER_FREQ_SEG1_HT_OPER)
> 231 ht_oper.operation_mode =
> 232 (le16_to_cpu(new_seg1) <<
233 IEEE80211_HT_OP_MODE_CCFS2_SHIFT);
234
235 /* default, for the case of IEEE80211_VHT_CHANWIDTH_USE_HT,
236 * to the previously parsed chandef
237 */
238 new_vht_chandef = csa_ie->chandef;
239
240 /* ignore if parsing fails */
241 if (!ieee80211_chandef_vht_oper(&sdata->local->hw,
242 vht_cap_info,
243 &vht_oper, &ht_oper,
244 &new_vht_chandef))
245 new_vht_chandef.chan = NULL;
246
247 if (sta_flags & IEEE80211_STA_DISABLE_80P80MHZ &&
248 new_vht_chandef.width == NL80211_CHAN_WIDTH_80P80)
249 ieee80211_chandef_downgrade(&new_vht_chandef);
250 if (sta_flags & IEEE80211_STA_DISABLE_160MHZ &&
251 new_vht_chandef.width == NL80211_CHAN_WIDTH_160)
252 ieee80211_chandef_downgrade(&new_vht_chandef);
253 }
254
255 /* if VHT data is there validate & use it */
256 if (new_vht_chandef.chan) {
257 if (!cfg80211_chandef_compatible(&new_vht_chandef,
258 &csa_ie->chandef)) {
259 sdata_info(sdata,
260 "BSS %pM: CSA has inconsistent channel data, disconnecting\n",
261 bssid);
262 return -EINVAL;
263 }
264 csa_ie->chandef = new_vht_chandef;
265 }
266
267 if (elems->max_channel_switch_time)
268 csa_ie->max_switch_time =
269 (elems->max_channel_switch_time[0] << 0) |
270 (elems->max_channel_switch_time[1] << 8) |
271 (elems->max_channel_switch_time[2] << 16);
272
273 return 0;
274 }
275
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[shenki:ftgmac100-fixes 120/182] drivers/fsi/fsi-occ.c:570:17: warning: cast to smaller integer type 'enum versions' from 'const void
by kernel test robot
Hi Eddie,
FYI, the error/warning still remains.
tree: https://github.com/shenki/linux ftgmac100-fixes
head: a9f71f82b86f334b0670285bc569dc41d2c16020
commit: 0f099b795d61ec929a685d444cc2566f57ac081f [120/182] fsi: occ: Add support for P10
config: arm64-randconfig-r022-20201019 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 094e9f4779eb9b5c6a49014f2f80b8cbb833572f)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/shenki/linux/commit/0f099b795d61ec929a685d444cc2566f57...
git remote add shenki https://github.com/shenki/linux
git fetch --no-tags shenki ftgmac100-fixes
git checkout 0f099b795d61ec929a685d444cc2566f57ac081f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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/fsi/fsi-occ.c:570:17: warning: cast to smaller integer type 'enum versions' from 'const void *' [-Wvoid-pointer-to-enum-cast]
occ->version = (enum versions)md;
^~~~~~~~~~~~~~~~~
1 warning generated.
vim +570 drivers/fsi/fsi-occ.c
552
553 static int occ_probe(struct platform_device *pdev)
554 {
555 int rc;
556 u32 reg;
557 struct occ *occ;
558 struct platform_device *hwmon_dev;
559 struct device *dev = &pdev->dev;
560 const void *md = of_device_get_match_data(dev);
561 struct platform_device_info hwmon_dev_info = {
562 .parent = dev,
563 .name = "occ-hwmon",
564 };
565
566 occ = devm_kzalloc(dev, sizeof(*occ), GFP_KERNEL);
567 if (!occ)
568 return -ENOMEM;
569
> 570 occ->version = (enum versions)md;
571 occ->dev = dev;
572 occ->sbefifo = dev->parent;
573 mutex_init(&occ->occ_lock);
574
575 if (dev->of_node) {
576 rc = of_property_read_u32(dev->of_node, "reg", ®);
577 if (!rc) {
578 /* make sure we don't have a duplicate from dts */
579 occ->idx = ida_simple_get(&occ_ida, reg, reg + 1,
580 GFP_KERNEL);
581 if (occ->idx < 0)
582 occ->idx = ida_simple_get(&occ_ida, 1, INT_MAX,
583 GFP_KERNEL);
584 } else {
585 occ->idx = ida_simple_get(&occ_ida, 1, INT_MAX,
586 GFP_KERNEL);
587 }
588 } else {
589 occ->idx = ida_simple_get(&occ_ida, 1, INT_MAX, GFP_KERNEL);
590 }
591
592 platform_set_drvdata(pdev, occ);
593
594 snprintf(occ->name, sizeof(occ->name), "occ%d", occ->idx);
595 occ->mdev.fops = &occ_fops;
596 occ->mdev.minor = MISC_DYNAMIC_MINOR;
597 occ->mdev.name = occ->name;
598 occ->mdev.parent = dev;
599
600 rc = misc_register(&occ->mdev);
601 if (rc) {
602 dev_err(dev, "failed to register miscdevice: %d\n", rc);
603 ida_simple_remove(&occ_ida, occ->idx);
604 return rc;
605 }
606
607 hwmon_dev_info.id = occ->idx;
608 hwmon_dev = platform_device_register_full(&hwmon_dev_info);
609 if (IS_ERR(hwmon_dev))
610 dev_warn(dev, "failed to create hwmon device\n");
611
612 return 0;
613 }
614
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[arnd-playground:Wextra 31/32] drivers/s390/block/dasd_proc.c:64:32: warning: trigraph ignored, use -trigraphs to enable
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git Wextra
head: 5d0c476a9aa8d83304ee40320c1533a7443c6af5
commit: 51d8bbf29f744fc470126e3b0a5a64fd5c155f0d [31/32] kbuild: consolidate extra warnings in scripts/Makefile.extrawarn
config: s390-allyesconfig (attached as .config)
compiler: s390-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/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground Wextra
git checkout 51d8bbf29f744fc470126e3b0a5a64fd5c155f0d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 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 >>):
drivers/s390/block/dasd_proc.c: In function 'dasd_devices_show':
>> drivers/s390/block/dasd_proc.c:64:32: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
64 | seq_printf(m, " at (???:??????)");
|
vim +64 drivers/s390/block/dasd_proc.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 34
^1da177e4c3f41 Linus Torvalds 2005-04-16 35 static int
^1da177e4c3f41 Linus Torvalds 2005-04-16 36 dasd_devices_show(struct seq_file *m, void *v)
^1da177e4c3f41 Linus Torvalds 2005-04-16 37 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 38 struct dasd_device *device;
8e09f21574ea30 Stefan Weinhuber 2008-01-26 39 struct dasd_block *block;
^1da177e4c3f41 Linus Torvalds 2005-04-16 40 char *substr;
^1da177e4c3f41 Linus Torvalds 2005-04-16 41
^1da177e4c3f41 Linus Torvalds 2005-04-16 42 device = dasd_device_from_devindex((unsigned long) v - 1);
^1da177e4c3f41 Linus Torvalds 2005-04-16 43 if (IS_ERR(device))
^1da177e4c3f41 Linus Torvalds 2005-04-16 44 return 0;
8e09f21574ea30 Stefan Weinhuber 2008-01-26 45 if (device->block)
8e09f21574ea30 Stefan Weinhuber 2008-01-26 46 block = device->block;
a5e2383991ee98 Stefan Weinhuber 2008-03-05 47 else {
a5e2383991ee98 Stefan Weinhuber 2008-03-05 48 dasd_put_device(device);
8e09f21574ea30 Stefan Weinhuber 2008-01-26 49 return 0;
a5e2383991ee98 Stefan Weinhuber 2008-03-05 50 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 51 /* Print device number. */
2a0217d5c7d22d Kay Sievers 2008-10-10 52 seq_printf(m, "%s", dev_name(&device->cdev->dev));
^1da177e4c3f41 Linus Torvalds 2005-04-16 53 /* Print discipline string. */
294001a80c9810 Stefan Haberland 2010-01-27 54 if (device->discipline != NULL)
^1da177e4c3f41 Linus Torvalds 2005-04-16 55 seq_printf(m, "(%s)", device->discipline->name);
^1da177e4c3f41 Linus Torvalds 2005-04-16 56 else
^1da177e4c3f41 Linus Torvalds 2005-04-16 57 seq_printf(m, "(none)");
^1da177e4c3f41 Linus Torvalds 2005-04-16 58 /* Print kdev. */
8e09f21574ea30 Stefan Weinhuber 2008-01-26 59 if (block->gdp)
^1da177e4c3f41 Linus Torvalds 2005-04-16 60 seq_printf(m, " at (%3d:%6d)",
f331c0296f2a9f Tejun Heo 2008-09-03 61 MAJOR(disk_devt(block->gdp)),
f331c0296f2a9f Tejun Heo 2008-09-03 62 MINOR(disk_devt(block->gdp)));
^1da177e4c3f41 Linus Torvalds 2005-04-16 63 else
^1da177e4c3f41 Linus Torvalds 2005-04-16 @64 seq_printf(m, " at (???:??????)");
^1da177e4c3f41 Linus Torvalds 2005-04-16 65 /* Print device name. */
8e09f21574ea30 Stefan Weinhuber 2008-01-26 66 if (block->gdp)
8e09f21574ea30 Stefan Weinhuber 2008-01-26 67 seq_printf(m, " is %-8s", block->gdp->disk_name);
^1da177e4c3f41 Linus Torvalds 2005-04-16 68 else
^1da177e4c3f41 Linus Torvalds 2005-04-16 69 seq_printf(m, " is ????????");
^1da177e4c3f41 Linus Torvalds 2005-04-16 70 /* Print devices features. */
c6eb7b7703ac4b Horst Hummel 2005-09-03 71 substr = (device->features & DASD_FEATURE_READONLY) ? "(ro)" : " ";
^1da177e4c3f41 Linus Torvalds 2005-04-16 72 seq_printf(m, "%4s: ", substr);
^1da177e4c3f41 Linus Torvalds 2005-04-16 73 /* Print device status information. */
294001a80c9810 Stefan Haberland 2010-01-27 74 switch (device->state) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 75 case DASD_STATE_NEW:
^1da177e4c3f41 Linus Torvalds 2005-04-16 76 seq_printf(m, "new");
^1da177e4c3f41 Linus Torvalds 2005-04-16 77 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 78 case DASD_STATE_KNOWN:
^1da177e4c3f41 Linus Torvalds 2005-04-16 79 seq_printf(m, "detected");
^1da177e4c3f41 Linus Torvalds 2005-04-16 80 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 81 case DASD_STATE_BASIC:
^1da177e4c3f41 Linus Torvalds 2005-04-16 82 seq_printf(m, "basic");
^1da177e4c3f41 Linus Torvalds 2005-04-16 83 break;
90f0094dc607ab Horst Hummel 2006-03-07 84 case DASD_STATE_UNFMT:
b707dbe6c52e14 Horst Hummel 2006-03-09 85 seq_printf(m, "unformatted");
90f0094dc607ab Horst Hummel 2006-03-07 86 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 87 case DASD_STATE_READY:
^1da177e4c3f41 Linus Torvalds 2005-04-16 88 case DASD_STATE_ONLINE:
^1da177e4c3f41 Linus Torvalds 2005-04-16 89 seq_printf(m, "active ");
8e09f21574ea30 Stefan Weinhuber 2008-01-26 90 if (dasd_check_blocksize(block->bp_block))
^1da177e4c3f41 Linus Torvalds 2005-04-16 91 seq_printf(m, "n/f ");
^1da177e4c3f41 Linus Torvalds 2005-04-16 92 else
^1da177e4c3f41 Linus Torvalds 2005-04-16 93 seq_printf(m,
7bf76f01695382 Jan Höppner 2017-08-15 94 "at blocksize: %u, %lu blocks, %lu MB",
8e09f21574ea30 Stefan Weinhuber 2008-01-26 95 block->bp_block, block->blocks,
8e09f21574ea30 Stefan Weinhuber 2008-01-26 96 ((block->bp_block >> 9) *
8e09f21574ea30 Stefan Weinhuber 2008-01-26 97 block->blocks) >> 11);
^1da177e4c3f41 Linus Torvalds 2005-04-16 98 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 99 default:
^1da177e4c3f41 Linus Torvalds 2005-04-16 100 seq_printf(m, "no stat");
^1da177e4c3f41 Linus Torvalds 2005-04-16 101 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 102 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 103 dasd_put_device(device);
^1da177e4c3f41 Linus Torvalds 2005-04-16 104 if (dasd_probeonly)
^1da177e4c3f41 Linus Torvalds 2005-04-16 105 seq_printf(m, "(probeonly)");
^1da177e4c3f41 Linus Torvalds 2005-04-16 106 seq_printf(m, "\n");
^1da177e4c3f41 Linus Torvalds 2005-04-16 107 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 108 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 109
:::::: The code at line 64 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[arnd-playground:Wextra 5/32] sound/firewire/amdtp-stream.c:1097:43: sparse: sparse: incorrect type in argument 6 (invalid types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git Wextra
head: 5d0c476a9aa8d83304ee40320c1533a7443c6af5
commit: 828241168b4b6b303cbba8bf9e1b693a3fd6ed61 [5/32] firewire: fix function type cast warning
config: x86_64-randconfig-s021-20201019 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-rc1-2-g368fd9ce-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground Wextra
git checkout 828241168b4b6b303cbba8bf9e1b693a3fd6ed61
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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 >>)"
sound/firewire/amdtp-stream.c: note: in included file:
include/linux/firewire.h:434:52: sparse: sparse: attribute __transparent_union__ applied to non-union type
>> sound/firewire/amdtp-stream.c:1097:43: sparse: sparse: incorrect type in argument 6 (invalid types) @@ expected union fw_iso_callback_t [usertype] callback @@ got void ( * )( ... ) @@
>> sound/firewire/amdtp-stream.c:1097:43: sparse: expected union fw_iso_callback_t [usertype] callback
>> sound/firewire/amdtp-stream.c:1097:43: sparse: got void ( * )( ... )
--
sound/firewire/isight.c: note: in included file:
include/linux/firewire.h:434:52: sparse: sparse: attribute __transparent_union__ applied to non-union type
>> sound/firewire/isight.c:365:52: sparse: sparse: incorrect type in argument 6 (invalid types) @@ expected union fw_iso_callback_t [usertype] callback @@ got void ( * )( ... ) @@
>> sound/firewire/isight.c:365:52: sparse: expected union fw_iso_callback_t [usertype] callback
>> sound/firewire/isight.c:365:52: sparse: got void ( * )( ... )
vim +1097 sound/firewire/amdtp-stream.c
7b3b0d8583c926 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1023
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1024 /**
be4a28940a9973 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1025 * amdtp_stream_start - start transferring packets
be4a28940a9973 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1026 * @s: the AMDTP stream to start
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1027 * @channel: the isochronous channel on the bus
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1028 * @speed: firewire speed code
acfedcbe1ce4c6 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1029 * @start_cycle: the isochronous cycle to start the context. Start immediately
acfedcbe1ce4c6 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1030 * if negative value is given.
af86b0b1f4b045 sound/firewire/amdtp-stream.c Takashi Sakamoto 2020-05-08 1031 * @queue_size: The number of packets in the queue.
af86b0b1f4b045 sound/firewire/amdtp-stream.c Takashi Sakamoto 2020-05-08 1032 * @idle_irq_interval: the interval to queue packet during initial state.
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1033 *
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1034 * The stream cannot be started until it has been configured with
be4a28940a9973 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1035 * amdtp_stream_set_parameters() and it must be started before any PCM or MIDI
be4a28940a9973 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1036 * device can be started.
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1037 */
a0e023317e2d55 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1038 static int amdtp_stream_start(struct amdtp_stream *s, int channel, int speed,
af86b0b1f4b045 sound/firewire/amdtp-stream.c Takashi Sakamoto 2020-05-08 1039 int start_cycle, unsigned int queue_size,
af86b0b1f4b045 sound/firewire/amdtp-stream.c Takashi Sakamoto 2020-05-08 1040 unsigned int idle_irq_interval)
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1041 {
2472cfb3232caf sound/firewire/amdtp-stream.c Takashi Sakamoto 2020-05-08 1042 bool is_irq_target = (s == s->domain->irq_target);
d3d10a4a1b1950 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-21 1043 unsigned int ctx_header_size;
f11453c7cc010d sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-22 1044 unsigned int max_ctx_payload_size;
2b3fc456febf54 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1045 enum dma_data_direction dir;
7ab566453fe32d sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1046 int type, tag, err;
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1047
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1048 mutex_lock(&s->mutex);
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1049
be4a28940a9973 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1050 if (WARN_ON(amdtp_stream_running(s) ||
4b7da117e5e1cd sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1051 (s->data_block_quadlets < 1))) {
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1052 err = -EBADFD;
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1053 goto err_unlock;
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1054 }
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1055
d3d10a4a1b1950 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-21 1056 if (s->direction == AMDTP_IN_STREAM) {
60dd49298ec580 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1057 // NOTE: IT context should be used for constant IRQ.
60dd49298ec580 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1058 if (is_irq_target) {
60dd49298ec580 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1059 err = -EINVAL;
60dd49298ec580 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1060 goto err_unlock;
60dd49298ec580 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1061 }
60dd49298ec580 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1062
b6bc812327aa69 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1063 s->data_block_counter = UINT_MAX;
d3d10a4a1b1950 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-21 1064 } else {
4b7da117e5e1cd sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1065 s->data_block_counter = 0;
d3d10a4a1b1950 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-21 1066 }
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1067
2b3fc456febf54 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1068 /* initialize packet buffer */
2b3fc456febf54 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1069 if (s->direction == AMDTP_IN_STREAM) {
2b3fc456febf54 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1070 dir = DMA_FROM_DEVICE;
2b3fc456febf54 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1071 type = FW_ISO_CONTEXT_RECEIVE;
f11453c7cc010d sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-22 1072 if (!(s->flags & CIP_NO_HEADER))
f11453c7cc010d sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-22 1073 ctx_header_size = IR_CTX_HEADER_SIZE_CIP;
f11453c7cc010d sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-22 1074 else
f11453c7cc010d sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-22 1075 ctx_header_size = IR_CTX_HEADER_SIZE_NO_CIP;
b18f0cfaf16bee sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-24 1076
b18f0cfaf16bee sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-24 1077 max_ctx_payload_size = amdtp_stream_get_max_payload(s) -
b18f0cfaf16bee sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-24 1078 ctx_header_size;
2b3fc456febf54 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1079 } else {
2b3fc456febf54 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1080 dir = DMA_TO_DEVICE;
2b3fc456febf54 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1081 type = FW_ISO_CONTEXT_TRANSMIT;
df9160b9149912 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-21 1082 ctx_header_size = 0; // No effect for IT context.
f11453c7cc010d sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-22 1083
b18f0cfaf16bee sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-24 1084 max_ctx_payload_size = amdtp_stream_get_max_payload(s);
b18f0cfaf16bee sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-24 1085 if (!(s->flags & CIP_NO_HEADER))
b18f0cfaf16bee sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-24 1086 max_ctx_payload_size -= IT_PKT_HEADER_SIZE_CIP;
b18f0cfaf16bee sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-24 1087 }
f11453c7cc010d sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-22 1088
af86b0b1f4b045 sound/firewire/amdtp-stream.c Takashi Sakamoto 2020-05-08 1089 err = iso_packets_buffer_init(&s->buffer, s->unit, queue_size,
f11453c7cc010d sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-22 1090 max_ctx_payload_size, dir);
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1091 if (err < 0)
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1092 goto err_unlock;
af86b0b1f4b045 sound/firewire/amdtp-stream.c Takashi Sakamoto 2020-05-08 1093 s->queue_size = queue_size;
60dd49298ec580 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1094
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1095 s->context = fw_iso_context_create(fw_parent_device(s->unit)->card,
d3d10a4a1b1950 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-21 1096 type, channel, speed, ctx_header_size,
2472cfb3232caf sound/firewire/amdtp-stream.c Takashi Sakamoto 2020-05-08 @1097 amdtp_stream_first_callback, s);
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1098 if (IS_ERR(s->context)) {
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1099 err = PTR_ERR(s->context);
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1100 if (err == -EBUSY)
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1101 dev_err(&s->unit->device,
be4a28940a9973 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1102 "no free stream on this controller\n");
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1103 goto err_buffer;
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1104 }
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1105
be4a28940a9973 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1106 amdtp_stream_update(s);
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1107
d3d10a4a1b1950 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-21 1108 if (s->direction == AMDTP_IN_STREAM) {
f11453c7cc010d sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-22 1109 s->ctx_data.tx.max_ctx_payload_length = max_ctx_payload_size;
d3d10a4a1b1950 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-21 1110 s->ctx_data.tx.ctx_header_size = ctx_header_size;
d3d10a4a1b1950 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-21 1111 }
52759c0963510a sound/firewire/amdtp-stream.c Takashi Sakamoto 2018-04-29 1112
3b196c394dd9f8 sound/firewire/amdtp-stream.c Takashi Sakamoto 2017-03-31 1113 if (s->flags & CIP_NO_HEADER)
3b196c394dd9f8 sound/firewire/amdtp-stream.c Takashi Sakamoto 2017-03-31 1114 s->tag = TAG_NO_CIP_HEADER;
3b196c394dd9f8 sound/firewire/amdtp-stream.c Takashi Sakamoto 2017-03-31 1115 else
3b196c394dd9f8 sound/firewire/amdtp-stream.c Takashi Sakamoto 2017-03-31 1116 s->tag = TAG_CIP;
3b196c394dd9f8 sound/firewire/amdtp-stream.c Takashi Sakamoto 2017-03-31 1117
a0e023317e2d55 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1118 s->pkt_descs = kcalloc(s->queue_size, sizeof(*s->pkt_descs),
04130cf8e296bf sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-07-22 1119 GFP_KERNEL);
04130cf8e296bf sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-07-22 1120 if (!s->pkt_descs) {
04130cf8e296bf sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-07-22 1121 err = -ENOMEM;
04130cf8e296bf sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-07-22 1122 goto err_context;
04130cf8e296bf sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-07-22 1123 }
04130cf8e296bf sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-07-22 1124
ec00f5e444706c sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1125 s->packet_index = 0;
4b7da117e5e1cd sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1126 do {
6007bf5460cc3b sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-24 1127 struct fw_iso_packet params;
e229853d505d7a sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1128
b18f0cfaf16bee sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-24 1129 if (s->direction == AMDTP_IN_STREAM) {
60dd49298ec580 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1130 err = queue_in_packet(s, ¶ms);
b18f0cfaf16bee sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-24 1131 } else {
60dd49298ec580 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1132 bool sched_irq = false;
60dd49298ec580 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1133
b18f0cfaf16bee sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-24 1134 params.header_length = 0;
b18f0cfaf16bee sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-24 1135 params.payload_length = 0;
60dd49298ec580 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1136
60dd49298ec580 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1137 if (is_irq_target) {
60dd49298ec580 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1138 sched_irq = !((s->packet_index + 1) %
60dd49298ec580 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1139 idle_irq_interval);
60dd49298ec580 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1140 }
60dd49298ec580 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1141
e229853d505d7a sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1142 err = queue_out_packet(s, ¶ms, sched_irq);
b18f0cfaf16bee sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-05-24 1143 }
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1144 if (err < 0)
04130cf8e296bf sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-07-22 1145 goto err_pkt_descs;
4b7da117e5e1cd sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1146 } while (s->packet_index > 0);
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1147
2b3fc456febf54 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1148 /* NOTE: TAG1 matches CIP. This just affects in stream. */
7ab566453fe32d sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1149 tag = FW_ISO_CONTEXT_MATCH_TAG1;
3b196c394dd9f8 sound/firewire/amdtp-stream.c Takashi Sakamoto 2017-03-31 1150 if ((s->flags & CIP_EMPTY_WITH_TAG0) || (s->flags & CIP_NO_HEADER))
7ab566453fe32d sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1151 tag |= FW_ISO_CONTEXT_MATCH_TAG0;
7ab566453fe32d sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1152
7b3b0d8583c926 sound/firewire/amdtp.c Takashi Sakamoto 2014-04-25 1153 s->callbacked = false;
acfedcbe1ce4c6 sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-10-18 1154 err = fw_iso_context_start(s->context, start_cycle, 0, tag);
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1155 if (err < 0)
04130cf8e296bf sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-07-22 1156 goto err_pkt_descs;
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1157
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1158 mutex_unlock(&s->mutex);
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1159
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1160 return 0;
04130cf8e296bf sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-07-22 1161 err_pkt_descs:
04130cf8e296bf sound/firewire/amdtp-stream.c Takashi Sakamoto 2019-07-22 1162 kfree(s->pkt_descs);
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1163 err_context:
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1164 fw_iso_context_destroy(s->context);
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1165 s->context = ERR_PTR(-1);
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1166 err_buffer:
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1167 iso_packets_buffer_destroy(&s->buffer, s->unit);
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1168 err_unlock:
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1169 mutex_unlock(&s->mutex);
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1170
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1171 return err;
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1172 }
31ef9134eb5263 sound/firewire/amdtp.c Clemens Ladisch 2011-03-15 1173
:::::: The code at line 1097 was first introduced by commit
:::::: 2472cfb3232caf8f68e4d93ae830c569b0bbc25b ALSA: firewire-lib: add reference to domain structure from stream structure
:::::: TO: Takashi Sakamoto <o-takashi(a)sakamocchi.jp>
:::::: CC: Takashi Iwai <tiwai(a)suse.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[linux-arm:clearfog 10/11] drivers/pci/pcie/portdrv_core.c:328 pcie_port_device_register() warn: inconsistent indenting
by kernel test robot
tree: git://git.armlinux.org.uk/~rmk/linux-arm clearfog
head: 9573fbf36e132a161223d54b40b42532092f25da
commit: fa41a0502c6bc6d3e793226c597b9762b181c76b [10/11] mvebu/clearfog pcie updates
config: microblaze-randconfig-m031-20201019 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/pci/pcie/portdrv_core.c:328 pcie_port_device_register() warn: inconsistent indenting
Old smatch warnings:
drivers/pci/pcie/portdrv_core.c:341 pcie_port_device_register() warn: inconsistent indenting
vim +328 drivers/pci/pcie/portdrv_core.c
308
309 /**
310 * pcie_port_device_register - register PCI Express port
311 * @dev: PCI Express port to register
312 *
313 * Allocate the port extension structure and register services associated with
314 * the port.
315 */
316 int pcie_port_device_register(struct pci_dev *dev)
317 {
318 int status, capabilities, i, nr_service;
319 int irqs[PCIE_PORT_DEVICE_MAXSERVICES];
320
321 /* Enable PCI Express port device */
322 status = pci_enable_device(dev);
323 if (status)
324 return status;
325
326 /* Get and check PCI Express port services */
327 capabilities = get_port_device_capability(dev);
> 328 dev_info(&dev->dev, "PCIe capabilities: 0x%x\n", capabilities);
329 if (!capabilities)
330 return 0;
331
332 pci_set_master(dev);
333 /*
334 * Initialize service irqs. Don't use service devices that
335 * require interrupts if there is no way to generate them.
336 * However, some drivers may have a polling mode (e.g. pciehp_poll_mode)
337 * that can be used in the absence of irqs. Allow them to determine
338 * if that is to be used.
339 */
340 status = pcie_init_service_irqs(dev, irqs, capabilities);
341 dev_info(&dev->dev, "init_service_irqs: %d\n", status);
342 if (status) {
343 capabilities &= PCIE_PORT_SERVICE_HP;
344 if (!capabilities)
345 goto error_disable;
346 }
347
348 /* Allocate child services if any */
349 status = -ENODEV;
350 nr_service = 0;
351 for (i = 0; i < PCIE_PORT_DEVICE_MAXSERVICES; i++) {
352 int service = 1 << i;
353 if (!(capabilities & service))
354 continue;
355 if (!pcie_device_init(dev, service, irqs[i]))
356 nr_service++;
357 }
358 if (!nr_service)
359 goto error_cleanup_irqs;
360
361 return 0;
362
363 error_cleanup_irqs:
364 pci_free_irq_vectors(dev);
365 error_disable:
366 pci_disable_device(dev);
367 return status;
368 }
369
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[linux-arm:zii 1/43] drivers/net/ethernet/mediatek/mtk_eth_soc.c:437:27: error: 'eth' undeclared
by kernel test robot
tree: git://git.armlinux.org.uk/~rmk/linux-arm zii
head: 6f85be7ce3fa31f378cda12c46b787dbfd1b6bc7
commit: 5fbc9160229b7f0144db0ad1159d214bc4cd7787 [1/43] net: mtk_eth_soc: use resolved link config for PCS PHY
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-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
git remote add linux-arm git://git.armlinux.org.uk/~rmk/linux-arm
git fetch --no-tags linux-arm zii
git checkout 5fbc9160229b7f0144db0ad1159d214bc4cd7787
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
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 >>):
In file included from drivers/net/ethernet/mediatek/mtk_eth_soc.c:23:
drivers/net/ethernet/mediatek/mtk_eth_soc.c: In function 'mtk_mac_link_up':
>> drivers/net/ethernet/mediatek/mtk_eth_soc.c:437:27: error: 'eth' undeclared (first use in this function)
437 | int sid = (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_SGMII)) ?
| ^~~
drivers/net/ethernet/mediatek/mtk_eth_soc.h:761:36: note: in definition of macro 'MTK_HAS_CAPS'
761 | #define MTK_HAS_CAPS(caps, _x) (((caps) & (_x)) == (_x))
| ^~~~
drivers/net/ethernet/mediatek/mtk_eth_soc.c:437:27: note: each undeclared identifier is reported only once for each function it appears in
437 | int sid = (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_SGMII)) ?
| ^~~
drivers/net/ethernet/mediatek/mtk_eth_soc.h:761:36: note: in definition of macro 'MTK_HAS_CAPS'
761 | #define MTK_HAS_CAPS(caps, _x) (((caps) & (_x)) == (_x))
| ^~~~
vim +/eth +437 drivers/net/ethernet/mediatek/mtk_eth_soc.c
425
426 static void mtk_mac_link_up(struct phylink_config *config,
427 struct phy_device *phy,
428 unsigned int mode, phy_interface_t interface,
429 int speed, int duplex, bool tx_pause, bool rx_pause)
430 {
431 struct mtk_mac *mac = container_of(config, struct mtk_mac,
432 phylink_config);
433 u32 mcr = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id));
434
435 if (phy_interface_mode_is_8023z(interface)) {
436 /* Decide how GMAC and SGMIISYS be mapped */
> 437 int sid = (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_SGMII)) ?
438 0 : mac->id;
439 mtk_sgmii_link_up(eth->sgmii, sid, speed, duplex);
440 }
441
442 mcr &= ~(MAC_MCR_SPEED_100 | MAC_MCR_SPEED_1000 |
443 MAC_MCR_FORCE_DPX | MAC_MCR_FORCE_TX_FC |
444 MAC_MCR_FORCE_RX_FC);
445
446 /* Configure speed */
447 switch (speed) {
448 case SPEED_2500:
449 case SPEED_1000:
450 mcr |= MAC_MCR_SPEED_1000;
451 break;
452 case SPEED_100:
453 mcr |= MAC_MCR_SPEED_100;
454 break;
455 }
456
457 /* Configure duplex */
458 if (duplex == DUPLEX_FULL)
459 mcr |= MAC_MCR_FORCE_DPX;
460
461 /* Configure pause modes - phylink will avoid these for half duplex */
462 if (tx_pause)
463 mcr |= MAC_MCR_FORCE_TX_FC;
464 if (rx_pause)
465 mcr |= MAC_MCR_FORCE_RX_FC;
466
467 mcr |= MAC_MCR_TX_EN | MAC_MCR_RX_EN;
468 mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
469 }
470
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months