Staging: media: davinci_vpfe: Drop macro and use an in-kernel function
Subsystems (2)
PATCH v3 1/1 Staging: media: davinci_vpfe: Drop macro and use an in-kernel function
Drop macro CEIL and use an in-kernel function DIV_ROUND_UP.
Signed-off-by Madhumitha Prabakaran <[email protected]>
---
Changes in v3:
- Drop conversion of macro into inline functions and instead use in-kernel function
Changes in v2:
- Corrected commit log spelling
- Made the subject line unique from previous commit
--- drivers/staging/media/davinci_vpfe/dm365_ipipe.h | 2 -- drivers/staging/media/davinci_vpfe/dm365_resizer.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/staging/media/davinci_vpfe/dm365_ipipe.h +0 -2
@@ -27,8 +27,6 @@#include "davinci_vpfe_user.h" #include "vpfe_video.h" -#define CEIL (a, b) (((a) + (b-1)) / (b)) -enum ipipe_noise_filter {IPIPE_D2F_1ST =0 ,IPIPE_D2F_2ND =1 ,
drivers/staging/media/davinci_vpfe/dm365_resizer.c +2 -2
@@ -386,7 +386,7 @@ resizer_calculate_down_scale_f_div_param(struct device *dev, } o =10 + (two_power <<2 );if (((input_width <<7 ) / rsz) %2 ) - o += (((CEIL (rsz,1024 )) <<1 ) << n); + o += ((DIV_ROUND_UP (rsz,1024 ) <<1 ) << n); h2 = output_width - h1;/* phi */ val = (h1 * rsz) - (((upper_h1 - (o -10 )) / two_power) <<8 );
@@ -630,7 +630,7 @@ resizer_calculate_normal_f_div_param(struct device *dev, int input_width, val /= rsz <<1 ; val <<=1 ; val +=2 ; - o += ((CEIL (rsz,1024 )) <<1 ); + o += (DIV_ROUND_UP (rsz,1024 ) <<1 ); h1 = val; } h2 = output_width - h1;
Signature · 1 line
2.17.1