mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Tim Abbott <tabbott@MIT.EDU>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>,
	Anders Kaseorg <andersk@MIT.EDU>, Waseem Daher <wdaher@MIT.EDU>,
	Denys Vlasenko <vda.linux@googlemail.com>,
	Jeff Arnold <jbarnold@MIT.EDU>, Paul Mundt <lethal@linux-sh.org>
Subject: Re: [PATCH 8/8] Remove unused support code for refok sections.
Date: Mon, 27 Apr 2009 20:51:56 +0200	[thread overview]
Message-ID: <20090427185156.GH12056@uranus.ravnborg.org> (raw)
In-Reply-To: <1240855347-19316-9-git-send-email-tabbott@mit.edu>

On Mon, Apr 27, 2009 at 02:02:27PM -0400, Tim Abbott wrote:
> The old refok sections
> 
>   .text.init.refok
>   .data.init.refok
>   .exit.text.refok
> 
> have been deprecated since commit
> 312b1485fb509c9bc32eda28ad29537896658cb8.  After the other patches in
> this patch series nothing is put in these sections, so clean things up
> by eliminating all the remaining references to them.
> 
> Signed-off-by: Tim Abbott <tabbott@mit.edu>
> Cc: Sam Ravnborg <sam@ravnborg.org>

I like this cleanup!
Acked-by: Sam Ravnborg <sam@ravnborg.org>

> ---
>  include/asm-generic/vmlinux.lds.h |    3 ---
>  include/linux/init.h              |    8 --------
>  scripts/mod/modpost.c             |   18 ------------------
>  3 files changed, 0 insertions(+), 29 deletions(-)
> 
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index eaa06ef..89853bc 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -90,7 +90,6 @@
>  /* .data section */
>  #define DATA_DATA							\
>  	*(.data)							\
> -	*(.data.init.refok)						\
>  	*(.ref.data)							\
>  	DEV_KEEP(init.data)						\
>  	DEV_KEEP(exit.data)						\
> @@ -289,8 +288,6 @@
>  		*(.text.hot)						\
>  		*(.text)						\
>  		*(.ref.text)						\
> -		*(.text.init.refok)					\
> -		*(.exit.text.refok)					\
>  	DEV_KEEP(init.text)						\
>  	DEV_KEEP(exit.text)						\
>  	CPU_KEEP(init.text)						\
> diff --git a/include/linux/init.h b/include/linux/init.h
> index 20a1334..0e06c17 100644
> --- a/include/linux/init.h
> +++ b/include/linux/init.h
> @@ -62,14 +62,6 @@
>  #define __refdata        __section(.ref.data)
>  #define __refconst       __section(.ref.rodata)
>  
> -/* backward compatibility note
> - *  A few places hardcode the old section names:
> - *  .text.init.refok
> - *  .data.init.refok
> - *  .exit.text.refok
> - *  They should be converted to use the defines from this file
> - */
> -
>  /* compatibility defines */
>  #define __init_refok     __ref
>  #define __initdata_refok __refdata
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index df6e628..8d46ea7 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -794,15 +794,6 @@ static const char *init_exit_sections[] =
>  /* data section */
>  static const char *data_sections[] = { DATA_SECTIONS, NULL };
>  
> -/* sections that may refer to an init/exit section with no warning */
> -static const char *initref_sections[] =
> -{
> -	".text.init.refok*",
> -	".exit.text.refok*",
> -	".data.init.refok*",
> -	NULL
> -};
> -
>  
>  /* symbols in .data that may refer to init/exit sections */
>  static const char *symbol_white_list[] =
> @@ -915,11 +906,6 @@ static int section_mismatch(const char *fromsec, const char *tosec)
>  /**
>   * Whitelist to allow certain references to pass with no warning.
>   *
> - * Pattern 0:
> - *   Do not warn if funtion/data are marked with __init_refok/__initdata_refok.
> - *   The pattern is identified by:
> - *   fromsec = .text.init.refok* | .data.init.refok*
> - *
>   * Pattern 1:
>   *   If a module parameter is declared __initdata and permissions=0
>   *   then this is legal despite the warning generated.
> @@ -958,10 +944,6 @@ static int section_mismatch(const char *fromsec, const char *tosec)
>  static int secref_whitelist(const char *fromsec, const char *fromsym,
>  			    const char *tosec, const char *tosym)
>  {
> -	/* Check for pattern 0 */
> -	if (match(fromsec, initref_sections))
> -		return 0;
> -
>  	/* Check for pattern 1 */
>  	if (match(tosec, init_data_sections) &&
>  	    match(fromsec, data_sections) &&
> -- 
> 1.6.2.1
> 

  reply	other threads:[~2009-04-27 18:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-27 18:02 [PATCH 0/8] cleanup old init and " Tim Abbott
2009-04-27 18:02 ` [PATCH 1/8] frv: Remove unused header asm/init.h Tim Abbott
2009-04-27 18:02   ` [PATCH 2/8] frv: Use __INIT macro instead of .text.init Tim Abbott
2009-04-27 18:02     ` [PATCH 3/8] arm: " Tim Abbott
2009-04-27 18:02       ` [PATCH 4/8] powerpc: Use TEXT_TEXT macro in linker script Tim Abbott
2009-04-27 18:02         ` [PATCH 5/8] powerpc: Use __REF macro instead of old .text.init.refok Tim Abbott
2009-04-27 18:02           ` [PATCH 6/8] sh: Use __INIT macro instead of .text.init Tim Abbott
2009-04-27 18:02             ` [PATCH 7/8] sparc: cleanup references to deprecated .text.init* sections Tim Abbott
2009-04-27 18:02               ` [PATCH 8/8] Remove unused support code for refok sections Tim Abbott
2009-04-27 18:51                 ` Sam Ravnborg [this message]
2009-04-27 18:50               ` [PATCH 7/8] sparc: cleanup references to deprecated .text.init* sections Sam Ravnborg
2009-04-27 18:47             ` [PATCH 6/8] sh: Use __INIT macro instead of .text.init Sam Ravnborg
2009-04-27 21:54             ` Paul Mundt
2009-04-27 18:44           ` [PATCH 5/8] powerpc: Use __REF macro instead of old .text.init.refok Sam Ravnborg
2009-04-27 18:44         ` [PATCH 4/8] powerpc: Use TEXT_TEXT macro in linker script Sam Ravnborg
2009-04-27 18:43       ` [PATCH 3/8] arm: Use __INIT macro instead of .text.init Sam Ravnborg
2009-04-27 18:44         ` Russell King
2009-04-27 18:37     ` [PATCH 2/8] frv: " Sam Ravnborg
2009-04-27 18:31   ` [PATCH 1/8] frv: Remove unused header asm/init.h Sam Ravnborg

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=20090427185156.GH12056@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=andersk@MIT.EDU \
    --cc=jbarnold@MIT.EDU \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tabbott@MIT.EDU \
    --cc=torvalds@linux-foundation.org \
    --cc=vda.linux@googlemail.com \
    --cc=wdaher@MIT.EDU \
    /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

all inboxes | Powered by JetHome®