[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200725085613.98222-1-miaoqinglang@huawei.com>
Date: Sat, 25 Jul 2020 16:56:13 +0800
From: Qinglang Miao <miaoqinglang@...wei.com>
To: Mikulas Patocka <mikulas@...ax.karlin.mff.cuni.cz>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: <linux-kernel@...r.kernel.org>
Subject: [PATCH -next] hpfs: convert to use le32_add_cpu()
Convert cpu_to_le16(le16_to_cpu(E1) + E2) to use le16_add_cpu().
Signed-off-by: Qinglang Miao <miaoqinglang@...wei.com>
---
fs/hpfs/dnode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/hpfs/dnode.c b/fs/hpfs/dnode.c
index 4ada525c5..76f539601 100644
--- a/fs/hpfs/dnode.c
+++ b/fs/hpfs/dnode.c
@@ -208,7 +208,7 @@ static void hpfs_delete_de(struct super_block *s, struct dnode *d,
hpfs_error(s, "attempt to delete last dirent in dnode %08x", le32_to_cpu(d->self));
return;
}
- d->first_free = cpu_to_le32(le32_to_cpu(d->first_free) - le16_to_cpu(de->length));
+ le32_add_cpu(&d->first_free, -le16_to_cpu(de->length));
memmove(de, de_next_de(de), le32_to_cpu(d->first_free) + (char *)d - (char *)de);
}
--
2.25.1
Powered by blists - more mailing lists