linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Jiri Kosina" <jikos@kernel.org>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"David Airlie" <airlied@linux.ie>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, Vojtech Pavlik <vojtech@ucw.cz>
Subject: Re: [PATCH] drm/amdgpu: Avoid printing of stack contents on firmware load error
Date: Thu, 24 Jun 2021 21:33:12 +0800	[thread overview]
Message-ID: <202106242104.Q1mZxczL-lkp@intel.com> (raw)
In-Reply-To: <nycvar.YFH.7.76.2106241135440.18969@cbobk.fhfr.pm>

[-- Attachment #1: Type: text/plain, Size: 7186 bytes --]

Hi Jiri,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.13-rc7 next-20210624]
[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/Jiri-Kosina/drm-amdgpu-Avoid-printing-of-stack-contents-on-firmware-load-error/20210624-173740
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7426cedc7dad67bf3c71ea6cc29ab7822e1a453f
config: arm64-randconfig-r006-20210622 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 7c8a507272587f181ec29401453949ebcd8fec65)
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 arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/f9d4f2041c2724ff3c9126761199d37acede1187
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jiri-Kosina/drm-amdgpu-Avoid-printing-of-stack-contents-on-firmware-load-error/20210624-173740
        git checkout f9d4f2041c2724ff3c9126761199d37acede1187
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/psp_v12_0.c:111:1: warning: unused label 'out' [-Wunused-label]
   out:
   ^~~~
   1 warning generated.


vim +/out +111 drivers/gpu/drm/amd/amdgpu/psp_v12_0.c

6a7a0bdbfa0c24 Aaron Liu     2019-08-09   47  
6a7a0bdbfa0c24 Aaron Liu     2019-08-09   48  static int psp_v12_0_init_microcode(struct psp_context *psp)
6a7a0bdbfa0c24 Aaron Liu     2019-08-09   49  {
6a7a0bdbfa0c24 Aaron Liu     2019-08-09   50  	struct amdgpu_device *adev = psp->adev;
6a7a0bdbfa0c24 Aaron Liu     2019-08-09   51  	const char *chip_name;
6627d1c1a82ba7 Changfeng     2020-09-01   52  	char fw_name[30];
6a7a0bdbfa0c24 Aaron Liu     2019-08-09   53  	int err = 0;
6627d1c1a82ba7 Changfeng     2020-09-01   54  	const struct ta_firmware_header_v1_0 *ta_hdr;
6627d1c1a82ba7 Changfeng     2020-09-01   55  	DRM_DEBUG("\n");
6a7a0bdbfa0c24 Aaron Liu     2019-08-09   56  
6a7a0bdbfa0c24 Aaron Liu     2019-08-09   57  	switch (adev->asic_type) {
6a7a0bdbfa0c24 Aaron Liu     2019-08-09   58  	case CHIP_RENOIR:
68697982204b21 Aaron Liu     2020-10-01   59  		if (adev->apu_flags & AMD_APU_IS_RENOIR)
6a7a0bdbfa0c24 Aaron Liu     2019-08-09   60  			chip_name = "renoir";
68697982204b21 Aaron Liu     2020-10-01   61  		else
68697982204b21 Aaron Liu     2020-10-01   62  			chip_name = "green_sardine";
6a7a0bdbfa0c24 Aaron Liu     2019-08-09   63  		break;
6a7a0bdbfa0c24 Aaron Liu     2019-08-09   64  	default:
6a7a0bdbfa0c24 Aaron Liu     2019-08-09   65  		BUG();
6a7a0bdbfa0c24 Aaron Liu     2019-08-09   66  	}
6a7a0bdbfa0c24 Aaron Liu     2019-08-09   67  
f4503f9eb3a16c Hawking Zhang 2020-04-20   68  	err = psp_init_asd_microcode(psp, chip_name);
6627d1c1a82ba7 Changfeng     2020-09-01   69  	if (err)
f9d4f2041c2724 Jiri Kosina   2021-06-24   70  		return err;
6627d1c1a82ba7 Changfeng     2020-09-01   71  
6627d1c1a82ba7 Changfeng     2020-09-01   72  	snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_ta.bin", chip_name);
6627d1c1a82ba7 Changfeng     2020-09-01   73  	err = request_firmware(&adev->psp.ta_fw, fw_name, adev->dev);
6627d1c1a82ba7 Changfeng     2020-09-01   74  	if (err) {
6627d1c1a82ba7 Changfeng     2020-09-01   75  		release_firmware(adev->psp.ta_fw);
6627d1c1a82ba7 Changfeng     2020-09-01   76  		adev->psp.ta_fw = NULL;
6627d1c1a82ba7 Changfeng     2020-09-01   77  		dev_info(adev->dev,
6627d1c1a82ba7 Changfeng     2020-09-01   78  			 "psp v12.0: Failed to load firmware \"%s\"\n",
6627d1c1a82ba7 Changfeng     2020-09-01   79  			 fw_name);
6627d1c1a82ba7 Changfeng     2020-09-01   80  	} else {
6627d1c1a82ba7 Changfeng     2020-09-01   81  		err = amdgpu_ucode_validate(adev->psp.ta_fw);
6627d1c1a82ba7 Changfeng     2020-09-01   82  		if (err)
6627d1c1a82ba7 Changfeng     2020-09-01   83  			goto out2;
6627d1c1a82ba7 Changfeng     2020-09-01   84  
6627d1c1a82ba7 Changfeng     2020-09-01   85  		ta_hdr = (const struct ta_firmware_header_v1_0 *)
6627d1c1a82ba7 Changfeng     2020-09-01   86  				 adev->psp.ta_fw->data;
6627d1c1a82ba7 Changfeng     2020-09-01   87  		adev->psp.ta_hdcp_ucode_version =
6627d1c1a82ba7 Changfeng     2020-09-01   88  			le32_to_cpu(ta_hdr->ta_hdcp_ucode_version);
6627d1c1a82ba7 Changfeng     2020-09-01   89  		adev->psp.ta_hdcp_ucode_size =
6627d1c1a82ba7 Changfeng     2020-09-01   90  			le32_to_cpu(ta_hdr->ta_hdcp_size_bytes);
6627d1c1a82ba7 Changfeng     2020-09-01   91  		adev->psp.ta_hdcp_start_addr =
6627d1c1a82ba7 Changfeng     2020-09-01   92  			(uint8_t *)ta_hdr +
6627d1c1a82ba7 Changfeng     2020-09-01   93  			le32_to_cpu(ta_hdr->header.ucode_array_offset_bytes);
6627d1c1a82ba7 Changfeng     2020-09-01   94  
6627d1c1a82ba7 Changfeng     2020-09-01   95  		adev->psp.ta_fw_version = le32_to_cpu(ta_hdr->header.ucode_version);
6627d1c1a82ba7 Changfeng     2020-09-01   96  
6627d1c1a82ba7 Changfeng     2020-09-01   97  		adev->psp.ta_dtm_ucode_version =
6627d1c1a82ba7 Changfeng     2020-09-01   98  			le32_to_cpu(ta_hdr->ta_dtm_ucode_version);
6627d1c1a82ba7 Changfeng     2020-09-01   99  		adev->psp.ta_dtm_ucode_size =
6627d1c1a82ba7 Changfeng     2020-09-01  100  			le32_to_cpu(ta_hdr->ta_dtm_size_bytes);
6627d1c1a82ba7 Changfeng     2020-09-01  101  		adev->psp.ta_dtm_start_addr =
6627d1c1a82ba7 Changfeng     2020-09-01  102  			(uint8_t *)adev->psp.ta_hdcp_start_addr +
6627d1c1a82ba7 Changfeng     2020-09-01  103  			le32_to_cpu(ta_hdr->ta_dtm_offset_bytes);
6627d1c1a82ba7 Changfeng     2020-09-01  104  	}
6627d1c1a82ba7 Changfeng     2020-09-01  105  
6627d1c1a82ba7 Changfeng     2020-09-01  106  	return 0;
6627d1c1a82ba7 Changfeng     2020-09-01  107  
6627d1c1a82ba7 Changfeng     2020-09-01  108  out2:
6627d1c1a82ba7 Changfeng     2020-09-01  109  	release_firmware(adev->psp.ta_fw);
6627d1c1a82ba7 Changfeng     2020-09-01  110  	adev->psp.ta_fw = NULL;
6627d1c1a82ba7 Changfeng     2020-09-01 @111  out:
6627d1c1a82ba7 Changfeng     2020-09-01  112  	if (err) {
6627d1c1a82ba7 Changfeng     2020-09-01  113  		dev_err(adev->dev,
6627d1c1a82ba7 Changfeng     2020-09-01  114  			"psp v12.0: Failed to load firmware \"%s\"\n",
6627d1c1a82ba7 Changfeng     2020-09-01  115  			fw_name);
6627d1c1a82ba7 Changfeng     2020-09-01  116  	}
6627d1c1a82ba7 Changfeng     2020-09-01  117  
6a7a0bdbfa0c24 Aaron Liu     2019-08-09  118  	return err;
6a7a0bdbfa0c24 Aaron Liu     2019-08-09  119  }
6a7a0bdbfa0c24 Aaron Liu     2019-08-09  120  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36903 bytes --]

      parent reply	other threads:[~2021-06-24 13:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-24  9:37 [PATCH] drm/amdgpu: Avoid printing of stack contents on firmware load error Jiri Kosina
     [not found] ` <YNRnDTD1fdpZOXB8@suse.com>
2021-06-24 11:11   ` [PATCH v2] " Jiri Kosina
2021-07-01  8:33     ` Jiri Kosina
2021-07-01 14:10       ` Alex Deucher
2021-06-24 13:33 ` kernel test robot [this message]

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=202106242104.Q1mZxczL-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jikos@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@ucw.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).