提交 a8f6db4d 编写于 作者: H Heiko Carstens 提交者: Martin Schwidefsky

s390/etr,stp: use -EOPNOTSUPP instead of -ENOSYS

Change -ENOSYS to -EOPNOTSUPP. Return value is used only internally.
Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 d06cbda6
...@@ -140,7 +140,7 @@ struct etr_ptff_qto { ...@@ -140,7 +140,7 @@ struct etr_ptff_qto {
/* Inline assembly helper functions */ /* Inline assembly helper functions */
static inline int etr_setr(struct etr_eacr *ctrl) static inline int etr_setr(struct etr_eacr *ctrl)
{ {
int rc = -ENOSYS; int rc = -EOPNOTSUPP;
asm volatile( asm volatile(
" .insn s,0xb2160000,%1\n" " .insn s,0xb2160000,%1\n"
...@@ -154,7 +154,7 @@ static inline int etr_setr(struct etr_eacr *ctrl) ...@@ -154,7 +154,7 @@ static inline int etr_setr(struct etr_eacr *ctrl)
/* Stores a format 1 aib with 64 bytes */ /* Stores a format 1 aib with 64 bytes */
static inline int etr_stetr(struct etr_aib *aib) static inline int etr_stetr(struct etr_aib *aib)
{ {
int rc = -ENOSYS; int rc = -EOPNOTSUPP;
asm volatile( asm volatile(
" .insn s,0xb2170000,%1\n" " .insn s,0xb2170000,%1\n"
...@@ -169,7 +169,7 @@ static inline int etr_stetr(struct etr_aib *aib) ...@@ -169,7 +169,7 @@ static inline int etr_stetr(struct etr_aib *aib)
static inline int etr_steai(struct etr_aib *aib, unsigned int func) static inline int etr_steai(struct etr_aib *aib, unsigned int func)
{ {
register unsigned int reg0 asm("0") = func; register unsigned int reg0 asm("0") = func;
int rc = -ENOSYS; int rc = -EOPNOTSUPP;
asm volatile( asm volatile(
" .insn s,0xb2b30000,%1\n" " .insn s,0xb2b30000,%1\n"
...@@ -190,7 +190,7 @@ static inline int etr_ptff(void *ptff_block, unsigned int func) ...@@ -190,7 +190,7 @@ static inline int etr_ptff(void *ptff_block, unsigned int func)
{ {
register unsigned int reg0 asm("0") = func; register unsigned int reg0 asm("0") = func;
register unsigned long reg1 asm("1") = (unsigned long) ptff_block; register unsigned long reg1 asm("1") = (unsigned long) ptff_block;
int rc = -ENOSYS; int rc = -EOPNOTSUPP;
asm volatile( asm volatile(
" .word 0x0104\n" " .word 0x0104\n"
......
...@@ -329,7 +329,7 @@ static unsigned long clock_sync_flags; ...@@ -329,7 +329,7 @@ static unsigned long clock_sync_flags;
* The synchronous get_clock function. It will write the current clock * The synchronous get_clock function. It will write the current clock
* value to the clock pointer and return 0 if the clock is in sync with * value to the clock pointer and return 0 if the clock is in sync with
* the external time source. If the clock mode is local it will return * the external time source. If the clock mode is local it will return
* -ENOSYS and -EAGAIN if the clock is not in sync with the external * -EOPNOTSUPP and -EAGAIN if the clock is not in sync with the external
* reference. * reference.
*/ */
int get_sync_clock(unsigned long long *clock) int get_sync_clock(unsigned long long *clock)
...@@ -347,7 +347,7 @@ int get_sync_clock(unsigned long long *clock) ...@@ -347,7 +347,7 @@ int get_sync_clock(unsigned long long *clock)
return 0; return 0;
if (!test_bit(CLOCK_SYNC_HAS_ETR, &clock_sync_flags) && if (!test_bit(CLOCK_SYNC_HAS_ETR, &clock_sync_flags) &&
!test_bit(CLOCK_SYNC_HAS_STP, &clock_sync_flags)) !test_bit(CLOCK_SYNC_HAS_STP, &clock_sync_flags))
return -ENOSYS; return -EOPNOTSUPP;
if (!test_bit(CLOCK_SYNC_ETR, &clock_sync_flags) && if (!test_bit(CLOCK_SYNC_ETR, &clock_sync_flags) &&
!test_bit(CLOCK_SYNC_STP, &clock_sync_flags)) !test_bit(CLOCK_SYNC_STP, &clock_sync_flags))
return -EACCES; return -EACCES;
......
...@@ -211,7 +211,7 @@ check_XRC (struct ccw1 *de_ccw, ...@@ -211,7 +211,7 @@ check_XRC (struct ccw1 *de_ccw,
rc = get_sync_clock(&data->ep_sys_time); rc = get_sync_clock(&data->ep_sys_time);
/* Ignore return code if sync clock is switched off. */ /* Ignore return code if sync clock is switched off. */
if (rc == -ENOSYS || rc == -EACCES) if (rc == -EOPNOTSUPP || rc == -EACCES)
rc = 0; rc = 0;
de_ccw->count = sizeof(struct DE_eckd_data); de_ccw->count = sizeof(struct DE_eckd_data);
...@@ -322,7 +322,7 @@ static int check_XRC_on_prefix(struct PFX_eckd_data *pfxdata, ...@@ -322,7 +322,7 @@ static int check_XRC_on_prefix(struct PFX_eckd_data *pfxdata,
rc = get_sync_clock(&pfxdata->define_extent.ep_sys_time); rc = get_sync_clock(&pfxdata->define_extent.ep_sys_time);
/* Ignore return code if sync clock is switched off. */ /* Ignore return code if sync clock is switched off. */
if (rc == -ENOSYS || rc == -EACCES) if (rc == -EOPNOTSUPP || rc == -EACCES)
rc = 0; rc = 0;
return rc; return rc;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册