From 7dd5356055fa46198da023134886ce10d7263cff Mon Sep 17 00:00:00 2001 From: Pelle Windestam Date: Mon, 9 Mar 2020 15:21:22 +0100 Subject: [PATCH] nxstyle: fixed various nxstyle warnings --- fs/aio/aio.h | 1 + fs/aio/aio_cancel.c | 8 +++++--- fs/aio/aio_fsync.c | 17 +++++++++-------- fs/aio/aio_write.c | 12 ++++++------ 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/fs/aio/aio.h b/fs/aio/aio.h index 5e80d192a5..e94cdf18c2 100644 --- a/fs/aio/aio.h +++ b/fs/aio/aio.h @@ -55,6 +55,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Configuration ************************************************************/ /* Number of pre-allocated AIO Control block containers */ diff --git a/fs/aio/aio_cancel.c b/fs/aio/aio_cancel.c index b8cd392e47..1bfe747ef9 100644 --- a/fs/aio/aio_cancel.c +++ b/fs/aio/aio_cancel.c @@ -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); diff --git a/fs/aio/aio_fsync.c b/fs/aio/aio_fsync.c index 687e8ef259..8ef7a3ea25 100644 --- a/fs/aio/aio_fsync.c +++ b/fs/aio/aio_fsync.c @@ -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 */ diff --git a/fs/aio/aio_write.c b/fs/aio/aio_write.c index 840b7e9228..0a45e73a8a 100644 --- a/fs/aio/aio_write.c +++ b/fs/aio/aio_write.c @@ -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(). *