@@ -2127,22 +2127,20 @@ static u16 message_response_sequence(struct hpi_adapter_obj *pao,
time_out = HPI6205_TIMEOUT;
/* read the result */
- if (time_out) {
- if (interface->u.response_buffer.response.size <= phr->size)
- memcpy(phr, &interface->u.response_buffer,
- interface->u.response_buffer.response.size);
- else {
- HPI_DEBUG_LOG(ERROR,
+ if (interface->u.response_buffer.response.size <= phr->size)
+ memcpy(phr, &interface->u.response_buffer,
+ interface->u.response_buffer.response.size);
+ else {
+ HPI_DEBUG_LOG(ERROR,
"response len %d too big for buffer %d\n",
interface->u.response_buffer.response.size,
phr->size);
- memcpy(phr, &interface->u.response_buffer,
+ memcpy(phr, &interface->u.response_buffer,
sizeof(struct hpi_response_header));
- phr->error = HPI_ERROR_RESPONSE_BUFFER_TOO_SMALL;
- phr->specific_error =
- interface->u.response_buffer.response.size;
- phr->size = sizeof(struct hpi_response_header);
- }
+ phr->error = HPI_ERROR_RESPONSE_BUFFER_TOO_SMALL;
+ phr->specific_error =
+ interface->u.response_buffer.response.size;
+ phr->size = sizeof(struct hpi_response_header);
}
/* set interface back to idle */
send_dsp_command(phw, H620_HIF_IDLE);
@@ -1320,12 +1320,12 @@ static int snd_mixart_probe(struct pci_dev *pci,
idx = index[dev];
else
idx = index[dev] + i;
- snprintf(tmpid, sizeof(tmpid), "%s-%d", id[dev] ? id[dev] : "MIXART", i);
+ snprintf(tmpid, sizeof(tmpid), "%s-%u", id[dev] ? id[dev] : "MIXART", i);
err = snd_card_new(&pci->dev, idx, tmpid, THIS_MODULE,
0, &card);
if (err < 0) {
- dev_err(&pci->dev, "cannot allocate the card %d\n", i);
+ dev_err(&pci->dev, "cannot allocate the card %u\n", i);
snd_mixart_free(mgr);
return err;
}
@@ -1334,7 +1334,7 @@ static int snd_mixart_probe(struct pci_dev *pci,
snprintf(card->shortname, sizeof(card->shortname),
"Digigram miXart [PCM #%d]", i);
snprintf(card->longname, sizeof(card->longname),
- "Digigram miXart at 0x%lx & 0x%lx, irq %i [PCM #%d]",
+ "Digigram miXart at 0x%lx & 0x%lx, irq %i [PCM #%u]",
mgr->mem[0].phys, mgr->mem[1].phys, mgr->irq, i);
err = snd_mixart_create(mgr, card, i);
Since HPI6205_TIMEOUT is a constant, time_out is always true, so unneeded judgments are removed. Signed-off-by: liujing <liujing@cmss.chinamobile.com>