[agd5f:drm-next 137/137] drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:457 sdma_v5_0_ring_emit_mem_sync() warn: inconsistent indenting
by kernel test robot
tree: https://gitlab.freedesktop.org/agd5f/linux.git drm-next
head: 412562f576272dbb614fa937b6a80819a6bbb233
commit: 412562f576272dbb614fa937b6a80819a6bbb233 [137/137] drm/amdgpu: Add graphics cache rinse packet for sdma 5.0
config: x86_64-randconfig-m001-20210421 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:457 sdma_v5_0_ring_emit_mem_sync() warn: inconsistent indenting
vim +457 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
439
440 /**
441 * sdma_v5_0_ring_emit_mem_sync - flush the IB by graphics cache rinse
442 *
443 * @ring: amdgpu ring pointer
444 * @job: job to retrieve vmid from
445 * @ib: IB object to schedule
446 *
447 * flush the IB by graphics cache rinse.
448 */
449 static void sdma_v5_0_ring_emit_mem_sync(struct amdgpu_ring *ring)
450 {
451 uint32_t gcr_cntl =
452 SDMA_GCR_GL2_INV | SDMA_GCR_GL2_WB | SDMA_GCR_GLM_INV |
453 SDMA_GCR_GL1_INV | SDMA_GCR_GLV_INV | SDMA_GCR_GLK_INV |
454 SDMA_GCR_GLI_INV(1);
455
456 /* flush entire cache L0/L1/L2, this can be optimized by performance requirement */
> 457 amdgpu_ring_write(ring, SDMA_PKT_HEADER_OP(SDMA_OP_GCR_REQ));
458 amdgpu_ring_write(ring, SDMA_PKT_GCR_REQ_PAYLOAD1_BASE_VA_31_7(0));
459 amdgpu_ring_write(ring, SDMA_PKT_GCR_REQ_PAYLOAD2_GCR_CONTROL_15_0(gcr_cntl) |
460 SDMA_PKT_GCR_REQ_PAYLOAD2_BASE_VA_47_32(0));
461 amdgpu_ring_write(ring, SDMA_PKT_GCR_REQ_PAYLOAD3_LIMIT_VA_31_7(0) |
462 SDMA_PKT_GCR_REQ_PAYLOAD3_GCR_CONTROL_18_16(gcr_cntl >> 16));
463 amdgpu_ring_write(ring, SDMA_PKT_GCR_REQ_PAYLOAD4_LIMIT_VA_47_32(0) |
464 SDMA_PKT_GCR_REQ_PAYLOAD4_VMID(0));
465 }
466
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[android-common:android12-5.10 1/1] mm/compaction.c:766:15: error: redefinition of 'isolate_and_split_free_page'
by kernel test robot
tree: https://android.googlesource.com/kernel/common android12-5.10
head: 8cd9aa93b7269460e8d5e4407738f21fe5d6e720
commit: 8cd9aa93b7269460e8d5e4407738f21fe5d6e720 [1/1] ANDROID: implement wrapper for reverse migration
config: x86_64-randconfig-c022-20210420 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout 8cd9aa93b7269460e8d5e4407738f21fe5d6e720
# save the attached .config to linux build tree
make W=1 W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> mm/compaction.c:766:15: error: redefinition of 'isolate_and_split_free_page'
766 | unsigned long isolate_and_split_free_page(struct page *page,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from mm/compaction.c:14:
include/linux/compaction.h:241:22: note: previous definition of 'isolate_and_split_free_page' was here
241 | static unsigned long isolate_and_split_free_page(struct page *page,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/compaction.c:56:27: warning: 'HPAGE_FRAG_CHECK_INTERVAL_MSEC' defined but not used [-Wunused-const-variable=]
56 | static const unsigned int HPAGE_FRAG_CHECK_INTERVAL_MSEC = 500;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from mm/compaction.c:14:
include/linux/compaction.h:241:22: warning: 'isolate_and_split_free_page' defined but not used [-Wunused-function]
241 | static unsigned long isolate_and_split_free_page(struct page *page,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/isolate_and_split_free_page +766 mm/compaction.c
765
> 766 unsigned long isolate_and_split_free_page(struct page *page,
767 struct list_head *list)
768 {
769 unsigned long isolated;
770 unsigned int order;
771
772 if (!PageBuddy(page))
773 return 0;
774
775 order = buddy_order(page);
776 isolated = __isolate_free_page(page, order);
777 if (!isolated)
778 return 0;
779
780 set_page_private(page, order);
781 list_add(&page->lru, list);
782
783 split_map_pages(list);
784
785 return isolated;
786 }
787 EXPORT_SYMBOL_GPL(isolate_and_split_free_page);
788
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[intel-linux-intel-lts:5.4/preempt-rt 7040/16189] arch/arm/mach-tegra/cpuidle-tegra20.c:206:29: error: 'struct cpuidle_state' has no member named 'disabled'
by kernel test robot
Hi Rafael,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 5.4/preempt-rt
head: e4bef0158828ec542f26811e8a1fb27b882166be
commit: 8bfaf7ab474ef5a95f5bd6a8724c4a9f8d0b9611 [7040/16189] cpuidle: Drop disabled field from struct cpuidle_state
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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://github.com/intel/linux-intel-lts/commit/8bfaf7ab474ef5a95f5bd6a87...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/preempt-rt
git checkout 8bfaf7ab474ef5a95f5bd6a8724c4a9f8d0b9611
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/arm/mach-tegra/cpuidle-tegra20.c: In function 'tegra20_cpuidle_pcie_irqs_in_use':
>> arch/arm/mach-tegra/cpuidle-tegra20.c:206:29: error: 'struct cpuidle_state' has no member named 'disabled'
206 | tegra_idle_driver.states[1].disabled = true;
| ^
vim +206 arch/arm/mach-tegra/cpuidle-tegra20.c
5c1350bdfcebf4 Joseph Lo 2013-01-15 196
b4f173752a5618 Stephen Warren 2013-05-06 197 /*
b4f173752a5618 Stephen Warren 2013-05-06 198 * Tegra20 HW appears to have a bug such that PCIe device interrupts, whether
b4f173752a5618 Stephen Warren 2013-05-06 199 * they are legacy IRQs or MSI, are lost when LP2 is enabled. To work around
b4f173752a5618 Stephen Warren 2013-05-06 200 * this, simply disable LP2 if the PCI driver and DT node are both enabled.
b4f173752a5618 Stephen Warren 2013-05-06 201 */
b4f173752a5618 Stephen Warren 2013-05-06 202 void tegra20_cpuidle_pcie_irqs_in_use(void)
b4f173752a5618 Stephen Warren 2013-05-06 203 {
b4f173752a5618 Stephen Warren 2013-05-06 204 pr_info_once(
b4f173752a5618 Stephen Warren 2013-05-06 205 "Disabling cpuidle LP2 state, since PCIe IRQs are in use\n");
b4f173752a5618 Stephen Warren 2013-05-06 @206 tegra_idle_driver.states[1].disabled = true;
b4f173752a5618 Stephen Warren 2013-05-06 207 }
b4f173752a5618 Stephen Warren 2013-05-06 208
:::::: The code at line 206 was first introduced by commit
:::::: b4f173752a56187bd55752b0474429202f2ab1d3 ARM: tegra: disable LP2 cpuidle state if PCIe is enabled
:::::: TO: Stephen Warren <swarren(a)nvidia.com>
:::::: CC: Stephen Warren <swarren(a)nvidia.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v12 3/4] drm/panfrost: devfreq: Disable devfreq when num_supplies > 1
by kernel test robot
Hi Nicolas,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20210420]
[cannot apply to robh/for-next linux/master linus/master v5.12-rc8 v5.12-rc7 v5.12-rc6 v5.12-rc8]
[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/Nicolas-Boichat/drm-panfrost-Add...
base: 593ef1658ecf61d3619885bdbbcfffa3d1417891
config: powerpc-randconfig-m031-20210421 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.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://github.com/0day-ci/linux/commit/0b928d8134d2744f01ed4b1ba3fd5c045...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Nicolas-Boichat/drm-panfrost-Add-support-for-mt8183-GPU/20210421-095604
git checkout 0b928d8134d2744f01ed4b1ba3fd5c0457d56a1c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/gpu/drm/panfrost/panfrost_devfreq.c: In function 'panfrost_devfreq_init':
>> drivers/gpu/drm/panfrost/panfrost_devfreq.c:104:2: error: 'opp_table' undeclared (first use in this function)
104 | opp_table = dev_pm_opp_set_regulators(dev, pfdev->comp->supply_names,
| ^~~~~~~~~
drivers/gpu/drm/panfrost/panfrost_devfreq.c:104:2: note: each undeclared identifier is reported only once for each function it appears in
vim +/opp_table +104 drivers/gpu/drm/panfrost/panfrost_devfreq.c
84
85 int panfrost_devfreq_init(struct panfrost_device *pfdev)
86 {
87 int ret;
88 struct dev_pm_opp *opp;
89 unsigned long cur_freq;
90 struct device *dev = &pfdev->pdev->dev;
91 struct devfreq *devfreq;
92 struct thermal_cooling_device *cooling;
93 struct panfrost_devfreq *pfdevfreq = &pfdev->pfdevfreq;
94
95 if (pfdev->comp->num_supplies > 1) {
96 /*
97 * GPUs with more than 1 supply require platform-specific handling:
98 * continue without devfreq
99 */
100 DRM_DEV_INFO(dev, "More than 1 supply is not supported yet\n");
101 return 0;
102 }
103
> 104 opp_table = dev_pm_opp_set_regulators(dev, pfdev->comp->supply_names,
105 pfdev->comp->num_supplies);
106 if (IS_ERR(opp_table)) {
107 ret = PTR_ERR(opp_table);
108 /* Continue if the optional regulator is missing */
109 if (ret != -ENODEV) {
110 DRM_DEV_ERROR(dev, "Couldn't set OPP regulators\n");
111 return ret;
112 }
113 }
114
115 ret = devm_pm_opp_of_add_table(dev);
116 if (ret) {
117 /* Optional, continue without devfreq */
118 if (ret == -ENODEV)
119 ret = 0;
120 return ret;
121 }
122 pfdevfreq->opp_of_table_added = true;
123
124 spin_lock_init(&pfdevfreq->lock);
125
126 panfrost_devfreq_reset(pfdevfreq);
127
128 cur_freq = clk_get_rate(pfdev->clock);
129
130 opp = devfreq_recommended_opp(dev, &cur_freq, 0);
131 if (IS_ERR(opp))
132 return PTR_ERR(opp);
133
134 panfrost_devfreq_profile.initial_freq = cur_freq;
135 dev_pm_opp_put(opp);
136
137 /*
138 * Setup default thresholds for the simple_ondemand governor.
139 * The values are chosen based on experiments.
140 */
141 pfdevfreq->gov_data.upthreshold = 45;
142 pfdevfreq->gov_data.downdifferential = 5;
143
144 devfreq = devm_devfreq_add_device(dev, &panfrost_devfreq_profile,
145 DEVFREQ_GOV_SIMPLE_ONDEMAND,
146 &pfdevfreq->gov_data);
147 if (IS_ERR(devfreq)) {
148 DRM_DEV_ERROR(dev, "Couldn't initialize GPU devfreq\n");
149 return PTR_ERR(devfreq);
150 }
151 pfdevfreq->devfreq = devfreq;
152
153 cooling = devfreq_cooling_em_register(devfreq, NULL);
154 if (IS_ERR(cooling))
155 DRM_DEV_INFO(dev, "Failed to register cooling device\n");
156 else
157 pfdevfreq->cooling = cooling;
158
159 return 0;
160 }
161
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[km13park-linux-1:master 2/3] drivers/scan_at_field/scan_at_field.c:210:10: warning: returning 'long int' from a function with return type 'const struct firmware *' makes pointer from integer without a cast
by kernel test robot
tree: https://github.com/km13park/linux-1.git master
head: 77464b203e49ef9c4d957061005b4d54b0c5e633
commit: 4dab1d6923971a00f7de82497cb99b0a2a54f6d2 [2/3] drivers/saf: Introduce Scan At Field driver
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/km13park/linux-1/commit/4dab1d6923971a00f7de82497cb99b...
git remote add km13park-linux-1 https://github.com/km13park/linux-1.git
git fetch --no-tags km13park-linux-1 master
git checkout 4dab1d6923971a00f7de82497cb99b0a2a54f6d2
# save the attached .config to linux build tree
make W=1 W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/scan_at_field/scan_at_field.c: In function 'load_scan_binary':
>> drivers/scan_at_field/scan_at_field.c:210:10: warning: returning 'long int' from a function with return type 'const struct firmware *' makes pointer from integer without a cast [-Wint-conversion]
210 | return PTR_ERR(saf_pdev);
| ^~~~~~~~~~~~~~~~~
drivers/scan_at_field/scan_at_field.c: In function 'test_init':
drivers/scan_at_field/scan_at_field.c:332:17: warning: variable 'root' set but not used [-Wunused-but-set-variable]
332 | struct device *root;
| ^~~~
drivers/scan_at_field/scan_at_field.c: In function 'load_scan_binaries':
>> drivers/scan_at_field/scan_at_field.c:303:1: warning: the frame size of 9248 bytes is larger than 8192 bytes [-Wframe-larger-than=]
303 | }
| ^
vim +210 drivers/scan_at_field/scan_at_field.c
197
198 /*
199 * Scan binary blob loading. Intel distributes the scan binary blob to vendors
200 * and vendor installed the hash and scan binary blobs to /lib/firmware/intel-saf.
201 */
202 static const struct firmware *load_scan_binary(const char *path, bool is_hash)
203 {
204 const struct firmware *fw;
205 int err;
206
207 saf_pdev = platform_device_register_simple("saf", -1, NULL, 0);
208 if (IS_ERR(saf_pdev)) {
209 pr_err("Error: platform_device_register_simple");
> 210 return PTR_ERR(saf_pdev);
211 }
212 err = request_firmware_direct(&fw, path, &saf_pdev->dev);
213 if (err) {
214 pr_err("Error: request_firmware_direct return");
215 goto out;
216 }
217
218 if (is_hash && !scan_blob_sanity_check((void *)fw->data)) {
219 pr_err("scan blob header sanity check failed");
220 goto out;
221 }
222 out:
223 platform_device_unregister(saf_pdev);
224
225 return fw;
226 }
227
228 /*
229 * Compare the binary blob version whenever loading a new binary blob.
230 * Load the new binary blob only if it is later or equal than the current version.
231 */
232 static bool has_newer_binary_blob(char *current_blob_ptr, char *new_blob_ptr)
233 {
234 if (!current_blob_ptr)
235 return true;
236
237 else if ((*(current_blob_ptr + BINARY_LOADER_VERSION_OFFSET) & 0xff) >
238 (*(new_blob_ptr + BINARY_LOADER_VERSION_OFFSET) & 0xff))
239 return false;
240
241 return true;
242 }
243
244 /*
245 * Load scan hash and data binaries. Scan hash copy and authentication must be run on
246 * the first cpu for each package.
247 * The first byte of scan hash holds the information to determine whether it is for scan
248 * at field or not.
249 */
250 int load_scan_binaries(void)
251 {
252 bool package_authenticated[NR_CPUS] = { [0 ... NR_CPUS - 1] = 0 };
253 char name[20], hash_path[256], scan_path[256];
254 const struct firmware *hash_fw, *test_fw;
255 int cpu, ret, curr_pkg;
256 u64 current_blob_ptr;
257
258 snprintf(name, sizeof(name), "%02x-%02x-%02x", boot_cpu_data.x86, boot_cpu_data.x86_model,
259 boot_cpu_data.x86_stepping);
260
261 /* scan hash and test files will be named as "ff-mm--ss.hash" and "ff-mm--ss.scan" */
262 snprintf(hash_path, sizeof(hash_path), "%s%s%s", saf_path, name, ".hash");
263 snprintf(scan_path, sizeof(scan_path), "%s%s%s", saf_path, name, ".scan");
264
265 current_blob_ptr = saf_params.hash_blob_ptr;
266
267 /* load the scan hash and authenticate per package */
268 for_each_online_cpu(cpu) {
269 curr_pkg = topology_physical_package_id(cpu);
270 if (package_authenticated[curr_pkg])
271 continue;
272 package_authenticated[curr_pkg] = 1;
273
274 hash_fw = load_scan_binary(hash_path, 1);
275 if (!hash_fw)
276 goto out;
277
278 if (!has_newer_binary_blob((char *)current_blob_ptr, (char *)hash_fw->data))
279 goto out;
280
281 saf_params.hash_blob_ptr = (u64)hash_fw->data;
282
283 if (*(hash_fw->data) == SCAN_PROGRAM) {
284 test_fw = load_scan_binary(scan_path, 0);
285 } else {
286 pr_err("wrong module type for scan test");
287 goto out;
288 }
289 if (!test_fw)
290 goto out;
291
292 saf_params.test_blob_ptr = (u64)test_fw->data;
293
294 ret = smp_call_function_single(cpu, (void *)copy_scan_hashes_authenticate, NULL, 1);
295 if (ret)
296 return -EINVAL;
297 }
298 out:
299 release_firmware(hash_fw);
300 release_firmware(test_fw);
301
302 return 0;
> 303 }
304
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[km13park-linux-1:master 2/3] drivers/scan_at_field/scan_at_field.c:218:18: error: implicit declaration of function 'scan_blob_sanity_check'
by kernel test robot
tree: https://github.com/km13park/linux-1.git master
head: 77464b203e49ef9c4d957061005b4d54b0c5e633
commit: 4dab1d6923971a00f7de82497cb99b0a2a54f6d2 [2/3] drivers/saf: Introduce Scan At Field driver
config: x86_64-randconfig-a016-20210420 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/km13park/linux-1/commit/4dab1d6923971a00f7de82497cb99b...
git remote add km13park-linux-1 https://github.com/km13park/linux-1.git
git fetch --no-tags km13park-linux-1 master
git checkout 4dab1d6923971a00f7de82497cb99b0a2a54f6d2
# save the attached .config to linux build tree
make W=1 W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/scan_at_field/scan_at_field.c: In function 'load_scan_binary':
drivers/scan_at_field/scan_at_field.c:210:10: warning: returning 'long int' from a function with return type 'const struct firmware *' makes pointer from integer without a cast [-Wint-conversion]
210 | return PTR_ERR(saf_pdev);
| ^~~~~~~~~~~~~~~~~
>> drivers/scan_at_field/scan_at_field.c:218:18: error: implicit declaration of function 'scan_blob_sanity_check' [-Werror=implicit-function-declaration]
218 | if (is_hash && !scan_blob_sanity_check((void *)fw->data)) {
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/scan_at_field/scan_at_field.c: In function 'test_init':
drivers/scan_at_field/scan_at_field.c:332:17: warning: variable 'root' set but not used [-Wunused-but-set-variable]
332 | struct device *root;
| ^~~~
drivers/scan_at_field/scan_at_field.c: In function 'load_scan_binaries':
drivers/scan_at_field/scan_at_field.c:303:1: warning: the frame size of 8736 bytes is larger than 8192 bytes [-Wframe-larger-than=]
303 | }
| ^
cc1: some warnings being treated as errors
vim +/scan_blob_sanity_check +218 drivers/scan_at_field/scan_at_field.c
197
198 /*
199 * Scan binary blob loading. Intel distributes the scan binary blob to vendors
200 * and vendor installed the hash and scan binary blobs to /lib/firmware/intel-saf.
201 */
202 static const struct firmware *load_scan_binary(const char *path, bool is_hash)
203 {
204 const struct firmware *fw;
205 int err;
206
207 saf_pdev = platform_device_register_simple("saf", -1, NULL, 0);
208 if (IS_ERR(saf_pdev)) {
209 pr_err("Error: platform_device_register_simple");
210 return PTR_ERR(saf_pdev);
211 }
212 err = request_firmware_direct(&fw, path, &saf_pdev->dev);
213 if (err) {
214 pr_err("Error: request_firmware_direct return");
215 goto out;
216 }
217
> 218 if (is_hash && !scan_blob_sanity_check((void *)fw->data)) {
219 pr_err("scan blob header sanity check failed");
220 goto out;
221 }
222 out:
223 platform_device_unregister(saf_pdev);
224
225 return fw;
226 }
227
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
drivers/power/supply/bq256xx_charger.c:346:12: warning: Identical inner 'if' condition is always true. [identicalInnerCondition]
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7af08140979a6e7e12b78c93b8625c8d25b084e2
commit: 32e4978bb920d047fe5de3ea42d176f267c01f63 power: supply: bq256xx: Introduce the BQ256XX charger driver
date: 3 months ago
compiler: mips64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/power/supply/bq256xx_charger.c:346:12: warning: Identical inner 'if' condition is always true. [identicalInnerCondition]
if (val < array[i])
^
drivers/power/supply/bq256xx_charger.c:345:33: note: outer condition: val<array[i]
if (val > array[i - 1] && val < array[i]) {
^
drivers/power/supply/bq256xx_charger.c:346:12: note: identical inner condition: val<array[i]
if (val < array[i])
^
vim +/if +346 drivers/power/supply/bq256xx_charger.c
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 330
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 331 static int bq256xx_array_parse(int array_size, int val, const int array[])
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 332 {
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 333 int i = 0;
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 334
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 335 if (val < array[i])
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 336 return i - 1;
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 337
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 338 if (val >= array[array_size - 1])
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 339 return array_size - 1;
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 340
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 341 for (i = 1; i < array_size; i++) {
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 342 if (val == array[i])
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 343 return i;
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 344
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 345 if (val > array[i - 1] && val < array[i]) {
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 @346 if (val < array[i])
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 347 return i - 1;
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 348 else
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 349 return i;
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 350 }
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 351 }
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 352 return -EINVAL;
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 353 }
32e4978bb920d0 Ricardo Rivera-Matos 2021-01-06 354
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[peterz-queue:sched/core 5/5] kernel/cpu.c:475:16: error: 'cpu' undeclared
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
head: f9768f96aa02d96ebce832c1e0a597448f1f4478
commit: f9768f96aa02d96ebce832c1e0a597448f1f4478 [5/5] cpumask/hotplug: Fix cpu_dying() state tracking
config: sparc-randconfig-p001-20210420 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.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/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue sched/core
git checkout f9768f96aa02d96ebce832c1e0a597448f1f4478
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=sparc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:10,
from include/linux/sched/mm.h:5,
from kernel/cpu.c:6:
kernel/cpu.c: In function 'cpuhp_set_state':
>> kernel/cpu.c:475:16: error: 'cpu' undeclared (first use in this function)
475 | if (cpu_dying(cpu) != !bringup)
| ^~~
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
kernel/cpu.c:475:2: note: in expansion of macro 'if'
475 | if (cpu_dying(cpu) != !bringup)
| ^~
kernel/cpu.c:475:16: note: each undeclared identifier is reported only once for each function it appears in
475 | if (cpu_dying(cpu) != !bringup)
| ^~~
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
kernel/cpu.c:475:2: note: in expansion of macro 'if'
475 | if (cpu_dying(cpu) != !bringup)
| ^~
kernel/cpu.c: In function 'cpuhp_reset_state':
kernel/cpu.c:509:16: error: 'cpu' undeclared (first use in this function)
509 | if (cpu_dying(cpu) != !bringup)
| ^~~
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
kernel/cpu.c:509:2: note: in expansion of macro 'if'
509 | if (cpu_dying(cpu) != !bringup)
| ^~
vim +/cpu +475 kernel/cpu.c
462
463 static inline enum cpuhp_state
464 cpuhp_set_state(struct cpuhp_cpu_state *st, enum cpuhp_state target)
465 {
466 enum cpuhp_state prev_state = st->state;
467 bool bringup = st->state < target;
468
469 st->rollback = false;
470 st->last = NULL;
471
472 st->target = target;
473 st->single = false;
474 st->bringup = bringup;
> 475 if (cpu_dying(cpu) != !bringup)
476 set_cpu_dying(cpu, !bringup);
477
478 return prev_state;
479 }
480
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[peterz-queue:sched/core 5/5] kernel/cpu.c:475:16: error: use of undeclared identifier 'cpu'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
head: f9768f96aa02d96ebce832c1e0a597448f1f4478
commit: f9768f96aa02d96ebce832c1e0a597448f1f4478 [5/5] cpumask/hotplug: Fix cpu_dying() state tracking
config: s390-randconfig-r033-20210420 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ca8eef7e3da8f750d7c7aa004fe426d1d34787ea)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue sched/core
git checkout f9768f96aa02d96ebce832c1e0a597448f1f4478
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from kernel/cpu.c:13:
In file included from include/linux/sched/isolation.h:6:
In file included from include/linux/tick.h:8:
In file included from include/linux/clockchips.h:14:
In file included from include/linux/clocksource.h:21:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
In file included from kernel/cpu.c:13:
In file included from include/linux/sched/isolation.h:6:
In file included from include/linux/tick.h:8:
In file included from include/linux/clockchips.h:14:
In file included from include/linux/clocksource.h:21:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
^
In file included from kernel/cpu.c:13:
In file included from include/linux/sched/isolation.h:6:
In file included from include/linux/tick.h:8:
In file included from include/linux/clockchips.h:14:
In file included from include/linux/clocksource.h:21:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> kernel/cpu.c:475:16: error: use of undeclared identifier 'cpu'
if (cpu_dying(cpu) != !bringup)
^
kernel/cpu.c:476:17: error: use of undeclared identifier 'cpu'
set_cpu_dying(cpu, !bringup);
^
kernel/cpu.c:509:16: error: use of undeclared identifier 'cpu'
if (cpu_dying(cpu) != !bringup)
^
kernel/cpu.c:510:17: error: use of undeclared identifier 'cpu'
set_cpu_dying(cpu, !bringup);
^
12 warnings and 4 errors generated.
vim +/cpu +475 kernel/cpu.c
462
463 static inline enum cpuhp_state
464 cpuhp_set_state(struct cpuhp_cpu_state *st, enum cpuhp_state target)
465 {
466 enum cpuhp_state prev_state = st->state;
467 bool bringup = st->state < target;
468
469 st->rollback = false;
470 st->last = NULL;
471
472 st->target = target;
473 st->single = false;
474 st->bringup = bringup;
> 475 if (cpu_dying(cpu) != !bringup)
476 set_cpu_dying(cpu, !bringup);
477
478 return prev_state;
479 }
480
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months