]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit0a6a62c448ae398018b1df560240dad9c11120d0
tree04690afa69db94779b1919dfd20825f96acfb832
parent89d35108b9afe1890c175196ae04e93d123faa7b
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