linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Pasha Tatashin <pasha.tatashin@soleen.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-mm <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	 LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm/page_table_check: Drop all redundant EXPORT_SYMBOL()
Date: Wed, 20 Apr 2022 12:54:08 -0400	[thread overview]
Message-ID: <CA+CK2bARgsgBAgawfAD8-xzDN6+_sg4zrPQnoTFy4b=ZMx_u1g@mail.gmail.com> (raw)
In-Reply-To: <20220420060221.1107736-1-anshuman.khandual@arm.com>

On Wed, Apr 20, 2022 at 2:01 AM Anshuman Khandual
<anshuman.khandual@arm.com> wrote:
>
> Function definitions need not be exported via EXPORT_SYMBOL() mechanism. In
> this case these functions just get called only inside their wrappers. Even
> __page_table_check_zero() gets called without such an export. Just drop all
> these redundant EXPORT_SYMBOL().
>
> Cc: Pasha Tatashin <pasha.tatashin@soleen.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: linux-mm@kvack.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
> This applies on v5.18-rc3
>
>  mm/page_table_check.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/mm/page_table_check.c b/mm/page_table_check.c
> index 2458281bff89..5c2a96159832 100644
> --- a/mm/page_table_check.c
> +++ b/mm/page_table_check.c
> @@ -167,7 +167,6 @@ void __page_table_check_pte_clear(struct mm_struct *mm, unsigned long addr,
>                                        PAGE_SIZE >> PAGE_SHIFT);
>         }
>  }
> -EXPORT_SYMBOL(__page_table_check_pte_clear);
>
>  void __page_table_check_pmd_clear(struct mm_struct *mm, unsigned long addr,
>                                   pmd_t pmd)
> @@ -180,7 +179,6 @@ void __page_table_check_pmd_clear(struct mm_struct *mm, unsigned long addr,
>                                        PMD_PAGE_SIZE >> PAGE_SHIFT);
>         }
>  }
> -EXPORT_SYMBOL(__page_table_check_pmd_clear);
>
>  void __page_table_check_pud_clear(struct mm_struct *mm, unsigned long addr,
>                                   pud_t pud)
> @@ -193,7 +191,6 @@ void __page_table_check_pud_clear(struct mm_struct *mm, unsigned long addr,
>                                        PUD_PAGE_SIZE >> PAGE_SHIFT);
>         }
>  }
> -EXPORT_SYMBOL(__page_table_check_pud_clear);
>
>  void __page_table_check_pte_set(struct mm_struct *mm, unsigned long addr,
>                                 pte_t *ptep, pte_t pte)
> @@ -208,7 +205,6 @@ void __page_table_check_pte_set(struct mm_struct *mm, unsigned long addr,
>                                      pte_write(pte));
>         }
>  }
> -EXPORT_SYMBOL(__page_table_check_pte_set);

Hi Anshuman,

See this:
https://lore.kernel.org/all/20211124234754.l5co34dUK%25akpm@linux-foundation.org/

The rest of EXPORTs were added to be symmetric, and allow other
drivers to use set_*p**()/clear_p** calls.

Pasha


  reply	other threads:[~2022-04-20 16:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20  6:02 Anshuman Khandual
2022-04-20 16:54 ` Pasha Tatashin [this message]
2022-04-21  3:23   ` Matthew Wilcox
2022-04-21  3:32     ` Pasha Tatashin
2022-04-21  3:47       ` Anshuman Khandual

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='CA+CK2bARgsgBAgawfAD8-xzDN6+_sg4zrPQnoTFy4b=ZMx_u1g@mail.gmail.com' \
    --to=pasha.tatashin@soleen.com \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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