public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: wuchi <wuchi.zero@gmail.com>
To: viro@zeniv.linux.org.uk, willy@infradead.org, mwilck@suse.com,
	ddiss@suse.de, akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] initramfs: mask my_inptr as __initdata
Date: Sat, 27 Aug 2022 15:11:16 +0800	[thread overview]
Message-ID: <20220827071116.83078-1-wuchi.zero@gmail.com> (raw)

As my_inptr is only used in __init function unpack_to_rootfs(),
mark it as __initdata to allow it be freed after boot.

Signed-off-by: wuchi <wuchi.zero@gmail.com>
---
 init/initramfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/initramfs.c b/init/initramfs.c
index 18229cfe8906..2f5bfb7d7652 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -482,7 +482,7 @@ static long __init flush_buffer(void *bufv, unsigned long len)
 	return origLen;
 }
 
-static unsigned long my_inptr; /* index of next byte to be processed in inbuf */
+static unsigned long my_inptr __initdata; /* index of next byte to be processed in inbuf */
 
 #include <linux/decompress/generic.h>
 
-- 
2.20.1


             reply	other threads:[~2022-08-27  7:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-27  7:11 wuchi [this message]
2022-08-28 21:19 ` [PATCH] initramfs: mask my_inptr as __initdata David Disseldorp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220827071116.83078-1-wuchi.zero@gmail.com \
    --to=wuchi.zero@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=ddiss@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mwilck@suse.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox