public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.5.54 -- ohci-dbg.c: 358: In function `show_list': `data1' undeclared (first use in this function)
@ 2003-01-02  6:12 Miles Lane
  2003-01-02 15:24 ` David Brownell
  0 siblings, 1 reply; 5+ messages in thread
From: Miles Lane @ 2003-01-02  6:12 UTC (permalink / raw)
  To: LKML; +Cc: David Brownell

  gcc -Wp,-MD,drivers/usb/host/.ohci-hcd.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=athlon -Iinclude/asm-i386/mach-default -fomit-frame-pointer -nostdinc -iwithprefix include    -DKBUILD_BASENAME=ohci_hcd
-DKBUILD_MODNAME=ohci_hcd   -c -o drivers/usb/host/ohci-hcd.o drivers/usb/host/ohci-hcd.c
In file included from drivers/usb/host/ohci-hcd.c:137:
drivers/usb/host/ohci-dbg.c: In function `show_list':
drivers/usb/host/ohci-dbg.c:358: `data1' undeclared (first use in this function)
drivers/usb/host/ohci-dbg.c:358: (Each undeclared identifier is reported only once
drivers/usb/host/ohci-dbg.c:358: for each function it appears in.)
drivers/usb/host/ohci-dbg.c:358: `data0' undeclared (first use in this function)
make[3]: *** [drivers/usb/host/ohci-hcd.o] Error 1

# USB Options
#
CONFIG_USB=y

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y

#
# USB Host Controller Drivers
#
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_OHCI_HCD=y


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.5.54 -- ohci-dbg.c: 358: In function `show_list': `data1' undeclared (first use in this function)
  2003-01-02  6:12 2.5.54 -- ohci-dbg.c: 358: In function `show_list': `data1' undeclared (first use in this function) Miles Lane
@ 2003-01-02 15:24 ` David Brownell
  2003-01-03  0:39   ` David Brownell
  0 siblings, 1 reply; 5+ messages in thread
From: David Brownell @ 2003-01-02 15:24 UTC (permalink / raw)
  To: Miles Lane; +Cc: LKML

Miles Lane wrote:
>   gcc -Wp,-MD,drivers/usb/host/.ohci-hcd.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=athlon -Iinclude/asm-i386/mach-default -fomit-frame-pointer -nostdinc -iwithprefix include    -DKBUILD_BASENAME=ohci_hcd
> -DKBUILD_MODNAME=ohci_hcd   -c -o drivers/usb/host/ohci-hcd.o drivers/usb/host/ohci-hcd.c
> In file included from drivers/usb/host/ohci-hcd.c:137:
> drivers/usb/host/ohci-dbg.c: In function `show_list':
> drivers/usb/host/ohci-dbg.c:358: `data1' undeclared (first use in this function)
> drivers/usb/host/ohci-dbg.c:358: (Each undeclared identifier is reported only once
> drivers/usb/host/ohci-dbg.c:358: for each function it appears in.)
> drivers/usb/host/ohci-dbg.c:358: `data0' undeclared (first use in this function)
> make[3]: *** [drivers/usb/host/ohci-hcd.o] Error 1

Looks like Greg's patch to use more dev_*() debug macros changed
some conditional structures too ... so the sysfs debug files are
always compiled in, rather than only with CONFIG_USB_DEBUG which
is what defines them.

Workaround by enabling USB debugging in your configuration.

I'll send some patch around later, likely to just revert that
part of his patch since I actually like having "production"
OHCI modules be less than 12K.  Though maybe those files should
be enabled with some other Kconfig option.  Thoughts?

- Dave





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.5.54 -- ohci-dbg.c: 358: In function `show_list': `data1' undeclared (first use in this function)
  2003-01-02 15:24 ` David Brownell
@ 2003-01-03  0:39   ` David Brownell
  2003-01-03  4:44     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: David Brownell @ 2003-01-03  0:39 UTC (permalink / raw)
  To: Miles Lane; +Cc: Greg KH, LKML, Linus Torvalds, usb devel

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

The attached patch just reverts the "always provide sysfs debug files"
part of Greg's patch.  Gets rid of that compile error as well as
keeping the driver object size smaller.

If we want to have debug files without CONFIG_USB_DEBUG, I'd rather
have them controlled by some other Kconfig option.

- Dave


[-- Attachment #2: ohci-0102.patch --]
[-- Type: text/plain, Size: 950 bytes --]

--- ./drivers/usb-dist/host/ohci-dbg.c	Thu Jan  2 13:18:42 2003
+++ ./drivers/usb/host/ohci-dbg.c	Thu Jan  2 15:04:38 2003
@@ -318,6 +318,10 @@
 	}
 }
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,32)
+#	define DRIVERFS_DEBUG_FILES
+#endif
+
 #else
 static inline void ohci_dump (struct ohci_hcd *controller, int verbose) {}
 
@@ -325,6 +329,8 @@
 
 /*-------------------------------------------------------------------------*/
 
+#ifdef DRIVERFS_DEBUG_FILES
+
 static ssize_t
 show_list (struct ohci_hcd *ohci, char *buf, size_t count, struct ed *ed)
 {
@@ -522,5 +528,12 @@
 	device_remove_file (bus->hcd.controller, &dev_attr_periodic);
 }
 
+#else /* empty stubs for creating those files */
+
+static inline void create_debug_files (struct ohci_hcd *bus) { }
+static inline void remove_debug_files (struct ohci_hcd *bus) { }
+
+#endif /* DRIVERFS_DEBUG_FILES */
+
 /*-------------------------------------------------------------------------*/
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.5.54 -- ohci-dbg.c: 358: In function `show_list': `data1' undeclared (first use in this function)
  2003-01-03  0:39   ` David Brownell
@ 2003-01-03  4:44     ` Greg KH
  2003-01-03  6:07       ` [linux-usb-devel] " David Brownell
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2003-01-03  4:44 UTC (permalink / raw)
  To: David Brownell; +Cc: Miles Lane, LKML, Linus Torvalds, usb devel

On Thu, Jan 02, 2003 at 04:39:57PM -0800, David Brownell wrote:
> +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,32)
> +#	define DRIVERFS_DEBUG_FILES
> +#endif

No, this is wrong, don't put this dependant on a specific kernel 
version that is long gone, that's why I took this portion out.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-usb-devel] Re: 2.5.54 -- ohci-dbg.c: 358: In function `show_list': `data1' undeclared (first use in this function)
  2003-01-03  4:44     ` Greg KH
@ 2003-01-03  6:07       ` David Brownell
  0 siblings, 0 replies; 5+ messages in thread
From: David Brownell @ 2003-01-03  6:07 UTC (permalink / raw)
  To: Greg KH; +Cc: Miles Lane, LKML, Linus Torvalds, usb devel

Greg KH wrote:
> On Thu, Jan 02, 2003 at 04:39:57PM -0800, David Brownell wrote:
> 
>>+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,32)
>>+#	define DRIVERFS_DEBUG_FILES
>>+#endif
> 
> 
> No, this is wrong, don't put this dependant on a specific kernel 
> version that is long gone, that's why I took this portion out.

Actually it originally there to support a backport of that version
to the 2.4 kernel, which has periodically worked.  That was the
downside of that particular patch of yours ... it didn't wrap the
dev_* calls as ohci_* calls, so the backport effort went up.

But OK, I'll remove that for now and resend.

- Dave



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-01-03  5:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-02  6:12 2.5.54 -- ohci-dbg.c: 358: In function `show_list': `data1' undeclared (first use in this function) Miles Lane
2003-01-02 15:24 ` David Brownell
2003-01-03  0:39   ` David Brownell
2003-01-03  4:44     ` Greg KH
2003-01-03  6:07       ` [linux-usb-devel] " David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox