Skip to contentSkip to conversation

ceph: Convert to use the preferred fallthrough macro

PATCH In review Miaohe Lin 2 participants 2 messages Aug 19, 2020 Ceph client

lore
Share & tools
lore

Miaohe Lin

author
#0 lore raw

PATCH 1/1 ceph: Convert to use the preferred fallthrough macro

Convert the uses of fallthrough comments to fallthrough macro.

---
 fs/ceph/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ceph/file.c +1 -1
index d51c3f2fdca0..30cd00265181 100644
@@ -252,7 +252,7 @@ static int ceph_init_file(struct inode *inode, struct file *file, int fmode)
 	case S_IFREG:
 		ceph_fscache_register_inode_cookie(inode);
 		ceph_fscache_file_set_cookie(inode, file);
-		/* fall through */
+		fallthrough;
 	case S_IFDIR:
 		ret = ceph_init_file_info(inode, file, fmode,
 						S_ISDIR(inode->i_mode));
Signature · 1 line
2.19.1
maintainer
#1 lore raw
Quoted 23 lines · Miaohe Lin

Convert the uses of fallthrough comments to fallthrough macro.

---
 fs/ceph/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ceph/file.c +1 -2
index d51c3f2fdca0..30cd00265181 100644
@@ -252,7 +252,7 @@ static int ceph_init_file(struct inode *inode, struct file *file, int fmode)
        case S_IFREG:
                ceph_fscache_register_inode_cookie(inode);
                ceph_fscache_file_set_cookie(inode, file);
-               /* fall through */
+               fallthrough;
        case S_IFDIR:
                ret = ceph_init_file_info(inode, file, fmode,
                                                S_ISDIR(inode->i_mode));
--
Quoted 2 lines

2.19.1

Hi Miaohe,

I've already done that, folding into your previous patch:

https://github.com/ceph/ceph-client/commit/3f19ae89547df1b8ccba359a2f7ddba0f108ffbd

Thanks,

Ilya