All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Nazarewicz <m.nazarewicz@samsung.com>
To: linux-usb@vger.kernel.org, Greg KH <greg@kroah.com>
Cc: linux-kernel@vger.kernel.org,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Sam Ravnborg" <sam@ravnborg.org>
Subject: [PATCHv8 13/13] init.h: add some more documentation to __ref* tags
Date: Thu, 12 Aug 2010 17:43:56 +0200	[thread overview]
Message-ID: <596c51e49e129c14531a6367ea7b321ee541bdb5.1281625724.git.m.nazarewicz@samsung.com> (raw)
In-Reply-To: <c4e57f3ae9153e524e7422527ef5e7351c1cf10c.1281625724.git.m.nazarewicz@samsung.com>

The __ref* tags may have been confusing for new kernel
developers (I was confused by them for sure) so adding a few
more sentences to comment to clear things up for people who
see those for the first time.

Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 include/linux/init.h |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/include/linux/init.h b/include/linux/init.h
index de99430..577671c 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -46,16 +46,23 @@
 #define __exitdata	__section(.exit.data)
 #define __exit_call	__used __section(.exitcall.exit)
 
-/* modpost check for section mismatches during the kernel build.
+/*
+ * modpost check for section mismatches during the kernel build.
  * A section mismatch happens when there are references from a
  * code or data section to an init section (both code or data).
  * The init sections are (for most archs) discarded by the kernel
  * when early init has completed so all such references are potential bugs.
  * For exit sections the same issue exists.
+ *
  * The following markers are used for the cases where the reference to
  * the *init / *exit section (code or data) is valid and will teach
- * modpost not to issue a warning.
- * The markers follow same syntax rules as __init / __initdata. */
+ * modpost not to issue a warning.  Intended semantics is that a code or
+ * data tagged __ref* can reference code or data from init section without
+ * producing a warning (of course, no warning does not mean code is
+ * correct, so optimally document why the __ref is needed and why it's OK).
+ *
+ * The markers follow same syntax rules as __init / __initdata.
+ */
 #define __ref            __section(.ref.text) noinline
 #define __refdata        __section(.ref.data)
 #define __refconst       __section(.ref.rodata)
-- 
1.7.1


  reply	other threads:[~2010-08-12 15:42 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-12 15:43 [PATCHv8 00/13] Various USB improvements Michal Nazarewicz
2010-08-12 15:43 ` [PATCHv8 01/13] USB: gadget: g_multi: fixed vendor and product ID Michal Nazarewicz
2010-08-12 15:43   ` [PATCHv8 02/13] USB: gadget: g_ffs: " Michal Nazarewicz
2010-08-12 15:43     ` [PATCHv8 03/13] USB: gadget: composite: Better string override handling Michal Nazarewicz
2010-08-12 15:43       ` [PATCHv8 04/13] USB: gadget: mass_storage: moved strings handling code to composite Michal Nazarewicz
2010-08-12 15:43         ` [PATCHv8 05/13] USB: gadget: functionfs: code cleanup Michal Nazarewicz
2010-08-12 15:43           ` [PATCHv8 06/13] USB: gadget: g_multi: moved strings handling code to composite Michal Nazarewicz
2010-08-12 15:43             ` [PATCHv8 07/13] usb: gadget: storage: remove nofua file when unbinding Michal Nazarewicz
2010-08-12 15:43               ` [PATCHv8 08/13] usb: gadget: mass_storage: optional SCSI WRITE FUA bit Michal Nazarewicz
2010-08-12 15:43                 ` [PATCHv8 09/13] Revert "USB: gadget: section mismatch warning fixed" Michal Nazarewicz
2010-08-12 15:43                   ` [PATCHv8 10/13] usb gadget: don't save bind callback in struct usb_gadget_driver Michal Nazarewicz
2010-08-12 15:43                     ` [PATCHv8 11/13] usb gadget: don't save bind callback in struct usb_composite_driver Michal Nazarewicz
2010-08-12 15:43                       ` [PATCHv8 12/13] usb gadget: don't save bind callback in struct usb_configuration Michal Nazarewicz
2010-08-12 15:43                         ` Michal Nazarewicz [this message]
2010-08-12 15:48                           ` [PATCHv8 13/13] init.h: add some more documentation to __ref* tags Sam Ravnborg
2010-08-12 15:45                       ` [PATCHv8 11/13] usb gadget: don't save bind callback in struct usb_composite_driver Uwe Kleine-König
2010-08-12 22:34         ` [PATCHv8 04/13] USB: gadget: mass_storage: moved strings handling code to composite David Brownell
2010-08-13 15:15           ` Alan Stern
2010-08-13 20:30             ` David Brownell
2010-08-14  0:23               ` Alan Stern
2010-08-18  1:26                 ` Michał Nazarewicz
2010-09-01 21:10       ` [PATCHv8 03/13] USB: gadget: composite: Better string override handling Greg KH
2010-09-01 21:12         ` Greg KH
2010-09-02  0:57           ` Michał Nazarewicz

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=596c51e49e129c14531a6367ea7b321ee541bdb5.1281625724.git.m.nazarewicz@samsung.com \
    --to=m.nazarewicz@samsung.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sam@ravnborg.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.