Skip to content

Commit 95b2536

Browse files
arndbbroonie
authored andcommitted
ASoC: Intel: catpt: avoid type mismatch in dev_dbg() format
Depending on the architecture __ffs() returns either an 'unsigned long' or 'unsigned int' result. Compile-testing this driver on targets that use the latter produces a warning: sound/soc/intel/catpt/dsp.c: In function 'catpt_dsp_set_srampge': sound/soc/intel/catpt/dsp.c:181:44: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'u32' {aka 'unsigned int'} [-Werror=format=] 181 | dev_dbg(cdev->dev, "sanitize block %ld: off 0x%08x\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change the type of the local variable to match the format string and avoid the warning on any architecture. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Cezary Rojewski <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent a549b92 commit 95b2536

File tree

1 file changed

+1
-1
lines changed
  • sound/soc/intel/catpt

1 file changed

+1
-1
lines changed

sound/soc/intel/catpt/dsp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static void catpt_dsp_set_srampge(struct catpt_dev *cdev, struct resource *sram,
156156
{
157157
unsigned long old;
158158
u32 off = sram->start;
159-
u32 b = __ffs(mask);
159+
unsigned long b = __ffs(mask);
160160

161161
old = catpt_readl_pci(cdev, VDRTCTL0) & mask;
162162
dev_dbg(cdev->dev, "SRAMPGE [0x%08lx] 0x%08lx -> 0x%08lx",

0 commit comments

Comments
 (0)