All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darren Jenkins\\" <darrenrjenkins@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: [Fwd: Re: [KJ][Patch] fix kbuild warning in sisfb.o]
Date: Sun, 02 Apr 2006 21:31:26 +0000	[thread overview]
Message-ID: <1144013487.29888.11.camel@localhost.localdomain> (raw)

[-- Attachment #1: Type: text/plain, Size: 2540 bytes --]

Randy,

I thought I would ask you, as you posted the warnings on KJ in the first
place.

How do you generate the kbuild warnings ?
I have spent a fair bit of time over the weekend trying to figure it
out, and even with git-20 which sams patch applies cleanly to, the
tree's I build don't generate these warnings. Make help shows that the
'make buildcheck' that these kbuild warnings replaces is gone, but no
help on how to get these warnings.

Anyway if you could point me in the direction of some info about how to
use, that would be great. :)

Darren J


-------- Forwarded Message --------
From: Sam Ravnborg <sam@ravnborg.org>
To: Darren Jenkins <darrenrjenkins@gmail.com>
Cc: kernel Janitors <kernel-janitors@lists.osdl.org>, Greg KH
<greg@kroah.com>
Subject: Re: [KJ][Patch] fix kbuild warning in sisfb.o
Date: Sat, 1 Apr 2006 09:38:29 +0200

On Sat, Apr 01, 2006 at 01:12:13PM +1100, Darren Jenkins" wrote:
> Sam
> 
> I don't know weather you are aware of this one yet, but we have just
> found an issue where 'struct pci_device_id' should be marked
> __devinitdata (see Documentation/pci.txt) as the pci code apparently
> only uses it in the driver initialisation, but the 'struct pci_driver'
> will still hold a pointer to it, giving a kbuild warning. See below.
> This definitely looks like a false positive that should be removed.

Hi Darren.
Following patch should fix it.
It recognize that the variable is named *_driver, and in that case
it will not warn about references to .init.data (+.init.text and
.exit.text).

This is only compiletine tested since I'm a bit busy atm.
Let me know if this solves it as expected and especially if it seems
to silence warnings that is not false positives.

	Sam

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 0b92ddf..81448e5 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -492,7 +492,7 @@ static int strrcmp(const char *s, const 
  *   These functions may often be marked __init and we do not want to
  *   warn here.
  *   the pattern is identified by:
- *   tosec   = .init.text | .exit.text
+ *   tosec   = .init.text | .exit.text | .init.data
  *   fromsec = .data
  *   atsym = *_driver, *_ops, *_probe, *probe_one
  **/
@@ -522,7 +522,8 @@ static int secref_whitelist(const char *
 
 	/* Check for pattern 2 */
 	if ((strcmp(tosec, ".init.text") != 0) &&
-	    (strcmp(tosec, ".exit.text") != 0))
+	    (strcmp(tosec, ".exit.text") != 0) &&
+	    (strcmp(tosec, ".init.data") != 0))
 		f2 = 0;
 	if (strcmp(fromsec, ".data") != 0)
 		f2 = 0;



[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

             reply	other threads:[~2006-04-02 21:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-02 21:31 Darren Jenkins\ [this message]
2006-04-03 13:42 ` [Fwd: Re: [KJ][Patch] fix kbuild warning in sisfb.o] Darren Jenkins\

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=1144013487.29888.11.camel@localhost.localdomain \
    --to=darrenrjenkins@gmail.com \
    --cc=kernel-janitors@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 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.