tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: f925116b24c0c42dc6d5ab5111c55fd7f74e8dc7 commit: a5e39ae27c3a305c6aafc0e423b0cb2c677facde [2355/14039] drm/amd/display: Add function for validate and update new stream config: ia64-randconfig-m041-20221207 compiler: ia64-linux-gcc (GCC) 12.1.0 If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Reported-by: Dan Carpenter <error27@xxxxxxxxx> smatch warnings: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:2621 planes_changed_for_existing_stream() error: we previously assumed 'stream_status' could be null (see line 2611) vim +/stream_status +2621 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2596 static bool planes_changed_for_existing_stream(struct dc_state *context, a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2597 struct dc_stream_state *stream, a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2598 const struct dc_validation_set set[], a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2599 int set_count) a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2600 { a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2601 int i, j; a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2602 struct dc_stream_status *stream_status = NULL; a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2603 a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2604 for (i = 0; i < context->stream_count; i++) { a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2605 if (context->streams[i] == stream) { a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2606 stream_status = &context->stream_status[i]; a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2607 break; a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2608 } a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2609 } a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2610 a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 @2611 if (!stream_status) a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2612 ASSERT(0); If you wrote this as ASSERT(stream_status) it would silence the static checker warning. a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2613 a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2614 for (i = 0; i < set_count; i++) a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2615 if (set[i].stream == stream) a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2616 break; a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2617 a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2618 if (i == set_count) a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2619 ASSERT(0); a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2620 a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 @2621 if (set[i].plane_count != stream_status->plane_count) a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2622 return true; a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2623 a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2624 for (j = 0; j < set[i].plane_count; j++) a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2625 if (set[i].plane_states[j] != stream_status->plane_states[j]) a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2626 return true; a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2627 a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2628 return false; a5e39ae27c3a30 Rodrigo Siqueira 2022-10-18 2629 } -- 0-DAY CI Kernel Test Service https://01.org/lkp