Re: [PATCH 02/18] MM: create new mm/swap.h header file.
by kernel test robot
Hi NeilBrown,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on cifs/for-next]
[also build test ERROR on axboe-block/for-next rostedt-trace/for-next linus/master v5.16-rc5]
[cannot apply to trondmy-nfs/linux-next hnaz-mm/master next-20211216]
[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/NeilBrown/Repair-SWAP-over-NFS/2...
base: git://git.samba.org/sfrench/cifs-2.6.git for-next
config: hexagon-randconfig-r045-20211216 (https://download.01.org/0day-ci/archive/20211217/202112171739.uSeLyZ1M-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9043c3d65b11b442226015acfbf8167684586cfa)
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/3dd9e64650d0340fd6469ba4f8abc183b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review NeilBrown/Repair-SWAP-over-NFS/20211217-075659
git checkout 3dd9e64650d0340fd6469ba4f8abc183bb2eea15
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> mm/memcontrol.c:5532:9: error: implicit declaration of function 'find_get_incore_page' [-Werror,-Wimplicit-function-declaration]
return find_get_incore_page(vma->vm_file->f_mapping,
^
>> mm/memcontrol.c:5532:9: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct page *' [-Wint-conversion]
return find_get_incore_page(vma->vm_file->f_mapping,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
vim +/find_get_incore_page +5532 mm/memcontrol.c
90254a65833b67 Daisuke Nishimura 2010-05-26 5521
87946a72283be3 Daisuke Nishimura 2010-05-26 5522 static struct page *mc_handle_file_pte(struct vm_area_struct *vma,
48384b0b76f366 Peter Xu 2021-11-05 5523 unsigned long addr, pte_t ptent)
87946a72283be3 Daisuke Nishimura 2010-05-26 5524 {
87946a72283be3 Daisuke Nishimura 2010-05-26 5525 if (!vma->vm_file) /* anonymous vma */
87946a72283be3 Daisuke Nishimura 2010-05-26 5526 return NULL;
1dfab5abcdd404 Johannes Weiner 2015-02-11 5527 if (!(mc.flags & MOVE_FILE))
87946a72283be3 Daisuke Nishimura 2010-05-26 5528 return NULL;
87946a72283be3 Daisuke Nishimura 2010-05-26 5529
87946a72283be3 Daisuke Nishimura 2010-05-26 5530 /* page is moved even if it's not RSS of this task(page-faulted). */
aa3b189551ad8e Hugh Dickins 2011-08-03 5531 /* shmem/tmpfs may report page out on swap: account for that too. */
f5df8635c5a3c9 Matthew Wilcox (Oracle 2020-10-13 @5532) return find_get_incore_page(vma->vm_file->f_mapping,
f5df8635c5a3c9 Matthew Wilcox (Oracle 2020-10-13 5533) linear_page_index(vma, addr));
87946a72283be3 Daisuke Nishimura 2010-05-26 5534 }
87946a72283be3 Daisuke Nishimura 2010-05-26 5535
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[soc:starfive/jh7100 9/16] drivers/reset/reset-starfive-jh7100.c:81:17: error: implicit declaration of function 'readq'; did you mean 'readb'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git starfive/jh7100
head: a43676272a6e0b398781bc5337ca4cc187ba923d
commit: 0be3a1595bf8c7f39153be02c9aae61dd2108576 [9/16] reset: starfive-jh7100: Add StarFive JH7100 reset driver
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20211217/202112170604.7G6suhnh-lk...)
compiler: arceb-elf-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/soc/soc.git/commit/?id=0b...
git remote add soc https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git
git fetch --no-tags soc starfive/jh7100
git checkout 0be3a1595bf8c7f39153be02c9aae61dd2108576
# 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=arc SHELL=/bin/bash
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/reset/reset-starfive-jh7100.c: In function 'jh7100_reset_update':
>> drivers/reset/reset-starfive-jh7100.c:81:17: error: implicit declaration of function 'readq'; did you mean 'readb'? [-Werror=implicit-function-declaration]
81 | value = readq(reg_assert);
| ^~~~~
| readb
>> drivers/reset/reset-starfive-jh7100.c:86:9: error: implicit declaration of function 'writeq'; did you mean 'writeb'? [-Werror=implicit-function-declaration]
86 | writeq(value, reg_assert);
| ^~~~~~
| writeb
cc1: some warnings being treated as errors
vim +81 drivers/reset/reset-starfive-jh7100.c
62
63 static int jh7100_reset_update(struct reset_controller_dev *rcdev,
64 unsigned long id, bool assert)
65 {
66 struct jh7100_reset *data = jh7100_reset_from(rcdev);
67 unsigned long offset = BIT_ULL_WORD(id);
68 u64 mask = BIT_ULL_MASK(id);
69 void __iomem *reg_assert = data->base + JH7100_RESET_ASSERT0 + offset * sizeof(u64);
70 void __iomem *reg_status = data->base + JH7100_RESET_STATUS0 + offset * sizeof(u64);
71 u64 done = jh7100_reset_asserted[offset] & mask;
72 u64 value;
73 unsigned long flags;
74 int ret;
75
76 if (!assert)
77 done ^= mask;
78
79 spin_lock_irqsave(&data->lock, flags);
80
> 81 value = readq(reg_assert);
82 if (assert)
83 value |= mask;
84 else
85 value &= ~mask;
> 86 writeq(value, reg_assert);
87
88 /* if the associated clock is gated, deasserting might otherwise hang forever */
89 ret = readq_poll_timeout_atomic(reg_status, value, (value & mask) == done, 0, 1000);
90
91 spin_unlock_irqrestore(&data->lock, flags);
92 return ret;
93 }
94
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[pinchartl-media:gmsl/max9286/bindings 44/45] drivers/media/v4l2-core/v4l2-subdev.c:1595:29: error: no member named 'entity' in 'struct v4l2_subdev'
by kernel test robot
tree: git://linuxtv.org/pinchartl/media.git gmsl/max9286/bindings
head: b551a93fb443867f1a950d6063910639bd303daf
commit: 1bf95761342cbb5585b976194300d58bc6f30000 [44/45] media: subdev: Extend routing validation helper
config: x86_64-randconfig-r015-20211216 (https://download.01.org/0day-ci/archive/20211217/202112171701.AthgRmzn-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9043c3d65b11b442226015acfbf8167684586cfa)
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
git remote add pinchartl-media git://linuxtv.org/pinchartl/media.git
git fetch --no-tags pinchartl-media gmsl/max9286/bindings
git checkout 1bf95761342cbb5585b976194300d58bc6f30000
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/media/v4l2-core/
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/media/v4l2-core/v4l2-subdev.c:1409:10: error: implicit declaration of function '__v4l2_subdev_state_alloc' [-Werror,-Wimplicit-function-declaration]
state = __v4l2_subdev_state_alloc(sd, name, key);
^
drivers/media/v4l2-core/v4l2-subdev.c:1409:8: warning: incompatible integer to pointer conversion assigning to 'struct v4l2_subdev_state *' from 'int' [-Wint-conversion]
state = __v4l2_subdev_state_alloc(sd, name, key);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/v4l2-core/v4l2-subdev.c:1421:2: error: implicit declaration of function '__v4l2_subdev_state_free' [-Werror,-Wimplicit-function-declaration]
__v4l2_subdev_state_free(sd->active_state);
^
>> drivers/media/v4l2-core/v4l2-subdev.c:1595:29: error: no member named 'entity' in 'struct v4l2_subdev'
remote_pads = kcalloc(sd->entity.num_pads, sizeof(*remote_pads),
~~ ^
drivers/media/v4l2-core/v4l2-subdev.c:1600:23: error: no member named 'entity' in 'struct v4l2_subdev'
for (i = 0; i < sd->entity.num_pads; ++i)
~~ ^
drivers/media/v4l2-core/v4l2-subdev.c:1608:30: error: no member named 'entity' in 'struct v4l2_subdev'
if (route->sink_pad >= sd->entity.num_pads ||
~~ ^
drivers/media/v4l2-core/v4l2-subdev.c:1609:13: error: no member named 'entity' in 'struct v4l2_subdev'
!(sd->entity.pads[route->sink_pad].flags & MEDIA_PAD_FL_SINK)) {
~~ ^
drivers/media/v4l2-core/v4l2-subdev.c:1615:32: error: no member named 'entity' in 'struct v4l2_subdev'
if (route->source_pad >= sd->entity.num_pads ||
~~ ^
drivers/media/v4l2-core/v4l2-subdev.c:1616:13: error: no member named 'entity' in 'struct v4l2_subdev'
!(sd->entity.pads[route->source_pad].flags & MEDIA_PAD_FL_SOURCE)) {
~~ ^
1 warning and 8 errors generated.
vim +1595 drivers/media/v4l2-core/v4l2-subdev.c
1585
1586 int v4l2_subdev_routing_validate(struct v4l2_subdev *sd,
1587 const struct v4l2_subdev_krouting *routing,
1588 enum v4l2_subdev_routing_restriction disallow)
1589 {
1590 u32 *remote_pads = NULL;
1591 unsigned int i, j;
1592 int ret = -EINVAL;
1593
1594 if (disallow & V4L2_SUBDEV_ROUTING_NO_STREAM_MIX) {
> 1595 remote_pads = kcalloc(sd->entity.num_pads, sizeof(*remote_pads),
1596 GFP_KERNEL);
1597 if (!remote_pads)
1598 return -ENOMEM;
1599
1600 for (i = 0; i < sd->entity.num_pads; ++i)
1601 remote_pads[i] = U32_MAX;
1602 }
1603
1604 for (i = 0; i < routing->num_routes; ++i) {
1605 const struct v4l2_subdev_route *route = &routing->routes[i];
1606
1607 /* Validate the sink and source pad numbers. */
1608 if (route->sink_pad >= sd->entity.num_pads ||
1609 !(sd->entity.pads[route->sink_pad].flags & MEDIA_PAD_FL_SINK)) {
1610 dev_dbg(sd->dev, "route %u sink (%u) is not a sink pad\n",
1611 i, route->sink_pad);
1612 goto out;
1613 }
1614
1615 if (route->source_pad >= sd->entity.num_pads ||
1616 !(sd->entity.pads[route->source_pad].flags & MEDIA_PAD_FL_SOURCE)) {
1617 dev_dbg(sd->dev, "route %u source (%u) is not a source pad\n",
1618 i, route->source_pad);
1619 goto out;
1620 }
1621
1622 /*
1623 * V4L2_SUBDEV_ROUTING_NO_STREAM_MIX: Streams on the same pad
1624 * may not be routed to streams on different pads.
1625 */
1626 if (disallow & V4L2_SUBDEV_ROUTING_NO_STREAM_MIX) {
1627 if (remote_pads[route->sink_pad] != U32_MAX &&
1628 remote_pads[route->sink_pad] != route->source_pad) {
1629 dev_dbg(sd->dev,
1630 "route %u attempts to mix %s streams\n",
1631 i, "sink");
1632 goto out;
1633 }
1634
1635 if (remote_pads[route->source_pad] != U32_MAX &&
1636 remote_pads[route->source_pad] != route->sink_pad) {
1637 dev_dbg(sd->dev,
1638 "route %u attempts to mix %s streams\n",
1639 i, "source");
1640 goto out;
1641 }
1642
1643 remote_pads[route->sink_pad] = route->source_pad;
1644 remote_pads[route->source_pad] = route->sink_pad;
1645 }
1646
1647 for (j = i + 1; j < routing->num_routes; ++j) {
1648 const struct v4l2_subdev_route *r = &routing->routes[j];
1649
1650 /*
1651 * V4L2_SUBDEV_ROUTING_NO_1_TO_N: No two routes can
1652 * originate from the same (sink) stream.
1653 */
1654 if ((disallow & V4L2_SUBDEV_ROUTING_NO_1_TO_N) &&
1655 route->sink_pad == r->sink_pad &&
1656 route->sink_stream == r->sink_stream) {
1657 dev_dbg(sd->dev,
1658 "routes %u and %u originate from same sink (%u/%u)\n",
1659 i, j, route->sink_pad,
1660 route->sink_stream);
1661 goto out;
1662 }
1663
1664 /*
1665 * V4L2_SUBDEV_ROUTING_NO_N_TO_1: No two routes can end
1666 * at the same (source) stream.
1667 */
1668 if ((disallow & V4L2_SUBDEV_ROUTING_NO_N_TO_1) &&
1669 route->source_pad == r->source_pad &&
1670 route->source_stream == r->source_stream) {
1671 dev_dbg(sd->dev,
1672 "routes %u and %u end at same source (%u/%u)\n",
1673 i, j, route->source_pad,
1674 route->source_stream);
1675 goto out;
1676 }
1677 }
1678 }
1679
1680 ret = 0;
1681
1682 out:
1683 kfree(remote_pads);
1684 return ret;
1685 }
1686 EXPORT_SYMBOL_GPL(v4l2_subdev_routing_validate);
1687
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[intel-tdx:kvm-upstream 126/152] arch/x86/kvm/vmx/tdx_stubs.c:13:6: warning: no previous prototype for function 'tdx_inject_nmi'
by kernel test robot
tree: https://github.com/intel/tdx.git kvm-upstream
head: bdfe06c17daab60c196ff80c1d98467a1d3734fa
commit: e5add375b2478be4f63bfc75497bfaae0d514fa0 [126/152] KVM: TDX: Implement methods to inject NMI
config: x86_64-randconfig-a013-20211216 (https://download.01.org/0day-ci/archive/20211217/202112171611.EkYfPiKg-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dd245bab9fbb364faa1581e4f92ba3119a872fba)
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/tdx/commit/e5add375b2478be4f63bfc75497bfaae0d514fa0
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx kvm-upstream
git checkout e5add375b2478be4f63bfc75497bfaae0d514fa0
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kvm/
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 >>):
arch/x86/kvm/vmx/tdx_stubs.c:4:13: warning: no previous prototype for function 'tdx_pre_kvm_init' [-Wmissing-prototypes]
void __init tdx_pre_kvm_init(unsigned int *vcpu_size,
^
arch/x86/kvm/vmx/tdx_stubs.c:4:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init tdx_pre_kvm_init(unsigned int *vcpu_size,
^
static
arch/x86/kvm/vmx/tdx_stubs.c:6:12: warning: no previous prototype for function 'tdx_hardware_setup' [-Wmissing-prototypes]
int __init tdx_hardware_setup(struct kvm_x86_ops *x86_ops) { return -EOPNOTSUPP; }
^
arch/x86/kvm/vmx/tdx_stubs.c:6:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __init tdx_hardware_setup(struct kvm_x86_ops *x86_ops) { return -EOPNOTSUPP; }
^
static
arch/x86/kvm/vmx/tdx_stubs.c:7:6: warning: no previous prototype for function 'tdx_hardware_enable' [-Wmissing-prototypes]
void tdx_hardware_enable(void) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:7:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_hardware_enable(void) {}
^
static
arch/x86/kvm/vmx/tdx_stubs.c:8:6: warning: no previous prototype for function 'tdx_hardware_disable' [-Wmissing-prototypes]
void tdx_hardware_disable(void) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:8:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_hardware_disable(void) {}
^
static
arch/x86/kvm/vmx/tdx_stubs.c:10:5: warning: no previous prototype for function 'tdx_vcpu_create' [-Wmissing-prototypes]
int tdx_vcpu_create(struct kvm_vcpu *vcpu) { return -EOPNOTSUPP; }
^
arch/x86/kvm/vmx/tdx_stubs.c:10:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tdx_vcpu_create(struct kvm_vcpu *vcpu) { return -EOPNOTSUPP; }
^
static
arch/x86/kvm/vmx/tdx_stubs.c:11:6: warning: no previous prototype for function 'tdx_vcpu_free' [-Wmissing-prototypes]
void tdx_vcpu_free(struct kvm_vcpu *vcpu) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:11:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_vcpu_free(struct kvm_vcpu *vcpu) {}
^
static
arch/x86/kvm/vmx/tdx_stubs.c:12:6: warning: no previous prototype for function 'tdx_vcpu_reset' [-Wmissing-prototypes]
void tdx_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:12:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event) {}
^
static
>> arch/x86/kvm/vmx/tdx_stubs.c:13:6: warning: no previous prototype for function 'tdx_inject_nmi' [-Wmissing-prototypes]
void tdx_inject_nmi(struct kvm_vcpu *vcpu) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:13:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_inject_nmi(struct kvm_vcpu *vcpu) {}
^
static
arch/x86/kvm/vmx/tdx_stubs.c:14:12: warning: no previous prototype for function 'tdx_vcpu_run' [-Wmissing-prototypes]
fastpath_t tdx_vcpu_run(struct kvm_vcpu *vcpu) { return EXIT_FASTPATH_NONE; }
^
arch/x86/kvm/vmx/tdx_stubs.c:14:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
fastpath_t tdx_vcpu_run(struct kvm_vcpu *vcpu) { return EXIT_FASTPATH_NONE; }
^
static
arch/x86/kvm/vmx/tdx_stubs.c:15:6: warning: no previous prototype for function 'tdx_vcpu_load' [-Wmissing-prototypes]
void tdx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:15:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) {}
^
static
arch/x86/kvm/vmx/tdx_stubs.c:16:6: warning: no previous prototype for function 'tdx_vcpu_put' [-Wmissing-prototypes]
void tdx_vcpu_put(struct kvm_vcpu *vcpu) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:16:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_vcpu_put(struct kvm_vcpu *vcpu) {}
^
static
arch/x86/kvm/vmx/tdx_stubs.c:17:6: warning: no previous prototype for function 'tdx_prepare_switch_to_guest' [-Wmissing-prototypes]
void tdx_prepare_switch_to_guest(struct kvm_vcpu *vcpu) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:17:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_prepare_switch_to_guest(struct kvm_vcpu *vcpu) {}
^
static
arch/x86/kvm/vmx/tdx_stubs.c:18:6: warning: no previous prototype for function 'tdx_handle_exit_irqoff' [-Wmissing-prototypes]
void tdx_handle_exit_irqoff(struct kvm_vcpu *vcpu) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:18:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_handle_exit_irqoff(struct kvm_vcpu *vcpu) {}
^
static
arch/x86/kvm/vmx/tdx_stubs.c:19:5: warning: no previous prototype for function 'tdx_handle_exit' [-Wmissing-prototypes]
int tdx_handle_exit(struct kvm_vcpu *vcpu,
^
arch/x86/kvm/vmx/tdx_stubs.c:19:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tdx_handle_exit(struct kvm_vcpu *vcpu,
^
static
arch/x86/kvm/vmx/tdx_stubs.c:21:6: warning: no previous prototype for function 'tdx_is_emulated_msr' [-Wmissing-prototypes]
bool tdx_is_emulated_msr(u32 index, bool write) { return false; }
^
arch/x86/kvm/vmx/tdx_stubs.c:21:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool tdx_is_emulated_msr(u32 index, bool write) { return false; }
^
static
arch/x86/kvm/vmx/tdx_stubs.c:22:5: warning: no previous prototype for function 'tdx_get_msr' [-Wmissing-prototypes]
int tdx_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr) { return 1; }
^
arch/x86/kvm/vmx/tdx_stubs.c:22:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tdx_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr) { return 1; }
^
static
arch/x86/kvm/vmx/tdx_stubs.c:23:5: warning: no previous prototype for function 'tdx_set_msr' [-Wmissing-prototypes]
int tdx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr) { return 1; }
^
arch/x86/kvm/vmx/tdx_stubs.c:23:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tdx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr) { return 1; }
^
static
arch/x86/kvm/vmx/tdx_stubs.c:25:6: warning: no previous prototype for function 'tdx_apicv_post_state_restore' [-Wmissing-prototypes]
void tdx_apicv_post_state_restore(struct kvm_vcpu *vcpu) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:25:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_apicv_post_state_restore(struct kvm_vcpu *vcpu) {}
^
static
arch/x86/kvm/vmx/tdx_stubs.c:26:5: warning: no previous prototype for function 'tdx_deliver_posted_interrupt' [-Wmissing-prototypes]
int tdx_deliver_posted_interrupt(struct kvm_vcpu *vcpu, int vector) { return 0; }
^
arch/x86/kvm/vmx/tdx_stubs.c:26:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tdx_deliver_posted_interrupt(struct kvm_vcpu *vcpu, int vector) { return 0; }
^
static
arch/x86/kvm/vmx/tdx_stubs.c:27:6: warning: no previous prototype for function 'tdx_get_exit_info' [-Wmissing-prototypes]
void tdx_get_exit_info(struct kvm_vcpu *vcpu, u32 *reason,
^
arch/x86/kvm/vmx/tdx_stubs.c:27:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_get_exit_info(struct kvm_vcpu *vcpu, u32 *reason,
^
static
arch/x86/kvm/vmx/tdx_stubs.c:30:5: warning: no previous prototype for function 'tdx_dev_ioctl' [-Wmissing-prototypes]
int tdx_dev_ioctl(void __user *argp) { return -EOPNOTSUPP; }
^
arch/x86/kvm/vmx/tdx_stubs.c:30:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tdx_dev_ioctl(void __user *argp) { return -EOPNOTSUPP; }
^
static
arch/x86/kvm/vmx/tdx_stubs.c:31:5: warning: no previous prototype for function 'tdx_vm_ioctl' [-Wmissing-prototypes]
int tdx_vm_ioctl(struct kvm *kvm, void __user *argp) { return -EOPNOTSUPP; }
^
vim +/tdx_inject_nmi +13 arch/x86/kvm/vmx/tdx_stubs.c
9
10 int tdx_vcpu_create(struct kvm_vcpu *vcpu) { return -EOPNOTSUPP; }
11 void tdx_vcpu_free(struct kvm_vcpu *vcpu) {}
12 void tdx_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event) {}
> 13 void tdx_inject_nmi(struct kvm_vcpu *vcpu) {}
14 fastpath_t tdx_vcpu_run(struct kvm_vcpu *vcpu) { return EXIT_FASTPATH_NONE; }
15 void tdx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) {}
16 void tdx_vcpu_put(struct kvm_vcpu *vcpu) {}
17 void tdx_prepare_switch_to_guest(struct kvm_vcpu *vcpu) {}
18 void tdx_handle_exit_irqoff(struct kvm_vcpu *vcpu) {}
19 int tdx_handle_exit(struct kvm_vcpu *vcpu,
20 enum exit_fastpath_completion fastpath) { return 0; }
21 bool tdx_is_emulated_msr(u32 index, bool write) { return false; }
22 int tdx_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr) { return 1; }
23 int tdx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr) { return 1; }
24
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH 05/18] MM: reclaim mustn't enter FS for SWP_FS_OPS swap-space
by kernel test robot
Hi NeilBrown,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on cifs/for-next]
[also build test ERROR on axboe-block/for-next rostedt-trace/for-next linus/master v5.16-rc5]
[cannot apply to trondmy-nfs/linux-next hnaz-mm/master mszeredi-vfs/overlayfs-next next-20211216]
[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/NeilBrown/Repair-SWAP-over-NFS/2...
base: git://git.samba.org/sfrench/cifs-2.6.git for-next
config: arm-randconfig-r006-20211216 (https://download.01.org/0day-ci/archive/20211217/202112171635.JUIRMzHQ-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9043c3d65b11b442226015acfbf8167684586cfa)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/a8e1b1ffec6ade1545df519d254eae040...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review NeilBrown/Repair-SWAP-over-NFS/20211217-075659
git checkout a8e1b1ffec6ade1545df519d254eae0400b7ec37
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash
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/vmscan.c:1480:20: error: implicit declaration of function 'page_swap_info' [-Werror,-Wimplicit-function-declaration]
return !data_race(page_swap_info(page)->flags & SWP_FS_OPS);
^
mm/vmscan.c:1480:20: note: did you mean 'swp_swap_info'?
include/linux/swap.h:487:40: note: 'swp_swap_info' declared here
static inline struct swap_info_struct *swp_swap_info(swp_entry_t entry)
^
>> mm/vmscan.c:1480:42: error: member reference type 'int' is not a pointer
return !data_race(page_swap_info(page)->flags & SWP_FS_OPS);
~~~~~~~~~~~~~~~~~~~~ ^
include/linux/compiler.h:216:28: note: expanded from macro 'data_race'
__unqual_scalar_typeof(({ expr; })) __v = ({ \
^~~~
include/linux/compiler_types.h:291:13: note: expanded from macro '__unqual_scalar_typeof'
_Generic((x), \
^
>> mm/vmscan.c:1480:20: error: implicit declaration of function 'page_swap_info' [-Werror,-Wimplicit-function-declaration]
return !data_race(page_swap_info(page)->flags & SWP_FS_OPS);
^
>> mm/vmscan.c:1480:42: error: member reference type 'int' is not a pointer
return !data_race(page_swap_info(page)->flags & SWP_FS_OPS);
~~~~~~~~~~~~~~~~~~~~ ^
include/linux/compiler.h:216:28: note: expanded from macro 'data_race'
__unqual_scalar_typeof(({ expr; })) __v = ({ \
^~~~
include/linux/compiler_types.h:298:15: note: expanded from macro '__unqual_scalar_typeof'
default: (x)))
^
>> mm/vmscan.c:1480:20: error: implicit declaration of function 'page_swap_info' [-Werror,-Wimplicit-function-declaration]
return !data_race(page_swap_info(page)->flags & SWP_FS_OPS);
^
>> mm/vmscan.c:1480:42: error: member reference type 'int' is not a pointer
return !data_race(page_swap_info(page)->flags & SWP_FS_OPS);
~~~~~~~~~~~~~~~~~~~~ ^
include/linux/compiler.h:218:3: note: expanded from macro 'data_race'
expr; \
^~~~
>> mm/vmscan.c:1480:9: error: invalid argument type 'void' to unary expression
return !data_race(page_swap_info(page)->flags & SWP_FS_OPS);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 errors generated.
vim +/page_swap_info +1480 mm/vmscan.c
1467
1468 static bool test_may_enter_fs(struct page *page, gfp_t gfp_mask)
1469 {
1470 if (gfp_mask & __GFP_FS)
1471 return true;
1472 if (!PageSwapCache(page) || !(gfp_mask & __GFP_IO))
1473 return false;
1474 /* We can "enter_fs" for swap-cache with only __GFP_IO
1475 * providing this isn't SWP_FS_OPS.
1476 * ->flags can be updated non-atomicially (scan_swap_map_slots),
1477 * but that will never affect SWP_FS_OPS, so the data_race
1478 * is safe.
1479 */
> 1480 return !data_race(page_swap_info(page)->flags & SWP_FS_OPS);
1481 }
1482
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[PATCH] Fix slab-out-of-bounds in r_page
by Yin Xiujiang
When PAGE_SIZE is 64K, if read_log_page is called by log_read_rst for
the first time, the size of *buffer would be equal to
DefaultLogPageSize(4K).But for *buffer operations like memcpy,
if the memory area size(n) which being assigned to buffer is larger
than 4K (log->page_size(64K) or bytes(64K-page_off)), it will cause
an out of boundary error.
Call trace:
[...]
kasan_report+0x44/0x130
check_memory_region+0xf8/0x1a0
memcpy+0xc8/0x100
ntfs_read_run_nb+0x20c/0x460
read_log_page+0xd0/0x1f4
log_read_rst+0x110/0x75c
log_replay+0x1e8/0x4aa0
ntfs_loadlog_and_replay+0x290/0x2d0
ntfs_fill_super+0x508/0xec0
get_tree_bdev+0x1fc/0x34c
[...]
Fix this by setting variable r_page to NULL in log_read_rst.
Signed-off-by: Yin Xiujiang <yinxiujiang(a)kylinos.cn>
---
fs/ntfs3/fslog.c | 24 +-----------------------
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/fs/ntfs3/fslog.c b/fs/ntfs3/fslog.c
index 06492f088d60..4fdb5bdfc2ee 100644
--- a/fs/ntfs3/fslog.c
+++ b/fs/ntfs3/fslog.c
@@ -1180,10 +1180,7 @@ static int log_read_rst(struct ntfs_log *log, u32 l_size, bool first,
struct restart_info *info)
{
u32 skip, vbo;
- struct RESTART_HDR *r_page = kmalloc(DefaultLogPageSize, GFP_NOFS);
-
- if (!r_page)
- return -ENOMEM;
+ struct RESTART_HDR *r_page = NULL;
memset(info, 0, sizeof(struct restart_info));
@@ -1199,7 +1196,6 @@ static int log_read_rst(struct ntfs_log *log, u32 l_size, bool first,
/* Loop continuously until we succeed. */
for (; vbo < l_size; vbo = 2 * vbo + skip, skip = 0) {
bool usa_error;
- u32 sys_page_size;
bool brst, bchk;
struct RESTART_AREA *ra;
@@ -1253,24 +1249,6 @@ static int log_read_rst(struct ntfs_log *log, u32 l_size, bool first,
goto check_result;
}
- /* Read the entire restart area. */
- sys_page_size = le32_to_cpu(r_page->sys_page_size);
- if (DefaultLogPageSize != sys_page_size) {
- kfree(r_page);
- r_page = kzalloc(sys_page_size, GFP_NOFS);
- if (!r_page)
- return -ENOMEM;
-
- if (read_log_page(log, vbo,
- (struct RECORD_PAGE_HDR **)&r_page,
- &usa_error)) {
- /* Ignore any errors. */
- kfree(r_page);
- r_page = NULL;
- continue;
- }
- }
-
if (is_client_area_valid(r_page, usa_error)) {
info->valid_page = true;
ra = Add2Ptr(r_page, le16_to_cpu(r_page->ra_off));
--
2.30.0
9 months, 1 week
[pinchartl-media:gmsl/max9286/bindings 44/45] drivers/media/v4l2-core/v4l2-subdev.c:1595:41: error: 'struct v4l2_subdev' has no member named 'entity'
by kernel test robot
tree: git://linuxtv.org/pinchartl/media.git gmsl/max9286/bindings
head: b551a93fb443867f1a950d6063910639bd303daf
commit: 1bf95761342cbb5585b976194300d58bc6f30000 [44/45] media: subdev: Extend routing validation helper
config: sparc64-randconfig-r014-20211216 (https://download.01.org/0day-ci/archive/20211217/202112171621.k6d6CR2S-lk...)
compiler: sparc64-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
git remote add pinchartl-media git://linuxtv.org/pinchartl/media.git
git fetch --no-tags pinchartl-media gmsl/max9286/bindings
git checkout 1bf95761342cbb5585b976194300d58bc6f30000
# 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=sparc64 SHELL=/bin/bash drivers/media/v4l2-core/
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/media/v4l2-core/v4l2-subdev.c: In function '__v4l2_subdev_init_finalize':
drivers/media/v4l2-core/v4l2-subdev.c:1409:17: error: implicit declaration of function '__v4l2_subdev_state_alloc' [-Werror=implicit-function-declaration]
1409 | state = __v4l2_subdev_state_alloc(sd, name, key);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/v4l2-core/v4l2-subdev.c:1409:15: warning: assignment to 'struct v4l2_subdev_state *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
1409 | state = __v4l2_subdev_state_alloc(sd, name, key);
| ^
drivers/media/v4l2-core/v4l2-subdev.c: In function 'v4l2_subdev_cleanup':
drivers/media/v4l2-core/v4l2-subdev.c:1421:9: error: implicit declaration of function '__v4l2_subdev_state_free' [-Werror=implicit-function-declaration]
1421 | __v4l2_subdev_state_free(sd->active_state);
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/v4l2-core/v4l2-subdev.c: In function 'v4l2_subdev_routing_validate':
>> drivers/media/v4l2-core/v4l2-subdev.c:1595:41: error: 'struct v4l2_subdev' has no member named 'entity'
1595 | remote_pads = kcalloc(sd->entity.num_pads, sizeof(*remote_pads),
| ^~
drivers/media/v4l2-core/v4l2-subdev.c:1600:35: error: 'struct v4l2_subdev' has no member named 'entity'
1600 | for (i = 0; i < sd->entity.num_pads; ++i)
| ^~
drivers/media/v4l2-core/v4l2-subdev.c:1608:42: error: 'struct v4l2_subdev' has no member named 'entity'
1608 | if (route->sink_pad >= sd->entity.num_pads ||
| ^~
drivers/media/v4l2-core/v4l2-subdev.c:1609:25: error: 'struct v4l2_subdev' has no member named 'entity'
1609 | !(sd->entity.pads[route->sink_pad].flags & MEDIA_PAD_FL_SINK)) {
| ^~
drivers/media/v4l2-core/v4l2-subdev.c:1615:44: error: 'struct v4l2_subdev' has no member named 'entity'
1615 | if (route->source_pad >= sd->entity.num_pads ||
| ^~
drivers/media/v4l2-core/v4l2-subdev.c:1616:25: error: 'struct v4l2_subdev' has no member named 'entity'
1616 | !(sd->entity.pads[route->source_pad].flags & MEDIA_PAD_FL_SOURCE)) {
| ^~
cc1: some warnings being treated as errors
vim +1595 drivers/media/v4l2-core/v4l2-subdev.c
1585
1586 int v4l2_subdev_routing_validate(struct v4l2_subdev *sd,
1587 const struct v4l2_subdev_krouting *routing,
1588 enum v4l2_subdev_routing_restriction disallow)
1589 {
1590 u32 *remote_pads = NULL;
1591 unsigned int i, j;
1592 int ret = -EINVAL;
1593
1594 if (disallow & V4L2_SUBDEV_ROUTING_NO_STREAM_MIX) {
> 1595 remote_pads = kcalloc(sd->entity.num_pads, sizeof(*remote_pads),
1596 GFP_KERNEL);
1597 if (!remote_pads)
1598 return -ENOMEM;
1599
1600 for (i = 0; i < sd->entity.num_pads; ++i)
1601 remote_pads[i] = U32_MAX;
1602 }
1603
1604 for (i = 0; i < routing->num_routes; ++i) {
1605 const struct v4l2_subdev_route *route = &routing->routes[i];
1606
1607 /* Validate the sink and source pad numbers. */
1608 if (route->sink_pad >= sd->entity.num_pads ||
1609 !(sd->entity.pads[route->sink_pad].flags & MEDIA_PAD_FL_SINK)) {
1610 dev_dbg(sd->dev, "route %u sink (%u) is not a sink pad\n",
1611 i, route->sink_pad);
1612 goto out;
1613 }
1614
1615 if (route->source_pad >= sd->entity.num_pads ||
1616 !(sd->entity.pads[route->source_pad].flags & MEDIA_PAD_FL_SOURCE)) {
1617 dev_dbg(sd->dev, "route %u source (%u) is not a source pad\n",
1618 i, route->source_pad);
1619 goto out;
1620 }
1621
1622 /*
1623 * V4L2_SUBDEV_ROUTING_NO_STREAM_MIX: Streams on the same pad
1624 * may not be routed to streams on different pads.
1625 */
1626 if (disallow & V4L2_SUBDEV_ROUTING_NO_STREAM_MIX) {
1627 if (remote_pads[route->sink_pad] != U32_MAX &&
1628 remote_pads[route->sink_pad] != route->source_pad) {
1629 dev_dbg(sd->dev,
1630 "route %u attempts to mix %s streams\n",
1631 i, "sink");
1632 goto out;
1633 }
1634
1635 if (remote_pads[route->source_pad] != U32_MAX &&
1636 remote_pads[route->source_pad] != route->sink_pad) {
1637 dev_dbg(sd->dev,
1638 "route %u attempts to mix %s streams\n",
1639 i, "source");
1640 goto out;
1641 }
1642
1643 remote_pads[route->sink_pad] = route->source_pad;
1644 remote_pads[route->source_pad] = route->sink_pad;
1645 }
1646
1647 for (j = i + 1; j < routing->num_routes; ++j) {
1648 const struct v4l2_subdev_route *r = &routing->routes[j];
1649
1650 /*
1651 * V4L2_SUBDEV_ROUTING_NO_1_TO_N: No two routes can
1652 * originate from the same (sink) stream.
1653 */
1654 if ((disallow & V4L2_SUBDEV_ROUTING_NO_1_TO_N) &&
1655 route->sink_pad == r->sink_pad &&
1656 route->sink_stream == r->sink_stream) {
1657 dev_dbg(sd->dev,
1658 "routes %u and %u originate from same sink (%u/%u)\n",
1659 i, j, route->sink_pad,
1660 route->sink_stream);
1661 goto out;
1662 }
1663
1664 /*
1665 * V4L2_SUBDEV_ROUTING_NO_N_TO_1: No two routes can end
1666 * at the same (source) stream.
1667 */
1668 if ((disallow & V4L2_SUBDEV_ROUTING_NO_N_TO_1) &&
1669 route->source_pad == r->source_pad &&
1670 route->source_stream == r->source_stream) {
1671 dev_dbg(sd->dev,
1672 "routes %u and %u end at same source (%u/%u)\n",
1673 i, j, route->source_pad,
1674 route->source_stream);
1675 goto out;
1676 }
1677 }
1678 }
1679
1680 ret = 0;
1681
1682 out:
1683 kfree(remote_pads);
1684 return ret;
1685 }
1686 EXPORT_SYMBOL_GPL(v4l2_subdev_routing_validate);
1687
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[pinchartl-media:gmsl/max9286/bindings 2/45] drivers/media/v4l2-core/v4l2-subdev.c:951:10: error: implicit declaration of function '__v4l2_subdev_state_alloc'
by kernel test robot
tree: git://linuxtv.org/pinchartl/media.git gmsl/max9286/bindings
head: b551a93fb443867f1a950d6063910639bd303daf
commit: 3e5486c9f448f3d9067b1050ed189db7d062fdf4 [2/45] media: subdev: add active state to struct v4l2_subdev
config: x86_64-randconfig-r015-20211216 (https://download.01.org/0day-ci/archive/20211217/202112171557.AF8ndfET-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9043c3d65b11b442226015acfbf8167684586cfa)
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
git remote add pinchartl-media git://linuxtv.org/pinchartl/media.git
git fetch --no-tags pinchartl-media gmsl/max9286/bindings
git checkout 3e5486c9f448f3d9067b1050ed189db7d062fdf4
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/media/v4l2-core/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/media/v4l2-core/v4l2-subdev.c:951:10: error: implicit declaration of function '__v4l2_subdev_state_alloc' [-Werror,-Wimplicit-function-declaration]
state = __v4l2_subdev_state_alloc(sd);
^
>> drivers/media/v4l2-core/v4l2-subdev.c:951:8: warning: incompatible integer to pointer conversion assigning to 'struct v4l2_subdev_state *' from 'int' [-Wint-conversion]
state = __v4l2_subdev_state_alloc(sd);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/v4l2-core/v4l2-subdev.c:963:2: error: implicit declaration of function '__v4l2_subdev_state_free' [-Werror,-Wimplicit-function-declaration]
__v4l2_subdev_state_free(sd->active_state);
^
1 warning and 2 errors generated.
vim +/__v4l2_subdev_state_alloc +951 drivers/media/v4l2-core/v4l2-subdev.c
946
947 int v4l2_subdev_init_finalize(struct v4l2_subdev *sd)
948 {
949 struct v4l2_subdev_state *state;
950
> 951 state = __v4l2_subdev_state_alloc(sd);
952 if (IS_ERR(state))
953 return PTR_ERR(state);
954
955 sd->active_state = state;
956
957 return 0;
958 }
959 EXPORT_SYMBOL_GPL(v4l2_subdev_init_finalize);
960
961 void v4l2_subdev_cleanup(struct v4l2_subdev *sd)
962 {
> 963 __v4l2_subdev_state_free(sd->active_state);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[xilinx-xlnx:xlnx_rebase_v5.4 1721/1768] drivers/pinctrl/core.c:1273 pinctrl_commit_state() error: uninitialized symbol 'ret'.
by Dan Carpenter
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: abafefebd1f1e040eef74e4ab571ea08bf745641
commit: c82e9765704a437b642de708cdf3c06535e07a89 [1721/1768] pinctrl: core: Handling pinmux and pinconf separately
config: x86_64-randconfig-m001-20211214 (https://download.01.org/0day-ci/archive/20211216/202112161957.08UfDn9B-lk...)
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>
New smatch warnings:
drivers/pinctrl/core.c:1273 pinctrl_commit_state() error: uninitialized symbol 'ret'.
Old smatch warnings:
drivers/pinctrl/core.c:1295 pinctrl_commit_state() error: uninitialized symbol 'ret'.
vim +/ret +1273 drivers/pinctrl/core.c
981ed1bfbc6c466 Florian Fainelli 2017-03-01 1237 static int pinctrl_commit_state(struct pinctrl *p, struct pinctrl_state *state)
befe5bdfbb698b3 Linus Walleij 2012-02-09 1238 {
6e5e959dde0d92d Stephen Warren 2012-03-02 1239 struct pinctrl_setting *setting, *setting2;
50cf7c8ab324de3 Richard Genoud 2013-03-25 1240 struct pinctrl_state *old_state = p->state;
6e5e959dde0d92d Stephen Warren 2012-03-02 1241 int ret;
7ecdb16fe63e5b3 Stephen Warren 2012-03-02 1242
6e5e959dde0d92d Stephen Warren 2012-03-02 1243 if (p->state) {
6e5e959dde0d92d Stephen Warren 2012-03-02 1244 /*
2243a87d90b42eb Fan Wu 2014-06-09 1245 * For each pinmux setting in the old state, forget SW's record
2243a87d90b42eb Fan Wu 2014-06-09 1246 * of mux owner for that pingroup. Any pingroups which are
2243a87d90b42eb Fan Wu 2014-06-09 1247 * still owned by the new state will be re-acquired by the call
2243a87d90b42eb Fan Wu 2014-06-09 1248 * to pinmux_enable_setting() in the loop below.
6e5e959dde0d92d Stephen Warren 2012-03-02 1249 */
6e5e959dde0d92d Stephen Warren 2012-03-02 1250 list_for_each_entry(setting, &p->state->settings, node) {
1e2082b52072173 Stephen Warren 2012-03-02 1251 if (setting->type != PIN_MAP_TYPE_MUX_GROUP)
1e2082b52072173 Stephen Warren 2012-03-02 1252 continue;
7ecdb16fe63e5b3 Stephen Warren 2012-03-02 1253 pinmux_disable_setting(setting);
befe5bdfbb698b3 Linus Walleij 2012-02-09 1254 }
57b676f9c1b7cd8 Stephen Warren 2012-03-02 1255 }
57b676f9c1b7cd8 Stephen Warren 2012-03-02 1256
3102a76cfbf9ac4 Richard Genoud 2013-03-25 1257 p->state = NULL;
6e5e959dde0d92d Stephen Warren 2012-03-02 1258
c82e9765704a437 Michal Simek 2021-03-10 1259 /* Apply all the settings for the new state - pinmux first */
6e5e959dde0d92d Stephen Warren 2012-03-02 1260 list_for_each_entry(setting, &state->settings, node) {
1e2082b52072173 Stephen Warren 2012-03-02 1261 switch (setting->type) {
1e2082b52072173 Stephen Warren 2012-03-02 1262 case PIN_MAP_TYPE_MUX_GROUP:
6e5e959dde0d92d Stephen Warren 2012-03-02 1263 ret = pinmux_enable_setting(setting);
1e2082b52072173 Stephen Warren 2012-03-02 1264 break;
1e2082b52072173 Stephen Warren 2012-03-02 1265 case PIN_MAP_TYPE_CONFIGS_PIN:
c82e9765704a437 Michal Simek 2021-03-10 1266 case PIN_MAP_TYPE_CONFIGS_GROUP:
c82e9765704a437 Michal Simek 2021-03-10 1267 break;
ret not set for these cases.
c82e9765704a437 Michal Simek 2021-03-10 1268 default:
c82e9765704a437 Michal Simek 2021-03-10 1269 ret = -EINVAL;
c82e9765704a437 Michal Simek 2021-03-10 1270 break;
c82e9765704a437 Michal Simek 2021-03-10 1271 }
c82e9765704a437 Michal Simek 2021-03-10 1272
c82e9765704a437 Michal Simek 2021-03-10 @1273 if (ret < 0)
c82e9765704a437 Michal Simek 2021-03-10 1274 goto unapply_new_state;
c82e9765704a437 Michal Simek 2021-03-10 1275
c82e9765704a437 Michal Simek 2021-03-10 1276 /* Do not link hogs (circular dependency) */
c82e9765704a437 Michal Simek 2021-03-10 1277 if (p != setting->pctldev->p)
c82e9765704a437 Michal Simek 2021-03-10 1278 pinctrl_link_add(setting->pctldev, p->dev);
c82e9765704a437 Michal Simek 2021-03-10 1279 }
c82e9765704a437 Michal Simek 2021-03-10 1280
c82e9765704a437 Michal Simek 2021-03-10 1281 /* Apply all the settings for the new state - pinconf after */
c82e9765704a437 Michal Simek 2021-03-10 1282 list_for_each_entry(setting, &state->settings, node) {
c82e9765704a437 Michal Simek 2021-03-10 1283 switch (setting->type) {
c82e9765704a437 Michal Simek 2021-03-10 1284 case PIN_MAP_TYPE_MUX_GROUP:
c82e9765704a437 Michal Simek 2021-03-10 1285 break;
Nor here.
c82e9765704a437 Michal Simek 2021-03-10 1286 case PIN_MAP_TYPE_CONFIGS_PIN:
1e2082b52072173 Stephen Warren 2012-03-02 1287 case PIN_MAP_TYPE_CONFIGS_GROUP:
1e2082b52072173 Stephen Warren 2012-03-02 1288 ret = pinconf_apply_setting(setting);
1e2082b52072173 Stephen Warren 2012-03-02 1289 break;
1e2082b52072173 Stephen Warren 2012-03-02 1290 default:
1e2082b52072173 Stephen Warren 2012-03-02 1291 ret = -EINVAL;
1e2082b52072173 Stephen Warren 2012-03-02 1292 break;
1e2082b52072173 Stephen Warren 2012-03-02 1293 }
3102a76cfbf9ac4 Richard Genoud 2013-03-25 1294
42fed7ba44e4e8c Patrice Chotard 2013-04-11 1295 if (ret < 0) {
3102a76cfbf9ac4 Richard Genoud 2013-03-25 1296 goto unapply_new_state;
6e5e959dde0d92d Stephen Warren 2012-03-02 1297 }
036f394dd77f811 Benjamin Gaignard 2019-05-22 1298
b672a87ae5ab070 Linus Walleij 2019-05-24 1299 /* Do not link hogs (circular dependency) */
b672a87ae5ab070 Linus Walleij 2019-05-24 1300 if (p != setting->pctldev->p)
036f394dd77f811 Benjamin Gaignard 2019-05-22 1301 pinctrl_link_add(setting->pctldev, p->dev);
42fed7ba44e4e8c Patrice Chotard 2013-04-11 1302 }
6e5e959dde0d92d Stephen Warren 2012-03-02 1303
3102a76cfbf9ac4 Richard Genoud 2013-03-25 1304 p->state = state;
3102a76cfbf9ac4 Richard Genoud 2013-03-25 1305
6e5e959dde0d92d Stephen Warren 2012-03-02 1306 return 0;
3102a76cfbf9ac4 Richard Genoud 2013-03-25 1307
3102a76cfbf9ac4 Richard Genoud 2013-03-25 1308 unapply_new_state:
da58751ca2490d5 Richard Genoud 2013-03-28 1309 dev_err(p->dev, "Error applying setting, reverse things back\n");
3102a76cfbf9ac4 Richard Genoud 2013-03-25 1310
3102a76cfbf9ac4 Richard Genoud 2013-03-25 1311 list_for_each_entry(setting2, &state->settings, node) {
3102a76cfbf9ac4 Richard Genoud 2013-03-25 1312 if (&setting2->node == &setting->node)
3102a76cfbf9ac4 Richard Genoud 2013-03-25 1313 break;
af6061777131639 Richard Genoud 2013-03-29 1314 /*
af6061777131639 Richard Genoud 2013-03-29 1315 * All we can do here is pinmux_disable_setting.
af6061777131639 Richard Genoud 2013-03-29 1316 * That means that some pins are muxed differently now
af6061777131639 Richard Genoud 2013-03-29 1317 * than they were before applying the setting (We can't
af6061777131639 Richard Genoud 2013-03-29 1318 * "unmux a pin"!), but it's not a big deal since the pins
af6061777131639 Richard Genoud 2013-03-29 1319 * are free to be muxed by another apply_setting.
af6061777131639 Richard Genoud 2013-03-29 1320 */
af6061777131639 Richard Genoud 2013-03-29 1321 if (setting2->type == PIN_MAP_TYPE_MUX_GROUP)
af6061777131639 Richard Genoud 2013-03-29 1322 pinmux_disable_setting(setting2);
3102a76cfbf9ac4 Richard Genoud 2013-03-25 1323 }
8009d5ff00df6ad Richard Genoud 2013-03-28 1324
385d94246b05f7c Richard Genoud 2013-03-29 1325 /* There's no infinite recursive loop here because p->state is NULL */
385d94246b05f7c Richard Genoud 2013-03-29 1326 if (old_state)
42fed7ba44e4e8c Patrice Chotard 2013-04-11 1327 pinctrl_select_state(p, old_state);
6e5e959dde0d92d Stephen Warren 2012-03-02 1328
6e5e959dde0d92d Stephen Warren 2012-03-02 1329 return ret;
befe5bdfbb698b3 Linus Walleij 2012-02-09 1330 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week