diff options
author | George Cherian <george.cherian@cavium.com> | 2017-02-14 04:23:17 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-02-15 00:23:50 -0500 |
commit | 6ecb7d62bf8ef34325fa55e8cf167610ed7abe83 (patch) | |
tree | ebf1824341ff1e9660c89c80278b294297038dde | |
parent | 36b05efc1b5b62054232d5b8453782ee7ca4efaa (diff) |
crypto: cavium - cpt_bind_vq_to_grp could return an error code
cpt_bind_vq_to_grp() could return an error code. However, it currently
returns a u8. This produce the static checker warning.
drivers/crypto/cavium/cpt/cptpf_mbox.c:70 cpt_bind_vq_to_grp() warn: signedness bug returning '(-22)'
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: George Cherian <george.cherian@cavium.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | drivers/crypto/cavium/cpt/cptpf_mbox.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/cavium/cpt/cptpf_mbox.c b/drivers/crypto/cavium/cpt/cptpf_mbox.c index 5818b415e814..20f2c6ee46a5 100644 --- a/drivers/crypto/cavium/cpt/cptpf_mbox.c +++ b/drivers/crypto/cavium/cpt/cptpf_mbox.c | |||
@@ -59,7 +59,7 @@ static void cpt_cfg_vq_priority(struct cpt_device *cpt, int vf, u32 pri) | |||
59 | cpt_write_csr64(cpt->reg_base, CPTX_PF_QX_CTL(0, vf), pf_qx_ctl.u); | 59 | cpt_write_csr64(cpt->reg_base, CPTX_PF_QX_CTL(0, vf), pf_qx_ctl.u); |
60 | } | 60 | } |
61 | 61 | ||
62 | static u8 cpt_bind_vq_to_grp(struct cpt_device *cpt, u8 q, u8 grp) | 62 | static int cpt_bind_vq_to_grp(struct cpt_device *cpt, u8 q, u8 grp) |
63 | { | 63 | { |
64 | struct microcode *mcode = cpt->mcode; | 64 | struct microcode *mcode = cpt->mcode; |
65 | union cptx_pf_qx_ctl pf_qx_ctl; | 65 | union cptx_pf_qx_ctl pf_qx_ctl; |
@@ -90,7 +90,7 @@ static void cpt_handle_mbox_intr(struct cpt_device *cpt, int vf) | |||
90 | { | 90 | { |
91 | struct cpt_vf_info *vfx = &cpt->vfinfo[vf]; | 91 | struct cpt_vf_info *vfx = &cpt->vfinfo[vf]; |
92 | struct cpt_mbox mbx = {}; | 92 | struct cpt_mbox mbx = {}; |
93 | u8 vftype; | 93 | int vftype; |
94 | struct device *dev = &cpt->pdev->dev; | 94 | struct device *dev = &cpt->pdev->dev; |
95 | /* | 95 | /* |
96 | * MBOX[0] contains msg | 96 | * MBOX[0] contains msg |