mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 20:08:15 +08:00
Eliminate some new warnings found in build testing.
This commit is contained in:
@@ -156,7 +156,7 @@ static int dma_interrupt_core(void *context)
|
|||||||
|
|
||||||
flags = spin_lock_irqsave();
|
flags = spin_lock_irqsave();
|
||||||
q_ent = pdmach->req_q.tail;
|
q_ent = pdmach->req_q.tail;
|
||||||
DEBUGASSERT(q_ent);
|
DEBUGASSERT(q_ent != NULL);
|
||||||
dmach = (struct lc823450_dmach_s *)q_ent;
|
dmach = (struct lc823450_dmach_s *)q_ent;
|
||||||
|
|
||||||
if (dmach->nxfrs == 0)
|
if (dmach->nxfrs == 0)
|
||||||
@@ -461,7 +461,7 @@ void lc823450_dmarequest(DMA_HANDLE handle, uint8_t dmarequest)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dmaerr("ERROR: Not implemetned\n");
|
dmaerr("ERROR: Not implemetned\n");
|
||||||
DEBUGASSERT(0);
|
DEBUGPANIC();
|
||||||
}
|
}
|
||||||
|
|
||||||
putreg32(val, DMACCFG(dmach->chn));
|
putreg32(val, DMACCFG(dmach->chn));
|
||||||
@@ -545,7 +545,8 @@ void lc823450_dmafree(DMA_HANDLE handle)
|
|||||||
{
|
{
|
||||||
struct lc823450_dmach_s *dmach = (DMA_HANDLE)handle;
|
struct lc823450_dmach_s *dmach = (DMA_HANDLE)handle;
|
||||||
|
|
||||||
DEBUGASSERT(dmach);
|
DEBUGASSERT(dmach != NULL);
|
||||||
|
UNUSED(dmach);
|
||||||
|
|
||||||
/* Make sure that the DMA channel was properly stopped */
|
/* Make sure that the DMA channel was properly stopped */
|
||||||
|
|
||||||
@@ -571,7 +572,7 @@ int lc823450_dmasetup(DMA_HANDLE handle, uint32_t control,
|
|||||||
{
|
{
|
||||||
struct lc823450_dmach_s *dmach = (DMA_HANDLE)handle;
|
struct lc823450_dmach_s *dmach = (DMA_HANDLE)handle;
|
||||||
|
|
||||||
DEBUGASSERT(dmach);
|
DEBUGASSERT(dmach != NULL);
|
||||||
|
|
||||||
dmach->srcaddr = srcaddr;
|
dmach->srcaddr = srcaddr;
|
||||||
dmach->destaddr = destaddr;
|
dmach->destaddr = destaddr;
|
||||||
@@ -587,7 +588,7 @@ int lc823450_dmallsetup(DMA_HANDLE handle, uint32_t control,
|
|||||||
{
|
{
|
||||||
struct lc823450_dmach_s *dmach = (DMA_HANDLE)handle;
|
struct lc823450_dmach_s *dmach = (DMA_HANDLE)handle;
|
||||||
|
|
||||||
DEBUGASSERT(dmach);
|
DEBUGASSERT(dmach != NULL);
|
||||||
|
|
||||||
dmach->srcaddr = srcaddr;
|
dmach->srcaddr = srcaddr;
|
||||||
dmach->destaddr = destaddr;
|
dmach->destaddr = destaddr;
|
||||||
@@ -618,7 +619,7 @@ int lc823450_dmastart(DMA_HANDLE handle, dma_callback_t callback, void *arg)
|
|||||||
struct lc823450_dmach_s *dmach = (DMA_HANDLE)handle;
|
struct lc823450_dmach_s *dmach = (DMA_HANDLE)handle;
|
||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
|
|
||||||
DEBUGASSERT(dmach);
|
DEBUGASSERT(dmach != NULL);
|
||||||
|
|
||||||
/* select physical channel */
|
/* select physical channel */
|
||||||
|
|
||||||
@@ -651,7 +652,7 @@ void lc823450_dmastop(DMA_HANDLE handle)
|
|||||||
struct lc823450_phydmach_s *pdmach;
|
struct lc823450_phydmach_s *pdmach;
|
||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
|
|
||||||
DEBUGASSERT(dmach);
|
DEBUGASSERT(dmach != NULL);
|
||||||
|
|
||||||
flags = spin_lock_irqsave();
|
flags = spin_lock_irqsave();
|
||||||
|
|
||||||
|
|||||||
@@ -343,6 +343,7 @@ static void lc823450_extint_initialize(void)
|
|||||||
|
|
||||||
ret = irq_attach(LC823450_IRQ_EXTINT5, lc823450_extint_isr, NULL);
|
ret = irq_attach(LC823450_IRQ_EXTINT5, lc823450_extint_isr, NULL);
|
||||||
DEBUGASSERT(ret == OK);
|
DEBUGASSERT(ret == OK);
|
||||||
|
UNUSED(ret);
|
||||||
|
|
||||||
up_enable_irq(LC823450_IRQ_EXTINT0);
|
up_enable_irq(LC823450_IRQ_EXTINT0);
|
||||||
up_enable_irq(LC823450_IRQ_EXTINT1);
|
up_enable_irq(LC823450_IRQ_EXTINT1);
|
||||||
|
|||||||
+12
-8
@@ -149,7 +149,9 @@ static void i2schar_rxcallback(FAR struct i2s_dev_s *dev,
|
|||||||
{
|
{
|
||||||
FAR struct i2schar_dev_s *priv = (FAR struct i2schar_dev_s *)arg;
|
FAR struct i2schar_dev_s *priv = (FAR struct i2schar_dev_s *)arg;
|
||||||
|
|
||||||
DEBUGASSERT(priv && apb);
|
DEBUGASSERT(priv != NULL && apb != NULL);
|
||||||
|
UNUSED(priv);
|
||||||
|
|
||||||
i2sinfo("apb=%p nbytes=%d result=%d\n", apb, apb->nbytes, result);
|
i2sinfo("apb=%p nbytes=%d result=%d\n", apb, apb->nbytes, result);
|
||||||
|
|
||||||
/* REVISIT: If you want this to actually do something other than
|
/* REVISIT: If you want this to actually do something other than
|
||||||
@@ -184,7 +186,9 @@ static void i2schar_txcallback(FAR struct i2s_dev_s *dev,
|
|||||||
{
|
{
|
||||||
FAR struct i2schar_dev_s *priv = (FAR struct i2schar_dev_s *)arg;
|
FAR struct i2schar_dev_s *priv = (FAR struct i2schar_dev_s *)arg;
|
||||||
|
|
||||||
DEBUGASSERT(priv && apb);
|
DEBUGASSERT(priv != NULL && apb != NULL);
|
||||||
|
UNUSED(priv);
|
||||||
|
|
||||||
i2sinfo("apb=%p nbytes=%d result=%d\n", apb, apb->nbytes, result);
|
i2sinfo("apb=%p nbytes=%d result=%d\n", apb, apb->nbytes, result);
|
||||||
|
|
||||||
/* REVISIT: If you want this to actually do something other than
|
/* REVISIT: If you want this to actually do something other than
|
||||||
@@ -221,13 +225,13 @@ static ssize_t i2schar_read(FAR struct file *filep, FAR char *buffer,
|
|||||||
|
|
||||||
/* Get our private data structure */
|
/* Get our private data structure */
|
||||||
|
|
||||||
DEBUGASSERT(filep && buffer);
|
DEBUGASSERT(filep != NULL && buffer != NULL);
|
||||||
|
|
||||||
inode = filep->f_inode;
|
inode = filep->f_inode;
|
||||||
DEBUGASSERT(inode);
|
DEBUGASSERT(inode != NULL);
|
||||||
|
|
||||||
priv = (FAR struct i2schar_dev_s *)inode->i_private;
|
priv = (FAR struct i2schar_dev_s *)inode->i_private;
|
||||||
DEBUGASSERT(priv);
|
DEBUGASSERT(priv != NULL);
|
||||||
|
|
||||||
/* Verify that the buffer refers to one, correctly sized audio buffer */
|
/* Verify that the buffer refers to one, correctly sized audio buffer */
|
||||||
|
|
||||||
@@ -363,13 +367,13 @@ static int i2schar_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|||||||
|
|
||||||
/* Get our private data structure */
|
/* Get our private data structure */
|
||||||
|
|
||||||
DEBUGASSERT(filep);
|
DEBUGASSERT(filep != NULL);
|
||||||
|
|
||||||
inode = filep->f_inode;
|
inode = filep->f_inode;
|
||||||
DEBUGASSERT(inode);
|
DEBUGASSERT(inodei != NULL);
|
||||||
|
|
||||||
priv = (FAR struct i2schar_dev_s *)inode->i_private;
|
priv = (FAR struct i2schar_dev_s *)inode->i_private;
|
||||||
DEBUGASSERT(priv && priv->i2s && priv->i2s->ops);
|
DEBUGASSERT(priv != NULL && priv->i2s && priv->i2s->ops);
|
||||||
|
|
||||||
if (priv->i2s->ops->i2s_ioctl)
|
if (priv->i2s->ops->i2s_ioctl)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user