Messages in this thread Patch in this message |  | | From | Qinglang Miao <> | Subject | [PATCH -next] hpfs: convert to use le32_add_cpu() | Date | Sat, 25 Jul 2020 16:56:13 +0800 |
| |
Convert cpu_to_le16(le16_to_cpu(E1) + E2) to use le16_add_cpu().
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.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
|  |