]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: caam/qi - fix warning in init_cgr()
authorHoria Geantă <horia.geanta@nxp.com>
Wed, 23 May 2018 11:32:42 +0000 (14:32 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 30 May 2018 16:13:47 +0000 (00:13 +0800)
commit49beb1e9c343b73e6f9a7d621854563a5ea6e19f
tree678b560f5c842d9b37aa1ade9e0e669034328643
parentb40f607c1defd540564905c337891e82b5dc7f5f
crypto: caam/qi - fix warning in init_cgr()

Coverity warns about an
"Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)"
when computing the congestion threshold value.

Even though it is highly unlikely for an overflow to happen,
use this as an opportunity to simplify the code.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/qi.c