drivers: Fix coding guidelines MISRAC:2012 Rule 14.4 do-whiles/Zero checks
MISRA C:2012 Rule 14.4 (The controlling expression of an if statement and the controlling expression of an iteration-statement shall have essentially Boolean type.) Use `do { ... } while (false)' instead of `do { ... } while (0)'. Use comparisons with zero instead of implicitly testing integers. The commit is a subset of the original auditable-branch commit: 5d02614e34a86b549c7707d3d9f0984bc3a5f22a Signed-off-by: Simon Hein <SHein@baumer.com>
This commit is contained in:
parent
c1288208ce
commit
d0921018fc
32 changed files with 49 additions and 49 deletions
|
@ -398,7 +398,7 @@ static int dma_sam0_get_status(const struct device *dev, uint32_t channel,
|
|||
DT_INST_IRQ_BY_IDX(0, n, priority), \
|
||||
dma_sam0_isr, DEVICE_DT_INST_GET(0), 0); \
|
||||
irq_enable(DT_INST_IRQ_BY_IDX(0, n, irq)); \
|
||||
} while (0)
|
||||
} while (false)
|
||||
|
||||
static int dma_sam0_init(const struct device *dev)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue