Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1229798
| From | Andrew Morton <akpm@linux-foundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/3] page-flags: rectify forward declaration |
| Date | 2015-09-22 00:40 +0200 |
| Message-ID | <qbhUB-3qy-7@gated-at.bofh.it> (permalink) |
| References | <qatXQ-7P2-7@gated-at.bofh.it> <qatXQ-7P2-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sat, 19 Sep 2015 22:42:59 +0530 Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:
> compound_head is defined as inline in page-flags.h but in the forward
> declaration of compound_head in the same file missed "inline". As a result
> we got plenty of build warnings while building for some architecture
> like avr32. The warning showed as:
> warning: 'compound_head' declared inline after being called.
> warning: previous declaration of 'compound_head' was here
>
> ...
>
> --- a/include/linux/page-flags.h
> +++ b/include/linux/page-flags.h
> @@ -227,7 +227,7 @@ static inline int __TestClearPage##uname(struct page *page) { return 0; }
> struct page;
> static inline int PageCompound(struct page *page);
> static inline int PageTail(struct page *page);
> -static struct page *compound_head(struct page *page);
> +static inline struct page *compound_head(struct page *page);
>
> __PAGEFLAG(Locked, locked, PF_NO_TAIL)
> PAGEFLAG(Error, error, PF_NO_COMPOUND) TESTCLEARFLAG(Error, error, PF_NO_COMPOUND)
Yes, that's an error, in -mm due to Kirill's page-flags patches.
The code is effectively doing
static inline XXX foo(...);
static inline YYY bar(...)
{
foo(...);
}
inline XXX foo(...)
{
...
}
ie: asking gcc to inline a forward-defined function. That does work,
but it's unusual and unexpected, and it's a bit unwise to expect the
compiler to do unusual and more difficult things.
Is it fixable? Can we use the traditional define-before-using structure?
Also, I'm finding that the patch series introduces a pretty large
bisection hole:
include/linux/page-flags.h: In function 'PageYoung':
include/linux/page-flags.h:327: error: implicit declaration of function 'PF_ANY'
include/linux/page-flags.h:327: error: invalid type argument of '->' (have 'int')
include/linux/page-flags.h:327: error: invalid type argument of '->' (have 'int')
which later gets fixed up by
page-flags-rectify-forward-declaration.patch.
Maybe it's time to do a wholesale refactoring of the patchset?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] fix allmodconfig failure of avr32 Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-19 19:20 +0200
[PATCH 3/3] page-flags: rectify forward declaration Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-19 19:20 +0200
Re: [PATCH 3/3] page-flags: rectify forward declaration Andrew Morton <akpm@linux-foundation.org> - 2015-09-22 00:40 +0200
Re: [PATCH 3/3] page-flags: rectify forward declaration Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-22 11:00 +0200
Re: [PATCH 3/3] page-flags: rectify forward declaration Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-24 17:30 +0200
[PATCH 14/16] page-flags: define PG_uptodate behavior on compound pages "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-24 17:00 +0200
[PATCH 11/16] page-flags: define PG_swapcache behavior on compound pages "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-24 17:00 +0200
[PATCH 02/16] page-flags: move code around "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-24 17:00 +0200
[PATCH 05/16] page-flags: define behavior of FS/IO-related flags on compound pages "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-24 17:00 +0200
[PATCH 01/16] page-flags: trivial cleanup for PageTrans* helpers "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-24 17:00 +0200
Re: [PATCH 01/16] page-flags: trivial cleanup for PageTrans* helpers Christoph Lameter <cl@linux.com> - 2015-09-24 17:50 +0200
[PATCH 09/16] page-flags: define PG_reserved behavior on compound pages "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-24 17:00 +0200
[PATCH 06/16] page-flags: define behavior of LRU-related flags on compound pages "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-24 17:00 +0200
[PATCH 13/16] page-flags: define PG_uncached behavior on compound pages "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-24 17:00 +0200
[PATCH 10/16] page-flags: define PG_swapbacked behavior on compound pages "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-24 17:00 +0200
[PATCH 15/16] page-flags: look at head page if the flag is encoded in page->mapping "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-24 17:00 +0200
[PATCH 08/16] page-flags: define behavior of Xen-related flags on compound pages "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-24 17:00 +0200
[PATCH 16/16] mm: sanitize page->mapping for tail pages "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-24 17:00 +0200
Re: [PATCH 16/16] mm: sanitize page->mapping for tail pages Jerome Glisse <j.glisse@gmail.com> - 2015-09-25 04:30 +0200
[PATCH 07/16] page-flags: define behavior SL*B-related flags on compound pages "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-24 17:00 +0200
[PATCH 00/16] Refreshed page-flags patchset "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-24 17:00 +0200
[PATCH 12/16] page-flags: define PG_mlocked behavior on compound pages "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-24 17:00 +0200
[PATCH 03/16] page-flags: introduce page flags policies wrt compound pages "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-24 17:00 +0200
Re: [PATCH 03/16] page-flags: introduce page flags policies wrt compound pages Konstantin Khlebnikov <khlebnikov@yandex-team.ru> - 2015-09-25 14:30 +0200
Re: [PATCH 03/16] page-flags: introduce page flags policies wrt compound pages "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-09-25 21:20 +0200
Re: [PATCH 03/16] page-flags: introduce page flags policies wrt compound pages "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-09-28 13:10 +0200
Re: [PATCH 03/16] page-flags: introduce page flags policies wrt compound pages Konstantin Khlebnikov <khlebnikov@yandex-team.ru> - 2015-09-28 13:50 +0200
Re: [PATCH 03/16] page-flags: introduce page flags policies wrt compound pages "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-09-28 20:00 +0200
[PATCH 04/16] page-flags: define PG_locked behavior on compound pages "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-24 17:00 +0200
Re: [PATCH 04/16] page-flags: define PG_locked behavior on compound pages Christoph Lameter <cl@linux.com> - 2015-09-24 18:10 +0200
Re: [PATCH 04/16] page-flags: define PG_locked behavior on compound pages "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-09-24 22:30 +0200
Re: [PATCH 00/16] Refreshed page-flags patchset Christoph Lameter <cl@linux.com> - 2015-09-24 18:20 +0200
Re: [PATCH 00/16] Refreshed page-flags patchset "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-09-24 22:30 +0200
csiph-web