Skip to contentSkip to conversation

dma: keystone_nav: remove spurious qm_cfg verification

PATCH In review Ivan Khoronzhuk 2 participants 3 messages Nov 3, 2014 – Nov 5, 2014 dmaengine

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dma: keystone_nav: remove spurious qm_cfg verification

The verification qm_cfg existence is done at ksnav_init(). So, there is no need to verify it after initialization.

---
 drivers/dma/keystone_nav.c | 12 ------------
 1 file changed, 12 deletions(-)
drivers/dma/keystone_nav.c +0 -12
index 77707c2..dfca75a 100644
@@ -81,9 +81,6 @@ void qm_close(void)
 {
 	u32	j;
 
-	if (qm_cfg == NULL)
-		return;
-
 	queue_close(qm_cfg->qpool_num);
 
 	qm_cfg->mngr_cfg->link_ram_base0	= 0;
@@ -105,9 +102,6 @@ void qm_push(struct qm_host_desc *hd, u32 qnum)
 {
 	u32 regd;
 
-	if (!qm_cfg)
-		return;
-
 	cpu_to_bus((u32 *)hd, sizeof(struct qm_host_desc)/4);
 	regd = (u32)hd | ((sizeof(struct qm_host_desc) >> 4) - 1);
 	writel(regd, &qm_cfg->queue[qnum].ptr_size_thresh);
@@ -127,9 +121,6 @@ struct qm_host_desc *qm_pop(u32 qnum)
 {
 	u32 uhd;
 
-	if (!qm_cfg)
-		return NULL;
-
 	uhd = readl(&qm_cfg->queue[qnum].ptr_size_thresh) & ~0xf;
 	if (uhd)
 		cpu_to_bus((u32 *)uhd, sizeof(struct qm_host_desc)/4);
@@ -139,9 +130,6 @@ struct qm_host_desc *qm_pop(u32 qnum)
 
 struct qm_host_desc *qm_pop_from_free_pool(void)
 {
-	if (!qm_cfg)
-		return NULL;
-
 	return qm_pop(qm_cfg->qpool_num);
 }
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 dma: keystone_nav: remove spurious qm_cfg verification

Quoted 4 lines · Ivan Khoronzhuk

The verification qm_cfg existence is done at ksnav_init(). So, there is no need to verify it after initialization.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141104/7db24400/attachment.pgp>
#2 lore raw
In reply to Ivan Khoronzhuk
Quoted 5 lines · Ivan

The verification qm_cfg existence is done at ksnav_init(). So, there is no need to verify it after initialization.

Applied to u-boot-ti/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141105/3201be0d/attachment.pgp>