From: kernel test robot <lkp@intel.com>
To: Mark Pearson <markpearson@lenovo.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
linux-acpi@vger.kernel.org, devel@acpica.org,
linux-pm@vger.kernel.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Hans de Goede <hdegoede@redhat.com>
Subject: [pm:bleeding-edge 8612/8615] drivers/acpi/platform_profile.c:147:24: warning: address of array 'pprof->choices' will always evaluate to 'true'
Date: Sun, 27 Dec 2020 13:11:57 +0800 [thread overview]
Message-ID: <202012271352.JvNDF17O-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2644 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head: a33520709645543f108361fe21fa9434a351c4e9
commit: 8c9b909fb1282e43792433e6c1cba125ccfc6201 [8612/8615] ACPI: platform-profile: Add platform profile support
config: x86_64-randconfig-a015-20201221 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project cee1e7d14f4628d6174b33640d502bff3b54ae45)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?id=8c9b909fb1282e43792433e6c1cba125ccfc6201
git remote add pm https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
git fetch --no-tags pm bleeding-edge
git checkout 8c9b909fb1282e43792433e6c1cba125ccfc6201
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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/acpi/platform_profile.c:147:24: warning: address of array 'pprof->choices' will always evaluate to 'true' [-Wpointer-bool-conversion]
if (!pprof || !pprof->choices || !pprof->profile_set ||
~~~~~~~~^~~~~~~
1 warning generated.
vim +147 drivers/acpi/platform_profile.c
134
135 int platform_profile_register(const struct platform_profile_handler *pprof)
136 {
137 int err;
138
139 mutex_lock(&profile_lock);
140 /* We can only have one active profile */
141 if (cur_profile) {
142 mutex_unlock(&profile_lock);
143 return -EEXIST;
144 }
145
146 /* Sanity check the profile handler field are set */
> 147 if (!pprof || !pprof->choices || !pprof->profile_set ||
148 !pprof->profile_get) {
149 mutex_unlock(&profile_lock);
150 return -EINVAL;
151 }
152
153 err = sysfs_create_group(acpi_kobj, &platform_profile_group);
154 if (err) {
155 mutex_unlock(&profile_lock);
156 return err;
157 }
158
159 cur_profile = pprof;
160 mutex_unlock(&profile_lock);
161 return 0;
162 }
163 EXPORT_SYMBOL_GPL(platform_profile_register);
164
---
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: 35796 bytes --]
next reply other threads:[~2020-12-27 5:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-27 5:11 kernel test robot [this message]
2020-12-27 11:56 ` [pm:bleeding-edge 8612/8615] drivers/acpi/platform_profile.c:147:24: warning: address of array 'pprof->choices' will always evaluate to 'true' Hans de Goede
2020-12-28 23:12 ` [External] " Mark Pearson
2020-12-29 15:23 ` Rafael J. Wysocki
2020-12-29 15:35 ` Mark Pearson
2020-12-29 15:46 ` Rafael J. Wysocki
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=202012271352.JvNDF17O-lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=devel@acpica.org \
--cc=hdegoede@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=markpearson@lenovo.com \
--cc=rjw@rjwysocki.net \
/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