mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
drivers/bch, pipes, timers: Run drivers through tools/nxstyle, correcting as many complaints as possible.
This commit is contained in:
+13
-12
@@ -194,22 +194,22 @@ static int bch_close(FAR struct file *filep)
|
||||
|
||||
if (bch->refs == 0 && bch->unlinked)
|
||||
{
|
||||
/* Tear the driver down now. */
|
||||
/* Tear the driver down now. */
|
||||
|
||||
ret = bchlib_teardown((FAR void *)bch);
|
||||
ret = bchlib_teardown((FAR void *)bch);
|
||||
|
||||
/* bchlib_teardown() would only fail if there are outstanding
|
||||
* references on the device. Since we know that is not true, it
|
||||
* should not fail at all.
|
||||
*/
|
||||
/* bchlib_teardown() would only fail if there are outstanding
|
||||
* references on the device. Since we know that is not true, it
|
||||
* should not fail at all.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(ret >= 0);
|
||||
if (ret >= 0)
|
||||
{
|
||||
/* Return without releasing the stale semaphore */
|
||||
DEBUGASSERT(ret >= 0);
|
||||
if (ret >= 0)
|
||||
{
|
||||
/* Return without releasing the stale semaphore */
|
||||
|
||||
return OK;
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,6 +250,7 @@ static off_t bch_seek(FAR struct file *filep, off_t offset, int whence)
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
/* Return EINVAL if the whence argument is invalid */
|
||||
|
||||
bchlib_semgive(bch);
|
||||
|
||||
@@ -65,8 +65,7 @@
|
||||
*
|
||||
* Description:
|
||||
* Unregister character driver access to a block device that was created
|
||||
/
|
||||
* by a previous call to bchdev_register().
|
||||
* by a previous call to bchdev_register().
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
@@ -189,11 +189,13 @@ int bchlib_readsector(FAR struct bchlib_s *bch, size_t sector)
|
||||
{
|
||||
ferr("Read failed: %d\n");
|
||||
}
|
||||
|
||||
bch->sector = sector;
|
||||
#if defined(CONFIG_BCH_ENCRYPTION)
|
||||
bch_cypher(bch, CYPHER_DECRYPT);
|
||||
#endif
|
||||
}
|
||||
|
||||
return (int)ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user