Skip to content

Commit

Permalink
s390/uv: use EOPNOTSUPP instead of ENOTSUPP
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Janosch Frank <[email protected]>
Signed-off-by: Christian Borntraeger <[email protected]>
Signed-off-by: Vasily Gorbik <[email protected]>
  • Loading branch information
borntraeger authored and Vasily Gorbik committed Dec 11, 2019
1 parent 0539ad0 commit 157309a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/include/asm/uv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 157309a

Please sign in to comment.