* [PATCH -next] hpfs: convert to use le32_add_cpu()
@ 2020-07-25 8:56 Qinglang Miao
0 siblings, 0 replies; only message in thread
From: Qinglang Miao @ 2020-07-25 8:56 UTC (permalink / raw)
To: Mikulas Patocka, Greg Kroah-Hartman; +Cc: linux-kernel
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-25 8:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-25 8:56 [PATCH -next] hpfs: convert to use le32_add_cpu() Qinglang Miao
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.