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
| ||
|
Date: Tue, 31 Jan 2012 15:59:25 +0000 From: Arnd Bergmann <arnd@...db.de> To: "Michael S. Tsirkin" <mst@...hat.com> Cc: Kevin Cernekee <cernekee@...il.com>, Ralf Baechle <ralf@...ux-mips.org>, Paul Mundt <lethal@...ux-sh.org>, Jesse Barnes <jbarnes@...tuousgeek.org>, Myron Stowe <myron.stowe@...hat.com>, Paul Gortmaker <paul.gortmaker@...driver.com>, Lucas De Marchi <lucas.demarchi@...fusion.mobi>, Dmitry Kasatkin <dmitry.kasatkin@...el.com>, James Morris <jmorris@...ei.org>, "John W. Linville" <linville@...driver.com>, Michael Witten <mfwitten@...il.com>, linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org, linux-sh@...r.kernel.org, linux-arch@...r.kernel.org Subject: Re: [PATCH 1/3] lib: add NO_GENERIC_PCI_IOPORT_MAP On Tuesday 31 January 2012, Michael S. Tsirkin wrote: > I have an idea: we can make the generic one inline > if we keep it in the .c file. So something like > the below on top of my patch will probably work. > Ack? IMHO this is still worse than the macro, because it breaks common practice. The common way to do this is #ifdef/#else/#endif in the header file to provide either an extern or a macro/inline definition, while having the inline definition in a separate place makes it harder to understand what's going on. E.g. a frequent review comment is to not put extern declarations inside of #ifdef, but if someone tries that here, it would break. You also still need the #ifdef in the implementation file, which we try to avoid normally just like we try to avoid macros where possible. Arnd -- 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