drivers/bch, pipes, timers: Run drivers through tools/nxstyle, correcting as many complaints as possible.

This commit is contained in:
Gregory Nutt
2019-12-06 23:36:33 -06:00
parent d1584d60a2
commit 2761279839
10 changed files with 95 additions and 72 deletions
+13 -12
View File
@@ -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);
+1 -2
View File
@@ -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().
*
****************************************************************************/
+2
View File
@@ -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;
}