From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1164 amdgpu_debugfs_gfxoff_status_read() warn: ignoring unreachable code.
Date: Fri, 21 Jul 2023 01:35:16 +0800 [thread overview]
Message-ID: <202307210103.0CbaWVAc-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: "André Almeida" <andrealmeid@igalia.com>
CC: Alex Deucher <alexander.deucher@amd.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 46670259519f4ee4ab378dc014798aabe77c5057
commit: 4686177f7d2140cdd9d031702c2b53ac4c89340a drm/amd/debugfs: Expose GFXOFF state to userspace
date: 12 months ago
:::::: branch date: 2 hours ago
:::::: commit date: 12 months ago
config: s390-randconfig-m031-20230720 (https://download.01.org/0day-ci/archive/20230721/202307210103.0CbaWVAc-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230721/202307210103.0CbaWVAc-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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202307210103.0CbaWVAc-lkp@intel.com/
New smatch warnings:
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1164 amdgpu_debugfs_gfxoff_status_read() warn: ignoring unreachable code.
Old smatch warnings:
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:386 amdgpu_debugfs_regs_pcie_read() warn: ignoring unreachable code.
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:499 amdgpu_debugfs_regs_didt_read() warn: ignoring unreachable code.
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:612 amdgpu_debugfs_regs_smc_read() warn: ignoring unreachable code.
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:768 amdgpu_debugfs_gca_config_read() warn: ignoring unreachable code.
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:846 amdgpu_debugfs_sensor_read() warn: ignoring unreachable code.
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:932 amdgpu_debugfs_wave_read() warn: ignoring unreachable code.
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1025 amdgpu_debugfs_gpr_read() warn: ignoring unreachable code.
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1123 amdgpu_debugfs_gfxoff_read() warn: ignoring unreachable code.
vim +1164 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
4686177f7d2140 André Almeida 2022-07-14 1139
4686177f7d2140 André Almeida 2022-07-14 1140 static ssize_t amdgpu_debugfs_gfxoff_status_read(struct file *f, char __user *buf,
4686177f7d2140 André Almeida 2022-07-14 1141 size_t size, loff_t *pos)
4686177f7d2140 André Almeida 2022-07-14 1142 {
4686177f7d2140 André Almeida 2022-07-14 1143 struct amdgpu_device *adev = file_inode(f)->i_private;
4686177f7d2140 André Almeida 2022-07-14 1144 ssize_t result = 0;
4686177f7d2140 André Almeida 2022-07-14 1145 int r;
4686177f7d2140 André Almeida 2022-07-14 1146
4686177f7d2140 André Almeida 2022-07-14 1147 if (size & 0x3 || *pos & 0x3)
4686177f7d2140 André Almeida 2022-07-14 1148 return -EINVAL;
4686177f7d2140 André Almeida 2022-07-14 1149
4686177f7d2140 André Almeida 2022-07-14 1150 r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
4686177f7d2140 André Almeida 2022-07-14 1151 if (r < 0) {
4686177f7d2140 André Almeida 2022-07-14 1152 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
4686177f7d2140 André Almeida 2022-07-14 1153 return r;
4686177f7d2140 André Almeida 2022-07-14 1154 }
4686177f7d2140 André Almeida 2022-07-14 1155
4686177f7d2140 André Almeida 2022-07-14 1156 while (size) {
4686177f7d2140 André Almeida 2022-07-14 1157 u32 value;
443c7f3c3641c7 Jinzhou.Su 2020-07-07 1158
443c7f3c3641c7 Jinzhou.Su 2020-07-07 1159 r = amdgpu_get_gfx_off_status(adev, &value);
edadd6fc28b24d André Almeida 2022-07-04 1160 if (r)
edadd6fc28b24d André Almeida 2022-07-04 1161 goto out;
443c7f3c3641c7 Jinzhou.Su 2020-07-07 1162
4686177f7d2140 André Almeida 2022-07-14 1163 r = put_user(value, (u32 *)buf);
edadd6fc28b24d André Almeida 2022-07-04 @1164 if (r)
edadd6fc28b24d André Almeida 2022-07-04 1165 goto out;
443c7f3c3641c7 Jinzhou.Su 2020-07-07 1166
443c7f3c3641c7 Jinzhou.Su 2020-07-07 1167 result += 4;
443c7f3c3641c7 Jinzhou.Su 2020-07-07 1168 buf += 4;
443c7f3c3641c7 Jinzhou.Su 2020-07-07 1169 *pos += 4;
443c7f3c3641c7 Jinzhou.Su 2020-07-07 1170 size -= 4;
443c7f3c3641c7 Jinzhou.Su 2020-07-07 1171 }
443c7f3c3641c7 Jinzhou.Su 2020-07-07 1172
edadd6fc28b24d André Almeida 2022-07-04 1173 r = result;
edadd6fc28b24d André Almeida 2022-07-04 1174 out:
4a580877bdcb83 Luben Tuikov 2020-08-24 1175 pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
4a580877bdcb83 Luben Tuikov 2020-08-24 1176 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
443c7f3c3641c7 Jinzhou.Su 2020-07-07 1177
edadd6fc28b24d André Almeida 2022-07-04 1178 return r;
443c7f3c3641c7 Jinzhou.Su 2020-07-07 1179 }
443c7f3c3641c7 Jinzhou.Su 2020-07-07 1180
:::::: The code at line 1164 was first introduced by commit
:::::: edadd6fc28b24dd5806dafc4b38633494ff423e6 drm/amdpgu/debugfs: Simplify some exit paths
:::::: TO: André Almeida <andrealmeid@igalia.com>
:::::: CC: Alex Deucher <alexander.deucher@amd.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2023-07-20 17:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-20 17:35 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-07-21 10:21 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1164 amdgpu_debugfs_gfxoff_status_read() warn: ignoring unreachable code kernel test robot
2023-04-16 4:52 kernel test robot
2023-03-30 13:42 kernel test robot
2023-02-04 20:22 kernel test robot
2022-12-25 17:21 kernel test robot
2022-11-04 5:19 kernel test robot
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=202307210103.0CbaWVAc-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@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.