Skip to content

Commit

Permalink
crypto: caam - Cast to long first before pointer conversion
Browse files Browse the repository at this point in the history
While storing an int in a pointer is safe the compiler is not
happy about it.  So we need some extra casting in order to make
this warning free.

Fixes: 1d3f75bce123 ("crypto: caam - dispose of IRQ mapping only...")
Signed-off-by: Herbert Xu <[email protected]>
Reviewed-by: Horia Geantă <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed Sep 13, 2019
1 parent 67caef0 commit 9575d1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/crypto/caam/jr.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ static int caam_jr_init(struct device *dev)

static void caam_jr_irq_dispose_mapping(void *data)
{
irq_dispose_mapping((int)data);
irq_dispose_mapping((unsigned long)data);
}

/*
Expand Down Expand Up @@ -546,7 +546,7 @@ static int caam_jr_probe(struct platform_device *pdev)
}

error = devm_add_action_or_reset(jrdev, caam_jr_irq_dispose_mapping,
(void *)jrpriv->irq);
(void *)(unsigned long)jrpriv->irq);
if (error)
return error;

Expand Down

0 comments on commit 9575d1a

Please sign in to comment.