[chrome-os:chromeos-4.19 7/7] drivers/gpu/arm/bifrost/mali_kbase_mem.c:839:6: error: no previous prototype for 'kbase_region_tracker_has_allocs'
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.19
head: d2a70c94acf9ec8c2f7b73c0b000d2303de18781
commit: d2a70c94acf9ec8c2f7b73c0b000d2303de18781 [7/7] CHROMIUM: MALI: GPUSWERRATA-1078
config: arm64-chromiumos-mediatek-customedconfig-chrome-os:chromeos-4.19:d2a70c94acf9ec8c2f7b73c0b000d2303de18781 (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 chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-4.19
git checkout d2a70c94acf9ec8c2f7b73c0b000d2303de18781
# 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 >>):
>> drivers/gpu/arm/bifrost/mali_kbase_mem.c:839:6: error: no previous prototype for 'kbase_region_tracker_has_allocs' [-Werror=missing-prototypes]
839 | bool kbase_region_tracker_has_allocs(struct kbase_context *kctx)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/arm/bifrost/mali_kbase_defs.h:37,
from drivers/gpu/arm/bifrost/mali_kbase.h:57,
from drivers/gpu/arm/bifrost/mali_kbase_mem.c:37:
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:625:33: error: 'base_hw_issues_model_tE2x' defined but not used [-Werror=unused-const-variable=]
625 | static const enum base_hw_issue base_hw_issues_model_tE2x[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:615:33: error: 'base_hw_issues_tE2x_r0p0' defined but not used [-Werror=unused-const-variable=]
615 | static const enum base_hw_issue base_hw_issues_tE2x_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:607:33: error: 'base_hw_issues_model_tTUx' defined but not used [-Werror=unused-const-variable=]
607 | static const enum base_hw_issue base_hw_issues_model_tTUx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:600:33: error: 'base_hw_issues_tTUx_r0p0' defined but not used [-Werror=unused-const-variable=]
600 | static const enum base_hw_issue base_hw_issues_tTUx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:592:33: error: 'base_hw_issues_model_tVAx' defined but not used [-Werror=unused-const-variable=]
592 | static const enum base_hw_issue base_hw_issues_model_tVAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:585:33: error: 'base_hw_issues_tVAx_r0p0' defined but not used [-Werror=unused-const-variable=]
585 | static const enum base_hw_issue base_hw_issues_tVAx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:577:33: error: 'base_hw_issues_model_tGRx' defined but not used [-Werror=unused-const-variable=]
577 | static const enum base_hw_issue base_hw_issues_model_tGRx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:570:33: error: 'base_hw_issues_tGRx_r0p0' defined but not used [-Werror=unused-const-variable=]
570 | static const enum base_hw_issue base_hw_issues_tGRx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:562:33: error: 'base_hw_issues_model_tODx' defined but not used [-Werror=unused-const-variable=]
562 | static const enum base_hw_issue base_hw_issues_model_tODx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:555:33: error: 'base_hw_issues_tODx_r0p0' defined but not used [-Werror=unused-const-variable=]
555 | static const enum base_hw_issue base_hw_issues_tODx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:545:33: error: 'base_hw_issues_model_tDUx' defined but not used [-Werror=unused-const-variable=]
545 | static const enum base_hw_issue base_hw_issues_model_tDUx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:535:33: error: 'base_hw_issues_tDUx_r0p0' defined but not used [-Werror=unused-const-variable=]
535 | static const enum base_hw_issue base_hw_issues_tDUx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:522:33: error: 'base_hw_issues_lBEx_r1p1' defined but not used [-Werror=unused-const-variable=]
522 | static const enum base_hw_issue base_hw_issues_lBEx_r1p1[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:508:33: error: 'base_hw_issues_lBEx_r1p0' defined but not used [-Werror=unused-const-variable=]
508 | static const enum base_hw_issue base_hw_issues_lBEx_r1p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:496:33: error: 'base_hw_issues_model_tBEx' defined but not used [-Werror=unused-const-variable=]
496 | static const enum base_hw_issue base_hw_issues_model_tBEx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:483:33: error: 'base_hw_issues_tBEx_r1p1' defined but not used [-Werror=unused-const-variable=]
483 | static const enum base_hw_issue base_hw_issues_tBEx_r1p1[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:470:33: error: 'base_hw_issues_tBEx_r1p0' defined but not used [-Werror=unused-const-variable=]
470 | static const enum base_hw_issue base_hw_issues_tBEx_r1p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:457:33: error: 'base_hw_issues_tBEx_r0p1' defined but not used [-Werror=unused-const-variable=]
457 | static const enum base_hw_issue base_hw_issues_tBEx_r0p1[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:443:33: error: 'base_hw_issues_tBEx_r0p0' defined but not used [-Werror=unused-const-variable=]
443 | static const enum base_hw_issue base_hw_issues_tBEx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:431:33: error: 'base_hw_issues_model_tNAx' defined but not used [-Werror=unused-const-variable=]
431 | static const enum base_hw_issue base_hw_issues_model_tNAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:416:33: error: 'base_hw_issues_tNAx_r0p1' defined but not used [-Werror=unused-const-variable=]
416 | static const enum base_hw_issue base_hw_issues_tNAx_r0p1[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:400:33: error: 'base_hw_issues_tNAx_r0p0' defined but not used [-Werror=unused-const-variable=]
400 | static const enum base_hw_issue base_hw_issues_tNAx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:388:33: error: 'base_hw_issues_model_tTRx' defined but not used [-Werror=unused-const-variable=]
388 | static const enum base_hw_issue base_hw_issues_model_tTRx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:373:33: error: 'base_hw_issues_tTRx_r0p2' defined but not used [-Werror=unused-const-variable=]
373 | static const enum base_hw_issue base_hw_issues_tTRx_r0p2[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:357:33: error: 'base_hw_issues_tTRx_r0p1' defined but not used [-Werror=unused-const-variable=]
357 | static const enum base_hw_issue base_hw_issues_tTRx_r0p1[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:341:33: error: 'base_hw_issues_tTRx_r0p0' defined but not used [-Werror=unused-const-variable=]
341 | static const enum base_hw_issue base_hw_issues_tTRx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:331:33: error: 'base_hw_issues_model_tGOx' defined but not used [-Werror=unused-const-variable=]
331 | static const enum base_hw_issue base_hw_issues_model_tGOx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:319:33: error: 'base_hw_issues_tGOx_r1p0' defined but not used [-Werror=unused-const-variable=]
319 | static const enum base_hw_issue base_hw_issues_tGOx_r1p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:307:33: error: 'base_hw_issues_tGOx_r0p0' defined but not used [-Werror=unused-const-variable=]
307 | static const enum base_hw_issue base_hw_issues_tGOx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:297:33: error: 'base_hw_issues_model_tNOx' defined but not used [-Werror=unused-const-variable=]
297 | static const enum base_hw_issue base_hw_issues_model_tNOx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:285:33: error: 'base_hw_issues_tNOx_r0p0' defined but not used [-Werror=unused-const-variable=]
285 | static const enum base_hw_issue base_hw_issues_tNOx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_issues.h:275:33: error: 'base_hw_issues_model_tDVx' defined but not used [-Werror=unused-const-variable=]
275 | static const enum base_hw_issue base_hw_issues_model_tDVx[] = {
vim +/kbase_region_tracker_has_allocs +839 drivers/gpu/arm/bifrost/mali_kbase_mem.c
822
823 /**
824 * Determine if any allocations have been made on a context's region tracker
825 * @kctx: KBase context
826 *
827 * Check the context to determine if any allocations have been made yet from
828 * any of its zones. This check should be done before resizing a zone, e.g. to
829 * make space to add a second zone.
830 *
831 * Whilst a zone without allocations can be resized whilst other zones have
832 * allocations, we still check all of @kctx 's zones anyway: this is a stronger
833 * guarantee and should be adhered to when creating new zones anyway.
834 *
835 * Allocations from kbdev zones are not counted.
836 *
837 * Return: true if any allocs exist on any zone, false otherwise
838 */
> 839 bool kbase_region_tracker_has_allocs(struct kbase_context *kctx)
840 {
841 unsigned int zone_idx;
842
843 lockdep_assert_held(&kctx->reg_lock);
844
845 for (zone_idx = 0; zone_idx < KBASE_REG_ZONE_MAX; ++zone_idx) {
846 struct kbase_reg_zone *zone;
847 struct kbase_va_region *reg;
848 u64 zone_base_addr;
849 unsigned long zone_bits = KBASE_REG_ZONE(zone_idx);
850 unsigned long reg_zone;
851
852 zone = kbase_ctx_reg_zone_get(kctx, zone_bits);
853 zone_base_addr = zone->base_pfn << PAGE_SHIFT;
854
855 reg = kbase_region_tracker_find_region_base_address(
856 kctx, zone_base_addr);
857
858 if (!zone->va_size_pages) {
859 WARN(reg,
860 "Should not have found a region that starts at 0x%.16llx for zone 0x%lx",
861 (unsigned long long)zone_base_addr, zone_bits);
862 continue;
863 }
864
865 if (WARN(!reg,
866 "There should always be a region that starts at 0x%.16llx for zone 0x%lx, couldn't find it",
867 (unsigned long long)zone_base_addr, zone_bits))
868 return true; /* Safest return value */
869
870 reg_zone = reg->flags & KBASE_REG_ZONE_MASK;
871 if (WARN(reg_zone != zone_bits,
872 "The region that starts at 0x%.16llx should be in zone 0x%lx but was found in the wrong zone 0x%lx",
873 (unsigned long long)zone_base_addr, zone_bits,
874 reg_zone))
875 return true; /* Safest return value */
876
877 /* Unless the region is completely free, of the same size as
878 * the original zone, then it has allocs
879 */
880 if ((!(reg->flags & KBASE_REG_FREE)) ||
881 (reg->nr_pages != zone->va_size_pages))
882 return true;
883 }
884
885 /* All zones are the same size as originally made, so there are no
886 * allocs
887 */
888 return false;
889 }
890
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
drivers/net/wan/fsl_ucc_hdlc.c:458:33: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ac91e6c6033ebc12c5c1e4aa171b81a662bd70f
commit: 8f28ca6bd8211214faf717677bbffe375c2a6072 iomap: constify ioreadX() iomem argument (as in generic implementation)
date: 9 months ago
config: powerpc-allyesconfig (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-341-g8af24329-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 8f28ca6bd8211214faf717677bbffe375c2a6072
# 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__' W=1 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/net/wan/fsl_ucc_hdlc.c:305:57: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:305:57: sparse: expected void [noderef] __iomem *
drivers/net/wan/fsl_ucc_hdlc.c:305:57: sparse: got restricted __be16 *
drivers/net/wan/fsl_ucc_hdlc.c:307:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got restricted __be32 * @@
drivers/net/wan/fsl_ucc_hdlc.c:307:46: sparse: expected void [noderef] __iomem *
drivers/net/wan/fsl_ucc_hdlc.c:307:46: sparse: got restricted __be32 *
drivers/net/wan/fsl_ucc_hdlc.c:316:57: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:316:57: sparse: expected void [noderef] __iomem *
drivers/net/wan/fsl_ucc_hdlc.c:316:57: sparse: got restricted __be16 *
drivers/net/wan/fsl_ucc_hdlc.c:318:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got restricted __be32 * @@
drivers/net/wan/fsl_ucc_hdlc.c:318:46: sparse: expected void [noderef] __iomem *
drivers/net/wan/fsl_ucc_hdlc.c:318:46: sparse: got restricted __be32 *
drivers/net/wan/fsl_ucc_hdlc.c:368:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got restricted __be16 [usertype] @@
drivers/net/wan/fsl_ucc_hdlc.c:368:29: sparse: expected unsigned short [usertype]
drivers/net/wan/fsl_ucc_hdlc.c:368:29: sparse: got restricted __be16 [usertype]
drivers/net/wan/fsl_ucc_hdlc.c:375:36: sparse: sparse: restricted __be16 degrades to integer
drivers/net/wan/fsl_ucc_hdlc.c:398:12: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct qe_bd [noderef] __iomem *bd @@ got struct qe_bd *curtx_bd @@
drivers/net/wan/fsl_ucc_hdlc.c:398:12: sparse: expected struct qe_bd [noderef] __iomem *bd
drivers/net/wan/fsl_ucc_hdlc.c:398:12: sparse: got struct qe_bd *curtx_bd
drivers/net/wan/fsl_ucc_hdlc.c:421:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct qe_bd [noderef] __iomem *[assigned] bd @@ got struct qe_bd *tx_bd_base @@
drivers/net/wan/fsl_ucc_hdlc.c:421:20: sparse: expected struct qe_bd [noderef] __iomem *[assigned] bd
drivers/net/wan/fsl_ucc_hdlc.c:421:20: sparse: got struct qe_bd *tx_bd_base
drivers/net/wan/fsl_ucc_hdlc.c:423:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/net/wan/fsl_ucc_hdlc.c:423:16: sparse: struct qe_bd [noderef] __iomem *
drivers/net/wan/fsl_ucc_hdlc.c:423:16: sparse: struct qe_bd *
>> drivers/net/wan/fsl_ucc_hdlc.c:458:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:502:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:524:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:548:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:592:67: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:607:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:850:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct qe_mux *qe_mux_reg @@ got struct qe_mux [noderef] __iomem * @@
>> drivers/net/wan/fsl_ucc_hdlc.c:853:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got restricted __be32 * @@
drivers/net/wan/fsl_ucc_hdlc.c:854:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got restricted __be32 * @@
drivers/net/wan/fsl_ucc_hdlc.c:857:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got restricted __be32 * @@
drivers/net/wan/fsl_ucc_hdlc.c:860:37: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *s @@ got restricted __be32 * @@
drivers/net/wan/fsl_ucc_hdlc.c:865:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct qe_mux *qe_mux_reg @@ got struct qe_mux [noderef] __iomem * @@
drivers/net/wan/fsl_ucc_hdlc.c:867:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *d @@ got restricted __be32 * @@
drivers/net/wan/fsl_ucc_hdlc.c:869:40: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got restricted __be32 * @@
drivers/net/wan/fsl_ucc_hdlc.c:870:40: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got restricted __be32 * @@
drivers/net/wan/fsl_ucc_hdlc.c:872:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got restricted __be32 * @@
drivers/net/wan/fsl_ucc_hdlc.c:992:57: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:994:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got restricted __be32 * @@
drivers/net/wan/fsl_ucc_hdlc.c:1003:57: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got restricted __be16 * @@
drivers/net/wan/fsl_ucc_hdlc.c:1005:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got restricted __be32 * @@
drivers/net/wan/fsl_ucc_hdlc.c:408:35: sparse: sparse: dereference of noderef expression
drivers/net/wan/fsl_ucc_hdlc.c:408:35: sparse: sparse: dereference of noderef expression
drivers/net/wan/fsl_ucc_hdlc.c:723:29: sparse: sparse: dereference of noderef expression
drivers/net/wan/fsl_ucc_hdlc.c:814:21: sparse: sparse: dereference of noderef expression
drivers/net/wan/fsl_ucc_hdlc.c:1020:29: sparse: sparse: dereference of noderef expression
vim +458 drivers/net/wan/fsl_ucc_hdlc.c
ba59d5705825fb Mathias Thore 2018-10-22 446
c19b6d246a3562 Zhao Qiang 2016-06-06 447 static int hdlc_tx_done(struct ucc_hdlc_private *priv)
c19b6d246a3562 Zhao Qiang 2016-06-06 448 {
c19b6d246a3562 Zhao Qiang 2016-06-06 449 /* Start from the next BD that should be filled */
c19b6d246a3562 Zhao Qiang 2016-06-06 450 struct net_device *dev = priv->ndev;
2e7ad56aa54778 Mathias Thore 2018-11-07 451 unsigned int bytes_sent = 0;
2e7ad56aa54778 Mathias Thore 2018-11-07 452 int howmany = 0;
c19b6d246a3562 Zhao Qiang 2016-06-06 453 struct qe_bd *bd; /* BD pointer */
c19b6d246a3562 Zhao Qiang 2016-06-06 454 u16 bd_status;
ba59d5705825fb Mathias Thore 2018-10-22 455 int tx_restart = 0;
c19b6d246a3562 Zhao Qiang 2016-06-06 456
c19b6d246a3562 Zhao Qiang 2016-06-06 457 bd = priv->dirty_tx;
c19b6d246a3562 Zhao Qiang 2016-06-06 @458 bd_status = ioread16be(&bd->status);
c19b6d246a3562 Zhao Qiang 2016-06-06 459
c19b6d246a3562 Zhao Qiang 2016-06-06 460 /* Normal processing. */
c19b6d246a3562 Zhao Qiang 2016-06-06 461 while ((bd_status & T_R_S) == 0) {
c19b6d246a3562 Zhao Qiang 2016-06-06 462 struct sk_buff *skb;
c19b6d246a3562 Zhao Qiang 2016-06-06 463
ba59d5705825fb Mathias Thore 2018-10-22 464 if (bd_status & T_UN_S) { /* Underrun */
ba59d5705825fb Mathias Thore 2018-10-22 465 dev->stats.tx_fifo_errors++;
ba59d5705825fb Mathias Thore 2018-10-22 466 tx_restart = 1;
ba59d5705825fb Mathias Thore 2018-10-22 467 }
ba59d5705825fb Mathias Thore 2018-10-22 468 if (bd_status & T_CT_S) { /* Carrier lost */
ba59d5705825fb Mathias Thore 2018-10-22 469 dev->stats.tx_carrier_errors++;
ba59d5705825fb Mathias Thore 2018-10-22 470 tx_restart = 1;
ba59d5705825fb Mathias Thore 2018-10-22 471 }
ba59d5705825fb Mathias Thore 2018-10-22 472
c19b6d246a3562 Zhao Qiang 2016-06-06 473 /* BD contains already transmitted buffer. */
c19b6d246a3562 Zhao Qiang 2016-06-06 474 /* Handle the transmitted buffer and release */
c19b6d246a3562 Zhao Qiang 2016-06-06 475 /* the BD to be used with the current frame */
c19b6d246a3562 Zhao Qiang 2016-06-06 476
c19b6d246a3562 Zhao Qiang 2016-06-06 477 skb = priv->tx_skbuff[priv->skb_dirtytx];
c19b6d246a3562 Zhao Qiang 2016-06-06 478 if (!skb)
c19b6d246a3562 Zhao Qiang 2016-06-06 479 break;
2e7ad56aa54778 Mathias Thore 2018-11-07 480 howmany++;
2e7ad56aa54778 Mathias Thore 2018-11-07 481 bytes_sent += skb->len;
c19b6d246a3562 Zhao Qiang 2016-06-06 482 dev->stats.tx_packets++;
c19b6d246a3562 Zhao Qiang 2016-06-06 483 memset(priv->tx_buffer +
c19b6d246a3562 Zhao Qiang 2016-06-06 484 (be32_to_cpu(bd->buf) - priv->dma_tx_addr),
c19b6d246a3562 Zhao Qiang 2016-06-06 485 0, skb->len);
7c3850adbcccc2 Yang Wei 2019-02-06 486 dev_consume_skb_irq(skb);
c19b6d246a3562 Zhao Qiang 2016-06-06 487
c19b6d246a3562 Zhao Qiang 2016-06-06 488 priv->tx_skbuff[priv->skb_dirtytx] = NULL;
c19b6d246a3562 Zhao Qiang 2016-06-06 489 priv->skb_dirtytx =
c19b6d246a3562 Zhao Qiang 2016-06-06 490 (priv->skb_dirtytx +
c19b6d246a3562 Zhao Qiang 2016-06-06 491 1) & TX_RING_MOD_MASK(TX_BD_RING_LEN);
c19b6d246a3562 Zhao Qiang 2016-06-06 492
c19b6d246a3562 Zhao Qiang 2016-06-06 493 /* We freed a buffer, so now we can restart transmission */
c19b6d246a3562 Zhao Qiang 2016-06-06 494 if (netif_queue_stopped(dev))
c19b6d246a3562 Zhao Qiang 2016-06-06 495 netif_wake_queue(dev);
c19b6d246a3562 Zhao Qiang 2016-06-06 496
c19b6d246a3562 Zhao Qiang 2016-06-06 497 /* Advance the confirmation BD pointer */
c19b6d246a3562 Zhao Qiang 2016-06-06 498 if (!(bd_status & T_W_S))
c19b6d246a3562 Zhao Qiang 2016-06-06 499 bd += 1;
c19b6d246a3562 Zhao Qiang 2016-06-06 500 else
c19b6d246a3562 Zhao Qiang 2016-06-06 501 bd = priv->tx_bd_base;
c19b6d246a3562 Zhao Qiang 2016-06-06 502 bd_status = ioread16be(&bd->status);
c19b6d246a3562 Zhao Qiang 2016-06-06 503 }
c19b6d246a3562 Zhao Qiang 2016-06-06 504 priv->dirty_tx = bd;
c19b6d246a3562 Zhao Qiang 2016-06-06 505
ba59d5705825fb Mathias Thore 2018-10-22 506 if (tx_restart)
ba59d5705825fb Mathias Thore 2018-10-22 507 hdlc_tx_restart(priv);
ba59d5705825fb Mathias Thore 2018-10-22 508
2e7ad56aa54778 Mathias Thore 2018-11-07 509 netdev_completed_queue(dev, howmany, bytes_sent);
c19b6d246a3562 Zhao Qiang 2016-06-06 510 return 0;
c19b6d246a3562 Zhao Qiang 2016-06-06 511 }
c19b6d246a3562 Zhao Qiang 2016-06-06 512
:::::: The code at line 458 was first introduced by commit
:::::: c19b6d246a35627c3a69b2fa6bdece212b48214b drivers/net: support hdlc function for QE-UCC
:::::: TO: Zhao Qiang <qiang.zhao(a)nxp.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[avpatel:riscv_aia_v1 13/14] drivers/irqchip/irq-riscv-imsic.c:149:29: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot
tree: https://github.com/avpatel/linux.git riscv_aia_v1
head: 548260cfe0acea0be6f270e42d7e68832a904bb0
commit: 543ca1dce814a3933727ad2fa6c45b8c1b6183b8 [13/14] irqchip: Add RISC-V incoming MSI controller driver
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-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-341-g8af24329-dirty
# https://github.com/avpatel/linux/commit/543ca1dce814a3933727ad2fa6c45b8c1...
git remote add avpatel https://github.com/avpatel/linux.git
git fetch --no-tags avpatel riscv_aia_v1
git checkout 543ca1dce814a3933727ad2fa6c45b8c1b6183b8
# 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__' W=1 ARCH=riscv
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/irqchip/irq-riscv-imsic.c:149:29: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void * @@ got void [noderef] __iomem *msi_va @@
drivers/irqchip/irq-riscv-imsic.c:149:29: sparse: expected void *
drivers/irqchip/irq-riscv-imsic.c:149:29: sparse: got void [noderef] __iomem *msi_va
>> drivers/irqchip/irq-riscv-imsic.c:405:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *[addressable] target_msi_va @@
drivers/irqchip/irq-riscv-imsic.c:405:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/irqchip/irq-riscv-imsic.c:405:17: sparse: got void *[addressable] target_msi_va
>> drivers/irqchip/irq-riscv-imsic.c:671:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *[addressable] msi_va @@
drivers/irqchip/irq-riscv-imsic.c:671:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/irqchip/irq-riscv-imsic.c:671:17: sparse: got void *[addressable] msi_va
vim +149 drivers/irqchip/irq-riscv-imsic.c
139
140 static int imsic_get_cpu_msi_virt(unsigned int cpu, void **out_msi_va)
141 {
142 struct imsic_handler *handler;
143
144 handler = per_cpu_ptr(&imsic_handlers, cpu);
145 if (handler->msi_va)
146 return -ENODEV;
147
148 if (out_msi_va)
> 149 *out_msi_va = handler->msi_va;
150
151 return 0;
152 }
153
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[rcar:vsp1/v3u 17/69] drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c:613:5: warning: no previous prototype for 'rcar_mipi_dsi_clk_enable'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git vsp1/v3u
head: 15890c07a0b56cea8221557f4c28a2052c1b3d14
commit: 7708982fa60fe0d474f68d42d0354e1973df954d [17/69] drm: rcar-du: Add R-Car DSI driver
config: openrisc-randconfig-r001-20210519 (attached as .config)
compiler: or1k-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/kbingham/rcar.git/commit/...
git remote add rcar https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git
git fetch --no-tags rcar vsp1/v3u
git checkout 7708982fa60fe0d474f68d42d0354e1973df954d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=openrisc
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/gpu/drm/rcar-du/rcar_mipi_dsi.c:95:2: warning: this decimal constant is unsigned only in ISO C90
95 | {2100000000, 0x41}, {2150000000, 0x42}, {2200000000, 0x43},
| ^
drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c:95:2: warning: this decimal constant is unsigned only in ISO C90
drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c:96:2: warning: this decimal constant is unsigned only in ISO C90
96 | {2250000000, 0x44}, {2300000000, 0x45}, {2350000000, 0x46},
| ^
drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c:96:2: warning: this decimal constant is unsigned only in ISO C90
drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c:96:2: warning: this decimal constant is unsigned only in ISO C90
drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c:97:2: warning: this decimal constant is unsigned only in ISO C90
97 | {2400000000, 0x47}, {2450000000, 0x48}, {2500000000, 0x49},
| ^
drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c:97:2: warning: this decimal constant is unsigned only in ISO C90
drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c:97:2: warning: this decimal constant is unsigned only in ISO C90
>> drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c:613:5: warning: no previous prototype for 'rcar_mipi_dsi_clk_enable' [-Wmissing-prototypes]
613 | int rcar_mipi_dsi_clk_enable(struct drm_bridge *bridge)
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c:636:6: warning: no previous prototype for 'rcar_mipi_dsi_clk_disable' [-Wmissing-prototypes]
636 | void rcar_mipi_dsi_clk_disable(struct drm_bridge *bridge)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/rcar_mipi_dsi_clk_enable +613 drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c
608
609 /* -----------------------------------------------------------------------------
610 * Clock Setting
611 */
612
> 613 int rcar_mipi_dsi_clk_enable(struct drm_bridge *bridge)
614 {
615 struct rcar_mipi_dsi *mipi_dsi = bridge_to_rcar_mipi_dsi(bridge);
616 int ret;
617
618 reset_control_deassert(mipi_dsi->rstc);
619
620 ret = clk_prepare_enable(mipi_dsi->clocks.mod);
621 if (ret < 0)
622 return ret;
623
624 ret = clk_prepare_enable(mipi_dsi->clocks.dsi);
625 if (ret < 0)
626 return ret;
627
628 ret = rcar_mipi_dsi_startup(mipi_dsi);
629 if (ret < 0)
630 return ret;
631
632 return 0;
633 }
634 EXPORT_SYMBOL_GPL(rcar_mipi_dsi_clk_enable);
635
> 636 void rcar_mipi_dsi_clk_disable(struct drm_bridge *bridge)
637 {
638 struct rcar_mipi_dsi *mipi_dsi = bridge_to_rcar_mipi_dsi(bridge);
639
640 rcar_mipi_dsi_shutdown(mipi_dsi);
641
642 /* Disable DSI clock and reset HW */
643 clk_disable_unprepare(mipi_dsi->clocks.dsi);
644
645 clk_disable_unprepare(mipi_dsi->clocks.mod);
646
647 reset_control_assert(mipi_dsi->rstc);
648 }
649 EXPORT_SYMBOL_GPL(rcar_mipi_dsi_clk_disable);
650
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[zen-kernel-zen-kernel:5.12/futex2 1/15] kernel/sys_ni.c:154:1: warning: no previous prototype for function '__ia32_sys_futex_wait'
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.12/futex2
head: a9442359954c51f77fa365e8d15b7950c6aeb55b
commit: 64cdae0a6364c651f13a9ba90f6a8fadd7e1b9f7 [1/15] futex2: Implement wait and wake functions
config: x86_64-randconfig-b001-20210518 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ceb1ac9812cb0972cfa34cecc5e5704ae2a22063)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/zen-kernel/zen-kernel/commit/64cdae0a6364c651f13a9ba90...
git remote add zen-kernel-zen-kernel https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.12/futex2
git checkout 64cdae0a6364c651f13a9ba90f6a8fadd7e1b9f7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>):
kernel/sys_ni.c:150:1: warning: no previous prototype for function '__ia32_sys_get_robust_list' [-Wmissing-prototypes]
COND_SYSCALL(get_robust_list);
^
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:118:1: note: expanded from here
__ia32_sys_get_robust_list
^
kernel/sys_ni.c:150:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
kernel/sys_ni.c:151:1: warning: no previous prototype for function '__ia32_compat_sys_get_robust_list' [-Wmissing-prototypes]
COND_SYSCALL_COMPAT(get_robust_list);
^
arch/x86/include/asm/syscall_wrapper.h:218:2: note: expanded from macro 'COND_SYSCALL_COMPAT'
__IA32_COMPAT_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:148:2: note: expanded from macro '__IA32_COMPAT_COND_SYSCALL'
__COND_SYSCALL(ia32, compat_sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:122:1: note: expanded from here
__ia32_compat_sys_get_robust_list
^
kernel/sys_ni.c:151:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:218:2: note: expanded from macro 'COND_SYSCALL_COMPAT'
__IA32_COMPAT_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:148:2: note: expanded from macro '__IA32_COMPAT_COND_SYSCALL'
__COND_SYSCALL(ia32, compat_sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
kernel/sys_ni.c:151:1: warning: no previous prototype for function '__x32_compat_sys_get_robust_list' [-Wmissing-prototypes]
COND_SYSCALL_COMPAT(get_robust_list);
^
arch/x86/include/asm/syscall_wrapper.h:219:2: note: expanded from macro 'COND_SYSCALL_COMPAT'
__X32_COMPAT_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:175:2: note: expanded from macro '__X32_COMPAT_COND_SYSCALL'
__COND_SYSCALL(x32, compat_sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:126:1: note: expanded from here
__x32_compat_sys_get_robust_list
^
kernel/sys_ni.c:151:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:219:2: note: expanded from macro 'COND_SYSCALL_COMPAT'
__X32_COMPAT_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:175:2: note: expanded from macro '__X32_COMPAT_COND_SYSCALL'
__COND_SYSCALL(x32, compat_sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
kernel/sys_ni.c:154:1: warning: no previous prototype for function '__x64_sys_futex_wait' [-Wmissing-prototypes]
COND_SYSCALL(futex_wait);
^
arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL'
__X64_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL'
__COND_SYSCALL(x64, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:130:1: note: expanded from here
__x64_sys_futex_wait
^
kernel/sys_ni.c:154:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL'
__X64_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL'
__COND_SYSCALL(x64, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
>> kernel/sys_ni.c:154:1: warning: no previous prototype for function '__ia32_sys_futex_wait' [-Wmissing-prototypes]
COND_SYSCALL(futex_wait);
^
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:134:1: note: expanded from here
__ia32_sys_futex_wait
^
kernel/sys_ni.c:154:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
kernel/sys_ni.c:155:1: warning: no previous prototype for function '__x64_sys_futex_wake' [-Wmissing-prototypes]
COND_SYSCALL(futex_wake);
^
arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL'
__X64_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL'
__COND_SYSCALL(x64, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:138:1: note: expanded from here
__x64_sys_futex_wake
^
kernel/sys_ni.c:155:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL'
__X64_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL'
__COND_SYSCALL(x64, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
>> kernel/sys_ni.c:155:1: warning: no previous prototype for function '__ia32_sys_futex_wake' [-Wmissing-prototypes]
COND_SYSCALL(futex_wake);
^
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:142:1: note: expanded from here
__ia32_sys_futex_wake
^
kernel/sys_ni.c:155:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
kernel/sys_ni.c:162:1: warning: no previous prototype for function '__x64_sys_kexec_load' [-Wmissing-prototypes]
COND_SYSCALL(kexec_load);
^
arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL'
__X64_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL'
__COND_SYSCALL(x64, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:146:1: note: expanded from here
__x64_sys_kexec_load
^
kernel/sys_ni.c:162:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:256:2: note: expanded from macro 'COND_SYSCALL'
__X64_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:100:2: note: expanded from macro '__X64_COND_SYSCALL'
__COND_SYSCALL(x64, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
kernel/sys_ni.c:162:1: warning: no previous prototype for function '__ia32_sys_kexec_load' [-Wmissing-prototypes]
COND_SYSCALL(kexec_load);
^
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:150:1: note: expanded from here
__ia32_sys_kexec_load
^
kernel/sys_ni.c:162:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:257:2: note: expanded from macro 'COND_SYSCALL'
__IA32_COND_SYSCALL(name)
^
arch/x86/include/asm/syscall_wrapper.h:120:2: note: expanded from macro '__IA32_COND_SYSCALL'
__COND_SYSCALL(ia32, sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
kernel/sys_ni.c:163:1: warning: no previous prototype for function '__ia32_compat_sys_kexec_load' [-Wmissing-prototypes]
COND_SYSCALL_COMPAT(kexec_load);
^
arch/x86/include/asm/syscall_wrapper.h:218:2: note: expanded from macro 'COND_SYSCALL_COMPAT'
__IA32_COMPAT_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:148:2: note: expanded from macro '__IA32_COMPAT_COND_SYSCALL'
__COND_SYSCALL(ia32, compat_sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:14: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
<scratch space>:154:1: note: expanded from here
__ia32_compat_sys_kexec_load
^
kernel/sys_ni.c:163:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/x86/include/asm/syscall_wrapper.h:218:2: note: expanded from macro 'COND_SYSCALL_COMPAT'
__IA32_COMPAT_COND_SYSCALL(name) \
^
arch/x86/include/asm/syscall_wrapper.h:148:2: note: expanded from macro '__IA32_COMPAT_COND_SYSCALL'
__COND_SYSCALL(ia32, compat_sys_##name)
^
arch/x86/include/asm/syscall_wrapper.h:83:9: note: expanded from macro '__COND_SYSCALL'
__weak long __##abi##_##name(const struct pt_regs *__unused) \
^
kernel/sys_ni.c:163:1: warning: no previous prototype for function '__x32_compat_sys_kexec_load' [-Wmissing-prototypes]
vim +/__ia32_sys_futex_wait +154 kernel/sys_ni.c
152
153 /* kernel/futex2.c */
> 154 COND_SYSCALL(futex_wait);
> 155 COND_SYSCALL(futex_wake);
156
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[zen-kernel-zen-kernel:5.12/futex2 3/15] kernel/futex2.c:714:28: error: storage size of 'waitv' isn't known
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.12/futex2
head: a9442359954c51f77fa365e8d15b7950c6aeb55b
commit: 04a97ad2406166e12a13f09c9981f18e6487f530 [3/15] futex2: Implement vectorized wait
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/zen-kernel/zen-kernel/commit/04a97ad2406166e12a13f09c9...
git remote add zen-kernel-zen-kernel https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.12/futex2
git checkout 04a97ad2406166e12a13f09c9981f18e6487f530
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
kernel/futex2.c:711:16: warning: 'struct compat_futex_waitv' declared inside parameter list will not be visible outside of this definition or declaration
711 | struct compat_futex_waitv __user *uwaitv,
| ^~~~~~~~~~~~~~~~~~
kernel/futex2.c: In function 'compat_futex_parse_waitv':
>> kernel/futex2.c:714:28: error: storage size of 'waitv' isn't known
714 | struct compat_futex_waitv waitv;
| ^~~~~
>> kernel/futex2.c:719:37: error: invalid use of undefined type 'struct compat_futex_waitv'
719 | if (copy_from_user(&waitv, &uwaitv[i], sizeof(waitv)))
| ^
>> kernel/futex2.c:719:37: error: dereferencing pointer to incomplete type 'struct compat_futex_waitv'
>> kernel/futex2.c:728:31: error: implicit declaration of function 'compat_ptr' [-Werror=implicit-function-declaration]
728 | futexv->objects[i].uaddr = compat_ptr(waitv.uaddr);
| ^~~~~~~~~~
kernel/futex2.c:714:28: warning: unused variable 'waitv' [-Wunused-variable]
714 | struct compat_futex_waitv waitv;
| ^~~~~
kernel/futex2.c: At top level:
>> kernel/futex2.c:747:36: error: expected ')' before 'struct'
747 | COMPAT_SYSCALL_DEFINE4(futex_waitv, struct compat_futex_waitv __user *, waiters,
| ^~~~~~~
| )
kernel/futex2.c:710:12: warning: 'compat_futex_parse_waitv' defined but not used [-Wunused-function]
710 | static int compat_futex_parse_waitv(struct futex_waiter_head *futexv,
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +714 kernel/futex2.c
700
701 #ifdef CONFIG_COMPAT
702 /**
703 * compat_futex_parse_waitv - Parse a waitv array from userspace
704 * @futexv: Kernel side list of waiters to be filled
705 * @uwaitv: Userspace list to be parsed
706 * @nr_futexes: Length of futexv
707 *
708 * Return: Error code on failure, pointer to a prepared futexv otherwise
709 */
710 static int compat_futex_parse_waitv(struct futex_waiter_head *futexv,
711 struct compat_futex_waitv __user *uwaitv,
712 unsigned int nr_futexes)
713 {
> 714 struct compat_futex_waitv waitv;
715 struct futex_bucket *bucket;
716 unsigned int i;
717
718 for (i = 0; i < nr_futexes; i++) {
> 719 if (copy_from_user(&waitv, &uwaitv[i], sizeof(waitv)))
720 return -EFAULT;
721
722 if ((waitv.flags & ~FUTEXV_WAITER_MASK) ||
723 (waitv.flags & FUTEX_SIZE_MASK) != FUTEX_32)
724 return -EINVAL;
725
726 futexv->objects[i].key.pointer = 0;
727 futexv->objects[i].flags = waitv.flags;
> 728 futexv->objects[i].uaddr = compat_ptr(waitv.uaddr);
729 futexv->objects[i].val = waitv.val;
730 futexv->objects[i].index = i;
731
732 bucket = futex_get_bucket(compat_ptr(waitv.uaddr),
733 &futexv->objects[i].key,
734 is_object_shared);
735
736 if (IS_ERR(bucket))
737 return PTR_ERR(bucket);
738
739 futexv->objects[i].bucket = bucket;
740
741 INIT_LIST_HEAD(&futexv->objects[i].list);
742 }
743
744 return 0;
745 }
746
> 747 COMPAT_SYSCALL_DEFINE4(futex_waitv, struct compat_futex_waitv __user *, waiters,
748 unsigned int, nr_futexes, unsigned int, flags,
749 struct __kernel_timespec __user *, timo)
750 {
751 struct futex_waiter_head *futexv;
752 int ret;
753
754 if (flags & ~FUTEXV_MASK)
755 return -EINVAL;
756
757 if (!nr_futexes || nr_futexes > FUTEX_WAITV_MAX || !waiters)
758 return -EINVAL;
759
760 futexv = kmalloc((sizeof(struct futex_waiter) * nr_futexes) +
761 sizeof(*futexv), GFP_KERNEL);
762 if (!futexv)
763 return -ENOMEM;
764
765 futexv->hint = false;
766 futexv->task = current;
767
768 ret = compat_futex_parse_waitv(futexv, waiters, nr_futexes);
769
770 if (!ret)
771 ret = __futex_waitv(futexv, nr_futexes, timo, flags);
772
773 kfree(futexv);
774
775 return ret;
776 }
777 #endif
778
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[nbd168-wireless:mt76 11/33] drivers/net/wireless/mediatek/mt76/mt7915/mac.c:1222:29: sparse: sparse: cast to restricted __le32
by kernel test robot
tree: https://github.com/nbd168/wireless mt76
head: 273a367e2d8fd34ef5e71a135e5368ea1e76b6d2
commit: 98b8539a54f2822f4542d0396e07a3d65ee8529f [11/33] mt76: mt7915: add support for tx status reporting
config: powerpc-allyesconfig (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-341-g8af24329-dirty
# https://github.com/nbd168/wireless/commit/98b8539a54f2822f4542d0396e07a3d...
git remote add nbd168-wireless https://github.com/nbd168/wireless
git fetch --no-tags nbd168-wireless mt76
git checkout 98b8539a54f2822f4542d0396e07a3d65ee8529f
# 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__' W=1 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/net/wireless/mediatek/mt76/mt7915/mac.c:1222:29: sparse: sparse: cast to restricted __le32
>> drivers/net/wireless/mediatek/mt76/mt7915/mac.c:1222:23: sparse: sparse: restricted __le32 degrades to integer
vim +1222 drivers/net/wireless/mediatek/mt76/mt7915/mac.c
1206
1207 static bool
1208 mt7915_mac_add_txs_skb(struct mt7915_dev *dev, struct mt76_wcid *wcid, int pid,
1209 __le32 *txs_data)
1210 {
1211 struct mt76_dev *mdev = &dev->mt76;
1212 struct ieee80211_tx_info *info;
1213 struct sk_buff_head list;
1214 struct sk_buff *skb;
1215
1216 mt76_tx_status_lock(mdev, &list);
1217 skb = mt76_tx_status_skb_get(mdev, wcid, pid, &list);
1218 if (!skb)
1219 goto out;
1220
1221 info = IEEE80211_SKB_CB(skb);
> 1222 if (!(txs_data[0] & le32_to_cpu(MT_TXS0_ACK_ERROR_MASK)))
1223 info->flags |= IEEE80211_TX_STAT_ACK;
1224
1225 info->status.ampdu_len = 1;
1226 info->status.ampdu_ack_len = !!(info->flags &
1227 IEEE80211_TX_STAT_ACK);
1228
1229 info->status.rates[0].idx = -1;
1230 mt76_tx_status_skb_done(mdev, skb, &list);
1231
1232 out:
1233 mt76_tx_status_unlock(mdev, &list);
1234
1235 return !!skb;
1236 }
1237
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
drivers/net/ethernet/korina.c:391:20: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ac91e6c6033ebc12c5c1e4aa171b81a662bd70f
commit: 6ef92063bf94cd8a6fa9fea3a82596955eb25424 net: korina: Make driver COMPILE_TESTable
date: 4 weeks ago
config: mips-allyesconfig (attached as .config)
compiler: mips-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-341-g8af24329-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 6ef92063bf94cd8a6fa9fea3a82596955eb25424
# 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__' W=1 ARCH=mips
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 >>)
command-line: note: in included file:
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
builtin:0:0: sparse: this was the original definition
drivers/net/ethernet/korina.c:408:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct dma_reg *ch @@ got struct dma_reg [noderef] __iomem *tx_dma_regs @@
drivers/net/ethernet/korina.c:408:33: sparse: expected struct dma_reg *ch
drivers/net/ethernet/korina.c:408:33: sparse: got struct dma_reg [noderef] __iomem *tx_dma_regs
drivers/net/ethernet/korina.c:415:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct dma_reg *ch @@ got struct dma_reg [noderef] __iomem *rx_dma_regs @@
drivers/net/ethernet/korina.c:415:33: sparse: expected struct dma_reg *ch
drivers/net/ethernet/korina.c:415:33: sparse: got struct dma_reg [noderef] __iomem *rx_dma_regs
>> drivers/net/ethernet/korina.c:391:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:391:20: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:391:20: sparse: got unsigned int *
>> drivers/net/ethernet/korina.c:392:31: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:392:31: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:392:31: sparse: got unsigned int *
drivers/net/ethernet/korina.c:394:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:394:33: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:394:33: sparse: got unsigned int *
drivers/net/ethernet/korina.c:397:28: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:397:28: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:397:28: sparse: got unsigned int *
drivers/net/ethernet/korina.c:400:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:400:20: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:400:20: sparse: got unsigned int *
drivers/net/ethernet/korina.c:401:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:401:20: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:401:20: sparse: got unsigned int *
>> drivers/net/ethernet/korina.c:391:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:391:20: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:391:20: sparse: got unsigned int *
>> drivers/net/ethernet/korina.c:392:31: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:392:31: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:392:31: sparse: got unsigned int *
drivers/net/ethernet/korina.c:394:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:394:33: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:394:33: sparse: got unsigned int *
drivers/net/ethernet/korina.c:397:28: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:397:28: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:397:28: sparse: got unsigned int *
drivers/net/ethernet/korina.c:400:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:400:20: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:400:20: sparse: got unsigned int *
drivers/net/ethernet/korina.c:401:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:401:20: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:401:20: sparse: got unsigned int *
vim +391 drivers/net/ethernet/korina.c
0fc96939a97ffd4 drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-19 387
ef11291bcd5f963 drivers/net/korina.c Florian Fainelli 2008-03-19 388 static inline void korina_abort_dma(struct net_device *dev,
ef11291bcd5f963 drivers/net/korina.c Florian Fainelli 2008-03-19 389 struct dma_reg *ch)
ef11291bcd5f963 drivers/net/korina.c Florian Fainelli 2008-03-19 390 {
ef11291bcd5f963 drivers/net/korina.c Florian Fainelli 2008-03-19 @391 if (readl(&ch->dmac) & DMA_CHAN_RUN_BIT) {
ef11291bcd5f963 drivers/net/korina.c Florian Fainelli 2008-03-19 @392 writel(0x10, &ch->dmac);
ef11291bcd5f963 drivers/net/korina.c Florian Fainelli 2008-03-19 393
ef11291bcd5f963 drivers/net/korina.c Florian Fainelli 2008-03-19 394 while (!(readl(&ch->dmas) & DMA_STAT_HALT))
860e9538a9482bb drivers/net/ethernet/korina.c Florian Westphal 2016-05-03 395 netif_trans_update(dev);
ef11291bcd5f963 drivers/net/korina.c Florian Fainelli 2008-03-19 396
ef11291bcd5f963 drivers/net/korina.c Florian Fainelli 2008-03-19 397 writel(0, &ch->dmas);
ef11291bcd5f963 drivers/net/korina.c Florian Fainelli 2008-03-19 398 }
ef11291bcd5f963 drivers/net/korina.c Florian Fainelli 2008-03-19 399
ef11291bcd5f963 drivers/net/korina.c Florian Fainelli 2008-03-19 400 writel(0, &ch->dmadptr);
ef11291bcd5f963 drivers/net/korina.c Florian Fainelli 2008-03-19 401 writel(0, &ch->dmandptr);
ef11291bcd5f963 drivers/net/korina.c Florian Fainelli 2008-03-19 402 }
ef11291bcd5f963 drivers/net/korina.c Florian Fainelli 2008-03-19 403
:::::: The code at line 391 was first introduced by commit
:::::: ef11291bcd5f963c72e7ba5952be3e3c97463d2c Add support the Korina (IDT RC32434) Ethernet MAC
:::::: TO: Florian Fainelli <florian.fainelli(a)telecomint.eu>
:::::: CC: Jeff Garzik <jeff(a)garzik.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
Re: [PATCH v5] mm: slub: move sysfs slab alloc/free interfaces to debugfs
by Dan Carpenter
Hi Faiyaz,
url: https://github.com/0day-ci/linux/commits/Faiyaz-Mohammed/mm-slub-move-sys...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 8404c9fbc84b741f66cff7d4934a25dd2c344452
config: i386-randconfig-m021-20210506 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
mm/slub.c:5891 slab_debugfs_start() warn: possible memory leak of 'spos'
vim +/spos +5891 mm/slub.c
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5877 static void *slab_debugfs_start(struct seq_file *seq, loff_t *ppos)
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5878 {
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5879 struct kmem_cache_node *n;
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5880 struct kmem_cache *s;
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5881 enum track_item alloc;
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5882 int node;
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5883 loff_t *spos = kmalloc(sizeof(loff_t), GFP_KERNEL);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Generally avoid putting functions which can fail in the declaration
block. Allocations inside the declaration block are a tiny percent of
declarations over all but they are an outsize source of static checker
bugs.
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5884
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5885 s = seq->file->f_inode->i_private;
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5886
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5887 if (!spos)
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5888 return NULL;
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5889
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5890 if (!(s->flags & SLAB_STORE_USER))
88e180b99466c1 Faiyaz Mohammed 2021-05-06 @5891 return ERR_PTR(-EOPNOTSUPP);
"spos" is leaked.
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5892
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5893 if (*ppos == 0) {
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5894
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5895 t.count = 0;
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5896 t.max = 0;
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5897 t.loc = NULL;
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5898 if (strcmp(seq->file->f_path.dentry->d_name.name, "alloc_traces") == 0)
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5899 alloc = TRACK_ALLOC;
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5900 else
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5901 alloc = TRACK_FREE;
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5902
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5903 if (!alloc_loc_track(&t, PAGE_SIZE / sizeof(struct location),
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5904 GFP_KERNEL)) {
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5905 seq_puts(seq, "Out of memory\n");
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5906 return ERR_PTR(-ENOMEM);
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5907 }
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5908 /* Push back cpu slabs */
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5909 flush_all(s);
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5910
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5911 for_each_kmem_cache_node(s, node, n) {
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5912 unsigned long flags;
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5913 struct page *page;
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5914
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5915 if (!atomic_long_read(&n->nr_slabs))
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5916 continue;
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5917
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5918 spin_lock_irqsave(&n->list_lock, flags);
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5919 list_for_each_entry(page, &n->partial, slab_list)
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5920 process_slab(&t, s, page, alloc);
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5921 list_for_each_entry(page, &n->full, slab_list)
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5922 process_slab(&t, s, page, alloc);
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5923 spin_unlock_irqrestore(&n->list_lock, flags);
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5924 }
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5925 }
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5926
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5927 if (*ppos < t.count) {
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5928 *spos = *ppos;
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5929 return spos;
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5930 }
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5931
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5932 kfree(spos);
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5933 return NULL;
88e180b99466c1 Faiyaz Mohammed 2021-05-06 5934 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months