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=Zl3qeNdaNdZMuZw8ImMxSxxSllmJByf8HbZPQEpyyhrb1/qGjlRP4lGnrAWTONK2BzfW UrrScSXSYo+6ddxl1yx6BGqaE4d6TUrph7GJf07TgXuLuwp7s9JXohHumSG4SBSKG3oW+ 2YGfjhLXqcKmRexrWdwp/gq+e1HVXrb+y/INoA0PMPZxzFNiu+27/NHxiFegp8dOBgj/x 8ioD3N/Y4j/Y7S9DuxPhtd4IDGb0ePO+5RdG3AN8v3gedwq2s1Ml54dlCGTbAlwjsASMN eQaAAU1ThuNjKVmQiFCxt8CkZtXRIfOgyUTV5e15hJ0nZceT7wn6aii+gWvpfr5suxQ== 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=G3o1sDkKi6lV/d/NvnQSndX3vJMn72sml9oiBK5IinCaS8HKTOkXzflivqeQ8l/0HMRv ibhewzHScR8pSAmycBHDmtcYQfcUQeZXjHtmRe1Y0+IFpAonMysEEJbmh/DjrPGIo6oyd zu31ciAKawcwRhIpsxmaAFCERXKtOzZ/CC9V/GLqas1Rr+kxHtoY7TC530uTwys+h6N3T lRJ9uOiv9jphejxNhfCDAmR0Aehwb/6C4MwxbQ32vjNvY1EiwCZm39XSBp6W3hDvU5i0L coLD0Bi6fru4AzrmLNQCmS+uF8kuG7YMKtHWoqTyyg8m+4ZbqObQypFKWGRkKOyxnEg== 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=X5An9vv9; 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 8AC8D606A32C for ; Thu, 3 Dec 2026 03:03:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8AC8D606A32C 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=X5An9vv9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796266993; x=1827802993; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=iw0T2JfuQq1CUoYmx394J0s4HWrxDCrvPs0cRa9fSJI=; b=X5An9vv9uAAkZ9YyPETwZUe05sytd63wMkpWq/Jh3nRJMS+si4DTnXwV idsXOzKu3TkpRD32Eez/muIane1MXalNL+fLjVfXmJ35fwqedKF/8sRVO 33XvMRLNlwLD5wv1lTPHcF7/PxXcyXFxgFeDifhk8RuzQ1tGLCTYjww4t 0J8G7y7/kfOW9OeZUNNqzsvI/XP9x13tDkZ33BkufYkP2zUpN5DHxNw8R 2E7idlDoamBKVgcWwQ6HHPau8M3T28c3l18OAKpgDBiO9/sZQvbBjYzQj gh5MyGY1rCbjM2+47oFH2CiSFXYpEcPeR1ueLNCcyNP2Ym6+56QU5lz8N g==; X-CSE-ConnectionGUID: WMEOc2+2QaGHS7HR6G93VA== X-CSE-MsgGUID: 9O0ShcAQQS2QV7W3AXQsQA== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5256461" X-IronPort-AV: E=Sophos;i="6.27,247,1787036400"; d="scan'208";a="5256461" 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: oe-kbuild-all@lists.linux.dev 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