bcache: Use fallthrough pseudo-keyword
PATCH v2 1/1 bcache: Use fallthrough pseudo-keyword
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1].
Signed-off-by Gustavo A. R. Silva <[email protected]>
---
Changes in v2:
- Add missing semicolon.
drivers/md/bcache/journal.c | 2 +- drivers/md/bcache/util.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-)
drivers/md/bcache/journal.c +1 -1
@@ -608,7 +608,7 @@ static void do_journal_discard(struct cache *ca) ca->sb.njournal_buckets;atomic_set (&ja->discard_in_flight,DISCARD_READY ); -/* fallthrough */ + fallthrough;case DISCARD_READY :if (ja->discard_idx == ja->last_idx)
drivers/md/bcache/util.c +7 -7
@@ -33,27 +33,27 @@ int bch_ ## name ## _h(const char *cp, type *res) \case 'y' : \case 'z' : \ u++; \ -/* fall through */ \ + fallthrough; \case 'e' : \ u++; \ -/* fall through */ \ + fallthrough; \case 'p' : \ u++; \ -/* fall through */ \ + fallthrough; \case 't' : \ u++; \ -/* fall through */ \ + fallthrough; \case 'g' : \ u++; \ -/* fall through */ \ + fallthrough; \case 'm' : \ u++; \ -/* fall through */ \ + fallthrough; \case 'k' : \ u++; \if (e++ == cp) \return -EINVAL ; \ -/* fall through */ \ + fallthrough; \case '\n' : \case '\0' : \if (*e =='\n' ) \
Signature · 1 line
2.27.0
Quoted 6 lines · Gustavo A. R. Silva
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1].
Signed-off-by Gustavo A. R. Silva <[email protected]>
I am OK with it, add it to my second for-next series.
Thanks.
Coly Li
Quoted 61 lines
---
Changes in v2:
- Add missing semicolon.drivers/md/bcache/journal.c | 2 +- drivers/md/bcache/util.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-)drivers/md/bcache/journal.c +1
-1@@ -608,7 +608,7 @@ static void do_journal_discard(struct cache *ca) ca->sb.njournal_buckets;atomic_set (&ja->discard_in_flight,DISCARD_READY ); -/* fallthrough */ + fallthrough;case DISCARD_READY :if (ja->discard_idx == ja->last_idx)drivers/md/bcache/util.c +7
-7@@ -33,27 +33,27 @@ int bch_ ## name ## _h(const char *cp, type *res) \case 'y' : \case 'z' : \ u++; \ -/* fall through */ \ + fallthrough; \case 'e' : \ u++; \ -/* fall through */ \ + fallthrough; \case 'p' : \ u++; \ -/* fall through */ \ + fallthrough; \case 't' : \ u++; \ -/* fall through */ \ + fallthrough; \case 'g' : \ u++; \ -/* fall through */ \ + fallthrough; \case 'm' : \ u++; \ -/* fall through */ \ + fallthrough; \case 'k' : \ u++; \if (e++ == cp) \return -EINVAL ; \ -/* fall through */ \ + fallthrough; \case '\n' : \case '\0' : \if (*e =='\n' ) \