Re: [PATCH v2 2/2] ASoC: codecs: add ES7243E ADC driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Igor,

kernel test robot noticed the following build errors:

[auto build test ERROR on baeb9a7d8b60b021d907127509c44507539c15e5]

url:    https://github.com/intel-lab-lkp/linux/commits/Igor-Prusov/ASoC-dt-bindings-Add-Everest-ES7243E/20240920-235246
base:   baeb9a7d8b60b021d907127509c44507539c15e5
patch link:    https://lore.kernel.org/r/20240920-es7243e-adc-v2-2-0be019735b81%40salutedevices.com
patch subject: [PATCH v2 2/2] ASoC: codecs: add ES7243E ADC driver
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20240922/202409220756.5MSHcbg7-lkp@xxxxxxxxx/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 8663a75fa2f31299ab8d1d90288d9df92aadee88)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240922/202409220756.5MSHcbg7-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409220756.5MSHcbg7-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   In file included from sound/soc/codecs/es7243e.c:15:
   In file included from include/linux/i2c.h:19:
   In file included from include/linux/regulator/consumer.h:35:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:25:
   In file included from include/linux/kernel_stat.h:8:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:14:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:548:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     548 |         val = __raw_readb(PCI_IOBASE + addr);
         |                           ~~~~~~~~~~ ^
   include/asm-generic/io.h:561:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     561 |         val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
      37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
         |                                                   ^
   In file included from sound/soc/codecs/es7243e.c:15:
   In file included from include/linux/i2c.h:19:
   In file included from include/linux/regulator/consumer.h:35:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:25:
   In file included from include/linux/kernel_stat.h:8:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:14:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:574:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     574 |         val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
      35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
         |                                                   ^
   In file included from sound/soc/codecs/es7243e.c:15:
   In file included from include/linux/i2c.h:19:
   In file included from include/linux/regulator/consumer.h:35:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:25:
   In file included from include/linux/kernel_stat.h:8:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:14:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:585:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     585 |         __raw_writeb(value, PCI_IOBASE + addr);
         |                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:595:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     595 |         __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   include/asm-generic/io.h:605:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     605 |         __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   In file included from sound/soc/codecs/es7243e.c:15:
   In file included from include/linux/i2c.h:19:
   In file included from include/linux/regulator/consumer.h:35:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:21:
   In file included from include/linux/mm.h:2239:
   include/linux/vmstat.h:517:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     517 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> sound/soc/codecs/es7243e.c:252:13: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     252 |                 sdpfmt |= FIELD_PREP(ES7243E_SDP_FMT, 0);
         |                           ^
   sound/soc/codecs/es7243e.c:272:11: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     272 |                 clk2 |= FIELD_PREP(ES7243E_CLK2_BCLK_INV, 0);
         |                         ^
   sound/soc/codecs/es7243e.c:351:8: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     351 |         val = FIELD_PREP(ES7243E_ADCCTL1_SCALE, cd->scale);
         |               ^
   sound/soc/codecs/es7243e.c:405:18: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     405 |         const int val = FIELD_PREP(ES7243E_SDP_MUTE, 3 * !!mute);
         |                         ^
   sound/soc/codecs/es7243e.c:514:8: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     514 |         val = FIELD_PREP(ES7243E_SDP_MUTE, 0);
         |               ^
   sound/soc/codecs/es7243e.c:570:8: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     570 |         val = FIELD_PREP(ES7243E_PGA1_EN, 1);
         |               ^
   7 warnings and 6 errors generated.


vim +/FIELD_PREP +252 sound/soc/codecs/es7243e.c

   239	
   240	static int es7243e_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
   241	{
   242		struct snd_soc_component *component = dai->component;
   243		unsigned int sdpfmt = 0;
   244		unsigned int clk2 = 0;
   245		bool is_dsp = false;
   246		bool invert_lrck = false;
   247		int ret;
   248	
   249		/* Set protocol of the serial data port */
   250		switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
   251		case SND_SOC_DAIFMT_I2S:
 > 252			sdpfmt |= FIELD_PREP(ES7243E_SDP_FMT, 0);
   253			break;
   254		case SND_SOC_DAIFMT_LEFT_J:
   255			sdpfmt |= FIELD_PREP(ES7243E_SDP_FMT, 1);
   256			break;
   257		case SND_SOC_DAIFMT_DSP_A:
   258			sdpfmt |= FIELD_PREP(ES7243E_SDP_FMT, 3);
   259			is_dsp = true;
   260			break;
   261		case SND_SOC_DAIFMT_DSP_B:
   262			sdpfmt |= FIELD_PREP(ES7243E_SDP_FMT, 3);
   263			is_dsp = true;
   264			break;
   265		default:
   266			return -EINVAL;
   267		}
   268	
   269		/* Set LR and BCLK polarity */
   270		switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
   271		case SND_SOC_DAIFMT_NB_NF:
   272			clk2 |= FIELD_PREP(ES7243E_CLK2_BCLK_INV, 0);
   273			sdpfmt |= FIELD_PREP(ES7243E_SDP_LRP, 0);
   274			break;
   275		case SND_SOC_DAIFMT_IB_IF:
   276			clk2 |= FIELD_PREP(ES7243E_CLK2_BCLK_INV, 1);
   277			sdpfmt |= FIELD_PREP(ES7243E_SDP_LRP, 1);
   278			invert_lrck = true;
   279			break;
   280		case SND_SOC_DAIFMT_IB_NF:
   281			clk2 |= FIELD_PREP(ES7243E_CLK2_BCLK_INV, 1);
   282			sdpfmt |= FIELD_PREP(ES7243E_SDP_LRP, 0);
   283			break;
   284		case SND_SOC_DAIFMT_NB_IF:
   285			clk2 |= FIELD_PREP(ES7243E_CLK2_BCLK_INV, 0);
   286			sdpfmt |= FIELD_PREP(ES7243E_SDP_LRP, 1);
   287			invert_lrck = true;
   288			break;
   289		default:
   290			return -EINVAL;
   291		}
   292	
   293		/* Inverted LRCK is not available in DSP mode. */
   294		if (is_dsp && invert_lrck)
   295			return -EINVAL;
   296	
   297		ret = snd_soc_component_update_bits(component, ES7243E_CLK2,
   298						    ES7243E_CLK2_BCLK_INV, clk2);
   299		if (ret < 0)
   300			return ret;
   301	
   302		return snd_soc_component_update_bits(component, ES7243E_SDP,
   303						     ES7243E_SDP_LRP, sdpfmt);
   304	}
   305	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux