All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	Mark Brown <broonie@kernel.org>,
	Samuel Holland <samuel@sholland.org>, Ondrej Jirman <megi@xff.cz>
Subject: [linux-next:master 1069/2532] sound/soc/sunxi/sun8i-codec.c:1355:38: error: no member named 'type' in 'struct snd_jack'
Date: Sun, 31 Mar 2024 12:07:37 +0800	[thread overview]
Message-ID: <202403311242.2m3EXGCO-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   a6bd6c9333397f5a0e2667d4d82fef8c970108f2
commit: 21fa98f4197bb3365dda1417708b318f403c13c1 [1069/2532] ASoC: sun8i-codec: Implement jack and accessory detection
config: hexagon-randconfig-r016-20211019 (https://download.01.org/0day-ci/archive/20240331/202403311242.2m3EXGCO-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240331/202403311242.2m3EXGCO-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/202403311242.2m3EXGCO-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from sound/soc/sunxi/sun8i-codec.c:16:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     547 |         val = __raw_readb(PCI_IOBASE + addr);
         |                           ~~~~~~~~~~ ^
   include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     560 |         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/sunxi/sun8i-codec.c:16:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     573 |         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/sunxi/sun8i-codec.c:16:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     584 |         __raw_writeb(value, PCI_IOBASE + addr);
         |                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     594 |         __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     604 |         __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
>> sound/soc/sunxi/sun8i-codec.c:1355:38: error: no member named 'type' in 'struct snd_jack'
    1355 |         int type_mask = scodec->jack->jack->type;
         |                         ~~~~~~~~~~~~~~~~~~  ^
   sound/soc/sunxi/sun8i-codec.c:1494:30: error: no member named 'type' in 'struct snd_jack'
    1494 |                                             scodec->jack->jack->type);
         |                                             ~~~~~~~~~~~~~~~~~~  ^
   6 warnings and 2 errors generated.


vim +1355 sound/soc/sunxi/sun8i-codec.c

  1349	
  1350	static void sun8i_codec_jack_work(struct work_struct *work)
  1351	{
  1352		struct sun8i_codec *scodec = container_of(work, struct sun8i_codec,
  1353							  jack_work.work);
  1354		unsigned int mdata;
> 1355		int type_mask = scodec->jack->jack->type;
  1356		int type;
  1357	
  1358		guard(mutex)(&scodec->jack_mutex);
  1359	
  1360		if (scodec->jack_status == SUN8I_JACK_STATUS_DISCONNECTED) {
  1361			if (scodec->last_hmic_irq != SUN8I_HMIC_STS_JACK_IN_IRQ_ST)
  1362				return;
  1363	
  1364			scodec->jack_last_sample = -1;
  1365	
  1366			if (type_mask & SND_JACK_MICROPHONE) {
  1367				/*
  1368				 * If we were in disconnected state, we enable HBIAS and
  1369				 * wait 600ms before reading initial HDATA value.
  1370				 */
  1371				scodec->jack_hbias_ready = ktime_add_ms(ktime_get(), 600);
  1372				sun8i_codec_set_hmic_bias(scodec, true);
  1373				queue_delayed_work(system_power_efficient_wq,
  1374						   &scodec->jack_work,
  1375						   msecs_to_jiffies(610));
  1376				scodec->jack_status = SUN8I_JACK_STATUS_WAITING_HBIAS;
  1377			} else {
  1378				snd_soc_jack_report(scodec->jack, SND_JACK_HEADPHONE,
  1379						    type_mask);
  1380				scodec->jack_status = SUN8I_JACK_STATUS_CONNECTED;
  1381			}
  1382		} else if (scodec->jack_status == SUN8I_JACK_STATUS_WAITING_HBIAS) {
  1383			/*
  1384			 * If we're waiting for HBIAS to stabilize, and we get plug-out
  1385			 * interrupt and nothing more for > 100ms, just cancel the
  1386			 * initialization.
  1387			 */
  1388			if (scodec->last_hmic_irq == SUN8I_HMIC_STS_JACK_OUT_IRQ_ST) {
  1389				scodec->jack_status = SUN8I_JACK_STATUS_DISCONNECTED;
  1390				sun8i_codec_set_hmic_bias(scodec, false);
  1391				return;
  1392			}
  1393	
  1394			/*
  1395			 * If we're not done waiting for HBIAS to stabilize, wait more.
  1396			 */
  1397			if (!ktime_after(ktime_get(), scodec->jack_hbias_ready)) {
  1398				s64 msecs = ktime_ms_delta(scodec->jack_hbias_ready,
  1399							   ktime_get());
  1400	
  1401				queue_delayed_work(system_power_efficient_wq,
  1402						   &scodec->jack_work,
  1403						   msecs_to_jiffies(msecs + 10));
  1404				return;
  1405			}
  1406	
  1407			/*
  1408			 * Everything is stabilized, determine jack type and report it.
  1409			 */
  1410			regmap_read(scodec->regmap, SUN8I_HMIC_STS, &mdata);
  1411			mdata &= SUN8I_HMIC_STS_HMIC_DATA_MASK;
  1412			mdata >>= SUN8I_HMIC_STS_HMIC_DATA;
  1413	
  1414			regmap_write(scodec->regmap, SUN8I_HMIC_STS, 0);
  1415	
  1416			type = mdata < 16 ? SND_JACK_HEADPHONE : SND_JACK_HEADSET;
  1417			if (type == SND_JACK_HEADPHONE)
  1418				sun8i_codec_set_hmic_bias(scodec, false);
  1419	
  1420			snd_soc_jack_report(scodec->jack, type, type_mask);
  1421			scodec->jack_status = SUN8I_JACK_STATUS_CONNECTED;
  1422		} else if (scodec->jack_status == SUN8I_JACK_STATUS_CONNECTED) {
  1423			if (scodec->last_hmic_irq != SUN8I_HMIC_STS_JACK_OUT_IRQ_ST)
  1424				return;
  1425	
  1426			scodec->jack_status = SUN8I_JACK_STATUS_DISCONNECTED;
  1427			if (type_mask & SND_JACK_MICROPHONE)
  1428				sun8i_codec_set_hmic_bias(scodec, false);
  1429	
  1430			snd_soc_jack_report(scodec->jack, 0, type_mask);
  1431		}
  1432	}
  1433	

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

                 reply	other threads:[~2024-03-31  4:08 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=202403311242.2m3EXGCO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=arnaud.ferraris@collabora.com \
    --cc=broonie@kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=llvm@lists.linux.dev \
    --cc=megi@xff.cz \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=samuel@sholland.org \
    /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.