media: tda10021: avoid casts when using symbol_rate
The usage of castings and float point when checking for
the setup based at the symbol_rate cause those warnings
with smatch:
drivers/media/dvb-frontends/tda10021.c:153 tda10021_set_symbolrate() warn: unsigned 'symbolrate' is never less than zero.
drivers/media/dvb-frontends/tda10021.c:155 tda10021_set_symbolrate() warn: unsigned 'symbolrate' is never less than zero.
drivers/media/dvb-frontends/tda10021.c:157 tda10021_set_symbolrate() warn: unsigned 'symbolrate' is never less than zero.
drivers/media/dvb-frontends/tda10021.c:159 tda10021_set_symbolrate() warn: unsigned 'symbolrate' is never less than zero.
While the code should work with gcc, as it will evaluate the
values into a constant before compiling, other compilers
could do otherwise. So, get rid of float pointing math on it,
avoiding the need of doing typecasts.
While here, cleanup some coding style issues at the related
code.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Showing
Please register or sign in to comment