]> git.baikalelectronics.ru Git - kernel.git/commit
media: c8sectpfe: Clean up handling of *_buffer_aligned
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 9 Feb 2022 18:25:21 +0000 (18:25 +0000)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 8 Jul 2022 11:02:24 +0000 (12:02 +0100)
commit7546dfbbcc2701a8f31b342ca45bd781a89ad9cd
treefde4ef0960a24ab60159bdadee1a9f2e7e1eed60
parent8ad4ca5d9d462e3de30d587d57cbeb68ee981928
media: c8sectpfe: Clean up handling of *_buffer_aligned

There are a few cases where code is harder than needed to read.
Improve those by:
- dropping unnecessary castings (see note below)
- use PTR_ALING() to be more explicit on what's going on there
- use proper definitions instead of hard coded values

Note, dropping castings will allow to perform an additional check
that type is not changed from void * to something else, e.g. u64,
which may very well break the bitmap APIs.

Link: https://lore.kernel.org/linux-media/20220209182521.55632-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c