History

ASoC: Intel: avs: Fix build error on arc, m68k and sparc

On some platforms (i.e. arc, m68k and sparc) __fls returns an int (while on most platforms it returns an unsigned long). This triggers a format warning on these few platforms as the driver uses %ld to print a warning. So explicitly cast the return value to unsigned long to make the warning go away (and so fix allmodconfig build on the affected architectures).

Uwe Kleine-König committed 4 years ago

Commit d6f81681 parent 5fa66f21 file · +2 −1Browse files

Unified · Split

sound/soc/intel/avs/board_selection.c+2−1
@@ -326,7 +326,8 @@ static int avs_register_i2s_board(struct avs_dev *adev, struct snd_soc_acpi_mach · 325 unmodified lines
326326 num_ssps = adev->hw_cfg.i2s_caps.ctrl_count;
327327 if (fls(mach->mach_params.i2s_link_mask) > num_ssps) {
328328 dev_err(adev->dev, "Platform supports %d SSPs but board %s requires SSP%ld\n",
329− num_ssps, mach->drv_name, __fls(mach->mach_params.i2s_link_mask));
329+ num_ssps, mach->drv_name,
330+ (unsigned long)__fls(mach->mach_params.i2s_link_mask));
330331 return -ENODEV;
331332 }
332333

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t