All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Greg KH <greg@kroah.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	jbaron@redhat.com, randy.dunlap@oracle.com,
	linux-kernel@vger.kernel.org, joe@perches.com,
	nick@nick-andrew.net
Subject: Re: [PATCH 1/7] dynamic debug v2 - infrastructure
Date: Wed, 13 Aug 2008 22:00:47 +0200	[thread overview]
Message-ID: <20080813200047.GA2053@uranus.ravnborg.org> (raw)
In-Reply-To: <20080813033859.GA9443@kroah.com>

On Tue, Aug 12, 2008 at 08:38:59PM -0700, Greg KH wrote:
> On Tue, Aug 12, 2008 at 06:16:53PM -0700, Andrew Morton wrote:
> > On Tue, 12 Aug 2008 18:08:04 -0700
> > Greg KH <greg@kroah.com> wrote:
> > 
> > > On Tue, Aug 12, 2008 at 04:46:19PM -0400, Jason Baron wrote:
> > > > On Tue, Aug 12, 2008 at 01:09:08PM -0700, Greg KH wrote:
> > > > > So close, can I have a good changelog comment with the patch so people
> > > > > know what it is when they look in the logs?
> > > > > 
> > > > > Care to resend it with that?
> > > > > 
> > > > 
> > > > Base infrastructure to enable per-module debug messages.
> > > 
> > > Ah, so close...
> > > 
> > > With this patch, I get the following build error:
> > > 
> > >   CC [M]  drivers/usb/gadget/u_ether.o
> > > drivers/usb/gadget/u_ether.c: In function ___gether_setup___:
> > > drivers/usb/gadget/u_ether.c:787: error: ___KBUILD_MODNAME___ undeclared (first use in this function)
> > > drivers/usb/gadget/u_ether.c:787: error: (Each undeclared identifier is reported only once
> > > drivers/usb/gadget/u_ether.c:787: error: for each function it appears in.)
> > > drivers/usb/gadget/u_ether.c:787: error: unknown field ___Usage___ specified in initializer
> > > drivers/usb/gadget/u_ether.c:787: error: expected expression before ___.___ token
> > > drivers/usb/gadget/u_ether.c:787: error: initializer element is not constant
> > > drivers/usb/gadget/u_ether.c:787: error: (near initialization for ___descriptor.hash___)
> > > drivers/usb/gadget/u_ether.c:787: error: ___Usage___ undeclared (first use in this function)
> > > drivers/usb/gadget/u_ether.c:787: error: invalid operands to binary << (have ___long long int___ and ___char *___)
> > > drivers/usb/gadget/u_ether.c:787: error: expected ___)___ before ___:___ token
> > > drivers/usb/gadget/u_ether.c:787: error: invalid operands to binary & (have ___long long int___ and ___char *___)
> > > drivers/usb/gadget/u_ether.c:787: error: invalid operands to binary << (have ___long long int___ and ___char *___)
> > > drivers/usb/gadget/u_ether.c:787: error: expected ___)___ before ___:___ token
> > > drivers/usb/gadget/u_ether.c:787: error: invalid operands to binary & (have ___long long int___ and ___char *___)
> > > drivers/usb/gadget/u_ether.c:787: error: expected ___)___ before ___:___ token
> > > drivers/usb/gadget/u_ether.c:787: warning: passing argument 4 of _____dynamic_dbg_enabled_helper___ makes integer from pointer without a cast
> > > drivers/usb/gadget/u_ether.c:787: error: expected ___)___ before ___KBUILD_MODNAME___
> > 
> > (lol at gcc crap)
> > 
> > > drivers/usb/gadget/u_ether.c:787: warning: too few arguments for format
> > 
> > argh, not that again.  We had this with a patch from Jesse a while
> > back, which I fixed thusly:
> 
> <patch moving KBUILD_MODNAME from a inline function to a macro snipped>
> 
> Yeah, I remember that too, but in this case, KBUILD_MODNAME is being
> used in a macro, not an inline function, the exact opposite.
> 
> Sam, any ideas here?  I'll bounce the original patch at you if you
> missed it last time.

I have not looked into the particular error but what happens is
that u_ether.o is used by more than one module so kbuild does
not know what value to assign the KBUILD_MODNAME and therefore
decide not to assign KBUILD_MODNAME at all.

And because any usage of KBUILD_MODNAME is anyway flawed in u_ether.c
as we do not know for what module it is being used it makes sense for
kbuild to do so.

The above error happens because u_ether.c uses something that require KBUILD_MODNAME
to be define.
So the correct fix is to avid usage of this macro in the source.

Note: The old error Andrew mentions was caused by alpha indirectly
pulling in a inline function that used KBUILD_MODNAME - something
that did not happen on the other architectures.

	Sam

  reply	other threads:[~2008-08-13 20:26 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-15 21:31 [PATCH 1/7] dynamic debug v2 - infrastructure Jason Baron
2008-07-17  7:01 ` Greg KH
2008-07-17 21:20   ` Jason Baron
2008-07-17 22:32     ` Greg KH
2008-07-17 22:56       ` Dominik Brodowski
2008-07-17 23:35         ` Greg KH
2008-07-18  6:37           ` Dominik Brodowski
2008-07-18 14:39       ` Jason Baron
2008-08-08 21:51       ` Jason Baron
2008-08-09  1:07         ` Greg KH
2008-08-11 14:12           ` Jason Baron
2008-08-11 16:45             ` Greg KH
2008-08-09  2:38         ` Randy Dunlap
2008-08-11 17:36           ` Jason Baron
2008-08-11 22:33             ` Greg KH
2008-08-12 19:48               ` Jason Baron
2008-08-12 20:09                 ` Greg KH
2008-08-12 20:46                   ` Jason Baron
2008-08-13  1:08                     ` Greg KH
2008-08-13  1:16                       ` Andrew Morton
2008-08-13  3:38                         ` Greg KH
2008-08-13 20:00                           ` Sam Ravnborg [this message]
2008-08-13 22:49                             ` jbaron
2008-08-13 23:54                             ` Greg KH
2008-08-14  1:25                               ` Greg KH
2008-08-13 19:05                       ` Jason Baron
2008-08-14 14:53                     ` Greg KH
2008-08-14 21:05                       ` Jason Baron
2008-09-16  0:03 ` Rusty Russell

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=20080813200047.GA2053@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=akpm@linux-foundation.org \
    --cc=greg@kroah.com \
    --cc=jbaron@redhat.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nick@nick-andrew.net \
    --cc=randy.dunlap@oracle.com \
    /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.