On 8/28/19 12:28 PM, Pierre-Louis Bossart wrote:
On 8/28/19 1:30 PM, Randy Dunlap wrote:
(from linux-next tree, but problem found/seen in mmotm)
Sorry, I don't know who is responsible for this driver.
That would be me.
I just checked with Mark Brown's for-next tree 8aceffa09b4b9867153bfe0ff6f40517240cee12
and things are fine in i386 mode, see below.
next-20190828 also works fine for me in i386 mode.
if you can point me to a tree and configuration that don't work I'll look into this, I'd need more info to progress.
Please try the attached randconfig file.
Thanks for looking.
make ARCH=i386
 Using /data/pbossart/ktest/broonie-next as source for kernel
 GEN Makefile
 CALL /data/pbossart/ktest/broonie-next/scripts/checksyscalls.sh
 CALL /data/pbossart/ktest/broonie-next/scripts/atomic/check-atomics.sh
 CHK include/generated/compile.h
 CC [M] sound/hda/ext/hdac_ext_bus.o
 CC [M] sound/hda/ext/hdac_ext_controller.o
 CC [M] sound/hda/ext/hdac_ext_stream.o
 LD [M] sound/hda/ext/snd-hda-ext-core.o
 CC [M] sound/hda/hda_bus_type.o
 CC [M] sound/hda/hdac_bus.o
 CC [M] sound/hda/hdac_device.o
 CC [M] sound/hda/hdac_sysfs.o
 CC [M] sound/hda/hdac_regmap.o
 CC [M] sound/hda/hdac_controller.o
 CC [M] sound/hda/hdac_stream.o
 CC [M] sound/hda/array.o
 CC [M] sound/hda/hdmi_chmap.o
 CC [M] sound/hda/trace.o
 CC [M] sound/hda/hdac_component.o
 CC [M] sound/hda/hdac_i915.o
 LD [M] sound/hda/snd-hda-core.o
 CC [M] sound/hda/intel-nhlt.o
 LD [M] sound/hda/snd-intel-nhlt.o
Kernel: arch/x86/boot/bzImage is ready (#18)
 Building modules, stage 2.
 MODPOST 156 modules
 CC sound/hda/ext/snd-hda-ext-core.mod.o
 LD [M] sound/hda/ext/snd-hda-ext-core.ko
 CC sound/hda/snd-hda-core.mod.o
 LD [M] sound/hda/snd-hda-core.ko
 CC sound/hda/snd-intel-nhlt.mod.o
 LD [M] sound/hda/snd-intel-nhlt.ko
~~~~~~~~~~~~~~~~~~~~~~
on i386:
ÂÂ CCÂÂÂÂÂ sound/hda/intel-nhlt.o
../sound/hda/intel-nhlt.c:14:25: error: redefinition of âintel_nhlt_initâ
 struct nhlt_acpi_table *intel_nhlt_init(struct device *dev)
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ^~~~~~~~~~~~~~~
In file included from ../sound/hda/intel-nhlt.c:5:0:
../include/sound/intel-nhlt.h:134:39: note: previous definition of âintel_nhlt_initâ was here
 static inline struct nhlt_acpi_table *intel_nhlt_init(struct device *dev)
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ^~~~~~~~~~~~~~~
../sound/hda/intel-nhlt.c: In function âintel_nhlt_initâ:
../sound/hda/intel-nhlt.c:39:14: error: dereferencing pointer to incomplete type âstruct nhlt_resource_descâ
ÂÂ if (nhlt_ptr->length)
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ^~
../sound/hda/intel-nhlt.c:41:4: error: implicit declaration of function âmemremapâ; did you mean âioremapâ? [-Werror=implicit-function-declaration]
ÂÂÂÂ memremap(nhlt_ptr->min_addr, nhlt_ptr->length,
ÂÂÂÂ ^~~~~~~~
ÂÂÂÂ ioremap
../sound/hda/intel-nhlt.c:42:6: error: âMEMREMAP_WBâ undeclared (first use in this function)
ÂÂÂÂÂÂ MEMREMAP_WB);
ÂÂÂÂÂÂ ^~~~~~~~~~~
../sound/hda/intel-nhlt.c:42:6: note: each undeclared identifier is reported only once for each function it appears in
../sound/hda/intel-nhlt.c:45:25: error: dereferencing pointer to incomplete type âstruct nhlt_acpi_tableâ
ÂÂÂÂÂÂ (strncmp(nhlt_table->header.signature,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ^~
../sound/hda/intel-nhlt.c:48:3: error: implicit declaration of function âmemunmapâ; did you mean âvunmapâ? [-Werror=implicit-function-declaration]
ÂÂÂ memunmap(nhlt_table);
ÂÂÂ ^~~~~~~~
ÂÂÂ vunmap
../sound/hda/intel-nhlt.c: At top level:
../sound/hda/intel-nhlt.c:56:6: error: redefinition of âintel_nhlt_freeâ
 void intel_nhlt_free(struct nhlt_acpi_table *nhlt)
ÂÂÂÂÂÂ ^~~~~~~~~~~~~~~
In file included from ../sound/hda/intel-nhlt.c:5:0:
../include/sound/intel-nhlt.h:139:20: note: previous definition of âintel_nhlt_freeâ was here
 static inline void intel_nhlt_free(struct nhlt_acpi_table *addr)
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ^~~~~~~~~~~~~~~
../sound/hda/intel-nhlt.c:62:5: error: redefinition of âintel_nhlt_get_dmic_geoâ
 int intel_nhlt_get_dmic_geo(struct device *dev, struct nhlt_acpi_table *nhlt)
ÂÂÂÂÂ ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ../sound/hda/intel-nhlt.c:5:0:
../include/sound/intel-nhlt.h:143:19: note: previous definition of âintel_nhlt_get_dmic_geoâ was here
 static inline int intel_nhlt_get_dmic_geo(struct device *dev,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ^~~~~~~~~~~~~~~~~~~~~~~
../sound/hda/intel-nhlt.c: In function âintel_nhlt_get_dmic_geoâ:
../sound/hda/intel-nhlt.c:76:11: error: dereferencing pointer to incomplete type âstruct nhlt_endpointâ
ÂÂÂ if (epnt->linktype == NHLT_LINK_DMIC) {
ÂÂÂÂÂÂÂÂÂÂÂ ^~
../sound/hda/intel-nhlt.c:76:25: error: âNHLT_LINK_DMICâ undeclared (first use in this function)
ÂÂÂ if (epnt->linktype == NHLT_LINK_DMIC) {
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ^~~~~~~~~~~~~~
../sound/hda/intel-nhlt.c:79:15: error: dereferencing pointer to incomplete type âstruct nhlt_dmic_array_configâ
ÂÂÂÂ switch (cfg->array_type) {
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ^~
../sound/hda/intel-nhlt.c:80:9: error: âNHLT_MIC_ARRAY_2CH_SMALLâ undeclared (first use in this function)
ÂÂÂÂ case NHLT_MIC_ARRAY_2CH_SMALL:
ÂÂÂÂÂÂÂÂÂ ^~~~~~~~~~~~~~~~~~~~~~~~
../sound/hda/intel-nhlt.c:81:9: error: âNHLT_MIC_ARRAY_2CH_BIGâ undeclared (first use in this function); did you mean âNHLT_MIC_ARRAY_2CH_SMALLâ?
ÂÂÂÂ case NHLT_MIC_ARRAY_2CH_BIG:
ÂÂÂÂÂÂÂÂÂ ^~~~~~~~~~~~~~~~~~~~~~
ÂÂÂÂÂÂÂÂÂ NHLT_MIC_ARRAY_2CH_SMALL
../sound/hda/intel-nhlt.c:82:16: error: âMIC_ARRAY_2CHâ undeclared (first use in this function); did you mean âNHLT_MIC_ARRAY_2CH_BIGâ?
ÂÂÂÂÂ dmic_geo = MIC_ARRAY_2CH;
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ^~~~~~~~~~~~~
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ NHLT_MIC_ARRAY_2CH_BIG
../sound/hda/intel-nhlt.c:85:9: error: âNHLT_MIC_ARRAY_4CH_1ST_GEOMâ undeclared (first use in this function); did you mean âNHLT_MIC_ARRAY_2CH_BIGâ?
ÂÂÂÂ case NHLT_MIC_ARRAY_4CH_1ST_GEOM:
ÂÂÂÂÂÂÂÂÂ ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ÂÂÂÂÂÂÂÂÂ NHLT_MIC_ARRAY_2CH_BIG
../sound/hda/intel-nhlt.c:86:9: error: âNHLT_MIC_ARRAY_4CH_L_SHAPEDâ undeclared (first use in this function); did you mean âNHLT_MIC_ARRAY_4CH_1ST_GEOMâ?
ÂÂÂÂ case NHLT_MIC_ARRAY_4CH_L_SHAPED:
ÂÂÂÂÂÂÂÂÂ ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ÂÂÂÂÂÂÂÂÂ NHLT_MIC_ARRAY_4CH_1ST_GEOM
ÂÂ ARÂÂÂÂÂ sound/i2c/other/built-in.a
../sound/hda/intel-nhlt.c:87:9: error: âNHLT_MIC_ARRAY_4CH_2ND_GEOMâ undeclared (first use in this function); did you mean âNHLT_MIC_ARRAY_4CH_1ST_GEOMâ?
ÂÂÂÂ case NHLT_MIC_ARRAY_4CH_2ND_GEOM:
ÂÂÂÂÂÂÂÂÂ ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ÂÂÂÂÂÂÂÂÂ NHLT_MIC_ARRAY_4CH_1ST_GEOM
../sound/hda/intel-nhlt.c:88:16: error: âMIC_ARRAY_4CHâ undeclared (first use in this function); did you mean âMIC_ARRAY_2CHâ?
ÂÂÂÂÂ dmic_geo = MIC_ARRAY_4CH;
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ^~~~~~~~~~~~~
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ MIC_ARRAY_2CH
ÂÂ ARÂÂÂÂÂ sound/i2c/built-in.a
ÂÂ CCÂÂÂÂÂ drivers/bluetooth/btmtksdio.o
../sound/hda/intel-nhlt.c:90:9: error: âNHLT_MIC_ARRAY_VENDOR_DEFINEDâ undeclared (first use in this function); did you mean âNHLT_MIC_ARRAY_4CH_L_SHAPEDâ?
ÂÂÂÂ case NHLT_MIC_ARRAY_VENDOR_DEFINED:
ÂÂÂÂÂÂÂÂÂ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ÂÂÂÂÂÂÂÂÂ NHLT_MIC_ARRAY_4CH_L_SHAPED
../sound/hda/intel-nhlt.c:92:26: error: dereferencing pointer to incomplete type âstruct nhlt_vendor_dmic_array_configâ
ÂÂÂÂÂ dmic_geo = cfg_vendor->nb_mics;
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ^~
../sound/hda/intel-nhlt.c: At top level:
../sound/hda/intel-nhlt.c:106:16: error: expected declaration specifiers or â...â before string constant
 MODULE_LICENSE("GPL v2");
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ^~~~~~~~
../sound/hda/intel-nhlt.c:107:20: error: expected declaration specifiers or â...â before string constant
 MODULE_DESCRIPTION("Intel NHLT driver");
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [../scripts/Makefile.build:266: sound/hda/intel-nhlt.o] Error 1