lkml.org 
[lkml]   [2013]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 02/10] intel: Remove extern from function prototypes
From
Date
On Tue, 2013-09-24 at 15:07 -0700, Jeff Kirsher wrote:
> On Tue, 2013-09-24 at 14:09 -0700, Joe Perches wrote:
> > There are a mix of function prototypes with and without extern
> > in the kernel sources. Standardize on not using extern for
> > function prototypes.
> >
> > Function prototypes don't need to be written with extern.
> > extern is assumed by the compiler. Its use is as unnecessary as
> > using auto to declare automatic/local variables in a block.
>
> So you are able to confirm that all compilers make this assumption
> correctly? The initial reason for using extern was because not all
> compilers made the assumption or made it correctly.

You are probably thinking of global variables, where declarations
without either 'extern' or an initialiser might or might not be treated
as 'common'. On function declarations, 'extern' really is redundant.

Ben.

--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.



\
 
 \ /
  Last update: 2013-09-25 00:21    [W:0.092 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site