Hi Stanislav, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm-intel/for-linux-next] [cannot apply to drm-tip/drm-tip v5.7-rc5 next-20200515] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Stanislav-Lisovskiy/Consider-DBuf-bandwidth-when-calculating-CDCLK/20200514-232752 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: i386-allyesconfig (attached as .config) reproduce: # apt-get install sparse # sparse version: v0.6.1-193-gb8fad4bc-dirty # save the attached .config to linux build tree make C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot All errors (new ones prefixed by >>, old ones prefixed by <<): drivers/gpu/drm/i915/display/intel_display.c: In function 'intel_atomic_check_planes': drivers/gpu/drm/i915/display/intel_display.c:14695:2: error: 'new_cdclk_state' undeclared (first use in this function); did you mean 'intel_cdclk_state'? new_cdclk_state = intel_atomic_get_new_cdclk_state(state); ^~~~~~~~~~~~~~~ intel_cdclk_state drivers/gpu/drm/i915/display/intel_display.c:14695:2: note: each undeclared identifier is reported only once for each function it appears in drivers/gpu/drm/i915/display/intel_display.c:14698:4: error: 'need_cdclk_calc' undeclared (first use in this function); did you mean 'intel_cdclk_vals'? *need_cdclk_calc = true; ^~~~~~~~~~~~~~~ intel_cdclk_vals In file included from include/linux/list.h:9:0, from include/linux/kobject.h:19, from include/linux/of.h:17, from include/linux/irqdomain.h:35, from include/linux/acpi.h:13, from include/linux/i2c.h:13, from drivers/gpu/drm/i915/display/intel_display.c:27: >> include/linux/kernel.h:866:2: error: first argument to '__builtin_choose_expr' not a constant __builtin_choose_expr(__safe_cmp(x, y), ^ include/linux/kernel.h:882:19: note: in expansion of macro '__careful_cmp' #define max(x, y) __careful_cmp(x, y, >) ^~~~~~~~~~~~~ drivers/gpu/drm/i915/display/intel_display.c:14711:15: note: in expansion of macro 'max' min_cdclk = max(new_cdclk_state->min_cdclk[crtc->pipe], min_cdclk); ^~~ drivers/gpu/drm/i915/display/intel_display.c: In function 'intel_atomic_check_cdclk': drivers/gpu/drm/i915/display/intel_display.c:14736:21: warning: unused variable 'crtc' [-Wunused-variable] struct intel_crtc *crtc; ^~~~ drivers/gpu/drm/i915/display/intel_display.c:14735:27: warning: unused variable 'new_crtc_state' [-Wunused-variable] struct intel_crtc_state *new_crtc_state; ^~~~~~~~~~~~~~ drivers/gpu/drm/i915/display/intel_display.c:14734:28: warning: unused variable 'new_cdclk_state' [-Wunused-variable] struct intel_cdclk_state *new_cdclk_state; ^~~~~~~~~~~~~~~ vim +/__builtin_choose_expr +866 include/linux/kernel.h 3c8ba0d61d04ce Kees Cook 2018-03-30 859 e9092d0d979611 Linus Torvalds 2018-04-09 860 #define __cmp_once(x, y, unique_x, unique_y, op) ({ \ e9092d0d979611 Linus Torvalds 2018-04-09 861 typeof(x) unique_x = (x); \ e9092d0d979611 Linus Torvalds 2018-04-09 862 typeof(y) unique_y = (y); \ e9092d0d979611 Linus Torvalds 2018-04-09 863 __cmp(unique_x, unique_y, op); }) 3c8ba0d61d04ce Kees Cook 2018-03-30 864 3c8ba0d61d04ce Kees Cook 2018-03-30 865 #define __careful_cmp(x, y, op) \ 3c8ba0d61d04ce Kees Cook 2018-03-30 @866 __builtin_choose_expr(__safe_cmp(x, y), \ e9092d0d979611 Linus Torvalds 2018-04-09 867 __cmp(x, y, op), \ e9092d0d979611 Linus Torvalds 2018-04-09 868 __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) e8c97af0c1f23d Randy Dunlap 2017-10-13 869 :::::: The code at line 866 was first introduced by commit :::::: 3c8ba0d61d04ced9f8d9ff93977995a9e4e96e91 kernel.h: Retain constant expression output for max()/min() :::::: TO: Kees Cook :::::: CC: Linus Torvalds --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org