media: camss: vfe: simplify vfe_get_wm_sizes()
authorTom Rix <trix@redhat.com>
Wed, 18 Aug 2021 19:41:05 +0000 (21:41 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 30 Sep 2021 08:07:55 +0000 (10:07 +0200)
commit749d896551df2ae6996aab51c25bbb3ecd589774
treec775c90aca263d56b6191f0651b54726118c9750
parenta9be3931188f240aa2dbdb7c9af65ecfb8c073c1
media: camss: vfe: simplify vfe_get_wm_sizes()

Static analysis reports this representative problem
camss-vfe-4-1.c:333: The result of the left shift is undefined because
  the left operand is negative
  reg |= (height - 1) << 4;
~~~~~~~~~ ^

The is a false positive.  height is set in vfe_get_wm_sizes() which
has a switch statement without a default.

Reviewing the switch, the cases contain redundant assignments.
So simplify to assignments.

Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/qcom/camss/camss-vfe-4-1.c
drivers/media/platform/qcom/camss/camss-vfe-4-7.c
drivers/media/platform/qcom/camss/camss-vfe-4-8.c