lkml.org 
[lkml]   [2013]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 24/35] mfd: ab8500: Remove unnecessary 'struct device' declaration
Date
On Monday 25 February 2013, Lee Jones wrote:
> > and others that use 'struct device'. C99 requires that a struct is declared
> > in advance before you use it in a function declaration.
>
> Hmm... I wonder why it doesn't complain then?
>
> I'll remove the patch.

It's only a problem if the file is included before any other header declares
'struct device'. It may well be that this currently never happens, but it's
better to be safe and have a header that can be included in any order:
relying on a specific inclusion order can easily break with 'make randconfig'
turning off specific features that you did not know you relied on.

Arnd


\
 
 \ /
  Last update: 2013-02-25 22:43    [W:0.091 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site