diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-11-03 16:30:21 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2012-12-13 10:33:24 -0500 |
commit | 4789775477718983b6f8c604a809b950c6a10052 (patch) | |
tree | 55c4cb49cca66be128475524eda10460ea0b4e19 /fs/ext3 | |
parent | 195c0f96f0f96da317e22c9851a7ecc1a541f9ad (diff) |
ext3: drop if around WARN_ON
Just use WARN_ON rather than an if containing only WARN_ON(1).
A simplified version of the semantic patch that makes this transformation
is as follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression e;
@@
- if (e) WARN_ON(1);
+ WARN_ON(e);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext3')
-rw-r--r-- | fs/ext3/inode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index 7e87e37a372a..b176d4253544 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c | |||
@@ -1071,8 +1071,7 @@ struct buffer_head *ext3_getblk(handle_t *handle, struct inode *inode, | |||
1071 | * mapped. 0 in case of a HOLE. | 1071 | * mapped. 0 in case of a HOLE. |
1072 | */ | 1072 | */ |
1073 | if (err > 0) { | 1073 | if (err > 0) { |
1074 | if (err > 1) | 1074 | WARN_ON(err > 1); |
1075 | WARN_ON(1); | ||
1076 | err = 0; | 1075 | err = 0; |
1077 | } | 1076 | } |
1078 | *errp = err; | 1077 | *errp = err; |