nxstyle: fixed various nxstyle warnings

This commit is contained in:
Pelle Windestam 2020-03-09 15:21:22 +01:00 committed by patacongo
parent 76aa3dd8ef
commit 7dd5356055
4 changed files with 21 additions and 17 deletions

View File

@ -55,6 +55,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************/
/* Number of pre-allocated AIO Control block containers */

View File

@ -124,8 +124,9 @@ int aio_cancel(int fildes, FAR struct aiocb *aiocbp)
aioc && aioc->aioc_aiocbp != aiocbp;
aioc = (FAR struct aio_container_s *)aioc->aioc_link.flink);
/* Did we find a container for this fildes? We should; the aio_result says
* that the transfer is pending. If not we return AIO_ALLDONE.
/* Did we find a container for this fildes? We should; the
* aio_result says that the transfer is pending. If not we return
* AIO_ALLDONE.
*/
if (aioc)
@ -198,7 +199,8 @@ int aio_cancel(int fildes, FAR struct aiocb *aiocbp)
{
/* Remove the container from the list of pending transfers */
next = (FAR struct aio_container_s *)aioc->aioc_link.flink;
next =
(FAR struct aio_container_s *)aioc->aioc_link.flink;
pid = aioc->aioc_pid;
aiocbp = aioc_decant(aioc);
DEBUGASSERT(aiocbp);

View File

@ -165,17 +165,18 @@ static void aio_fsync_worker(FAR void *arg)
* referenced by aiocbp becomes an illegal address prior to asynchronous
* I/O completion, then the behavior is undefined.
*
* If the aio_fsync() function fails or aiocbp indicates an error condition,
* data is not guaranteed to have been successfully transferred.
* If the aio_fsync() function fails or aiocbp indicates an error
* condition, data is not guaranteed to have been successfully transferred.
*
* Input Parameters:
* op - Should be either O_SYNC or O_DSYNC. Ignored in this implementation.
* op - Should be either O_SYNC or O_DSYNC. Ignored in this
* implementation.
* aiocbp - A pointer to an instance of struct aiocb
*
* Returned Value:
* The aio_fsync() function will return the value 0 if the I/O operation is
* successfully queued; otherwise, the function will return the value -1 and
* set errno to indicate the error.
* successfully queued; otherwise, the function will return the value -1
* and set errno to indicate the error.
*
* The aio_fsync() function will fail if:
*
@ -193,8 +194,8 @@ static void aio_fsync_worker(FAR void *arg)
* operation, which can be retrieved using aio_error().
*
* POSIX Compliance
* - NuttX does not currently make any distinction between O_DYSNC and O_SYNC.
* Hence, the 'op' argument is ignored altogether.
* - NuttX does not currently make any distinction between O_DYSNC and
* O_SYNC. Hence, the 'op' argument is ignored altogether.
* - Most errors required in the standard are not detected at this point.
* There are no pre-queuing checks for the validity of the operation.
*
@ -205,7 +206,7 @@ int aio_fsync(int op, FAR struct aiocb *aiocbp)
FAR struct aio_container_s *aioc;
int ret;
DEBUGASSERT(op == O_SYNC /* || op == O_DSYNC */);
DEBUGASSERT(op == O_SYNC); /* || op == O_DSYNC */
DEBUGASSERT(aiocbp);
/* The result -EINPROGRESS means that the transfer has not yet completed */

View File

@ -204,12 +204,12 @@ errout:
*
* If O_APPEND is not set for the file descriptor aio_fildes, then the
* requested operation will take place at the absolute position in the file
* as given by aio_offset, as if lseek() were called immediately prior to the
* operation with an offset equal to aio_offset and a whence equal to SEEK_SET.
* If O_APPEND is set for the file descriptor, write operations append to the
* file in the same order as the calls were made. After a successful call to
* enqueue an asynchronous I/O operation, the value of the file offset for the
* file is unspecified.
* as given by aio_offset, as if lseek() were called immediately prior to
* the operation with an offset equal to aio_offset and a whence equal to
* SEEK_SET. If O_APPEND is set for the file descriptor, write operations
* append to the file in the same order as the calls were made. After a
* successful call to enqueue an asynchronous I/O operation, the value of
* the file offset for the file is unspecified.
*
* The aiocbp->aio_lio_opcode field will be ignored by aio_write().
*