Linux 6.10: Move 'inline' before func return type

With Linux 6.10 commit:
    "kbuild: turn on -Wextra by default" (f5982cceb3)
there are additional compiler warnings that can turn
into build errors when --enable-checking is used.

    "error: ‘inline’ is not at beginning of declaration
    [-Werror=old-style-declaration]"

The error is due to the return type preceding the "inline" keyword
in function declarations.

Fix the declarations for file_can_read_pages() and
afs_linux_readpage_fastpath() to have the proper ordering of the
static/inline keywords attributes so they precede the return type.

Just a note that the `static` and `inline` keywords must precede a
function's return type.

Reviewed-on: https://gerrit.openafs.org/15768
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
(cherry picked from commit 7097eec17bc01bcfc12c4d299136b2d3b94ec3d7)

Change-Id: Ifce9c6b0b110788a054f0bad6066505e4bd86d40
Reviewed-on: https://gerrit.openafs.org/15800
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
Cheyenne Wills 2024-06-06 10:42:57 -06:00 committed by Benjamin Kaduk
parent e24033ddab
commit c788883d62

View File

@ -2454,7 +2454,7 @@ afs_linux_read_cache(struct file *cachefp, struct page *page,
/*
* Return true if the file has a mapping that can read pages
*/
static int inline
static inline int
file_can_read_pages(struct file *fp)
{
#if defined(STRUCT_ADDRESS_SPACE_OPERATIONS_HAS_READ_FOLIO)
@ -2467,7 +2467,7 @@ file_can_read_pages(struct file *fp)
return 0;
}
static int inline
static inline int
afs_linux_readpage_fastpath(struct file *fp, struct page *pp, int *codep)
{
loff_t offset = page_offset(pp);