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] [day] [month] [year] [list]
Message-ID: <CAErSpo4B0sQpozB9Zco892_wtykMQ9-P2iF4QR+HXdte1YpMzg@mail.gmail.com>
Date:	Wed, 17 Apr 2013 17:57:21 -0600
From:	Bjorn Helgaas <bhelgaas@...gle.com>
To:	Stephen Rothwell <sfr@...b.auug.org.au>
Cc:	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: PCI: Remove "extern" from function declarations

On Wed, Apr 17, 2013 at 5:24 PM, Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> Hi Bjorn,
>
> I just noticed this commit (f39d5b72913e "PCI: Remove "extern" from
> function declarations") in the pci next branch.  Just wondering why you
> would do such a thing.  It is a lot of churn in quite a few header files
> and (in my opinion) goes the wrong way anyway.
>
> It may not actually make any difference to the compiler for functions, but
> for variables, it does.   A variable declared in a header file without
> "extern" will effectively define it in every compilation that includes
> the header file, one with "extern" will only produce references.
>
> So, since, the global variables really should have the "extern", the
> functions are now inconsistent with that.
>
> It also means that when someone copies a function declaration to make a
> "static inline" stub, the "extern" is a big hint for them to remember to
> make the stub "static" - I have seen several occasions when this was not
> done and that causes compilation failures (but usually only in the
> configuration that the author did not bother to test).

Good points.  The fact that some function declarations use "extern"
and some don't is just an annoying inconsistency.  I prefer fewer
words to read, so I removed them, but that's just a personal
preference, and I'd be OK it were always present, too.  I suppose if
anybody but me actually cared very much, we'd have checkpatch complain
about one way or the other, but I don't think it does.

Bjorn
--
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