[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM5PR11MB17236A48767FEFB5C59426A297F80@DM5PR11MB1723.namprd11.prod.outlook.com>
Date: Wed, 7 Sep 2016 12:31:03 +0000
From: Yuval Mintz <Yuval.Mintz@...gic.com>
To: Arnd Bergmann <arnd@...db.de>
CC: Baoyou Xie <baoyou.xie@...aro.org>,
netdev <netdev@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
"xie.baoyou@....com.cn" <xie.baoyou@....com.cn>,
Ariel Elior <Ariel.Elior@...gic.com>
Subject: RE: [PATCH] qed: add missing header dependencies
> > While I obviously have no strong objection for including
> > qed_selftest.h from qed_selftest.c, I'm not sure I understand which C
> > standard dictates this requirement.
> > Why should a function definition [not call] be preceded by a prototype?
>
> - When a function is defined in one file and used in another, you want
> both files to include the same header that has the declaration to
> ensure that the types are identical. There are cases where the
> prototype is changed after the fact in an incompatible way, causing
> silent data corruption on some configurations but maybe not on others.
O.k., motivation is clear.
But this really isn't enforced by the ansi-c standard, right?
Anyway, thanks.
Acked-by: Yuval Mintz <Yuval.Mintz@...gic.com>
Powered by blists - more mailing lists