summaryrefslogtreecommitdiffstats
path: root/fs/ubifs/misc.h
diff options
context:
space:
mode:
authorYaowei Bai <bywxiaobai@163.com>2015-09-29 21:57:33 +0800
committerRichard Weinberger <richard@nod.at>2015-11-06 23:26:48 +0100
commit86ba9ed928f33cf6afbac433ff03dd8c6a0ceac4 (patch)
tree693075a3e15930c1eb1293c4eccf8c51cf63f287 /fs/ubifs/misc.h
parent1cb8f9776c7dcadc57885c6653943511d282633b (diff)
downloadop-kernel-dev-86ba9ed928f33cf6afbac433ff03dd8c6a0ceac4.zip
op-kernel-dev-86ba9ed928f33cf6afbac433ff03dd8c6a0ceac4.tar.gz
fs/ubifs: remove unnecessary new_valid_dev check
As currently new_valid_dev always returns 1, so new_valid_dev check is not needed, remove it. Signed-off-by: Yaowei Bai <bywxiaobai@163.com> Reviewed-by: Richard Weinberger <richard@nod.at> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/misc.h')
-rw-r--r--fs/ubifs/misc.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/ubifs/misc.h b/fs/ubifs/misc.h
index ee7cb5e..8ece6ca 100644
--- a/fs/ubifs/misc.h
+++ b/fs/ubifs/misc.h
@@ -155,13 +155,8 @@ static inline int ubifs_wbuf_sync(struct ubifs_wbuf *wbuf)
*/
static inline int ubifs_encode_dev(union ubifs_dev_desc *dev, dev_t rdev)
{
- if (new_valid_dev(rdev)) {
- dev->new = cpu_to_le32(new_encode_dev(rdev));
- return sizeof(dev->new);
- } else {
- dev->huge = cpu_to_le64(huge_encode_dev(rdev));
- return sizeof(dev->huge);
- }
+ dev->new = cpu_to_le32(new_encode_dev(rdev));
+ return sizeof(dev->new);
}
/**
OpenPOWER on IntegriCloud