linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: Denis Efremov <efremov@linux.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
	Josh Triplett <josh@joshtriplett.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] torture: remove exporting of internal functions
Date: Thu, 4 Jul 2019 07:19:20 -0700	[thread overview]
Message-ID: <20190704141919.GD26519@linux.ibm.com> (raw)
In-Reply-To: <20190704125719.31290-1-efremov@linux.com>

On Thu, Jul 04, 2019 at 03:57:19PM +0300, Denis Efremov wrote:
> The functions torture_onoff_cleanup, torture_shuffle_cleanup are declared
> as static and marked as EXPORT_SYMBOL. It's a bit confusing for an
> internal function to be exported. The area of visibility for such function
> is its .c file and all other modules. Other *.c files of the same module
> can't use it, despite all other modules can. Relying on the fact that these
> are the internal functions and they are not a crucial part of the API, the
> patch removes the EXPORT_SYMBOL marking of the torture_onoff_cleanup and
> torture_shuffle_cleanup. The patch complements commit cc47ae083026
> ("rcutorture: Abstract torture-test cleanup").
> 
> Signed-off-by: Denis Efremov <efremov@linux.com>

Good catch, applied, thank you!

I reworked the commit message as follows, so could you please check
to make sure that I didn't fold, spindle, or otherwise mutilate
something?

						Thanx, Paul

------------------------------------------------------------------------

commit 0848a1dfea913f0c384b49a1f61f84b95a4d555a
Author: Denis Efremov <efremov@linux.com>
Date:   Thu Jul 4 15:57:19 2019 +0300

    torture: Remove exporting of internal functions
    
    The functions torture_onoff_cleanup() and torture_shuffle_cleanup()
    are declared static and marked EXPORT_SYMBOL_GPL(), which is at best an
    odd combination.  Because these functions are not used outside of the
    kernel/torture.c file they are defined in, this commit removes their
    EXPORT_SYMBOL_GPL() marking.
    
    Fixes: cc47ae083026 ("rcutorture: Abstract torture-test cleanup")
    Signed-off-by: Denis Efremov <efremov@linux.com>
    Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>

diff --git a/kernel/torture.c b/kernel/torture.c
index a8d9bdfba7c3..7c13f5558b71 100644
--- a/kernel/torture.c
+++ b/kernel/torture.c
@@ -263,7 +263,6 @@ static void torture_onoff_cleanup(void)
 	onoff_task = NULL;
 #endif /* #ifdef CONFIG_HOTPLUG_CPU */
 }
-EXPORT_SYMBOL_GPL(torture_onoff_cleanup);
 
 /*
  * Print online/offline testing statistics.
@@ -449,7 +448,6 @@ static void torture_shuffle_cleanup(void)
 	}
 	shuffler_task = NULL;
 }
-EXPORT_SYMBOL_GPL(torture_shuffle_cleanup);
 
 /*
  * Variables for auto-shutdown.  This allows "lights out" torture runs


  reply	other threads:[~2019-07-04 14:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04 12:57 [PATCH] torture: remove exporting of internal functions Denis Efremov
2019-07-04 14:19 ` Paul E. McKenney [this message]
2019-07-04 14:46   ` Denis Efremov

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=20190704141919.GD26519@linux.ibm.com \
    --to=paulmck@linux.ibm.com \
    --cc=dave@stgolabs.net \
    --cc=efremov@linux.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).