Commit graph

7 commits

Author SHA1 Message Date
Hin-Tak Leung
74d65bfcbd 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
2020-04-27 01:07:51 +01:00
Hin-Tak Leung
476378c156 suppress "this statement may fall through" warning
The semi-colon is needed, to prevent the comment being parsed as part of the "if {...}" statement.

The warning looks like this:

seeed-voicecard/wm8960.c: In function ‘wm8960_hw_params’:
seeed-voicecard/wm8960.c:752:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
  752 |   if ((iface & 0x3) != 0) {
      |      ^
seeed-voicecard/wm8960.c:757:2: note: here
  757 |  default:
      |  ^~~~~~~
2020-04-26 23:27:54 +01:00
respeaker
b98fce84e0 Add: compatible to linux-4.18 or higher 2019-03-14 03:13:25 +00:00
root
188be2636f Fix: API name to DECLARE_TLV_DB_RANGE 2017-12-15 07:47:08 +00:00
Baozhu Zuo
f6e665e6fe remove debug message 2017-05-22 15:49:41 +08:00
Baozhu Zuo
a35c5a9546 using 24M mclk 2017-05-16 14:31:19 +08:00
Baozhu Zuo
57b9cc640c add all project files 2017-04-27 15:31:04 +08:00