From: kernel test robot <lkp@intel.com>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [frank-w-bpi-r2-4.14:6.9-r4_mt76_self 28/29] drivers/net/wireless/mediatek/mt76/mt7996/init.c:886:5: warning: no previous prototype for 'mt7996_get_chip_sku'
Date: Mon, 15 Apr 2024 09:01:07 +0800 [thread overview]
Message-ID: <202404150849.4uLPfyYj-lkp@intel.com> (raw)
tree: https://github.com/frank-w/BPI-R2-4.14 6.9-r4_mt76_self
head: f8d0547c22785a7073256ecd281b7c7c5bd6ad36
commit: 5f76f61ef303d7df2b80016e63ec1bdd7efc2b11 [28/29] mt76: try to add the hw detection function from downstream
config: microblaze-allmodconfig (https://download.01.org/0day-ci/archive/20240415/202404150849.4uLPfyYj-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240415/202404150849.4uLPfyYj-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404150849.4uLPfyYj-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/net/wireless/mediatek/mt76/mt7996/init.c:886:5: warning: no previous prototype for 'mt7996_get_chip_sku' [-Wmissing-prototypes]
886 | int mt7996_get_chip_sku(struct mt7996_dev *dev)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7996/init.c: In function 'mt7996_get_chip_sku':
drivers/net/wireless/mediatek/mt76/mt7996/init.c:934:17: error: too many arguments to function 'mt7996_mcu_get_eeprom'
934 | mt7996_mcu_get_eeprom(dev, MT7976C_EFUSE_OFFSET, buf);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/wireless/mediatek/mt76/mt7996/init.c:11:
drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h:500:5: note: declared here
500 | int mt7996_mcu_get_eeprom(struct mt7996_dev *dev, u32 offset);
| ^~~~~~~~~~~~~~~~~~~~~
vim +/mt7996_get_chip_sku +886 drivers/net/wireless/mediatek/mt76/mt7996/init.c
885
> 886 int mt7996_get_chip_sku(struct mt7996_dev *dev)
887 {
888 #define MT7976C_CHIP_VER 0x8a10
889 #define MT7976C_HL_CHIP_VER 0x8b00
890 #define MT7976C_PS_CHIP_VER 0x8c10
891 #define MT7976C_EFUSE_OFFSET 0x470
892 #define MT7976C_EFUSE_VALUE 0xc
893 u32 regval, val = mt76_rr(dev, MT_PAD_GPIO);
894 u16 adie_chip_id, adie_chip_ver;
895 u8 adie_comb, adie_num, adie_idx = 0;
896
897 switch (mt76_chip(&dev->mt76)) {
898 case 0x7990:
899 if (FIELD_GET(MT_PAD_GPIO_2ADIE_TBTC, val)) {
900 dev->chip_sku = MT7996_SKU_233;
901 dev->fem_type = MT7996_FEM_INT;
902 return 0;
903 }
904
905 adie_comb = FIELD_GET(MT_PAD_GPIO_ADIE_COMB, val);
906 if (adie_comb <= 1)
907 dev->chip_sku = MT7996_SKU_444;
908 else
909 dev->chip_sku = MT7996_SKU_404;
910 break;
911 case 0x7992:
912 adie_comb = FIELD_GET(MT_PAD_GPIO_ADIE_COMB_7992, val);
913 adie_num = FIELD_GET(MT_PAD_GPIO_ADIE_NUM_7992, val);
914 adie_idx = !adie_num;
915 if (adie_num)
916 dev->chip_sku = MT7992_SKU_23;
917 else if (adie_comb)
918 dev->chip_sku = MT7992_SKU_44;
919 else
920 dev->chip_sku = MT7992_SKU_24;
921 break;
922 default:
923 return -EINVAL;
924 }
925
926 if (test_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state)) {
927 u8 buf[MT7996_EEPROM_BLOCK_SIZE];
928 u8 idx = MT7976C_EFUSE_OFFSET % MT7996_EEPROM_BLOCK_SIZE;
929 bool is_7976c;
930
931 mt7996_mcu_rf_regval(dev, MT_ADIE_CHIP_ID(adie_idx), ®val, false);
932 adie_chip_id = FIELD_GET(MT_ADIE_CHIP_ID_MASK, regval);
933 adie_chip_ver = FIELD_GET(MT_ADIE_VERSION_MASK, regval);
934 mt7996_mcu_get_eeprom(dev, MT7976C_EFUSE_OFFSET, buf);
935 is_7976c = (adie_chip_ver == MT7976C_CHIP_VER) ||
936 (adie_chip_ver == MT7976C_HL_CHIP_VER) ||
937 (adie_chip_ver == MT7976C_PS_CHIP_VER) ||
938 (buf[idx] == MT7976C_EFUSE_VALUE);
939 if (adie_chip_id == 0x7975 || (adie_chip_id == 0x7976 && is_7976c) ||
940 adie_chip_id == 0x7979)
941 dev->fem_type = MT7996_FEM_INT;
942 else if (adie_chip_id == 0x7977 && adie_comb == 1)
943 dev->fem_type = MT7996_FEM_MIX;
944 else
945 dev->fem_type = MT7996_FEM_EXT;
946 }
947
948 return 0;
949 }
950
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-04-15 1:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202404150849.4uLPfyYj-lkp@intel.com \
--to=lkp@intel.com \
--cc=frank-w@public-files.de \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.