OSDN Git Service

media: cx2341x: replace badly designed macros
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 25 Mar 2019 19:09:30 +0000 (15:09 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 25 Mar 2019 22:02:25 +0000 (18:02 -0400)
commit3d19cde7be76d4471426edc348bcf3b45c64f097
tree04690afa69db94779b1919dfd20825f96acfb832
parent153d11cc530cb2a3045167253582d3d2849ad519
media: cx2341x: replace badly designed macros

There are some macros at cx2341x_update() with seemed to
be introduced in order to ensure that lines would be less
than 80 columns.

Well, the thing is that they make the code harder to be analized,
not only by humans, but also for static code analyzers:

drivers/media/common/cx2341x.c:1116 cx2341x_update() error: we previously assumed 'old' could be null (see line 1047)

So, remove the "force" var, and replace the NEQ macro to a
better designed one that makes clearer about what it is doing.

While here, also remove the "temporal" var, as it is just another
way of doing the same type of check as the new CMP_FIELD() macro
already does.

Finally, fix coding style at the block code.
 remove such macros.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/common/cx2341x.c