All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: alsa-devel@alsa-project.org, tiwai@suse.de,
	"Ranjani Sridharan" <ranjani.sridharan@linux.intel.com>,
	"Rander Wang" <rander.wang@intel.com>,
	broonie@kernel.org,
	"Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>
Subject: Re: [PATCH 03/16] ASoC: SOF: ops: add readb/writeb helpers
Date: Thu, 27 Oct 2022 11:51:02 -0700	[thread overview]
Message-ID: <Y1rTFrohLqaiZAy/@dev-arch.thelio-3990X> (raw)
In-Reply-To: <20221024165310.246183-4-pierre-louis.bossart@linux.intel.com>

Hi Pierre-Louis,

On Mon, Oct 24, 2022 at 11:52:57AM -0500, Pierre-Louis Bossart wrote:
> These will be used to add more consistency in the SOF core and
> drivers.
> 
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
> Reviewed-by: Rander Wang <rander.wang@intel.com>
> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>

This change is now in -next as commit 74fe0c4dcb41 ("ASoC: SOF: ops: add
readb/writeb helpers"), where it breaks the build badly on at least
ARCH=arm:

$ kmake ARCH=arm CROSS_COMPILE=arm-linux-gnu- allmodconfig sound/soc/sof/
...
In file included from sound/soc/sof/sof-client.c:16:
sound/soc/sof/ops.h: In function ‘snd_sof_dsp_writeb’:
sound/soc/sof/ops.h:309:75: error: macro "writeb" passed 3 arguments, but takes just 2
  309 |                 sof_ops(sdev)->writeb(sdev, sdev->bar[bar] + offset, value);
      |                                                                           ^
In file included from ./include/linux/io.h:13,
                 from ./include/linux/irq.h:20,
                 from ./include/asm-generic/hardirq.h:17,
                 from ./arch/arm/include/asm/hardirq.h:10,
                 from ./include/linux/hardirq.h:11,
                 from ./include/linux/interrupt.h:11,
                 from sound/soc/sof/ops.h:15:
./arch/arm/include/asm/io.h:288: note: macro "writeb" defined here
  288 | #define writeb(v,c)             ({ __iowmb(); writeb_relaxed(v,c); })
      |
sound/soc/sof/ops.h:309:30: error: statement with no effect [-Werror=unused-value]
  309 |                 sof_ops(sdev)->writeb(sdev, sdev->bar[bar] + offset, value);
      |                              ^
sound/soc/sof/ops.h: In function ‘snd_sof_dsp_readb’:
sound/soc/sof/ops.h:336:74: error: macro "readb" passed 2 arguments, but takes just 1
  336 |                 return sof_ops(sdev)->readb(sdev, sdev->bar[bar] + offset);
      |                                                                          ^
./arch/arm/include/asm/io.h:284: note: macro "readb" defined here
  284 | #define readb(c)                ({ u8  __v = readb_relaxed(c); __iormb(); __v; })
      |
sound/soc/sof/ops.h:336:37: error: returning ‘u8 (*)(struct snd_sof_dev *, void *)’ {aka ‘unsigned char (*)(struct snd_sof_dev *, void *)’} from a function with return type ‘u8’ {aka ‘unsigned char’} makes integer from pointer without a cast [-Werror=int-conversion]
  336 |                 return sof_ops(sdev)->readb(sdev, sdev->bar[bar] + offset);
      |                                     ^
cc1: all warnings being treated as errors
...

I guess the preprocessor gets to these calls first and everything
explodes from there. Perhaps these should be namespaced somehow?

Cheers,
Nathan

  reply	other threads:[~2022-10-27 18:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24 16:52 [PATCH 00/16] ASoC: SOF: Intel: HDaudio cleanups Pierre-Louis Bossart
2022-10-24 16:52 ` [PATCH 01/16] ASoC: SOF: ops: fallback to mmio in helpers Pierre-Louis Bossart
2022-10-24 16:52 ` [PATCH 02/16] ASoC: SOF: Intel: use mmio fallback for all platforms Pierre-Louis Bossart
2022-10-24 16:52 ` [PATCH 03/16] ASoC: SOF: ops: add readb/writeb helpers Pierre-Louis Bossart
2022-10-27 18:51   ` Nathan Chancellor [this message]
2022-10-27 19:58     ` Pierre-Louis Bossart
2022-10-27 20:02       ` Nathan Chancellor
2022-10-24 16:52 ` [PATCH 04/16] ASoC: SOF: ops: add snd_sof_dsp_updateb() helper Pierre-Louis Bossart
2022-10-24 16:52 ` [PATCH 05/16] ASoC: SOF: Intel: hda-dsp: use SOF helpers for consistency Pierre-Louis Bossart
2022-10-24 16:53 ` [PATCH 06/16] ASoC: SOF: Intel: hda-dai: start removing the use of runtime->private_data in BE Pierre-Louis Bossart
2022-10-24 16:53 ` [PATCH 07/16] ASoC: SOF: Intel: hda-dai: use component_get_drvdata to find hdac_bus Pierre-Louis Bossart
2022-10-24 16:53 ` [PATCH 08/16] ASoC: SOF: Intel: hda-dai: remove useless members in hda_pipe_params Pierre-Louis Bossart
2022-10-24 16:53 ` [PATCH 09/16] ASoC: SOF: Intel: hda-ctrl: remove useless sleep Pierre-Louis Bossart
2022-10-24 16:53 ` [PATCH 10/16] ASoC: SOF: Intel: hda: always do a full reset Pierre-Louis Bossart
2022-10-24 16:53 ` [PATCH 11/16] ASoC: SOF: Intel: hda: remove useless check on GCTL Pierre-Louis Bossart
2022-10-24 16:53 ` [PATCH 12/16] ASoC: SOF: Intel: hda-stream: use SOF helpers for consistency Pierre-Louis Bossart
2022-10-24 16:53 ` [PATCH 13/16] ASoC: SOF: Intel: hda-stream: rename CL_SD_CTL registers as SD_CTL Pierre-Louis Bossart
2022-10-24 16:53 ` [PATCH 14/16] ASoC: SOF: Intel: hda: use SOF helper for consistency Pierre-Louis Bossart
2022-10-24 16:53 ` [PATCH 15/16] ASoC: SOF: Intel: hda-stream: use snd_sof_dsp_updateb() helper Pierre-Louis Bossart
2022-10-24 16:53 ` [PATCH 16/16] ASoC: SOF: Intel: hda-stream: use readb/writeb for stream registers Pierre-Louis Bossart
2022-10-26 19:04 ` [PATCH 00/16] ASoC: SOF: Intel: HDaudio cleanups Mark Brown

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=Y1rTFrohLqaiZAy/@dev-arch.thelio-3990X \
    --to=nathan@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=rander.wang@intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=tiwai@suse.de \
    /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.