From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F3D086C6FB for ; Thu, 14 Dec 2023 23:48:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="JFjV09sm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702597719; x=1734133719; h=date:from:to:cc:subject:message-id:mime-version; bh=NwTPjsINtjz6bj7IWfrfWCE6ugFwF08fiakrTtgjL+Y=; b=JFjV09sm1AXcWy6Q+6P6McRUuGxvISZP3+6LDzOxXoZvv1RjNThO+iIQ QVMEfQ2PTvIgb+hiQFcCPwcQEnJ1rgFH/Zhk3iUV8nhGHKkZ/faX3xCZC 9hpeoROAz70nyVKcnTePXYdkA4Js/0GB7cKcrKfwmse+XIj6128Ed3/Jp xWofBjSvKAV3G0PRjJGW4mZqBPZPfIpVLuwB2FMVe7A26qVA3sMCWX5C3 f3RJM5S8ZQG+CPrUYXmg5bRDEKtH5pUIduV+EdtuoRK6LEArlWSn0A8VC 8vCR9ShnKr56hz9jYksrXaa7K92EHa7GZ10TATUMxIfcHbjkt/xKJCq74 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="2058227" X-IronPort-AV: E=Sophos;i="6.04,277,1695711600"; d="scan'208";a="2058227" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Dec 2023 15:48:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="844910749" X-IronPort-AV: E=Sophos;i="6.04,277,1695711600"; d="scan'208";a="844910749" Received: from lkp-server02.sh.intel.com (HELO b07ab15da5fe) ([10.239.97.151]) by fmsmga004.fm.intel.com with ESMTP; 14 Dec 2023 15:48:37 -0800 Received: from kbuild by b07ab15da5fe with local (Exim 4.96) (envelope-from ) id 1rDvRQ-000MkZ-0p; Thu, 14 Dec 2023 23:48:32 +0000 Date: Fri, 15 Dec 2023 07:48:26 +0800 From: kernel test robot To: Lewis Huang Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Alex Deucher , Nicholas Kazlauskas Subject: drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c:532:62-63: WARNING comparing pointer to 0 Message-ID: <202312150759.RDeuSwNA-lkp@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: c7402612e2e61b76177f22e6e7f705adcbecc6fe commit: 5911d02cac70d7fb52009fbd37423e63f8f6f9bc drm/amd/display: Change the DMCUB mailbox memory location from FB to inbox date: 4 weeks ago config: x86_64-randconfig-104-20231214 (https://download.01.org/0day-ci/archive/20231215/202312150759.RDeuSwNA-lkp@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce: (https://download.01.org/0day-ci/archive/20231215/202312150759.RDeuSwNA-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202312150759.RDeuSwNA-lkp@intel.com/ cocci warnings: (new ones prefixed by >>) >> drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c:532:62-63: WARNING comparing pointer to 0 vim +532 drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c 505 506 enum dmub_status dmub_srv_calc_mem_info(struct dmub_srv *dmub, 507 const struct dmub_srv_memory_params *params, 508 struct dmub_srv_fb_info *out) 509 { 510 uint8_t *cpu_base; 511 uint64_t gpu_base; 512 uint32_t i; 513 514 if (!dmub->sw_init) 515 return DMUB_STATUS_INVALID; 516 517 memset(out, 0, sizeof(*out)); 518 519 if (params->region_info->num_regions != DMUB_NUM_WINDOWS) 520 return DMUB_STATUS_INVALID; 521 522 cpu_base = (uint8_t *)params->cpu_fb_addr; 523 gpu_base = params->gpu_fb_addr; 524 525 for (i = 0; i < DMUB_NUM_WINDOWS; ++i) { 526 const struct dmub_region *reg = 527 ¶ms->region_info->regions[i]; 528 529 out->fb[i].cpu_addr = cpu_base + reg->base; 530 out->fb[i].gpu_addr = gpu_base + reg->base; 531 > 532 if (i == DMUB_WINDOW_4_MAILBOX && params->cpu_inbox_addr != 0) { 533 out->fb[i].cpu_addr = (uint8_t *)params->cpu_inbox_addr + reg->base; 534 out->fb[i].gpu_addr = params->gpu_inbox_addr + reg->base; 535 } 536 537 out->fb[i].size = reg->top - reg->base; 538 } 539 540 out->num_fb = DMUB_NUM_WINDOWS; 541 542 return DMUB_STATUS_OK; 543 } 544 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki