S390's <asm/facility.h> uses the min_t() macro, so it should
include <linux/minmax.h> to avoid build errors.
In file included from arch/s390/pci/pci_insn.c:12:
arch/s390/include/asm/facility.h: In function '__stfle':
arch/s390/include/asm/facility.h:98:22: error: implicit declaration of
function 'min_t' [-Werror=implicit-function-declaration]
98 | nr = min_t(unsigned long, (nr + 1) * 8, size * 8);
arch/s390/include/asm/facility.h:98:28: error: expected expression
before 'unsigned'
98 | nr = min_t(unsigned long, (nr + 1) * 8, size * 8);
Fixes: 4f18d869ffd0 ("s390: fix stfle zero padding")
Signed-off-by: Randy Dunlap <[email protected]>
Reported-by: Linux Kernel Functional Testing <[email protected]>
Cc: Naresh Kamboju <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Vasily Gorbik <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: [email protected]
---
arch/s390/include/asm/facility.h | 1 +
1 file changed, 1 insertion(+)
--- linux-next-20211028.orig/arch/s390/include/asm/facility.h
+++ linux-next-20211028/arch/s390/include/asm/facility.h
@@ -9,6 +9,7 @@
#define __ASM_FACILITY_H
#include <asm/facility-defs.h>
+#include <linux/minmax.h>
#include <linux/string.h>
#include <linux/preempt.h>
#include <asm/lowcore.h>
On Thu, Oct 28, 2021 at 05:26:33PM -0700, Randy Dunlap wrote:
> S390's <asm/facility.h> uses the min_t() macro, so it should
> include <linux/minmax.h> to avoid build errors.
>
> In file included from arch/s390/pci/pci_insn.c:12:
> arch/s390/include/asm/facility.h: In function '__stfle':
> arch/s390/include/asm/facility.h:98:22: error: implicit declaration of
> function 'min_t' [-Werror=implicit-function-declaration]
> 98 | nr = min_t(unsigned long, (nr + 1) * 8, size * 8);
> arch/s390/include/asm/facility.h:98:28: error: expected expression
> before 'unsigned'
> 98 | nr = min_t(unsigned long, (nr + 1) * 8, size * 8);
Thank you, but it has been addressed in latest linux-next by:
https://lore.kernel.org/all/[email protected]/