From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.20 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796266993; b=rT3rlWSJQSSDZEwKO7FHpO4IjLwz8mJBjkgcs8o60m8dZoHZYYjc/r/CijEpzqHOzeM3 oN0tU0TfnMklfTjrwyv0SxIElAckaoPreS8qMY+mYv5s4GkVEwftFFixYfW0110WxPiBh fAVX+o+GsTFVfo8Ftl07Wi9IN/voHDtahc2Zp/bJFO14YbLQ74Vz/jgMHxEP55E+QAoB5 VqQZwUGGtchtx9u0xp7kbkn/7DHS7a9EPsxwTAp48kTE3WZTyonyd7fz1u0d/1lO+ChNv w0zjsLHMliJpQ1nKSPI93O7mA7Q0oLoSW39vliSva/zxN5vRY6w/wTNXLWeMz8JFHCA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796266993; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Date:From:To: Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=iw0T2JfuQq1CUoYmx394J0s4HWrxDCrvPs0cRa9fSJI=; b=iZtSFb5eUnALonV+NpjxHD4Ys0pMVImqURjlPtQU4Qz2ZQlq1qb5ydwn8bVyguQFhB7k Tbl9SRd/1oszmLN0ejADkZUaN6uaWqaLoxxe4F9/01X2LfXxZXPtXXVD0TgzJKjtvv51f oacgIn/ujA6afyOqarG8tigDXnJ3KEmEHZ1wO06n8qKfcOHMvuybDLv/HbUOn7JckOr8i B1ucEowwwmP7tRbudSa45Gc5SqMn+YWIP20/aXTjq2QBOsZaPhlE5ConSE1n3OVVH69Zx SKsG9EA9dEMWzI5ZTJjF78dwH6EX39HHkOn/VILF2TAe0twpF4x0BYhbnr1OUc5vmcQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=VLLEaA7D; arc=none smtp.remote-ip=198.175.65.20 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67DAD606A322 for ; Thu, 3 Dec 2026 03:03:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 67DAD606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=VLLEaA7D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796266992; x=1827802992; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=iw0T2JfuQq1CUoYmx394J0s4HWrxDCrvPs0cRa9fSJI=; b=VLLEaA7DyhpH5xzb5kRNSqCJgUB1BckAoG9HTJDE6kTSnOpU6F1OMbDr acyn3l74MiuOPQl+e9HCLuedvqw4pmojNgMxQHlol7qE+3E7M9aOollsV +mxqgaccmAhsiHxNccGU9mirBH3OBNdYUI7gHivFP/mevnqiOtDp1ZkRo MEJJV5dmGsAx3mP2loUx8o3RKsAET6uEmjYxNiDMmNslKnz94egFwce7S yued1dMXfWxlRZ43y+lvRw4xO7cuvlmiC/MD+9QhtPeNIlegJo86D0VJI KKIqM4VZRzv/fEhwo/+dpO5AgoMK11CbzHwsbqeTn+ZtTNikfVpV2gTiW A==; X-CSE-ConnectionGUID: MmaiGR+0Rt2T5g3RM9Ih/Q== X-CSE-MsgGUID: Yxv/STMURaOurnXsII+pQw== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5256459" X-IronPort-AV: E=Sophos;i="6.27,247,1787036400"; d="scan'208";a="5256459" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2026 19:03:12 -0800 X-CSE-ConnectionGUID: Wx7uAaPdSY6O1CQub6Po8g== X-CSE-MsgGUID: vyLHZJlASIyYOwtexbi0Cg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,247,1787036400"; d="scan'208";a="13938137" Received: from lkp-server01.sh.intel.com (HELO 0caa9d2d175c) ([10.239.97.150]) by fmviesa007.fm.intel.com with ESMTP; 02 Dec 2026 19:03:08 -0800 Received: from kbuild by 0caa9d2d175c with local (Exim 4.98.2) (envelope-from ) id 1xYx69-00000001gn7-1S4B; Thu, 03 Dec 2026 03:03:05 +0000 Date: Thu, 3 Dec 2026 11:02:44 +0800 From: kernel test robot To: Anthony Liu Cc: oe-kbuild-all@lists.linux.dev, Emery.Hsin@mediatek.com, Jb.Tsai@mediatek.com, Leon.Yen@mediatek.com, Litien.Chang@mediatek.com, Quan.Zhou@mediatek.com, Ryder.Lee@mediatek.com, Sean.Wang@mediatek.com, kun.wu@mediatek.com, linux-wireless@vger.kernel.org, lorenzo@kernel.org, nbd@nbd.name Subject: Re: [PATCH v1 2/2] wifi: mt76: add boundary check to array accesses Message-ID: <20261203105244.RBdWyoat-lkp@intel.com> References: <20261202081806.1297416-2-anthony.liu@mediatek.com> X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261202081806.1297416-2-anthony.liu@mediatek.com> Hi Anthony, kernel test robot noticed the following build errors: [auto build test ERROR on wireless-next/main] [also build test ERROR on wireless/main linus/master v7.4-rc5 next-20261202] [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#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Anthony-Liu/wifi-mt76-add-boundary-check-to-array-accesses/20261202-161806 base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main patch link: https://lore.kernel.org/r/20261202081806.1297416-2-anthony.liu%40mediatek.com patch subject: [PATCH v1 2/2] wifi: mt76: add boundary check to array accesses config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20261203/20261203105244.RBdWyoat-lkp@intel.com/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261203/20261203105244.RBdWyoat-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/20261203105244.RBdWyoat-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from include/linux/kernel.h:16, from drivers/net/wireless/mediatek/mt76/mt76.h:9, from drivers/net/wireless/mediatek/mt76/mmio.c:6: drivers/net/wireless/mediatek/mt76/mt76.h: In function 'mt76_init_tx_queue': >> drivers/net/wireless/mediatek/mt76/mt76.h:1364:42: error: 'dev' undeclared (first use in this function); did you mean 'cdev'? 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~ include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ drivers/net/wireless/mediatek/mt76/mt76.h:1364:42: note: each undeclared identifier is reported only once for each function it appears in 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~ include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ In file included from include/linux/array_size.h:5: >> include/linux/compiler.h:200:82: error: expression in static assertion is not an integer 200 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg, ...) ((int)sizeof(struct {_Static_assert(!(e), msg);})) | ^ include/linux/compiler.h:205:33: note: in expansion of macro '__BUILD_BUG_ON_ZERO_MSG' 205 | #define __must_be_array(a) __BUILD_BUG_ON_ZERO_MSG(!__is_array(a), \ | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~~~~~~~~~~~~~ drivers/net/wireless/mediatek/mt76/mt76.h:1364:31: note: in expansion of macro 'ARRAY_SIZE' 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~~~~~~~~ -- In file included from include/linux/kernel.h:16, from drivers/net/wireless/mediatek/mt76/mt76x0/usb.c:6: drivers/net/wireless/mediatek/mt76/mt76x0/../mt76.h: In function 'mt76_init_tx_queue': >> drivers/net/wireless/mediatek/mt76/mt76x0/../mt76.h:1364:42: error: 'dev' undeclared (first use in this function); did you mean 'cdev'? 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~ include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ drivers/net/wireless/mediatek/mt76/mt76x0/../mt76.h:1364:42: note: each undeclared identifier is reported only once for each function it appears in 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~ include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ In file included from include/linux/array_size.h:5: >> include/linux/compiler.h:200:82: error: expression in static assertion is not an integer 200 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg, ...) ((int)sizeof(struct {_Static_assert(!(e), msg);})) | ^ include/linux/compiler.h:205:33: note: in expansion of macro '__BUILD_BUG_ON_ZERO_MSG' 205 | #define __must_be_array(a) __BUILD_BUG_ON_ZERO_MSG(!__is_array(a), \ | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~~~~~~~~~~~~~ drivers/net/wireless/mediatek/mt76/mt76x0/../mt76.h:1364:31: note: in expansion of macro 'ARRAY_SIZE' 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~~~~~~~~ -- In file included from include/linux/string.h:6, from include/linux/bitmap.h:13, from include/linux/cpumask.h:11, from arch/x86/include/asm/paravirt.h:19, from arch/x86/include/asm/irqflags.h:100, from include/linux/irqflags.h:18, from arch/x86/include/asm/special_insns.h:10, from arch/x86/include/asm/processor.h:25, from arch/x86/include/asm/timex.h:5, from include/linux/timex.h:67, from include/linux/time32.h:13, from include/linux/time.h:60, from include/linux/stat.h:19, from include/linux/module.h:13, from drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c:6: drivers/net/wireless/mediatek/mt76/mt76x2/../mt76.h: In function 'mt76_init_tx_queue': >> drivers/net/wireless/mediatek/mt76/mt76x2/../mt76.h:1364:42: error: 'dev' undeclared (first use in this function); did you mean 'cdev'? 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~ include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ drivers/net/wireless/mediatek/mt76/mt76x2/../mt76.h:1364:42: note: each undeclared identifier is reported only once for each function it appears in 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~ include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ In file included from include/linux/build_bug.h:5, from include/linux/container_of.h:5, from include/linux/list.h:5, from include/linux/module.h:12: >> include/linux/compiler.h:200:82: error: expression in static assertion is not an integer 200 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg, ...) ((int)sizeof(struct {_Static_assert(!(e), msg);})) | ^ include/linux/compiler.h:205:33: note: in expansion of macro '__BUILD_BUG_ON_ZERO_MSG' 205 | #define __must_be_array(a) __BUILD_BUG_ON_ZERO_MSG(!__is_array(a), \ | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~~~~~~~~~~~~~ drivers/net/wireless/mediatek/mt76/mt76x2/../mt76.h:1364:31: note: in expansion of macro 'ARRAY_SIZE' 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~~~~~~~~ -- In file included from include/linux/string.h:6, from include/linux/bitmap.h:13, from include/linux/cpumask.h:11, from arch/x86/include/asm/paravirt.h:19, from arch/x86/include/asm/irqflags.h:100, from include/linux/irqflags.h:18, from arch/x86/include/asm/special_insns.h:10, from arch/x86/include/asm/processor.h:25, from include/linux/sched.h:13, from include/linux/ratelimit.h:6, from include/linux/dev_printk.h:16, from include/linux/device.h:15, from include/linux/devcoredump.h:8, from drivers/net/wireless/mediatek/mt76/mt7921/mac.c:4: drivers/net/wireless/mediatek/mt76/mt7921/../mt76.h: In function 'mt76_init_tx_queue': >> drivers/net/wireless/mediatek/mt76/mt7921/../mt76.h:1364:42: error: 'dev' undeclared (first use in this function); did you mean 'cdev'? 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~ include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ drivers/net/wireless/mediatek/mt76/mt7921/../mt76.h:1364:42: note: each undeclared identifier is reported only once for each function it appears in 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~ include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ In file included from include/linux/dev_printk.h:14: >> include/linux/compiler.h:200:82: error: expression in static assertion is not an integer 200 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg, ...) ((int)sizeof(struct {_Static_assert(!(e), msg);})) | ^ include/linux/compiler.h:205:33: note: in expansion of macro '__BUILD_BUG_ON_ZERO_MSG' 205 | #define __must_be_array(a) __BUILD_BUG_ON_ZERO_MSG(!__is_array(a), \ | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~~~~~~~~~~~~~ drivers/net/wireless/mediatek/mt76/mt7921/../mt76.h:1364:31: note: in expansion of macro 'ARRAY_SIZE' 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~~~~~~~~ -- In file included from include/linux/string.h:6, from include/linux/bitmap.h:13, from include/linux/cpumask.h:11, from arch/x86/include/asm/paravirt.h:19, from arch/x86/include/asm/irqflags.h:100, from include/linux/irqflags.h:18, from arch/x86/include/asm/special_insns.h:10, from arch/x86/include/asm/processor.h:25, from include/linux/sched.h:13, from include/linux/ratelimit.h:6, from include/linux/dev_printk.h:16, from include/linux/device.h:15, from include/linux/devcoredump.h:8, from drivers/net/wireless/mediatek/mt76/mt7925/mac.c:4: drivers/net/wireless/mediatek/mt76/mt7925/../mt76.h: In function 'mt76_init_tx_queue': >> drivers/net/wireless/mediatek/mt76/mt7925/../mt76.h:1364:42: error: 'dev' undeclared (first use in this function); did you mean 'cdev'? 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~ include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ drivers/net/wireless/mediatek/mt76/mt7925/../mt76.h:1364:42: note: each undeclared identifier is reported only once for each function it appears in 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~ include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ In file included from include/linux/dev_printk.h:14: >> include/linux/compiler.h:200:82: error: expression in static assertion is not an integer 200 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg, ...) ((int)sizeof(struct {_Static_assert(!(e), msg);})) | ^ include/linux/compiler.h:205:33: note: in expansion of macro '__BUILD_BUG_ON_ZERO_MSG' 205 | #define __must_be_array(a) __BUILD_BUG_ON_ZERO_MSG(!__is_array(a), \ | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~~~~~~~~~~~~~ drivers/net/wireless/mediatek/mt76/mt7925/../mt76.h:1364:31: note: in expansion of macro 'ARRAY_SIZE' 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~~~~~~~~ -- In file included from include/linux/kernel.h:16, from wireless/mediatek/mt76/mt76.h:9, from wireless/mediatek/mt76/mmio.c:6: wireless/mediatek/mt76/mt76.h: In function 'mt76_init_tx_queue': wireless/mediatek/mt76/mt76.h:1364:42: error: 'dev' undeclared (first use in this function); did you mean 'cdev'? 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~ include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ wireless/mediatek/mt76/mt76.h:1364:42: note: each undeclared identifier is reported only once for each function it appears in 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~ include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ In file included from include/linux/array_size.h:5: >> include/linux/compiler.h:200:82: error: expression in static assertion is not an integer 200 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg, ...) ((int)sizeof(struct {_Static_assert(!(e), msg);})) | ^ include/linux/compiler.h:205:33: note: in expansion of macro '__BUILD_BUG_ON_ZERO_MSG' 205 | #define __must_be_array(a) __BUILD_BUG_ON_ZERO_MSG(!__is_array(a), \ | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~~~~~~~~~~~~~ wireless/mediatek/mt76/mt76.h:1364:31: note: in expansion of macro 'ARRAY_SIZE' 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~~~~~~~~ -- In file included from include/linux/kernel.h:16, from wireless/mediatek/mt76/mt76x0/usb.c:6: wireless/mediatek/mt76/mt76x0/../mt76.h: In function 'mt76_init_tx_queue': wireless/mediatek/mt76/mt76x0/../mt76.h:1364:42: error: 'dev' undeclared (first use in this function); did you mean 'cdev'? 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~ include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ wireless/mediatek/mt76/mt76x0/../mt76.h:1364:42: note: each undeclared identifier is reported only once for each function it appears in 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~ include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ In file included from include/linux/array_size.h:5: >> include/linux/compiler.h:200:82: error: expression in static assertion is not an integer 200 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg, ...) ((int)sizeof(struct {_Static_assert(!(e), msg);})) | ^ include/linux/compiler.h:205:33: note: in expansion of macro '__BUILD_BUG_ON_ZERO_MSG' 205 | #define __must_be_array(a) __BUILD_BUG_ON_ZERO_MSG(!__is_array(a), \ | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~~~~~~~~~~~~~ wireless/mediatek/mt76/mt76x0/../mt76.h:1364:31: note: in expansion of macro 'ARRAY_SIZE' 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~~~~~~~~ -- In file included from include/linux/string.h:6, from include/linux/bitmap.h:13, from include/linux/cpumask.h:11, from arch/x86/include/asm/paravirt.h:19, from arch/x86/include/asm/irqflags.h:100, from include/linux/irqflags.h:18, from arch/x86/include/asm/special_insns.h:10, from arch/x86/include/asm/processor.h:25, from arch/x86/include/asm/timex.h:5, from include/linux/timex.h:67, from include/linux/time32.h:13, from include/linux/time.h:60, from include/linux/stat.h:19, from include/linux/module.h:13, from wireless/mediatek/mt76/mt76x2/eeprom.c:6: wireless/mediatek/mt76/mt76x2/../mt76.h: In function 'mt76_init_tx_queue': wireless/mediatek/mt76/mt76x2/../mt76.h:1364:42: error: 'dev' undeclared (first use in this function); did you mean 'cdev'? 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~ include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ wireless/mediatek/mt76/mt76x2/../mt76.h:1364:42: note: each undeclared identifier is reported only once for each function it appears in 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~ include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ In file included from include/linux/build_bug.h:5, from include/linux/container_of.h:5, from include/linux/list.h:5, from include/linux/module.h:12: >> include/linux/compiler.h:200:82: error: expression in static assertion is not an integer 200 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg, ...) ((int)sizeof(struct {_Static_assert(!(e), msg);})) | ^ include/linux/compiler.h:205:33: note: in expansion of macro '__BUILD_BUG_ON_ZERO_MSG' 205 | #define __must_be_array(a) __BUILD_BUG_ON_ZERO_MSG(!__is_array(a), \ | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~~~~~~~~~~~~~ wireless/mediatek/mt76/mt76x2/../mt76.h:1364:31: note: in expansion of macro 'ARRAY_SIZE' 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~~~~~~~~ -- In file included from include/linux/string.h:6, from include/linux/bitmap.h:13, from include/linux/cpumask.h:11, from arch/x86/include/asm/paravirt.h:19, from arch/x86/include/asm/irqflags.h:100, from include/linux/irqflags.h:18, from arch/x86/include/asm/special_insns.h:10, from arch/x86/include/asm/processor.h:25, from include/linux/sched.h:13, from include/linux/ratelimit.h:6, from include/linux/dev_printk.h:16, from include/linux/device.h:15, from include/linux/devcoredump.h:8, from wireless/mediatek/mt76/mt7921/mac.c:4: wireless/mediatek/mt76/mt7921/../mt76.h: In function 'mt76_init_tx_queue': wireless/mediatek/mt76/mt7921/../mt76.h:1364:42: error: 'dev' undeclared (first use in this function); did you mean 'cdev'? 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~ include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ wireless/mediatek/mt76/mt7921/../mt76.h:1364:42: note: each undeclared identifier is reported only once for each function it appears in 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~ include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ In file included from include/linux/dev_printk.h:14: >> include/linux/compiler.h:200:82: error: expression in static assertion is not an integer 200 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg, ...) ((int)sizeof(struct {_Static_assert(!(e), msg);})) | ^ include/linux/compiler.h:205:33: note: in expansion of macro '__BUILD_BUG_ON_ZERO_MSG' 205 | #define __must_be_array(a) __BUILD_BUG_ON_ZERO_MSG(!__is_array(a), \ | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array' 11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~~~~~~~~~~~~~ wireless/mediatek/mt76/mt7921/../mt76.h:1364:31: note: in expansion of macro 'ARRAY_SIZE' 1364 | if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) | ^~~~~~~~~~ .. vim +1364 drivers/net/wireless/mediatek/mt76/mt76.h 1344 1345 int mt76_queues_read(struct seq_file *s, void *data); 1346 void mt76_seq_puts_array(struct seq_file *file, const char *str, 1347 s8 *val, int len); 1348 1349 int mt76_eeprom_init(struct mt76_dev *dev, int len); 1350 int mt76_eeprom_override(struct mt76_phy *phy); 1351 int mt76_get_of_data_from_mtd(struct mt76_dev *dev, void *eep, int offset, int len); 1352 int mt76_get_of_data_from_nvmem(struct mt76_dev *dev, void *eep, 1353 const char *cell_name, int len); 1354 1355 struct mt76_queue * 1356 mt76_init_queue(struct mt76_dev *dev, int qid, int idx, int n_desc, 1357 int ring_base, void *wed, u32 flags); 1358 static inline int mt76_init_tx_queue(struct mt76_phy *phy, int qid, int idx, 1359 int n_desc, int ring_base, void *wed, 1360 u32 flags) 1361 { 1362 struct mt76_queue *q; 1363 > 1364 if (qid < 0 || qid >= ARRAY_SIZE(dev->q_tx)) 1365 return -EINVAL; 1366 1367 q = mt76_init_queue(phy->dev, qid, idx, n_desc, ring_base, wed, flags); 1368 if (IS_ERR(q)) 1369 return PTR_ERR(q); 1370 1371 phy->q_tx[qid] = q; 1372 1373 return 0; 1374 } 1375 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki