Skip to contentSkip to conversation

erofs-utils: lib: use cpu_to_le16() for chunk index startblk_hi

PATCH New Yifan Zhao 1 participant 1 message Aug 28 Library code

lore
Share & tools
lore

Yifan Zhao

author
#0 lore raw

PATCH 1/1 erofs-utils: lib: use cpu_to_le16() for chunk index startblk_hi

Assisted-by Codex:gpt-5.6-sol
---
 lib/blobchunk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/blobchunk.c +1 -1
index d307a4f..f969cf2 100644
@@ -245,7 +245,7 @@ int erofs_write_chunk_indexes(struct erofs_inode *inode, struct erofs_vfile *vf,
 		startblk &= addrmask;
 		idx.device_id = cpu_to_le16(chunk->device_id);
 		idx.startblk_lo = cpu_to_le32(startblk);
-		idx.startblk_hi = cpu_to_le32(startblk >> 32);
+		idx.startblk_hi = cpu_to_le16(startblk >> 32);
 		DBG_BUGON(!_48bit && idx.startblk_hi);
 
 		if (unit == EROFS_BLOCK_MAP_ENTRY_SIZE)
Signature · 1 line
2.55.0