Message ID | 20200804135644.58878-1-wanghai38@huawei.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | [-next] soc: fsl: qe: Remove unnessesary check in ucc_set_tdm_rxtx_clk | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (14fd53d1e5ee7350564cac75e336f8c0dea13bc9) |
snowpatch_ozlabs/build-ppc64le | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/build-ppc64be | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/build-ppc64e | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/build-pmac32 | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 8 lines checked |
snowpatch_ozlabs/needsstable | success | Patch has no Fixes tags |
On Tue, Aug 4, 2020 at 9:04 AM Wang Hai <wanghai38@huawei.com> wrote: > > Fix smatch warning: > > drivers/soc/fsl/qe/ucc.c:526 > ucc_set_tdm_rxtx_clk() warn: unsigned 'tdm_num' is never less than zero. > > 'tdm_num' is u32 type, never less than zero. > > Signed-off-by: Wang Hai <wanghai38@huawei.com> Applied for next. Thanks. > --- > drivers/soc/fsl/qe/ucc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/soc/fsl/qe/ucc.c b/drivers/soc/fsl/qe/ucc.c > index cac0fb7693a0..21dbcd787cd5 100644 > --- a/drivers/soc/fsl/qe/ucc.c > +++ b/drivers/soc/fsl/qe/ucc.c > @@ -523,7 +523,7 @@ int ucc_set_tdm_rxtx_clk(u32 tdm_num, enum qe_clock clock, > > qe_mux_reg = &qe_immr->qmx; > > - if (tdm_num > 7 || tdm_num < 0) > + if (tdm_num > 7) > return -EINVAL; > > /* The communications direction must be RX or TX */ > -- > 2.17.1 >
diff --git a/drivers/soc/fsl/qe/ucc.c b/drivers/soc/fsl/qe/ucc.c index cac0fb7693a0..21dbcd787cd5 100644 --- a/drivers/soc/fsl/qe/ucc.c +++ b/drivers/soc/fsl/qe/ucc.c @@ -523,7 +523,7 @@ int ucc_set_tdm_rxtx_clk(u32 tdm_num, enum qe_clock clock, qe_mux_reg = &qe_immr->qmx; - if (tdm_num > 7 || tdm_num < 0) + if (tdm_num > 7) return -EINVAL; /* The communications direction must be RX or TX */
Fix smatch warning: drivers/soc/fsl/qe/ucc.c:526 ucc_set_tdm_rxtx_clk() warn: unsigned 'tdm_num' is never less than zero. 'tdm_num' is u32 type, never less than zero. Signed-off-by: Wang Hai <wanghai38@huawei.com> --- drivers/soc/fsl/qe/ucc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)