lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100708033420.GA24135@suse.de>
Date:	Wed, 7 Jul 2010 20:34:20 -0700
From:	Greg KH <gregkh@...e.de>
To:	Patrick Pannuto <ppannuto@...eaurora.org>
Cc:	dbrownell@...rs.sourceforge.net, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org, sboyd@...eaurora.org
Subject: Re: [PATCH] usb: gadget: #include device.h in gadget.h

On Wed, Jul 07, 2010 at 05:47:08PM -0700, Patrick Pannuto wrote:
> gadget.h uses structures defined in device.h, it must include it. In
> most cases, gadget.h is preceded by linux/platform_device.h, but if
> you are grouping headers sanely, device.h may not be pulled in until
> *after* gadget (e.g. mach/msm_device.h), thus gadget.h should not
> rely on something else #including device.h
> 
> include/linux/usb/gadget.h:488: error: field 'dev' has incomplete type

Why not just provide an "empty" prototype for whatever is needed.
Generally, having header files include header files is frowned apon, and
a number of people have been working on slowly unwinding a lot of this
type of mess that we currently have.

> include/linux/usb/gadget.h: In function 'set_gadget_data':
> include/linux/usb/gadget.h:492:
> 	error: implicit declaration of function 'dev_set_drvdata'

Ick, but then, this gets messier.

How about just fixing up the .c file that the problem happens in, to
include device.h first?  Is this an issue in the current tree somehow?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ