From: Christian Borntraeger <borntraeger@de.ibm.com>
Date: Fri, 6 Dec 2019 07:27:51 +0000 (+0100)
Subject: s390/uv: use EOPNOTSUPP instead of ENOTSUPP
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=157309a97015d8b32d65847d8a6d493d1a958e93;p=linux.git

s390/uv: use EOPNOTSUPP instead of ENOTSUPP

ENOTSUP is just an internal kernel error and should never reach
userspace. The return value of the share function is not exported to
userspace, but to avoid giving bad examples let us use EOPNOTSUPP:

Suggested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
---

diff --git a/arch/s390/include/asm/uv.h b/arch/s390/include/asm/uv.h
index ef3c00b049ab4..4093a2856929a 100644
--- a/arch/s390/include/asm/uv.h
+++ b/arch/s390/include/asm/uv.h
@@ -86,7 +86,7 @@ static inline int share(unsigned long addr, u16 cmd)
 	};
 
 	if (!is_prot_virt_guest())
-		return -ENOTSUPP;
+		return -EOPNOTSUPP;
 	/*
 	 * Sharing is page wise, if we encounter addresses that are
 	 * not page aligned, we assume something went wrong. If