Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: fix minor codestyle problems

Fixes five checkpatch warnings:

CHECK: Please don't use multiple blank lines
+
+

ERROR: Macros with complex values should be enclosed in parentheses
+#define MAX_I64 \
+ (int64_t)((1ULL << 63) - 1)

WARNING: Missing a blank line after declarations
+ struct bw_fixed res;
+ ASSERT(value < BW_FIXED_MAX_I32 && value > BW_FIXED_MIN_I32);

ERROR: that open brace { should be on the previous line
+ do
+ {

ERROR: that open brace { should be on the previous line
+ if (remainder >= arg2_value)
+ {

Signed-off-by: Tales Aparecida <tales.aparecida@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Tales Aparecida and committed by
Alex Deucher
30f2d2e4 6ae0632d

+4 -6
+4 -6
drivers/gpu/drm/amd/display/dc/dml/calcs/bw_fixed.c
··· 25 25 #include "dm_services.h" 26 26 #include "bw_fixed.h" 27 27 28 - 29 28 #define MAX_I64 \ 30 - (int64_t)((1ULL << 63) - 1) 29 + ((int64_t)((1ULL << 63) - 1)) 31 30 32 31 #define MIN_I64 \ 33 32 (-MAX_I64 - 1) ··· 48 49 struct bw_fixed bw_int_to_fixed_nonconst(int64_t value) 49 50 { 50 51 struct bw_fixed res; 52 + 51 53 ASSERT(value < BW_FIXED_MAX_I32 && value > BW_FIXED_MIN_I32); 52 54 res.value = value << BW_FIXED_BITS_PER_FRACTIONAL_PART; 53 55 return res; ··· 78 78 { 79 79 uint32_t i = BW_FIXED_BITS_PER_FRACTIONAL_PART; 80 80 81 - do 82 - { 81 + do { 83 82 remainder <<= 1; 84 83 85 84 res_value <<= 1; 86 85 87 - if (remainder >= arg2_value) 88 - { 86 + if (remainder >= arg2_value) { 89 87 res_value |= 1; 90 88 remainder -= arg2_value; 91 89 }