style(9) changes before further editing that region:

. add unnecessary parenthesis around return values
. put body of an "if" statement onto a line of its own
This commit is contained in:
Joerg Wunsch 2002-05-13 10:28:20 +00:00
parent 2f8707ca5d
commit 8a0ba81859
2 changed files with 14 additions and 12 deletions

View File

@ -1490,7 +1490,7 @@ fd_in(struct fdc_data *fdc, int *ptr)
while ((i = fdsts_rd(fdc) & (NE7_DIO|NE7_RQM)) while ((i = fdsts_rd(fdc) & (NE7_DIO|NE7_RQM))
!= (NE7_DIO|NE7_RQM) && j-- > 0) { != (NE7_DIO|NE7_RQM) && j-- > 0) {
if (i == NE7_RQM) if (i == NE7_RQM)
return fdc_err(fdc, "ready for output in input\n"); return (fdc_err(fdc, "ready for output in input\n"));
/* /*
* After (maybe) 1 msec of waiting, back off to larger * After (maybe) 1 msec of waiting, back off to larger
* stepping to get the timing more accurate. * stepping to get the timing more accurate.
@ -1502,17 +1502,17 @@ fd_in(struct fdc_data *fdc, int *ptr)
DELAY(1); DELAY(1);
} }
if (j <= 0) if (j <= 0)
return fdc_err(fdc, bootverbose? "input ready timeout\n": 0); return (fdc_err(fdc, bootverbose? "input ready timeout\n": 0));
#ifdef FDC_DEBUG #ifdef FDC_DEBUG
i = fddata_rd(fdc); i = fddata_rd(fdc);
TRACE1("[FDDATA->0x%x]", (unsigned char)i); TRACE1("[FDDATA->0x%x]", (unsigned char)i);
*ptr = i; *ptr = i;
return 0; return (0);
#else /* !FDC_DEBUG */ #else /* !FDC_DEBUG */
i = fddata_rd(fdc); i = fddata_rd(fdc);
if (ptr) if (ptr)
*ptr = i; *ptr = i;
return 0; return (0);
#endif /* FDC_DEBUG */ #endif /* FDC_DEBUG */
} }
@ -1533,7 +1533,8 @@ out_fdc(struct fdc_data *fdc, int x)
i -= 999; i -= 999;
} else } else
DELAY(1); DELAY(1);
if (i <= 0) return fdc_err(fdc, "direction bit not set\n"); if (i <= 0)
return (fdc_err(fdc, "direction bit not set\n"));
/* Check that the floppy controller is ready for a command */ /* Check that the floppy controller is ready for a command */
i = FDSTS_TIMEOUT; i = FDSTS_TIMEOUT;
@ -1548,7 +1549,7 @@ out_fdc(struct fdc_data *fdc, int x)
} else } else
DELAY(1); DELAY(1);
if (i <= 0) if (i <= 0)
return fdc_err(fdc, bootverbose? "output ready timeout\n": 0); return (fdc_err(fdc, bootverbose? "output ready timeout\n": 0));
/* Send the command and return */ /* Send the command and return */
fddata_wr(fdc, x); fddata_wr(fdc, x);

View File

@ -1490,7 +1490,7 @@ fd_in(struct fdc_data *fdc, int *ptr)
while ((i = fdsts_rd(fdc) & (NE7_DIO|NE7_RQM)) while ((i = fdsts_rd(fdc) & (NE7_DIO|NE7_RQM))
!= (NE7_DIO|NE7_RQM) && j-- > 0) { != (NE7_DIO|NE7_RQM) && j-- > 0) {
if (i == NE7_RQM) if (i == NE7_RQM)
return fdc_err(fdc, "ready for output in input\n"); return (fdc_err(fdc, "ready for output in input\n"));
/* /*
* After (maybe) 1 msec of waiting, back off to larger * After (maybe) 1 msec of waiting, back off to larger
* stepping to get the timing more accurate. * stepping to get the timing more accurate.
@ -1502,17 +1502,17 @@ fd_in(struct fdc_data *fdc, int *ptr)
DELAY(1); DELAY(1);
} }
if (j <= 0) if (j <= 0)
return fdc_err(fdc, bootverbose? "input ready timeout\n": 0); return (fdc_err(fdc, bootverbose? "input ready timeout\n": 0));
#ifdef FDC_DEBUG #ifdef FDC_DEBUG
i = fddata_rd(fdc); i = fddata_rd(fdc);
TRACE1("[FDDATA->0x%x]", (unsigned char)i); TRACE1("[FDDATA->0x%x]", (unsigned char)i);
*ptr = i; *ptr = i;
return 0; return (0);
#else /* !FDC_DEBUG */ #else /* !FDC_DEBUG */
i = fddata_rd(fdc); i = fddata_rd(fdc);
if (ptr) if (ptr)
*ptr = i; *ptr = i;
return 0; return (0);
#endif /* FDC_DEBUG */ #endif /* FDC_DEBUG */
} }
@ -1533,7 +1533,8 @@ out_fdc(struct fdc_data *fdc, int x)
i -= 999; i -= 999;
} else } else
DELAY(1); DELAY(1);
if (i <= 0) return fdc_err(fdc, "direction bit not set\n"); if (i <= 0)
return (fdc_err(fdc, "direction bit not set\n"));
/* Check that the floppy controller is ready for a command */ /* Check that the floppy controller is ready for a command */
i = FDSTS_TIMEOUT; i = FDSTS_TIMEOUT;
@ -1548,7 +1549,7 @@ out_fdc(struct fdc_data *fdc, int x)
} else } else
DELAY(1); DELAY(1);
if (i <= 0) if (i <= 0)
return fdc_err(fdc, bootverbose? "output ready timeout\n": 0); return (fdc_err(fdc, bootverbose? "output ready timeout\n": 0));
/* Send the command and return */ /* Send the command and return */
fddata_wr(fdc, x); fddata_wr(fdc, x);