From: kernel test robot <lkp@intel.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Alex Deucher <alexander.deucher@amd.com>
Subject: drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c:590:13: warning: '%s' directive argument is null
Date: Thu, 13 Feb 2025 04:50:42 +0800 [thread overview]
Message-ID: <202502130406.iWQ0eBug-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 09fbf3d502050282bf47ab3babe1d4ed54dd1fd8
commit: 020620424b27bababf7f53d00692ab919c357a3f drm/amd: Use a constant format string for amdgpu_ucode_request
date: 6 months ago
config: x86_64-buildonly-randconfig-001-20250213 (https://download.01.org/0day-ci/archive/20250213/202502130406.iWQ0eBug-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250213/202502130406.iWQ0eBug-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502130406.iWQ0eBug-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c: In function 'amdgpu_umsch_mm_init_microcode':
>> drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c:590:13: warning: '%s' directive argument is null [-Wformat-overflow=]
590 | r = amdgpu_ucode_request(adev, &adev->umsch_mm.fw, "%s", fw_name);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +590 drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
573
574 int amdgpu_umsch_mm_init_microcode(struct amdgpu_umsch_mm *umsch)
575 {
576 const struct umsch_mm_firmware_header_v1_0 *umsch_mm_hdr;
577 struct amdgpu_device *adev = umsch->ring.adev;
578 const char *fw_name = NULL;
579 int r;
580
581 switch (amdgpu_ip_version(adev, VCN_HWIP, 0)) {
582 case IP_VERSION(4, 0, 5):
583 case IP_VERSION(4, 0, 6):
584 fw_name = "amdgpu/umsch_mm_4_0_0.bin";
585 break;
586 default:
587 break;
588 }
589
> 590 r = amdgpu_ucode_request(adev, &adev->umsch_mm.fw, "%s", fw_name);
591 if (r) {
592 release_firmware(adev->umsch_mm.fw);
593 adev->umsch_mm.fw = NULL;
594 return r;
595 }
596
597 umsch_mm_hdr = (const struct umsch_mm_firmware_header_v1_0 *)adev->umsch_mm.fw->data;
598
599 adev->umsch_mm.ucode_size = le32_to_cpu(umsch_mm_hdr->umsch_mm_ucode_size_bytes);
600 adev->umsch_mm.data_size = le32_to_cpu(umsch_mm_hdr->umsch_mm_ucode_data_size_bytes);
601
602 adev->umsch_mm.irq_start_addr =
603 le32_to_cpu(umsch_mm_hdr->umsch_mm_irq_start_addr_lo) |
604 ((uint64_t)(le32_to_cpu(umsch_mm_hdr->umsch_mm_irq_start_addr_hi)) << 32);
605 adev->umsch_mm.uc_start_addr =
606 le32_to_cpu(umsch_mm_hdr->umsch_mm_uc_start_addr_lo) |
607 ((uint64_t)(le32_to_cpu(umsch_mm_hdr->umsch_mm_uc_start_addr_hi)) << 32);
608 adev->umsch_mm.data_start_addr =
609 le32_to_cpu(umsch_mm_hdr->umsch_mm_data_start_addr_lo) |
610 ((uint64_t)(le32_to_cpu(umsch_mm_hdr->umsch_mm_data_start_addr_hi)) << 32);
611
612 if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
613 struct amdgpu_firmware_info *info;
614
615 info = &adev->firmware.ucode[AMDGPU_UCODE_ID_UMSCH_MM_UCODE];
616 info->ucode_id = AMDGPU_UCODE_ID_UMSCH_MM_UCODE;
617 info->fw = adev->umsch_mm.fw;
618 adev->firmware.fw_size +=
619 ALIGN(le32_to_cpu(umsch_mm_hdr->umsch_mm_ucode_size_bytes), PAGE_SIZE);
620
621 info = &adev->firmware.ucode[AMDGPU_UCODE_ID_UMSCH_MM_DATA];
622 info->ucode_id = AMDGPU_UCODE_ID_UMSCH_MM_DATA;
623 info->fw = adev->umsch_mm.fw;
624 adev->firmware.fw_size +=
625 ALIGN(le32_to_cpu(umsch_mm_hdr->umsch_mm_ucode_data_size_bytes), PAGE_SIZE);
626 }
627
628 return 0;
629 }
630
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-02-12 20:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202502130406.iWQ0eBug-lkp@intel.com \
--to=lkp@intel.com \
--cc=alexander.deucher@amd.com \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.