[sashal-linux-stable:queue-5.10 62/74] fs/io_uring.c:3427:3: error: label 'copy_iov' used but not defined
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.10
head: 9ced6633127bd25a94939777d9ecda54800859fc
commit: 75a2698c924a9065cc53174004ef4aabfd6eb3c1 [62/74] io_uring: further simplify do_read error parsing
config: parisc-randconfig-r004-20210318 (attached as .config)
compiler: hppa-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/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.10
git checkout 75a2698c924a9065cc53174004ef4aabfd6eb3c1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
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 >>):
fs/io_uring.c: In function 'io_prep_async_work':
fs/io_uring.c:1431:22: warning: variable 'id' set but not used [-Wunused-but-set-variable]
1431 | struct io_identity *id;
| ^~
fs/io_uring.c: In function 'io_read':
>> fs/io_uring.c:3427:3: error: label 'copy_iov' used but not defined
3427 | goto copy_iov;
| ^~~~
fs/io_uring.c: In function 'io_close':
fs/io_uring.c:4275:22: error: 'IO_WQ_WORK_NO_CANCEL' undeclared (first use in this function); did you mean 'IO_WQ_WORK_CANCEL'?
4275 | req->work.flags |= IO_WQ_WORK_NO_CANCEL;
| ^~~~~~~~~~~~~~~~~~~~
| IO_WQ_WORK_CANCEL
fs/io_uring.c:4275:22: note: each undeclared identifier is reported only once for each function it appears in
fs/io_uring.c: In function 'io_wq_submit_work':
fs/io_uring.c:6100:3: error: implicit declaration of function 'io_req_task_work_add_fallback'; did you mean 'io_req_task_work_add'? [-Werror=implicit-function-declaration]
6100 | io_req_task_work_add_fallback(req, io_req_task_cancel);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| io_req_task_work_add
fs/io_uring.c:6101:3: error: 'return' with no value, in function returning non-void [-Werror=return-type]
6101 | return;
| ^~~~~~
fs/io_uring.c:6086:27: note: declared here
6086 | static struct io_wq_work *io_wq_submit_work(struct io_wq_work *work)
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/copy_iov +3427 fs/io_uring.c
f67676d160c6ee Jens Axboe 2019-12-02 3397
a1d7c393c4711a Jens Axboe 2020-06-22 3398 static int io_read(struct io_kiocb *req, bool force_nonblock,
a1d7c393c4711a Jens Axboe 2020-06-22 3399 struct io_comp_state *cs)
2b188cc1bb857a Jens Axboe 2019-01-07 3400 {
2b188cc1bb857a Jens Axboe 2019-01-07 3401 struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
9adbd45d6d32ff Jens Axboe 2019-12-20 3402 struct kiocb *kiocb = &req->rw.kiocb;
ff6165b2d7f66f Jens Axboe 2020-08-13 3403 struct iov_iter __iter, *iter = &__iter;
e8c2bc1fb6c949 Jens Axboe 2020-08-15 3404 struct io_async_rw *rw = req->async_data;
227c0c9673d867 Jens Axboe 2020-08-13 3405 ssize_t io_size, ret, ret2;
f5cac8b156e8b7 Jens Axboe 2020-09-14 3406 bool no_async;
ff6165b2d7f66f Jens Axboe 2020-08-13 3407
e8c2bc1fb6c949 Jens Axboe 2020-08-15 3408 if (rw)
e8c2bc1fb6c949 Jens Axboe 2020-08-15 3409 iter = &rw->iter;
2b188cc1bb857a Jens Axboe 2019-01-07 3410
ff6165b2d7f66f Jens Axboe 2020-08-13 3411 ret = io_import_iovec(READ, req, &iovec, iter, !force_nonblock);
f67676d160c6ee Jens Axboe 2019-12-02 3412 if (ret < 0)
2b188cc1bb857a Jens Axboe 2019-01-07 3413 return ret;
758adcb5e98092 Pavel Begunkov 2020-11-07 3414 io_size = iov_iter_count(iter);
fa15bafb71fd7a Pavel Begunkov 2020-08-01 3415 req->result = io_size;
227c0c9673d867 Jens Axboe 2020-08-13 3416 ret = 0;
2b188cc1bb857a Jens Axboe 2019-01-07 3417
fd6c2e4c063d64 Jens Axboe 2019-12-18 3418 /* Ensure we clear previously set non-block flag */
fd6c2e4c063d64 Jens Axboe 2019-12-18 3419 if (!force_nonblock)
29de5f6a350778 Jens Axboe 2020-02-20 3420 kiocb->ki_flags &= ~IOCB_NOWAIT;
a88fc400212fc1 Pavel Begunkov 2020-09-30 3421 else
a88fc400212fc1 Pavel Begunkov 2020-09-30 3422 kiocb->ki_flags |= IOCB_NOWAIT;
a88fc400212fc1 Pavel Begunkov 2020-09-30 3423
24c74678634b3c Pavel Begunkov 2020-06-21 3424 /* If the file doesn't support async, just async punt */
f5cac8b156e8b7 Jens Axboe 2020-09-14 3425 no_async = force_nonblock && !io_file_supports_async(req->file, READ);
f5cac8b156e8b7 Jens Axboe 2020-09-14 3426 if (no_async)
f67676d160c6ee Jens Axboe 2019-12-02 @3427 goto copy_iov;
9e645e1105ca60 Jens Axboe 2019-05-10 3428
758adcb5e98092 Pavel Begunkov 2020-11-07 3429 ret = rw_verify_area(READ, req->file, io_kiocb_ppos(kiocb), io_size);
fa15bafb71fd7a Pavel Begunkov 2020-08-01 3430 if (unlikely(ret))
fa15bafb71fd7a Pavel Begunkov 2020-08-01 3431 goto out_free;
2b188cc1bb857a Jens Axboe 2019-01-07 3432
227c0c9673d867 Jens Axboe 2020-08-13 3433 ret = io_iter_do_read(req, iter);
32960613b7c335 Jens Axboe 2019-09-23 3434
d964a45ff1644d Pavel Begunkov 2021-02-01 3435 if (ret == -EIOCBQUEUED) {
227c0c9673d867 Jens Axboe 2020-08-13 3436 ret = 0;
f67676d160c6ee Jens Axboe 2019-12-02 3437 goto out_free;
227c0c9673d867 Jens Axboe 2020-08-13 3438 } else if (ret == -EAGAIN) {
eefdf30f3dcb5c Jens Axboe 2020-08-27 3439 /* IOPOLL retry should happen for io-wq threads */
eefdf30f3dcb5c Jens Axboe 2020-08-27 3440 if (!force_nonblock && !(req->ctx->flags & IORING_SETUP_IOPOLL))
f91daf565b0e27 Jens Axboe 2020-08-15 3441 goto done;
355afaeb578aba Jens Axboe 2020-09-02 3442 /* no retry on NONBLOCK marked file */
355afaeb578aba Jens Axboe 2020-09-02 3443 if (req->file->f_flags & O_NONBLOCK)
355afaeb578aba Jens Axboe 2020-09-02 3444 goto done;
842163154b87b0 Jens Axboe 2020-08-24 3445 /* some cases will consume bytes even on error returns */
758adcb5e98092 Pavel Begunkov 2020-11-07 3446 iov_iter_revert(iter, io_size - iov_iter_count(iter));
f38c7e3abfba9a Jens Axboe 2020-09-25 3447 ret = 0;
75a2698c924a90 Pavel Begunkov 2021-02-04 3448 } else if (ret <= 0 || ret == io_size) {
00d23d516e2e79 Jens Axboe 2020-08-25 3449 /* make sure -ERESTARTSYS -> -EINTR is done */
00d23d516e2e79 Jens Axboe 2020-08-25 3450 goto done;
75a2698c924a90 Pavel Begunkov 2021-02-04 3451 } else {
75a2698c924a90 Pavel Begunkov 2021-02-04 3452 /* we did blocking attempt. no retry. */
75a2698c924a90 Pavel Begunkov 2021-02-04 3453 if (!force_nonblock || (req->file->f_flags & O_NONBLOCK) ||
75a2698c924a90 Pavel Begunkov 2021-02-04 3454 !(req->flags & REQ_F_ISREG))
227c0c9673d867 Jens Axboe 2020-08-13 3455 goto done;
227c0c9673d867 Jens Axboe 2020-08-13 3456
227c0c9673d867 Jens Axboe 2020-08-13 3457 io_size -= ret;
75a2698c924a90 Pavel Begunkov 2021-02-04 3458 }
75a2698c924a90 Pavel Begunkov 2021-02-04 3459
227c0c9673d867 Jens Axboe 2020-08-13 3460 ret2 = io_setup_async_rw(req, iovec, inline_vecs, iter, true);
227c0c9673d867 Jens Axboe 2020-08-13 3461 if (ret2) {
227c0c9673d867 Jens Axboe 2020-08-13 3462 ret = ret2;
227c0c9673d867 Jens Axboe 2020-08-13 3463 goto out_free;
f67676d160c6ee Jens Axboe 2019-12-02 3464 }
f5cac8b156e8b7 Jens Axboe 2020-09-14 3465 if (no_async)
f5cac8b156e8b7 Jens Axboe 2020-09-14 3466 return -EAGAIN;
e8c2bc1fb6c949 Jens Axboe 2020-08-15 3467 rw = req->async_data;
227c0c9673d867 Jens Axboe 2020-08-13 3468 /* it's copied and will be cleaned with ->io */
227c0c9673d867 Jens Axboe 2020-08-13 3469 iovec = NULL;
227c0c9673d867 Jens Axboe 2020-08-13 3470 /* now use our persistent iterator, if we aren't already */
e8c2bc1fb6c949 Jens Axboe 2020-08-15 3471 iter = &rw->iter;
227c0c9673d867 Jens Axboe 2020-08-13 3472 retry:
e8c2bc1fb6c949 Jens Axboe 2020-08-15 3473 rw->bytes_done += ret;
227c0c9673d867 Jens Axboe 2020-08-13 3474 /* if we can retry, do so with the callbacks armed */
227c0c9673d867 Jens Axboe 2020-08-13 3475 if (!io_rw_should_retry(req)) {
bcf5a06304d69a Jens Axboe 2020-05-22 3476 kiocb->ki_flags &= ~IOCB_WAITQ;
f67676d160c6ee Jens Axboe 2019-12-02 3477 return -EAGAIN;
2b188cc1bb857a Jens Axboe 2019-01-07 3478 }
227c0c9673d867 Jens Axboe 2020-08-13 3479
227c0c9673d867 Jens Axboe 2020-08-13 3480 /*
227c0c9673d867 Jens Axboe 2020-08-13 3481 * Now retry read with the IOCB_WAITQ parts set in the iocb. If we
227c0c9673d867 Jens Axboe 2020-08-13 3482 * get -EIOCBQUEUED, then we'll get a notification when the desired
227c0c9673d867 Jens Axboe 2020-08-13 3483 * page gets unlocked. We can also get a partial read here, and if we
227c0c9673d867 Jens Axboe 2020-08-13 3484 * do, then just retry at the new offset.
227c0c9673d867 Jens Axboe 2020-08-13 3485 */
227c0c9673d867 Jens Axboe 2020-08-13 3486 ret = io_iter_do_read(req, iter);
227c0c9673d867 Jens Axboe 2020-08-13 3487 if (ret == -EIOCBQUEUED) {
227c0c9673d867 Jens Axboe 2020-08-13 3488 ret = 0;
227c0c9673d867 Jens Axboe 2020-08-13 3489 goto out_free;
227c0c9673d867 Jens Axboe 2020-08-13 3490 } else if (ret > 0 && ret < io_size) {
227c0c9673d867 Jens Axboe 2020-08-13 3491 /* we got some bytes, but not all. retry. */
227c0c9673d867 Jens Axboe 2020-08-13 3492 goto retry;
227c0c9673d867 Jens Axboe 2020-08-13 3493 }
227c0c9673d867 Jens Axboe 2020-08-13 3494 done:
227c0c9673d867 Jens Axboe 2020-08-13 3495 kiocb_done(kiocb, ret, cs);
227c0c9673d867 Jens Axboe 2020-08-13 3496 ret = 0;
f67676d160c6ee Jens Axboe 2019-12-02 3497 out_free:
f261c16861b829 Pavel Begunkov 2020-08-20 3498 /* it's reportedly faster than delegating the null check to kfree() */
252917c30f551e Pavel Begunkov 2020-07-13 3499 if (iovec)
2b188cc1bb857a Jens Axboe 2019-01-07 3500 kfree(iovec);
2b188cc1bb857a Jens Axboe 2019-01-07 3501 return ret;
2b188cc1bb857a Jens Axboe 2019-01-07 3502 }
2b188cc1bb857a Jens Axboe 2019-01-07 3503
:::::: The code at line 3427 was first introduced by commit
:::::: f67676d160c6ee2ed82917fadfed6d29cab8237c io_uring: ensure async punted read/write requests copy iovec
:::::: TO: Jens Axboe <axboe(a)kernel.dk>
:::::: CC: Jens Axboe <axboe(a)kernel.dk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[agd5f:amd-staging-drm-next 2019/2088] drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4677:6: warning: no previous prototype for function 'amdgpu_device_recheck_guilty_jobs'
by kernel test robot
Hi Jack,
FYI, the error/warning still remains.
tree: https://gitlab.freedesktop.org/agd5f/linux.git amd-staging-drm-next
head: 06dfdade5cc1b3e959e34a170f6cbe33aa7f475f
commit: c8a921d49443025e10794342d4433b3f29616409 [2019/2088] drm/amd/amdgpu implement tdr advanced mode
config: x86_64-randconfig-a003-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6db3ab2903f42712f44000afb5aa467efbd25f35)
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
git remote add agd5f https://gitlab.freedesktop.org/agd5f/linux.git
git fetch --no-tags agd5f amd-staging-drm-next
git checkout c8a921d49443025e10794342d4433b3f29616409
# 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(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:39:
include/linux/efi.h:1099:34: warning: passing 1-byte aligned argument to 4-byte aligned parameter 2 of 'get_var' may result in an unaligned pointer access [-Walign-mismatch]
status = get_var(L"SecureBoot", &EFI_GLOBAL_VARIABLE_GUID, NULL, &size,
^
include/linux/efi.h:1107:24: warning: passing 1-byte aligned argument to 4-byte aligned parameter 2 of 'get_var' may result in an unaligned pointer access [-Walign-mismatch]
get_var(L"SetupMode", &EFI_GLOBAL_VARIABLE_GUID, NULL, &size, &setupmode);
^
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4731:27: error: no member named 'num_jobs' in 'struct drm_gpu_scheduler'
atomic_dec(&ring->sched.num_jobs);
~~~~~~~~~~~ ^
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4738:25: error: no member named 'node' in 'struct drm_sched_job'
list_del_init(&s_job->node);
~~~~~ ^
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4677:6: warning: no previous prototype for function 'amdgpu_device_recheck_guilty_jobs' [-Wmissing-prototypes]
void amdgpu_device_recheck_guilty_jobs(struct amdgpu_device *adev,
^
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4677:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void amdgpu_device_recheck_guilty_jobs(struct amdgpu_device *adev,
^
static
3 warnings and 2 errors generated.
vim +/amdgpu_device_recheck_guilty_jobs +4677 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
4676
> 4677 void amdgpu_device_recheck_guilty_jobs(struct amdgpu_device *adev,
4678 struct amdgpu_hive_info *hive,
4679 struct list_head *device_list_handle,
4680 bool *need_full_reset)
4681 {
4682 int i, r = 0;
4683
4684 for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
4685 struct amdgpu_ring *ring = adev->rings[i];
4686 int ret = 0;
4687 struct drm_sched_job *s_job;
4688
4689 if (!ring || !ring->sched.thread)
4690 continue;
4691
4692 s_job = list_first_entry_or_null(&ring->sched.pending_list,
4693 struct drm_sched_job, list);
4694 if (s_job == NULL)
4695 continue;
4696
4697 /* clear job's guilty and depend the folowing step to decide the real one */
4698 drm_sched_reset_karma(s_job);
4699 drm_sched_resubmit_jobs_ext(&ring->sched, 1);
4700
4701 ret = dma_fence_wait_timeout(s_job->s_fence->parent, false, ring->sched.timeout);
4702 if (ret == 0) { /* timeout */
4703 DRM_ERROR("Found the real bad job! ring:%s, job_id:%llx\n",
4704 ring->sched.name, s_job->id);
4705
4706 /* set guilty */
4707 drm_sched_increase_karma(s_job);
4708 retry:
4709 /* do hw reset */
4710 if (amdgpu_sriov_vf(adev)) {
4711 amdgpu_virt_fini_data_exchange(adev);
4712 r = amdgpu_device_reset_sriov(adev, false);
4713 if (r)
4714 adev->asic_reset_res = r;
4715 } else {
4716 r = amdgpu_do_asic_reset(hive, device_list_handle,
4717 need_full_reset, false);
4718 if (r && r == -EAGAIN)
4719 goto retry;
4720 }
4721
4722 /*
4723 * add reset counter so that the following
4724 * resubmitted job could flush vmid
4725 */
4726 atomic_inc(&adev->gpu_reset_counter);
4727 continue;
4728 }
4729
4730 /* got the hw fence, signal finished fence */
4731 atomic_dec(&ring->sched.num_jobs);
4732 dma_fence_get(&s_job->s_fence->finished);
4733 dma_fence_signal(&s_job->s_fence->finished);
4734 dma_fence_put(&s_job->s_fence->finished);
4735
4736 /* remove node from list and free the job */
4737 spin_lock(&ring->sched.job_list_lock);
4738 list_del_init(&s_job->node);
4739 spin_unlock(&ring->sched.job_list_lock);
4740 ring->sched.ops->free_job(s_job);
4741 }
4742 }
4743
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH v2 1/5] hwmon: (max31790) Rework to use regmap
by Dan Carpenter
Hi "Václav,
url: https://github.com/0day-ci/linux/commits/V-clav-Kubern-t/hwmon-max31790-R...
base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
config: x86_64-randconfig-m001-20210316 (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>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/hwmon/max31790.c:263 max31790_fan_is_visible() warn: impossible condition '(fan_config < 0) => (0-255 < 0)'
drivers/hwmon/max31790.c:337 max31790_write_pwm() warn: impossible condition '(fan_config < 0) => (0-255 < 0)'
drivers/hwmon/max31790.c:372 max31790_pwm_is_visible() warn: impossible condition '(fan_config < 0) => (0-255 < 0)'
vim +263 drivers/hwmon/max31790.c
54187ff9d766b2 Guenter Roeck 2016-07-01 257 static umode_t max31790_fan_is_visible(const void *_data, u32 attr, int channel)
195a4b4298a795 Il Han 2015-08-30 258 {
54187ff9d766b2 Guenter Roeck 2016-07-01 259 const struct max31790_data *data = _data;
2c8602cfaeab63 Václav Kubernát 2021-03-16 260 struct regmap *regmap = data->regmap;
2c8602cfaeab63 Václav Kubernát 2021-03-16 261 u8 fan_config = read_reg_byte(regmap, MAX31790_REG_FAN_CONFIG(channel % NR_CHANNEL));
2c8602cfaeab63 Václav Kubernát 2021-03-16 262
2c8602cfaeab63 Václav Kubernát 2021-03-16 @263 if (fan_config < 0)
^^^^^^^^^^^^^^
A u8 can't be negative.
2c8602cfaeab63 Václav Kubernát 2021-03-16 264 return 0;
54187ff9d766b2 Guenter Roeck 2016-07-01 265
54187ff9d766b2 Guenter Roeck 2016-07-01 266 switch (attr) {
54187ff9d766b2 Guenter Roeck 2016-07-01 267 case hwmon_fan_input:
54187ff9d766b2 Guenter Roeck 2016-07-01 268 case hwmon_fan_fault:
54187ff9d766b2 Guenter Roeck 2016-07-01 269 if (channel < NR_CHANNEL ||
54187ff9d766b2 Guenter Roeck 2016-07-01 270 (fan_config & MAX31790_FAN_CFG_TACH_INPUT))
dc8dbb4d7672b7 Guenter Roeck 2018-12-10 271 return 0444;
54187ff9d766b2 Guenter Roeck 2016-07-01 272 return 0;
54187ff9d766b2 Guenter Roeck 2016-07-01 273 case hwmon_fan_target:
54187ff9d766b2 Guenter Roeck 2016-07-01 274 if (channel < NR_CHANNEL &&
54187ff9d766b2 Guenter Roeck 2016-07-01 275 !(fan_config & MAX31790_FAN_CFG_TACH_INPUT))
dc8dbb4d7672b7 Guenter Roeck 2018-12-10 276 return 0644;
54187ff9d766b2 Guenter Roeck 2016-07-01 277 return 0;
54187ff9d766b2 Guenter Roeck 2016-07-01 278 default:
54187ff9d766b2 Guenter Roeck 2016-07-01 279 return 0;
195a4b4298a795 Il Han 2015-08-30 280 }
195a4b4298a795 Il Han 2015-08-30 281 }
195a4b4298a795 Il Han 2015-08-30 282
54187ff9d766b2 Guenter Roeck 2016-07-01 283 static int max31790_read_pwm(struct device *dev, u32 attr, int channel,
54187ff9d766b2 Guenter Roeck 2016-07-01 284 long *val)
195a4b4298a795 Il Han 2015-08-30 285 {
2c8602cfaeab63 Václav Kubernát 2021-03-16 286 struct max31790_data *data = dev_get_drvdata(dev);
2c8602cfaeab63 Václav Kubernát 2021-03-16 287 struct regmap *regmap = data->regmap;
2c8602cfaeab63 Václav Kubernát 2021-03-16 288 int read;
195a4b4298a795 Il Han 2015-08-30 289
195a4b4298a795 Il Han 2015-08-30 290 if (IS_ERR(data))
195a4b4298a795 Il Han 2015-08-30 291 return PTR_ERR(data);
195a4b4298a795 Il Han 2015-08-30 292
54187ff9d766b2 Guenter Roeck 2016-07-01 293 switch (attr) {
54187ff9d766b2 Guenter Roeck 2016-07-01 294 case hwmon_pwm_input:
2c8602cfaeab63 Václav Kubernát 2021-03-16 295 read = read_reg_word(regmap, MAX31790_REG_PWMOUT(channel));
2c8602cfaeab63 Václav Kubernát 2021-03-16 296 if (read < 0)
2c8602cfaeab63 Václav Kubernát 2021-03-16 297 return read;
2c8602cfaeab63 Václav Kubernát 2021-03-16 298
2c8602cfaeab63 Václav Kubernát 2021-03-16 299 *val = read >> 8;
54187ff9d766b2 Guenter Roeck 2016-07-01 300 return 0;
54187ff9d766b2 Guenter Roeck 2016-07-01 301 case hwmon_pwm_enable:
2c8602cfaeab63 Václav Kubernát 2021-03-16 302 read = read_reg_byte(regmap, MAX31790_REG_FAN_CONFIG(channel));
2c8602cfaeab63 Václav Kubernát 2021-03-16 303 if (read < 0)
2c8602cfaeab63 Václav Kubernát 2021-03-16 304 return read;
2c8602cfaeab63 Václav Kubernát 2021-03-16 305
2c8602cfaeab63 Václav Kubernát 2021-03-16 306 if (read & MAX31790_FAN_CFG_RPM_MODE)
54187ff9d766b2 Guenter Roeck 2016-07-01 307 *val = 2;
2c8602cfaeab63 Václav Kubernát 2021-03-16 308 else if (read & MAX31790_FAN_CFG_TACH_INPUT_EN)
54187ff9d766b2 Guenter Roeck 2016-07-01 309 *val = 1;
195a4b4298a795 Il Han 2015-08-30 310 else
54187ff9d766b2 Guenter Roeck 2016-07-01 311 *val = 0;
54187ff9d766b2 Guenter Roeck 2016-07-01 312 return 0;
54187ff9d766b2 Guenter Roeck 2016-07-01 313 default:
54187ff9d766b2 Guenter Roeck 2016-07-01 314 return -EOPNOTSUPP;
54187ff9d766b2 Guenter Roeck 2016-07-01 315 }
195a4b4298a795 Il Han 2015-08-30 316 }
195a4b4298a795 Il Han 2015-08-30 317
54187ff9d766b2 Guenter Roeck 2016-07-01 318 static int max31790_write_pwm(struct device *dev, u32 attr, int channel,
54187ff9d766b2 Guenter Roeck 2016-07-01 319 long val)
195a4b4298a795 Il Han 2015-08-30 320 {
195a4b4298a795 Il Han 2015-08-30 321 struct max31790_data *data = dev_get_drvdata(dev);
2c8602cfaeab63 Václav Kubernát 2021-03-16 322 struct regmap *regmap = data->regmap;
54187ff9d766b2 Guenter Roeck 2016-07-01 323 u8 fan_config;
54187ff9d766b2 Guenter Roeck 2016-07-01 324 int err = 0;
195a4b4298a795 Il Han 2015-08-30 325
54187ff9d766b2 Guenter Roeck 2016-07-01 326 switch (attr) {
54187ff9d766b2 Guenter Roeck 2016-07-01 327 case hwmon_pwm_input:
54187ff9d766b2 Guenter Roeck 2016-07-01 328 if (val < 0 || val > 255) {
54187ff9d766b2 Guenter Roeck 2016-07-01 329 err = -EINVAL;
54187ff9d766b2 Guenter Roeck 2016-07-01 330 break;
54187ff9d766b2 Guenter Roeck 2016-07-01 331 }
2c8602cfaeab63 Václav Kubernát 2021-03-16 332 err = write_reg_word(regmap, MAX31790_REG_PWMOUT(channel), val << 8);
195a4b4298a795 Il Han 2015-08-30 333 break;
54187ff9d766b2 Guenter Roeck 2016-07-01 334 case hwmon_pwm_enable:
2c8602cfaeab63 Václav Kubernát 2021-03-16 335 fan_config = read_reg_byte(regmap, MAX31790_REG_FAN_CONFIG(channel % NR_CHANNEL));
2c8602cfaeab63 Václav Kubernát 2021-03-16 336
2c8602cfaeab63 Václav Kubernát 2021-03-16 @337 if (fan_config < 0)
2c8602cfaeab63 Václav Kubernát 2021-03-16 338 return fan_config;
2c8602cfaeab63 Václav Kubernát 2021-03-16 339
54187ff9d766b2 Guenter Roeck 2016-07-01 340 if (val == 0) {
54187ff9d766b2 Guenter Roeck 2016-07-01 341 fan_config &= ~(MAX31790_FAN_CFG_TACH_INPUT_EN |
54187ff9d766b2 Guenter Roeck 2016-07-01 342 MAX31790_FAN_CFG_RPM_MODE);
54187ff9d766b2 Guenter Roeck 2016-07-01 343 } else if (val == 1) {
54187ff9d766b2 Guenter Roeck 2016-07-01 344 fan_config = (fan_config |
54187ff9d766b2 Guenter Roeck 2016-07-01 345 MAX31790_FAN_CFG_TACH_INPUT_EN) &
54187ff9d766b2 Guenter Roeck 2016-07-01 346 ~MAX31790_FAN_CFG_RPM_MODE;
54187ff9d766b2 Guenter Roeck 2016-07-01 347 } else if (val == 2) {
54187ff9d766b2 Guenter Roeck 2016-07-01 348 fan_config |= MAX31790_FAN_CFG_TACH_INPUT_EN |
54187ff9d766b2 Guenter Roeck 2016-07-01 349 MAX31790_FAN_CFG_RPM_MODE;
54187ff9d766b2 Guenter Roeck 2016-07-01 350 } else {
54187ff9d766b2 Guenter Roeck 2016-07-01 351 err = -EINVAL;
195a4b4298a795 Il Han 2015-08-30 352 break;
54187ff9d766b2 Guenter Roeck 2016-07-01 353 }
2c8602cfaeab63 Václav Kubernát 2021-03-16 354 err = regmap_write(regmap,
54187ff9d766b2 Guenter Roeck 2016-07-01 355 MAX31790_REG_FAN_CONFIG(channel),
54187ff9d766b2 Guenter Roeck 2016-07-01 356 fan_config);
195a4b4298a795 Il Han 2015-08-30 357 break;
195a4b4298a795 Il Han 2015-08-30 358 default:
54187ff9d766b2 Guenter Roeck 2016-07-01 359 err = -EOPNOTSUPP;
54187ff9d766b2 Guenter Roeck 2016-07-01 360 break;
195a4b4298a795 Il Han 2015-08-30 361 }
195a4b4298a795 Il Han 2015-08-30 362
195a4b4298a795 Il Han 2015-08-30 363 return err;
195a4b4298a795 Il Han 2015-08-30 364 }
195a4b4298a795 Il Han 2015-08-30 365
54187ff9d766b2 Guenter Roeck 2016-07-01 366 static umode_t max31790_pwm_is_visible(const void *_data, u32 attr, int channel)
195a4b4298a795 Il Han 2015-08-30 367 {
54187ff9d766b2 Guenter Roeck 2016-07-01 368 const struct max31790_data *data = _data;
2c8602cfaeab63 Václav Kubernát 2021-03-16 369 struct regmap *regmap = data->regmap;
2c8602cfaeab63 Václav Kubernát 2021-03-16 370 u8 fan_config = read_reg_byte(regmap, MAX31790_REG_FAN_CONFIG(channel % NR_CHANNEL));
2c8602cfaeab63 Václav Kubernát 2021-03-16 371
2c8602cfaeab63 Václav Kubernát 2021-03-16 @372 if (fan_config < 0)
2c8602cfaeab63 Václav Kubernát 2021-03-16 373 return 0;
54187ff9d766b2 Guenter Roeck 2016-07-01 374
54187ff9d766b2 Guenter Roeck 2016-07-01 375 switch (attr) {
54187ff9d766b2 Guenter Roeck 2016-07-01 376 case hwmon_pwm_input:
54187ff9d766b2 Guenter Roeck 2016-07-01 377 case hwmon_pwm_enable:
54187ff9d766b2 Guenter Roeck 2016-07-01 378 if (!(fan_config & MAX31790_FAN_CFG_TACH_INPUT))
dc8dbb4d7672b7 Guenter Roeck 2018-12-10 379 return 0644;
54187ff9d766b2 Guenter Roeck 2016-07-01 380 return 0;
54187ff9d766b2 Guenter Roeck 2016-07-01 381 default:
54187ff9d766b2 Guenter Roeck 2016-07-01 382 return 0;
54187ff9d766b2 Guenter Roeck 2016-07-01 383 }
54187ff9d766b2 Guenter Roeck 2016-07-01 384 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[sashal-linux-stable:queue-5.10 56/74] mm/page_alloc.c:3275:2: error: implicit declaration of function 'split_page_memcg'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.10
head: 9ced6633127bd25a94939777d9ecda54800859fc
commit: ce4ba942d630e0361a9272fc065ee6530bc1bdd7 [56/74] mm/memcg: set memcg when splitting page
config: powerpc-randconfig-r002-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6db3ab2903f42712f44000afb5aa467efbd25f35)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.10
git checkout ce4ba942d630e0361a9272fc065ee6530bc1bdd7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 >>):
>> mm/page_alloc.c:3275:2: error: implicit declaration of function 'split_page_memcg' [-Werror,-Wimplicit-function-declaration]
split_page_memcg(page, 1 << order);
^
mm/page_alloc.c:3563:15: warning: no previous prototype for function 'should_fail_alloc_page' [-Wmissing-prototypes]
noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
^
mm/page_alloc.c:3563:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
^
static
mm/page_alloc.c:6244:23: warning: no previous prototype for function 'memmap_init' [-Wmissing-prototypes]
void __meminit __weak memmap_init(unsigned long size, int nid,
^
mm/page_alloc.c:6244:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __meminit __weak memmap_init(unsigned long size, int nid,
^
static
2 warnings and 1 error generated.
vim +/split_page_memcg +3275 mm/page_alloc.c
3256
3257 /*
3258 * split_page takes a non-compound higher-order page, and splits it into
3259 * n (1<<order) sub-pages: page[0..n]
3260 * Each sub-page must be freed individually.
3261 *
3262 * Note: this is probably too low level an operation for use in drivers.
3263 * Please consult with lkml before using this in your driver.
3264 */
3265 void split_page(struct page *page, unsigned int order)
3266 {
3267 int i;
3268
3269 VM_BUG_ON_PAGE(PageCompound(page), page);
3270 VM_BUG_ON_PAGE(!page_count(page), page);
3271
3272 for (i = 1; i < (1 << order); i++)
3273 set_page_refcounted(page + i);
3274 split_page_owner(page, 1 << order);
> 3275 split_page_memcg(page, 1 << order);
3276 }
3277 EXPORT_SYMBOL_GPL(split_page);
3278
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[sashal-linux-stable:queue-4.19 2/2] arch/powerpc/lib/sstep.c:2552:7: warning: this statement may fall through
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.19
head: e19f9c9b9d08b80587c0b922a18a383acaee5133
commit: e19f9c9b9d08b80587c0b922a18a383acaee5133 [2/2] powerpc/sstep: Fix load-store and update emulation
config: powerpc-allyesconfig (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://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-4.19
git checkout e19f9c9b9d08b80587c0b922a18a383acaee5133
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
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 >>):
In file included from arch/powerpc/include/asm/book3s/64/mmu-hash.h:24,
from arch/powerpc/include/asm/book3s/64/mmu.h:30,
from arch/powerpc/include/asm/mmu.h:313,
from arch/powerpc/include/asm/lppaca.h:36,
from arch/powerpc/include/asm/paca.h:21,
from arch/powerpc/include/asm/current.h:16,
from include/linux/mutex.h:14,
from include/linux/notifier.h:14,
from include/linux/kprobes.h:35,
from arch/powerpc/lib/sstep.c:12:
arch/powerpc/include/asm/book3s/64/pgtable.h:1292:15: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
1292 | static inline const int pud_pfn(pud_t pud)
| ^~~~~
arch/powerpc/lib/sstep.c: In function 'analyse_instr':
arch/powerpc/lib/sstep.c:2554:4: error: 'fallthrough' undeclared (first use in this function)
2554 | fallthrough;
| ^~~~~~~~~~~
arch/powerpc/lib/sstep.c:2554:4: note: each undeclared identifier is reported only once for each function it appears in
arch/powerpc/lib/sstep.c:2559:5: error: label 'unknown_opcode' used but not defined
2559 | goto unknown_opcode;
| ^~~~
>> arch/powerpc/lib/sstep.c:2552:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
2552 | if (ra == rd)
| ^
arch/powerpc/lib/sstep.c:2555:3: note: here
2555 | case STORE:
| ^~~~
vim +2552 arch/powerpc/lib/sstep.c
2546
2547 }
2548
2549 if (OP_IS_LOAD_STORE(op->type) && (op->type & UPDATE)) {
2550 switch (GETTYPE(op->type)) {
2551 case LOAD:
> 2552 if (ra == rd)
2553 goto unknown_opcode;
2554 fallthrough;
2555 case STORE:
2556 case LOAD_FP:
2557 case STORE_FP:
2558 if (ra == 0)
2559 goto unknown_opcode;
2560 }
2561 }
2562
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[sashal-linux-stable:queue-5.4 7/8] mm/page_alloc.c:3135:2: error: implicit declaration of function 'split_page_memcg'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: b24ca39180f94e05ffdb3647ca2386841aa7fad7
commit: 36c0f4438e873a61dd5f0cbe2695b826e18f93d3 [7/8] mm/memcg: set memcg when splitting page
config: powerpc-randconfig-r021-20210317 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6db3ab2903f42712f44000afb5aa467efbd25f35)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.4
git checkout 36c0f4438e873a61dd5f0cbe2695b826e18f93d3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 >>):
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:141:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from mm/page_alloc.c:20:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:143:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:544:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from mm/page_alloc.c:20:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:145:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from mm/page_alloc.c:20:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:147:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from mm/page_alloc.c:20:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:149:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:547:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
mm/page_alloc.c:2478:5: warning: no previous prototype for function 'find_suitable_fallback' [-Wmissing-prototypes]
int find_suitable_fallback(struct free_area *area, unsigned int order,
^
mm/page_alloc.c:2478:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int find_suitable_fallback(struct free_area *area, unsigned int order,
^
static
>> mm/page_alloc.c:3135:2: error: implicit declaration of function 'split_page_memcg' [-Werror,-Wimplicit-function-declaration]
split_page_memcg(page, 1 << order);
^
mm/page_alloc.c:3390:15: warning: no previous prototype for function 'should_fail_alloc_page' [-Wmissing-prototypes]
noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
^
mm/page_alloc.c:3390:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
^
static
mm/page_alloc.c:6053:23: warning: no previous prototype for function 'memmap_init' [-Wmissing-prototypes]
void __meminit __weak memmap_init(unsigned long size, int nid,
^
mm/page_alloc.c:6053:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __meminit __weak memmap_init(unsigned long size, int nid,
^
static
15 warnings and 1 error generated.
vim +/split_page_memcg +3135 mm/page_alloc.c
3116
3117 /*
3118 * split_page takes a non-compound higher-order page, and splits it into
3119 * n (1<<order) sub-pages: page[0..n]
3120 * Each sub-page must be freed individually.
3121 *
3122 * Note: this is probably too low level an operation for use in drivers.
3123 * Please consult with lkml before using this in your driver.
3124 */
3125 void split_page(struct page *page, unsigned int order)
3126 {
3127 int i;
3128
3129 VM_BUG_ON_PAGE(PageCompound(page), page);
3130 VM_BUG_ON_PAGE(!page_count(page), page);
3131
3132 for (i = 1; i < (1 << order); i++)
3133 set_page_refcounted(page + i);
3134 split_page_owner(page, 1 << order);
> 3135 split_page_memcg(page, 1 << order);
3136 }
3137 EXPORT_SYMBOL_GPL(split_page);
3138
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[sashal-linux-stable:queue-5.10 1/74] drivers/net/ethernet/mellanox/mlx5/core/en_main.c:4406:6: error: implicit declaration of function 'mlx5_fpga_is_ipsec_device'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.10
head: 9ced6633127bd25a94939777d9ecda54800859fc
commit: 854f43c099ea41ee621e53b6968bd73a8a0d68b0 [1/74] net/mlx5e: Enable XDP for Connect-X IPsec capable devices
config: x86_64-randconfig-a004-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6db3ab2903f42712f44000afb5aa467efbd25f35)
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/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.10
git checkout 854f43c099ea41ee621e53b6968bd73a8a0d68b0
# 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(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/net/ethernet/mellanox/mlx5/core/en_main.c:4406:6: error: implicit declaration of function 'mlx5_fpga_is_ipsec_device' [-Werror,-Wimplicit-function-declaration]
if (mlx5_fpga_is_ipsec_device(priv->mdev)) {
^
1 error generated.
vim +/mlx5_fpga_is_ipsec_device +4406 drivers/net/ethernet/mellanox/mlx5/core/en_main.c
4395
4396 static int mlx5e_xdp_allowed(struct mlx5e_priv *priv, struct bpf_prog *prog)
4397 {
4398 struct net_device *netdev = priv->netdev;
4399 struct mlx5e_channels new_channels = {};
4400
4401 if (priv->channels.params.lro_en) {
4402 netdev_warn(netdev, "can't set XDP while LRO is on, disable LRO first\n");
4403 return -EINVAL;
4404 }
4405
> 4406 if (mlx5_fpga_is_ipsec_device(priv->mdev)) {
4407 netdev_warn(netdev,
4408 "XDP is not available on Innova cards with IPsec support\n");
4409 return -EINVAL;
4410 }
4411
4412 new_channels.params = priv->channels.params;
4413 new_channels.params.xdp_prog = prog;
4414
4415 /* No XSK params: AF_XDP can't be enabled yet at the point of setting
4416 * the XDP program.
4417 */
4418 if (!mlx5e_rx_is_linear_skb(&new_channels.params, NULL)) {
4419 netdev_warn(netdev, "XDP is not allowed with MTU(%d) > %d\n",
4420 new_channels.params.sw_mtu,
4421 mlx5e_xdp_max_mtu(&new_channels.params, NULL));
4422 return -EINVAL;
4423 }
4424
4425 return 0;
4426 }
4427
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[agd5f:drm-next 470/518] drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:3510: undefined reference to `dc_dsc_stream_bandwidth_in_kbps'
by kernel test robot
tree: https://gitlab.freedesktop.org/agd5f/linux.git drm-next
head: c37eed39d0ba85a057baa9fafbf9f7cc1f888c1e
commit: a03f6c0e26b2882fe3eeb092111bdccc113d76ce [470/518] drm/amd/display: Add changes for dsc bpp in 16ths and unify bw calculations
config: x86_64-randconfig-r015-20210318 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add agd5f https://gitlab.freedesktop.org/agd5f/linux.git
git fetch --no-tags agd5f drm-next
git checkout a03f6c0e26b2882fe3eeb092111bdccc113d76ce
# save the attached .config to linux build tree
make 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 >>):
ld: drivers/gpu/drm/amd/display/dc/core/dc_link.o: in function `dc_bandwidth_in_kbps_from_timing':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:3510: undefined reference to `dc_dsc_stream_bandwidth_in_kbps'
vim +3510 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c
3502
3503 uint32_t dc_bandwidth_in_kbps_from_timing(
3504 const struct dc_crtc_timing *timing)
3505 {
3506 uint32_t bits_per_channel = 0;
3507 uint32_t kbps;
3508
3509 if (timing->flags.DSC) {
> 3510 return dc_dsc_stream_bandwidth_in_kbps(timing->pix_clk_100hz, timing->dsc_cfg.bits_per_pixel);
3511 }
3512
3513 switch (timing->display_color_depth) {
3514 case COLOR_DEPTH_666:
3515 bits_per_channel = 6;
3516 break;
3517 case COLOR_DEPTH_888:
3518 bits_per_channel = 8;
3519 break;
3520 case COLOR_DEPTH_101010:
3521 bits_per_channel = 10;
3522 break;
3523 case COLOR_DEPTH_121212:
3524 bits_per_channel = 12;
3525 break;
3526 case COLOR_DEPTH_141414:
3527 bits_per_channel = 14;
3528 break;
3529 case COLOR_DEPTH_161616:
3530 bits_per_channel = 16;
3531 break;
3532 default:
3533 ASSERT(bits_per_channel != 0);
3534 bits_per_channel = 8;
3535 break;
3536 }
3537
3538 kbps = timing->pix_clk_100hz / 10;
3539 kbps *= bits_per_channel;
3540
3541 if (timing->flags.Y_ONLY != 1) {
3542 /*Only YOnly make reduce bandwidth by 1/3 compares to RGB*/
3543 kbps *= 3;
3544 if (timing->pixel_encoding == PIXEL_ENCODING_YCBCR420)
3545 kbps /= 2;
3546 else if (timing->pixel_encoding == PIXEL_ENCODING_YCBCR422)
3547 kbps = kbps * 2 / 3;
3548 }
3549
3550 return kbps;
3551
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH v2 4/6] mm/mremap: Use mmu gather interface instead of flush_tlb_range
by kernel test robot
Hi "Aneesh,
I love your patch! Yet something to improve:
[auto build test ERROR on powerpc/next]
[also build test ERROR on kselftest/next v5.12-rc3 next-20210317]
[cannot apply to hnaz-linux-mm/master]
[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/Aneesh-Kumar-K-V/Speedup-mremap-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: x86_64-rhel-8.3 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/d3b9a3e6f414413d8f822185158b937d9...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Aneesh-Kumar-K-V/Speedup-mremap-on-ppc64/20210315-194324
git checkout d3b9a3e6f414413d8f822185158b937d9f19b7a6
# save the attached .config to linux build tree
make 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>
Note: the linux-review/Aneesh-Kumar-K-V/Speedup-mremap-on-ppc64/20210315-194324 HEAD 79633714ff2b990b3e4972873457678bb34d029f builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
mm/mremap.c: In function 'move_normal_pmd':
>> mm/mremap.c:219:20: error: storage size of 'tlb' isn't known
219 | struct mmu_gather tlb;
| ^~~
>> mm/mremap.c:267:2: error: implicit declaration of function 'tlb_flush_pte_range' [-Werror=implicit-function-declaration]
267 | tlb_flush_pte_range(&tlb, old_addr, PMD_SIZE);
| ^~~~~~~~~~~~~~~~~~~
mm/mremap.c:219:20: warning: unused variable 'tlb' [-Wunused-variable]
219 | struct mmu_gather tlb;
| ^~~
mm/mremap.c: In function 'move_normal_pud':
mm/mremap.c:297:20: error: storage size of 'tlb' isn't known
297 | struct mmu_gather tlb;
| ^~~
mm/mremap.c:297:20: warning: unused variable 'tlb' [-Wunused-variable]
cc1: some warnings being treated as errors
vim +219 mm/mremap.c
212
213 #ifdef CONFIG_HAVE_MOVE_PMD
214 static bool move_normal_pmd(struct vm_area_struct *vma, unsigned long old_addr,
215 unsigned long new_addr, pmd_t *old_pmd, pmd_t *new_pmd)
216 {
217 spinlock_t *old_ptl, *new_ptl;
218 struct mm_struct *mm = vma->vm_mm;
> 219 struct mmu_gather tlb;
220 pmd_t pmd;
221
222 /*
223 * The destination pmd shouldn't be established, free_pgtables()
224 * should have released it.
225 *
226 * However, there's a case during execve() where we use mremap
227 * to move the initial stack, and in that case the target area
228 * may overlap the source area (always moving down).
229 *
230 * If everything is PMD-aligned, that works fine, as moving
231 * each pmd down will clear the source pmd. But if we first
232 * have a few 4kB-only pages that get moved down, and then
233 * hit the "now the rest is PMD-aligned, let's do everything
234 * one pmd at a time", we will still have the old (now empty
235 * of any 4kB pages, but still there) PMD in the page table
236 * tree.
237 *
238 * Warn on it once - because we really should try to figure
239 * out how to do this better - but then say "I won't move
240 * this pmd".
241 *
242 * One alternative might be to just unmap the target pmd at
243 * this point, and verify that it really is empty. We'll see.
244 */
245 if (WARN_ON_ONCE(!pmd_none(*new_pmd)))
246 return false;
247
248 tlb_gather_mmu(&tlb, mm);
249 /*
250 * We don't have to worry about the ordering of src and dst
251 * ptlocks because exclusive mmap_lock prevents deadlock.
252 */
253 old_ptl = pmd_lock(mm, old_pmd);
254 new_ptl = pmd_lockptr(mm, new_pmd);
255 if (new_ptl != old_ptl)
256 spin_lock_nested(new_ptl, SINGLE_DEPTH_NESTING);
257
258 /* Clear the pmd */
259 pmd = *old_pmd;
260 pmd_clear(old_pmd);
261
262 /*
263 * Mark the range. We are not freeing page table pages nor
264 * regular pages. Hence we don't need to call tlb_remove_table()
265 * or tlb_remove_page().
266 */
> 267 tlb_flush_pte_range(&tlb, old_addr, PMD_SIZE);
268 tlb.freed_tables = 1;
269 VM_BUG_ON(!pmd_none(*new_pmd));
270 pmd_populate(mm, new_pmd, (pgtable_t)pmd_page_vaddr(pmd));
271
272 if (new_ptl != old_ptl)
273 spin_unlock(new_ptl);
274 spin_unlock(old_ptl);
275 /*
276 * This will invalidate both the old TLB and page table walk caches.
277 */
278 tlb_finish_mmu(&tlb);
279
280 return true;
281 }
282 #else
283 static inline bool move_normal_pmd(struct vm_area_struct *vma,
284 unsigned long old_addr, unsigned long new_addr, pmd_t *old_pmd,
285 pmd_t *new_pmd)
286 {
287 return false;
288 }
289 #endif
290
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months