use the kernel's way of suppressing fallthrough
See include/linux/compiler_attributes.h: /* * Add the pseudo keyword 'fallthrough' so case statement blocks * must end with any of these keywords: * break; * fallthrough; * goto <label>; * return [expression]; * * gcc: https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html#Statement-Attributes */ -if __has_attribute(__fallthrough__) - define fallthrough __attribute__((__fallthrough__)) -else - define fallthrough do {} while (0) /* fallthrough */ -endif
This commit is contained in:
parent
30276c80bc
commit
74d65bfcbd
2 changed files with 3 additions and 3 deletions
2
ac108.c
2
ac108.c
|
@ -865,7 +865,7 @@ static int ac108_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) {
|
||||||
/* TODO: Both cpu_dai and codec_dai(AC108) be set as slave in DTS */
|
/* TODO: Both cpu_dai and codec_dai(AC108) be set as slave in DTS */
|
||||||
dev_dbg(dai->dev, "used as slave when AC101 is master\n");
|
dev_dbg(dai->dev, "used as slave when AC101 is master\n");
|
||||||
}
|
}
|
||||||
/* fall through */
|
fallthrough;
|
||||||
case SND_SOC_DAIFMT_CBS_CFS: /*AC108 Slave*/
|
case SND_SOC_DAIFMT_CBS_CFS: /*AC108 Slave*/
|
||||||
dev_dbg(dai->dev, "AC108 set to work as Slave\n");
|
dev_dbg(dai->dev, "AC108 set to work as Slave\n");
|
||||||
/**
|
/**
|
||||||
|
|
4
wm8960.c
4
wm8960.c
|
@ -752,8 +752,8 @@ static int wm8960_hw_params(struct snd_pcm_substream *substream,
|
||||||
if ((iface & 0x3) != 0) {
|
if ((iface & 0x3) != 0) {
|
||||||
iface |= 0x000c;
|
iface |= 0x000c;
|
||||||
break;
|
break;
|
||||||
};
|
}
|
||||||
/* fall through */
|
fallthrough;
|
||||||
default:
|
default:
|
||||||
dev_err(codec->dev, "unsupported width %d\n",
|
dev_err(codec->dev, "unsupported width %d\n",
|
||||||
params_width(params));
|
params_width(params));
|
||||||
|
|
Loading…
Reference in a new issue