From: kernel test robot <lkp@intel.com>
To: Alex Deucher <alexander.deucher@amd.com>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 4335/5418] drivers/gpu/drm/amd/amdgpu/amdgpu_profile.c:37:5: warning: no previous prototype for 'amdgpu_profile_ioctl'
Date: Wed, 8 Dec 2021 03:44:49 +0800 [thread overview]
Message-ID: <202112080344.JKjDO0hY-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 04fe99a8d936d46a310ca61b8b63dc270962bf01
commit: aeae40911ee65eaebbba9ab6ded0a3da8e7ea8d5 [4335/5418] drm/amdgpu/UAPI: add new PROFILE IOCTL
config: parisc-randconfig-m031-20211207 (https://download.01.org/0day-ci/archive/20211208/202112080344.JKjDO0hY-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 11.2.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=aeae40911ee65eaebbba9ab6ded0a3da8e7ea8d5
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout aeae40911ee65eaebbba9ab6ded0a3da8e7ea8d5
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/
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/amdgpu_profile.c:37:5: warning: no previous prototype for 'amdgpu_profile_ioctl' [-Wmissing-prototypes]
37 | int amdgpu_profile_ioctl(struct drm_device *dev, void *data,
| ^~~~~~~~~~~~~~~~~~~~
vim +/amdgpu_profile_ioctl +37 drivers/gpu/drm/amd/amdgpu/amdgpu_profile.c
26
27 /**
28 * amdgpu_profile_ioctl - Manages settings for profiling.
29 *
30 * @dev: drm device pointer
31 * @data: drm_amdgpu_vm
32 * @filp: drm file pointer
33 *
34 * Returns:
35 * 0 for success, -errno for errors.
36 */
> 37 int amdgpu_profile_ioctl(struct drm_device *dev, void *data,
38 struct drm_file *filp)
39 {
40 union drm_amdgpu_profile *args = data;
41 struct amdgpu_device *adev = drm_to_adev(dev);
42 const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;
43 enum amd_dpm_forced_level current_level, requested_level;
44 int r;
45
46 if (pp_funcs->get_performance_level)
47 current_level = amdgpu_dpm_get_performance_level(adev);
48 else
49 current_level = adev->pm.dpm.forced_level;
50
51 switch (args->in.op) {
52 case AMDGPU_PROFILE_OP_GET_STABLE_PSTATE:
53 if (args->in.flags)
54 return -EINVAL;
55 switch (current_level) {
56 case AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD:
57 args->out.flags = AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_STANDARD;
58 break;
59 case AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK:
60 args->out.flags = AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_MIN_SCLK;
61 break;
62 case AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK:
63 args->out.flags = AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_MIN_MCLK;
64 break;
65 case AMD_DPM_FORCED_LEVEL_PROFILE_PEAK:
66 args->out.flags = AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_PEAK;
67 break;
68 default:
69 args->out.flags = AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_NONE;
70 break;
71 }
72 break;
73 case AMDGPU_PROFILE_OP_SET_STABLE_PSTATE:
74 if (args->in.flags & ~AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_MASK)
75 return -EINVAL;
76 switch (args->in.flags & AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_MASK) {
77 case AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_STANDARD:
78 requested_level = AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD;
79 break;
80 case AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_MIN_SCLK:
81 requested_level = AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK;
82 break;
83 case AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_MIN_MCLK:
84 requested_level = AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK;
85 break;
86 case AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_PEAK:
87 requested_level = AMD_DPM_FORCED_LEVEL_PROFILE_PEAK;
88 break;
89 case AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_NONE:
90 requested_level = AMD_DPM_FORCED_LEVEL_AUTO;
91 break;
92 default:
93 return -EINVAL;
94 }
95
96 if ((current_level != requested_level) && pp_funcs->force_performance_level) {
97 mutex_lock(&adev->pm.mutex);
98 r = amdgpu_dpm_force_performance_level(adev, requested_level);
99 if (!r)
100 adev->pm.dpm.forced_level = requested_level;
101 mutex_unlock(&adev->pm.mutex);
102 if (r)
103 return r;
104 }
105 break;
106 default:
107 return -EINVAL;
108 }
109
110 return 0;
111 }
112
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
reply other threads:[~2021-12-07 19:45 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=202112080344.JKjDO0hY-lkp@intel.com \
--to=lkp@intel.com \
--cc=alexander.deucher@amd.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
/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