initrd: Remove unused parameter 'pos' from identify_ramdisk_image()
PATCH 1/1 initrd: Remove unused parameter 'pos' from identify_ramdisk_image()
Commit bef173299613 ("initrd: switch initrd loading to struct file based APIs") added the parameter 'loff_t pos' to the identify_ramdisk_image() function and passed 'in_pos' from rd_load_image(). However, the passed value is immediately overwritten inside identify_ramdisk_image() and therefore never used.
Replace the function parameter with a local variable and update the call site accordingly.
No functional changes intended.
Signed-off-by Thorsten Blum <[email protected]>
--- init/do_mounts_rd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
init/do_mounts_rd.c +3 -3
@@ -55,8 +55,7 @@ static int __init crd_load(decompress_fn deco);* lz4 */ static int __init -identify_ramdisk_image (struct file *file,loff_t pos, -decompress_fn *decompressor) +identify_ramdisk_image (struct file *file,decompress_fn *decompressor) {const int size =512 ;struct minix_super_block *minixsb;
@@ -68,6 +67,7 @@ identify_ramdisk_image(struct file *file, loff_t pos,const char *compress_name;unsigned long n;int start_block = rd_image_start; +loff_t pos; buf =kmalloc (size,GFP_KERNEL );if (!buf)
@@ -202,7 +202,7 @@ int __init rd_load_image(char *from) goto noclose_input; in_pos = rd_image_start *BLOCK_SIZE ; - nblocks =identify_ramdisk_image (in_file, in_pos, &decompressor); + nblocks =identify_ramdisk_image (in_file, &decompressor);if (nblocks <0 ) goto done;
Signature · 1 line
2.51.0
Please, drop your initrd-related patches.
I recently sent patchset, which simply removes initrd support:
https://lore.kernel.org/lkml/[email protected]/
Signature · 1 line
Askar Safin