CC: [email protected] CC: [email protected] In-Reply-To: <4c6511bd7f4ce52aa3323141b6f0a68ae2773787.1645029005.git.dave.steven...@raspberrypi.com> References: <4c6511bd7f4ce52aa3323141b6f0a68ae2773787.1645029005.git.dave.steven...@raspberrypi.com> TO: Dave Stevenson <[email protected]> TO: Maarten Lankhorst <[email protected]> TO: Maxime Ripard <[email protected]> TO: Thomas Zimmermann <[email protected]> TO: David Airlie <[email protected]> TO: Daniel Vetter <[email protected]> TO: [email protected] CC: Marek Vasut <[email protected]> CC: Jonas Karlman <[email protected]> CC: Robert Foss <[email protected]> CC: Neil Armstrong <[email protected]> CC: Douglas Anderson <[email protected]> CC: Jernej Skrabec <[email protected]> CC: [email protected] CC: Laurent Pinchart <[email protected]> CC: Andrzej Hajda <[email protected]> CC: Dmitry Baryshkov <[email protected]> CC: Dave Stevenson <[email protected]> CC: Jagan Teki <[email protected]>
Hi Dave, I love your patch! Perhaps something to improve: [auto build test WARNING on drm/drm-next] [also build test WARNING on v5.17-rc4 next-20220217] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Dave-Stevenson/DSI-host-and-peripheral-initialisation-ordering/20220217-010120 base: git://anongit.freedesktop.org/drm/drm drm-next :::::: branch date: 2 days ago :::::: commit date: 2 days ago config: mips-randconfig-c004-20220216 (https://download.01.org/0day-ci/archive/20220218/[email protected]/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0e628a783b935c70c80815db6c061ec84f884af5) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install mips cross compiling tool for clang build # apt-get install binutils-mips-linux-gnu # https://github.com/0day-ci/linux/commit/a483cd9be6fb2c1fc1cbf88a0df3a28723630519 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Dave-Stevenson/DSI-host-and-peripheral-initialisation-ordering/20220217-010120 git checkout a483cd9be6fb2c1fc1cbf88a0df3a28723630519 # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> clang-analyzer warnings: (new ones prefixed by >>) ^ include/linux/compiler_types.h:334:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:318:2: note: expanded from macro '__compiletime_assert' do { \ ^ mm/zsmalloc.c:1901:2: note: Loop condition is false. Exiting loop kunmap_atomic(s_addr); ^ include/linux/highmem-internal.h:243:35: note: expanded from macro 'kunmap_atomic' #define kunmap_atomic(__addr) \ ^ mm/zsmalloc.c:1903:2: note: Calling 'replace_sub_page' replace_sub_page(class, zspage, newpage, page); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/zsmalloc.c:1801:2: note: Initializing to a null pointer value struct page *pages[ZS_MAX_PAGES_PER_ZSPAGE] = {NULL, }; ^~~~~~~~~~~~~~~~~~ mm/zsmalloc.c:1806:7: note: Assuming 'page' is not equal to 'oldpage' if (page == oldpage) ^~~~~~~~~~~~~~~ mm/zsmalloc.c:1806:3: note: Taking false branch if (page == oldpage) ^ mm/zsmalloc.c:1805:2: note: Loop condition is false. Exiting loop do { ^ mm/zsmalloc.c:1813:2: note: Calling 'create_page_chain' create_page_chain(class, zspage, pages); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/zsmalloc.c:1033:14: note: Assuming 'i' is < 'nr_pages' for (i = 0; i < nr_pages; i++) { ^~~~~~~~~~~~ mm/zsmalloc.c:1033:2: note: Loop condition is true. Entering loop body for (i = 0; i < nr_pages; i++) { ^ mm/zsmalloc.c:1037:7: note: 'i' is equal to 0 if (i == 0) { ^ mm/zsmalloc.c:1037:3: note: Taking true branch if (i == 0) { ^ mm/zsmalloc.c:1040:17: note: Assuming field 'objs_per_zspage' is not equal to 1 if (unlikely(class->objs_per_zspage == 1 && ^ include/linux/compiler.h:48:41: note: expanded from macro 'unlikely' # define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x))) ^ include/linux/compiler.h:33:34: note: expanded from macro '__branch_check__' ______r = __builtin_expect(!!(x), expect); \ ^ mm/zsmalloc.c:1040:45: note: Left side of '&&' is false if (unlikely(class->objs_per_zspage == 1 && ^ mm/zsmalloc.c:1040:24: note: Field 'objs_per_zspage' is not equal to 1 if (unlikely(class->objs_per_zspage == 1 && ^ mm/zsmalloc.c:1040:45: note: Left side of '&&' is false if (unlikely(class->objs_per_zspage == 1 && ^ mm/zsmalloc.c:1040:4: note: Taking false branch if (unlikely(class->objs_per_zspage == 1 && ^ mm/zsmalloc.c:1033:28: note: The value 1 is assigned to 'i' for (i = 0; i < nr_pages; i++) { ^~~ mm/zsmalloc.c:1033:14: note: Assuming 'i' is < 'nr_pages' for (i = 0; i < nr_pages; i++) { ^~~~~~~~~~~~ mm/zsmalloc.c:1033:2: note: Loop condition is true. Entering loop body for (i = 0; i < nr_pages; i++) { ^ mm/zsmalloc.c:1034:3: note: Null pointer value stored to 'page' page = pages[i]; ^~~~~~~~~~~~~~~ mm/zsmalloc.c:1035:20: note: Passing null pointer value via 1st parameter 'page' set_page_private(page, (unsigned long)zspage); ^~~~ mm/zsmalloc.c:1035:3: note: Calling 'set_page_private' set_page_private(page, (unsigned long)zspage); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mm_types.h:309:16: note: Dereference of null pointer page->private = private; ~~~~~~~~~~~~~~^~~~~~~~~ mm/zsmalloc.c:934:2: warning: Value stored to 'next' is never read [clang-analyzer-deadcode.DeadStores] next = page = get_first_page(zspage); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/zsmalloc.c:934:2: note: Value stored to 'next' is never read next = page = get_first_page(zspage); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 3 warnings generated. >> drivers/gpu/drm/drm_bridge.c:662:9: warning: Assigned value is garbage or >> undefined [clang-analyzer-core.uninitialized.Assign] iter = limit; ^ ~~~~~ drivers/gpu/drm/drm_bridge.c:625:35: note: 'limit' declared without an initial value struct drm_bridge *iter, *next, *limit; ^~~~~ drivers/gpu/drm/drm_bridge.c:627:6: note: Assuming 'bridge' is non-null if (!bridge) ^~~~~~~ drivers/gpu/drm/drm_bridge.c:627:2: note: Taking false branch if (!bridge) ^ drivers/gpu/drm/drm_bridge.c:632:2: note: Loop condition is true. Entering loop body list_for_each_entry_reverse(iter, &encoder->bridge_chain, chain_node) { ^ include/linux/list.h:649:2: note: expanded from macro 'list_for_each_entry_reverse' for (pos = list_last_entry(head, typeof(*pos), member); \ ^ drivers/gpu/drm/drm_bridge.c:633:7: note: Assuming the condition is false if (iter->ops & DRM_BRIDGE_OP_UPSTREAM_FIRST) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_bridge.c:633:3: note: Taking false branch if (iter->ops & DRM_BRIDGE_OP_UPSTREAM_FIRST) { ^ drivers/gpu/drm/drm_bridge.c:658:7: note: Assuming field 'pre_enable' is non-null if (iter->funcs->pre_enable) ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_bridge.c:658:3: note: Taking true branch if (iter->funcs->pre_enable) ^ drivers/gpu/drm/drm_bridge.c:661:7: note: Assuming the condition is true if (iter->ops & DRM_BRIDGE_OP_UPSTREAM_FIRST) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_bridge.c:661:3: note: Taking true branch if (iter->ops & DRM_BRIDGE_OP_UPSTREAM_FIRST) ^ drivers/gpu/drm/drm_bridge.c:662:9: note: Assigned value is garbage or undefined iter = limit; ^ ~~~~~ drivers/gpu/drm/drm_bridge.c:894:9: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] iter = limit; ^ ~~~~~ drivers/gpu/drm/drm_bridge.c:859:35: note: 'limit' declared without an initial value struct drm_bridge *iter, *next, *limit; ^~~~~ drivers/gpu/drm/drm_bridge.c:861:6: note: Assuming 'bridge' is non-null if (!bridge) ^~~~~~~ drivers/gpu/drm/drm_bridge.c:861:2: note: Taking false branch if (!bridge) ^ drivers/gpu/drm/drm_bridge.c:866:2: note: Loop condition is true. Entering loop body list_for_each_entry_reverse(iter, &encoder->bridge_chain, chain_node) { ^ include/linux/list.h:649:2: note: expanded from macro 'list_for_each_entry_reverse' for (pos = list_last_entry(head, typeof(*pos), member); \ ^ drivers/gpu/drm/drm_bridge.c:867:7: note: Assuming the condition is false if (iter->ops & DRM_BRIDGE_OP_UPSTREAM_FIRST) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_bridge.c:867:3: note: Taking false branch if (iter->ops & DRM_BRIDGE_OP_UPSTREAM_FIRST) { ^ drivers/gpu/drm/drm_bridge.c:893:7: note: Assuming the condition is true if (iter->ops & DRM_BRIDGE_OP_UPSTREAM_FIRST) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_bridge.c:893:3: note: Taking true branch if (iter->ops & DRM_BRIDGE_OP_UPSTREAM_FIRST) ^ drivers/gpu/drm/drm_bridge.c:894:9: note: Assigned value is garbage or undefined iter = limit; ^ ~~~~~ Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 2 warnings generated. Suppressed 2 warnings (1 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 2 warnings generated. drivers/dma/sh/rcar-dmac.c:914:20: warning: The right operand of '|' is a garbage value due to array index out of bounds [clang-analyzer-core.UndefinedBinaryOperatorResult] desc->chcr = chcr | chcr_ts[desc->xfer_shift]; ^ drivers/dma/sh/rcar-dmac.c:1235:6: note: Assuming field 'mid_rid' is >= 0 if (rchan->mid_rid < 0 || buf_len < period_len) { ^~~~~~~~~~~~~~~~~~ drivers/dma/sh/rcar-dmac.c:1235:6: note: Left side of '||' is false drivers/dma/sh/rcar-dmac.c:1235:28: note: Assuming 'buf_len' is >= 'period_len' vim +662 drivers/gpu/drm/drm_bridge.c 862e686ce402992 Archit Taneja 2015-05-21 608 862e686ce402992 Archit Taneja 2015-05-21 609 /** ea099adfdf4bf35 Boris Brezillon 2019-12-03 610 * drm_bridge_chain_pre_enable - prepares for enabling all bridges in the ea099adfdf4bf35 Boris Brezillon 2019-12-03 611 * encoder chain 862e686ce402992 Archit Taneja 2015-05-21 612 * @bridge: bridge control structure 862e686ce402992 Archit Taneja 2015-05-21 613 * 4541d31e2ab547f Daniel Vetter 2017-01-02 614 * Calls &drm_bridge_funcs.pre_enable op for all the bridges in the encoder 862e686ce402992 Archit Taneja 2015-05-21 615 * chain, starting from the last bridge to the first. These are called 862e686ce402992 Archit Taneja 2015-05-21 616 * before calling the encoder's commit op. a483cd9be6fb2c1 Dave Stevenson 2022-02-16 617 * If a bridge sets the DRM_BRIDGE_OP_UPSTREAM_FIRST, then the pre_enable for a483cd9be6fb2c1 Dave Stevenson 2022-02-16 618 * the previous bridge will be called before pre_enable of this bridge. 862e686ce402992 Archit Taneja 2015-05-21 619 * 862e686ce402992 Archit Taneja 2015-05-21 620 * Note: the bridge passed should be the one closest to the encoder 862e686ce402992 Archit Taneja 2015-05-21 621 */ ea099adfdf4bf35 Boris Brezillon 2019-12-03 622 void drm_bridge_chain_pre_enable(struct drm_bridge *bridge) 862e686ce402992 Archit Taneja 2015-05-21 623 { 05193dc38197021 Boris Brezillon 2019-12-03 624 struct drm_encoder *encoder; a483cd9be6fb2c1 Dave Stevenson 2022-02-16 625 struct drm_bridge *iter, *next, *limit; 05193dc38197021 Boris Brezillon 2019-12-03 626 862e686ce402992 Archit Taneja 2015-05-21 627 if (!bridge) 862e686ce402992 Archit Taneja 2015-05-21 628 return; 862e686ce402992 Archit Taneja 2015-05-21 629 05193dc38197021 Boris Brezillon 2019-12-03 630 encoder = bridge->encoder; a483cd9be6fb2c1 Dave Stevenson 2022-02-16 631 05193dc38197021 Boris Brezillon 2019-12-03 632 list_for_each_entry_reverse(iter, &encoder->bridge_chain, chain_node) { a483cd9be6fb2c1 Dave Stevenson 2022-02-16 633 if (iter->ops & DRM_BRIDGE_OP_UPSTREAM_FIRST) { a483cd9be6fb2c1 Dave Stevenson 2022-02-16 634 next = iter; a483cd9be6fb2c1 Dave Stevenson 2022-02-16 635 limit = bridge; a483cd9be6fb2c1 Dave Stevenson 2022-02-16 636 list_for_each_entry_from_reverse(next, a483cd9be6fb2c1 Dave Stevenson 2022-02-16 637 &encoder->bridge_chain, a483cd9be6fb2c1 Dave Stevenson 2022-02-16 638 chain_node) { a483cd9be6fb2c1 Dave Stevenson 2022-02-16 639 if (next == bridge) a483cd9be6fb2c1 Dave Stevenson 2022-02-16 640 break; a483cd9be6fb2c1 Dave Stevenson 2022-02-16 641 a483cd9be6fb2c1 Dave Stevenson 2022-02-16 642 if (!(next->ops & a483cd9be6fb2c1 Dave Stevenson 2022-02-16 643 DRM_BRIDGE_OP_UPSTREAM_FIRST)) { a483cd9be6fb2c1 Dave Stevenson 2022-02-16 644 limit = list_prev_entry(next, chain_node); a483cd9be6fb2c1 Dave Stevenson 2022-02-16 645 break; a483cd9be6fb2c1 Dave Stevenson 2022-02-16 646 } a483cd9be6fb2c1 Dave Stevenson 2022-02-16 647 } a483cd9be6fb2c1 Dave Stevenson 2022-02-16 648 a483cd9be6fb2c1 Dave Stevenson 2022-02-16 649 list_for_each_entry_from(next, &encoder->bridge_chain, chain_node) { a483cd9be6fb2c1 Dave Stevenson 2022-02-16 650 if (next == iter) a483cd9be6fb2c1 Dave Stevenson 2022-02-16 651 break; a483cd9be6fb2c1 Dave Stevenson 2022-02-16 652 a483cd9be6fb2c1 Dave Stevenson 2022-02-16 653 if (next->funcs->pre_enable) a483cd9be6fb2c1 Dave Stevenson 2022-02-16 654 next->funcs->pre_enable(next); a483cd9be6fb2c1 Dave Stevenson 2022-02-16 655 } a483cd9be6fb2c1 Dave Stevenson 2022-02-16 656 } a483cd9be6fb2c1 Dave Stevenson 2022-02-16 657 05193dc38197021 Boris Brezillon 2019-12-03 658 if (iter->funcs->pre_enable) 05193dc38197021 Boris Brezillon 2019-12-03 659 iter->funcs->pre_enable(iter); bab5cca7e609952 Douglas Anderson 2021-04-16 660 a483cd9be6fb2c1 Dave Stevenson 2022-02-16 661 if (iter->ops & DRM_BRIDGE_OP_UPSTREAM_FIRST) a483cd9be6fb2c1 Dave Stevenson 2022-02-16 @662 iter = limit; a483cd9be6fb2c1 Dave Stevenson 2022-02-16 663 bab5cca7e609952 Douglas Anderson 2021-04-16 664 if (iter == bridge) bab5cca7e609952 Douglas Anderson 2021-04-16 665 break; 05193dc38197021 Boris Brezillon 2019-12-03 666 } 862e686ce402992 Archit Taneja 2015-05-21 667 } ea099adfdf4bf35 Boris Brezillon 2019-12-03 668 EXPORT_SYMBOL(drm_bridge_chain_pre_enable); 862e686ce402992 Archit Taneja 2015-05-21 669 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected] _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
