]> 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)
commit9a48d56691ba58b3ff743c0c7843deb1ae78ec9f
tree04690afa69db94779b1919dfd20825f96acfb832
parentdea4908f62c51f87461d70f6bf29b59ab9a073fb
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