Re: [PATCH v3] btrfs: trim: fix underflow in trim length to prevent access beyond device boundary
by kernel test robot
Hi Qu,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on kdave/for-next]
[also build test WARNING on v5.8-rc7 next-20200731]
[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/Qu-Wenruo/btrfs-trim-fix-underfl...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
config: x86_64-randconfig-s022-20200731 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-115-g5fc204f2-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> fs/btrfs/extent-tree.c:5676:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> fs/btrfs/extent-tree.c:5676:25: sparse: struct rcu_string [noderef] __rcu *
>> fs/btrfs/extent-tree.c:5676:25: sparse: struct rcu_string *
fs/btrfs/extent-tree.c:1769:9: sparse: sparse: context imbalance in 'run_and_cleanup_extent_op' - unexpected unlock
fs/btrfs/extent-tree.c:1842:28: sparse: sparse: context imbalance in 'cleanup_ref_head' - unexpected unlock
fs/btrfs/extent-tree.c:1918:36: sparse: sparse: context imbalance in 'btrfs_run_delayed_refs_for_head' - unexpected unlock
fs/btrfs/extent-tree.c:1983:21: sparse: sparse: context imbalance in '__btrfs_run_delayed_refs' - wrong count at exit
vim +5676 fs/btrfs/extent-tree.c
5619
5620 /*
5621 * It used to be that old block groups would be left around forever.
5622 * Iterating over them would be enough to trim unused space. Since we
5623 * now automatically remove them, we also need to iterate over unallocated
5624 * space.
5625 *
5626 * We don't want a transaction for this since the discard may take a
5627 * substantial amount of time. We don't require that a transaction be
5628 * running, but we do need to take a running transaction into account
5629 * to ensure that we're not discarding chunks that were released or
5630 * allocated in the current transaction.
5631 *
5632 * Holding the chunks lock will prevent other threads from allocating
5633 * or releasing chunks, but it won't prevent a running transaction
5634 * from committing and releasing the memory that the pending chunks
5635 * list head uses. For that, we need to take a reference to the
5636 * transaction and hold the commit root sem. We only need to hold
5637 * it while performing the free space search since we have already
5638 * held back allocations.
5639 */
5640 static int btrfs_trim_free_extents(struct btrfs_device *device, u64 *trimmed)
5641 {
5642 u64 start = SZ_1M, len = 0, end = 0;
5643 int ret;
5644
5645 *trimmed = 0;
5646
5647 /* Discard not supported = nothing to do. */
5648 if (!blk_queue_discard(bdev_get_queue(device->bdev)))
5649 return 0;
5650
5651 /* Not writable = nothing to do. */
5652 if (!test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state))
5653 return 0;
5654
5655 /* No free space = nothing to do. */
5656 if (device->total_bytes <= device->bytes_used)
5657 return 0;
5658
5659 ret = 0;
5660
5661 while (1) {
5662 struct btrfs_fs_info *fs_info = device->fs_info;
5663 u64 bytes;
5664
5665 ret = mutex_lock_interruptible(&fs_info->chunk_mutex);
5666 if (ret)
5667 break;
5668
5669 find_first_clear_extent_bit(&device->alloc_state, start,
5670 &start, &end,
5671 CHUNK_TRIMMED | CHUNK_ALLOCATED);
5672
5673 /* CHUNK_* bits not cleared properly */
5674 if (start > device->total_bytes) {
5675 WARN_ON(IS_ENABLED(CONFIG_BTRFS_DEBUG));
> 5676 btrfs_warn_in_rcu(fs_info,
5677 "ignoring attempt to trim beyond device size: offset %llu length %llu device %s device size %llu",
5678 start, end - start + 1,
5679 rcu_str_deref(device->name),
5680 device->total_bytes);
5681 mutex_unlock(&fs_info->chunk_mutex);
5682 ret = 0;
5683 break;
5684 }
5685
5686 /* The remaining part has already been trimmed */
5687 if (start == device->total_bytes) {
5688 mutex_unlock(&fs_info->chunk_mutex);
5689 ret = 0;
5690 break;
5691 }
5692
5693 /* Ensure we skip the reserved area in the first 1M */
5694 start = max_t(u64, start, SZ_1M);
5695
5696 /*
5697 * If find_first_clear_extent_bit find a range that spans the
5698 * end of the device it will set end to -1, in this case it's up
5699 * to the caller to trim the value to the size of the device.
5700 */
5701 end = min(end, device->total_bytes - 1);
5702
5703 len = end - start + 1;
5704
5705 /* We didn't find any extents */
5706 if (!len) {
5707 mutex_unlock(&fs_info->chunk_mutex);
5708 ret = 0;
5709 break;
5710 }
5711
5712 ret = btrfs_issue_discard(device->bdev, start, len,
5713 &bytes);
5714 if (!ret)
5715 set_extent_bits(&device->alloc_state, start,
5716 start + bytes - 1,
5717 CHUNK_TRIMMED);
5718 mutex_unlock(&fs_info->chunk_mutex);
5719
5720 if (ret)
5721 break;
5722
5723 start += len;
5724 *trimmed += bytes;
5725
5726 if (fatal_signal_pending(current)) {
5727 ret = -ERESTARTSYS;
5728 break;
5729 }
5730
5731 cond_resched();
5732 }
5733
5734 return ret;
5735 }
5736
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[sashal-linux-stable:queue-4.14 23/24] fs/f2fs/dir.c:826:17: error: 'sbi' undeclared
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.14
head: 38b03c1996b73a45c98139722f16ed5fd22181c3
commit: 5f3953105124f6f2c194247dbcd375d0ace43031 [23/24] f2fs: check memory boundary by insane namelen
config: sparc-randconfig-r012-20200731 (attached as .config)
compiler: sparc-linux-gcc (GCC) 7.5.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 checkout 5f3953105124f6f2c194247dbcd375d0ace43031
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=sparc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
fs/f2fs/dir.c: In function 'f2fs_fill_dentries':
>> fs/f2fs/dir.c:826:17: error: 'sbi' undeclared (first use in this function)
set_sbi_flag(sbi, SBI_NEED_FSCK);
^~~
fs/f2fs/dir.c:826:17: note: each undeclared identifier is reported only once for each function it appears in
In file included from fs/f2fs/dir.c:13:0:
fs/f2fs/f2fs.h: In function '__mark_inode_dirty_flag':
fs/f2fs/f2fs.h:2035:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (set)
^
fs/f2fs/f2fs.h:2037:2: note: here
case FI_DATA_EXIST:
^~~~
vim +/sbi +826 fs/f2fs/dir.c
792
793 int f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d,
794 unsigned int start_pos, struct fscrypt_str *fstr)
795 {
796 unsigned char d_type = DT_UNKNOWN;
797 unsigned int bit_pos;
798 struct f2fs_dir_entry *de = NULL;
799 struct fscrypt_str de_name = FSTR_INIT(NULL, 0);
800
801 bit_pos = ((unsigned long)ctx->pos % d->max);
802
803 while (bit_pos < d->max) {
804 bit_pos = find_next_bit_le(d->bitmap, d->max, bit_pos);
805 if (bit_pos >= d->max)
806 break;
807
808 de = &d->dentry[bit_pos];
809 if (de->name_len == 0) {
810 bit_pos++;
811 ctx->pos = start_pos + bit_pos;
812 continue;
813 }
814
815 d_type = get_de_type(de);
816
817 de_name.name = d->filename[bit_pos];
818 de_name.len = le16_to_cpu(de->name_len);
819
820 /* check memory boundary before moving forward */
821 bit_pos += GET_DENTRY_SLOTS(le16_to_cpu(de->name_len));
822 if (unlikely(bit_pos > d->max)) {
823 f2fs_msg(F2FS_I_SB(d->inode)->sb, KERN_WARNING,
824 "%s: corrupted namelen=%d, run fsck to fix.",
825 __func__, le16_to_cpu(de->name_len));
> 826 set_sbi_flag(sbi, SBI_NEED_FSCK);
827 return -EINVAL;
828 }
829
830 if (f2fs_encrypted_inode(d->inode)) {
831 int save_len = fstr->len;
832 int err;
833
834 err = fscrypt_fname_disk_to_usr(d->inode,
835 (u32)de->hash_code, 0,
836 &de_name, fstr);
837 if (err)
838 return err;
839
840 de_name = *fstr;
841 fstr->len = save_len;
842 }
843
844 if (!dir_emit(ctx, de_name.name, de_name.len,
845 le32_to_cpu(de->ino), d_type))
846 return 1;
847
848 ctx->pos = start_pos + bit_pos;
849 }
850 return 0;
851 }
852
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[superna9999:amlogic/v5.9/s400-mipi-dsi 12/16] include/linux/kern_levels.h:5:18: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'struct drm_encoder
by kernel test robot
tree: https://github.com/superna9999/linux amlogic/v5.9/s400-mipi-dsi
head: 4cbe7065356e7e68a59a0787bc4a4a3ca9375065
commit: 87c65f7a5406d7484a6e9aeab87b275f29542aed [12/16] drm: bridge: debug
config: i386-randconfig-r001-20200731 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout 87c65f7a5406d7484a6e9aeab87b275f29542aed
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 include/linux/printk.h:7,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/gpu/drm/drm_bridge.c:25:
drivers/gpu/drm/drm_bridge.c: In function 'drm_bridge_attach':
>> include/linux/kern_levels.h:5:18: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'struct drm_encoder *' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
include/linux/printk.h:368:9: note: in expansion of macro 'KERN_INFO'
368 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/drm_bridge.c:181:2: note: in expansion of macro 'pr_info'
181 | pr_info("%s %08x %08x %08x\n", __func__, encoder, bridge, previous);
| ^~~~~~~
drivers/gpu/drm/drm_bridge.c:181:17: note: format string is defined here
181 | pr_info("%s %08x %08x %08x\n", __func__, encoder, bridge, previous);
| ~~~^
| |
| unsigned int
In file included from include/linux/printk.h:7,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/gpu/drm/drm_bridge.c:25:
>> include/linux/kern_levels.h:5:18: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'struct drm_bridge *' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
include/linux/printk.h:368:9: note: in expansion of macro 'KERN_INFO'
368 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/drm_bridge.c:181:2: note: in expansion of macro 'pr_info'
181 | pr_info("%s %08x %08x %08x\n", __func__, encoder, bridge, previous);
| ^~~~~~~
drivers/gpu/drm/drm_bridge.c:181:22: note: format string is defined here
181 | pr_info("%s %08x %08x %08x\n", __func__, encoder, bridge, previous);
| ~~~^
| |
| unsigned int
In file included from include/linux/printk.h:7,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/gpu/drm/drm_bridge.c:25:
include/linux/kern_levels.h:5:18: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'struct drm_bridge *' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
include/linux/printk.h:368:9: note: in expansion of macro 'KERN_INFO'
368 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/drm_bridge.c:181:2: note: in expansion of macro 'pr_info'
181 | pr_info("%s %08x %08x %08x\n", __func__, encoder, bridge, previous);
| ^~~~~~~
drivers/gpu/drm/drm_bridge.c:181:27: note: format string is defined here
181 | pr_info("%s %08x %08x %08x\n", __func__, encoder, bridge, previous);
| ~~~^
| |
| unsigned int
vim +5 include/linux/kern_levels.h
314ba3520e513a Joe Perches 2012-07-30 4
04d2c8c83d0e3a Joe Perches 2012-07-30 @5 #define KERN_SOH "\001" /* ASCII Start Of Header */
04d2c8c83d0e3a Joe Perches 2012-07-30 6 #define KERN_SOH_ASCII '\001'
04d2c8c83d0e3a Joe Perches 2012-07-30 7
:::::: The code at line 5 was first introduced by commit
:::::: 04d2c8c83d0e3ac5f78aeede51babb3236200112 printk: convert the format for KERN_<LEVEL> to a 2 byte pattern
:::::: TO: Joe Perches <joe(a)perches.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[peterz-queue:locking/core 1/2] arch/x86/mm/highmem_32.c:66:13: warning: no previous prototype for 'set_highmem_pages_init'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/core
head: c4dfe2b515b510d7db6858c14f9b2492130a543b
commit: 589bcab3e46636fc4fb4f56b3f51adba98f50ee0 [1/2] seqlock,headers: Untangle the spaghetti monster
config: i386-randconfig-r001-20200731 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout 589bcab3e46636fc4fb4f56b3f51adba98f50ee0
# save the attached .config to linux build tree
make W=1 ARCH=i386
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/mm/highmem_32.c:66:13: warning: no previous prototype for 'set_highmem_pages_init' [-Wmissing-prototypes]
66 | void __init set_highmem_pages_init(void)
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/set_highmem_pages_init +66 arch/x86/mm/highmem_32.c
60e64d46a58236 arch/i386/mm/highmem.c Vivek Goyal 2005-06-25 65
867c5b5292583b arch/x86/mm/highmem_32.c Pekka Enberg 2009-03-03 @66 void __init set_highmem_pages_init(void)
:::::: The code at line 66 was first introduced by commit
:::::: 867c5b5292583b1e474cbbcb4c77f09bfca3903c x86: set_highmem_pages_init() cleanup
:::::: TO: Pekka Enberg <penberg(a)cs.helsinki.fi>
:::::: CC: Ingo Molnar <mingo(a)elte.hu>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
drivers/media/platform/omap/omap_vout.c:2040:21: warning: cast to pointer from integer of different size
by kernel test robot
Hi Hans,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: deacdb3e3979979016fcd0ffd518c320a62ad166
commit: 839b9d2c59b3b3e74cb58b457615ff61154d8a41 media: omap_vout: fix various v4l2-compliance failures
date: 12 months ago
config: i386-randconfig-r032-20200731 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout 839b9d2c59b3b3e74cb58b457615ff61154d8a41
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/media/platform/omap/omap_vout.c: In function 'omap_vout_create_video_devices':
>> drivers/media/platform/omap/omap_vout.c:2040:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
2040 | vout->fbuf.base = (void *)info.paddr;
| ^
vim +2040 drivers/media/platform/omap/omap_vout.c
1999
2000 /* Create video out devices */
2001 static int __init omap_vout_create_video_devices(struct platform_device *pdev)
2002 {
2003 int ret = 0, k;
2004 struct omap_vout_device *vout;
2005 struct video_device *vfd = NULL;
2006 struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev);
2007 struct omap2video_device *vid_dev = container_of(v4l2_dev,
2008 struct omap2video_device, v4l2_dev);
2009 struct omap_overlay *ovl = vid_dev->overlays[0];
2010 struct omap_overlay_info info;
2011
2012 ovl->get_overlay_info(ovl, &info);
2013
2014 for (k = 0; k < pdev->num_resources; k++) {
2015
2016 vout = kzalloc(sizeof(struct omap_vout_device), GFP_KERNEL);
2017 if (!vout) {
2018 dev_err(&pdev->dev, ": could not allocate memory\n");
2019 return -ENOMEM;
2020 }
2021
2022 vout->vid = k;
2023 vid_dev->vouts[k] = vout;
2024 vout->vid_dev = vid_dev;
2025 /* Select video2 if only 1 overlay is controlled by V4L2 */
2026 if (pdev->num_resources == 1)
2027 vout->vid_info.overlays[0] = vid_dev->overlays[k + 2];
2028 else
2029 /* Else select video1 and video2 one by one. */
2030 vout->vid_info.overlays[0] = vid_dev->overlays[k + 1];
2031 vout->vid_info.num_overlays = 1;
2032 vout->vid_info.id = k + 1;
2033 /*
2034 * Set the framebuffer base, this allows applications to find
2035 * the fb corresponding to this overlay.
2036 *
2037 * To be precise: fbuf.base should match smem_start of
2038 * struct fb_fix_screeninfo.
2039 */
> 2040 vout->fbuf.base = (void *)info.paddr;
2041
2042 /* Set VRFB as rotation_type for omap2 and omap3 */
2043 if (omap_vout_dss_omap24xx() || omap_vout_dss_omap34xx())
2044 vout->vid_info.rotation_type = VOUT_ROT_VRFB;
2045
2046 /* Setup the default configuration for the video devices
2047 */
2048 if (omap_vout_setup_video_data(vout) != 0) {
2049 ret = -ENOMEM;
2050 goto error;
2051 }
2052
2053 /* Allocate default number of buffers for the video streaming
2054 * and reserve the VRFB space for rotation
2055 */
2056 if (omap_vout_setup_video_bufs(pdev, k) != 0) {
2057 ret = -ENOMEM;
2058 goto error1;
2059 }
2060
2061 /* Register the Video device with V4L2
2062 */
2063 vfd = vout->vfd;
2064 if (video_register_device(vfd, VFL_TYPE_GRABBER, -1) < 0) {
2065 dev_err(&pdev->dev,
2066 ": Could not register Video for Linux device\n");
2067 vfd->minor = -1;
2068 ret = -ENODEV;
2069 goto error2;
2070 }
2071 video_set_drvdata(vfd, vout);
2072
2073 dev_info(&pdev->dev,
2074 ": registered and initialized video device %d\n",
2075 vfd->minor);
2076 if (k == (pdev->num_resources - 1))
2077 return 0;
2078
2079 continue;
2080 error2:
2081 if (vout->vid_info.rotation_type == VOUT_ROT_VRFB)
2082 omap_vout_release_vrfb(vout);
2083 omap_vout_free_buffers(vout);
2084 error1:
2085 video_device_release(vfd);
2086 error:
2087 kfree(vout);
2088 return ret;
2089 }
2090
2091 return -ENODEV;
2092 }
2093 /* Driver functions */
2094 static void omap_vout_cleanup_device(struct omap_vout_device *vout)
2095 {
2096 struct video_device *vfd;
2097 struct omapvideo_info *ovid;
2098
2099 if (!vout)
2100 return;
2101
2102 vfd = vout->vfd;
2103 ovid = &vout->vid_info;
2104 if (vfd) {
2105 if (!video_is_registered(vfd)) {
2106 /*
2107 * The device was never registered, so release the
2108 * video_device struct directly.
2109 */
2110 video_device_release(vfd);
2111 } else {
2112 /*
2113 * The unregister function will release the video_device
2114 * struct as well as unregistering it.
2115 */
2116 video_unregister_device(vfd);
2117 }
2118 }
2119 v4l2_ctrl_handler_free(&vout->ctrl_handler);
2120 if (ovid->rotation_type == VOUT_ROT_VRFB) {
2121 omap_vout_release_vrfb(vout);
2122 /* Free the VRFB buffer if allocated
2123 * init time
2124 */
2125 if (vout->vrfb_static_allocation)
2126 omap_vout_free_vrfb_buffers(vout);
2127 }
2128 omap_vout_free_buffers(vout);
2129
2130 kfree(vout);
2131 }
2132
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[morimoto-linux:fw-cleanup-2020-07-31-v2 48/80] drivers/sh/clk/cpg.c:49:9: error: assignment to 'unsigned int void from incompatible pointer type 'unsigned int
by kernel test robot
tree: https://github.com/morimoto/linux fw-cleanup-2020-07-31-v2
head: 4ad80bc2cac12df625c1ad891c7a370a8411e711
commit: 013817ef9e632a17287c60bfcb52acde451e2fa6 [48/80] sh: clkfwk: remove r8/r16/r32
config: sh-allmodconfig (attached as .config)
compiler: sh4-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
git checkout 013817ef9e632a17287c60bfcb52acde451e2fa6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
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/sh/clk/cpg.c: In function 'sh_clk_mstp_enable':
>> drivers/sh/clk/cpg.c:49:9: error: assignment to 'unsigned int (*)(const void *)' from incompatible pointer type 'unsigned int (*)(void *)' [-Werror=incompatible-pointer-types]
49 | read = ioread8;
| ^
drivers/sh/clk/cpg.c:51:9: error: assignment to 'unsigned int (*)(const void *)' from incompatible pointer type 'unsigned int (*)(void *)' [-Werror=incompatible-pointer-types]
51 | read = ioread16;
| ^
drivers/sh/clk/cpg.c:53:9: error: assignment to 'unsigned int (*)(const void *)' from incompatible pointer type 'unsigned int (*)(void *)' [-Werror=incompatible-pointer-types]
53 | read = ioread32;
| ^
cc1: some warnings being treated as errors
vim +49 drivers/sh/clk/cpg.c
38
39 static int sh_clk_mstp_enable(struct clk *clk)
40 {
41 sh_clk_write(sh_clk_read(clk) & ~(1 << clk->enable_bit), clk);
42 if (clk->status_reg) {
43 unsigned int (*read)(const void __iomem *addr);
44 int i;
45 void __iomem *mapped_status = (phys_addr_t)clk->status_reg -
46 (phys_addr_t)clk->enable_reg + clk->mapped_reg;
47
48 if (clk->flags & CLK_ENABLE_REG_8BIT)
> 49 read = ioread8;
50 else if (clk->flags & CLK_ENABLE_REG_16BIT)
51 read = ioread16;
52 else
53 read = ioread32;
54
55 for (i = 1000;
56 (read(mapped_status) & (1 << clk->enable_bit)) && i;
57 i--)
58 cpu_relax();
59 if (!i) {
60 pr_err("cpg: failed to enable %p[%d]\n",
61 clk->enable_reg, clk->enable_bit);
62 return -ETIMEDOUT;
63 }
64 }
65 return 0;
66 }
67
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[superna9999:amlogic/v5.9/s400-mipi-dsi 11/16] drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c:1067:23: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int'
by kernel test robot
tree: https://github.com/superna9999/linux amlogic/v5.9/s400-mipi-dsi
head: 4cbe7065356e7e68a59a0787bc4a4a3ca9375065
commit: 3f8ccd777b297d35d96122dceae7fb4c77041a46 [11/16] drm: bridge: dw-mipi-dsi: debug & tweaks
config: ia64-allyesconfig (attached as .config)
compiler: ia64-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
git checkout 3f8ccd777b297d35d96122dceae7fb4c77041a46
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
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 include/linux/printk.h:7,
from include/linux/kernel.h:15,
from include/linux/clk.h:13,
from drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c:12:
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c: In function 'dw_mipi_dsi_host_attach':
>> include/linux/kern_levels.h:5:18: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'struct drm_panel *' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
include/linux/printk.h:368:9: note: in expansion of macro 'KERN_INFO'
368 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c:319:2: note: in expansion of macro 'pr_info'
319 | pr_info("panel: %08x\n", panel);
| ^~~~~~~
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c:319:21: note: format string is defined here
319 | pr_info("panel: %08x\n", panel);
| ~~~^
| |
| unsigned int
In file included from include/linux/printk.h:7,
from include/linux/kernel.h:15,
from include/linux/clk.h:13,
from drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c:12:
include/linux/kern_levels.h:5:18: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'struct drm_bridge *' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
include/linux/printk.h:368:9: note: in expansion of macro 'KERN_INFO'
368 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c:320:2: note: in expansion of macro 'pr_info'
320 | pr_info("bridge: %08x\n", bridge);
| ^~~~~~~
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c:320:22: note: format string is defined here
320 | pr_info("bridge: %08x\n", bridge);
| ~~~^
| |
| unsigned int
In file included from include/linux/printk.h:7,
from include/linux/kernel.h:15,
from include/linux/clk.h:13,
from drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c:12:
include/linux/kern_levels.h:5:18: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'struct drm_bridge *' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
include/linux/printk.h:368:9: note: in expansion of macro 'KERN_INFO'
368 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c:331:2: note: in expansion of macro 'pr_info'
331 | pr_info("panel_bridge: %08x\n", dsi->panel_bridge);
| ^~~~~~~
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c:331:28: note: format string is defined here
331 | pr_info("panel_bridge: %08x\n", dsi->panel_bridge);
| ~~~^
| |
| unsigned int
In file included from include/linux/device.h:15,
from include/linux/node.h:18,
from include/linux/cpu.h:17,
from include/linux/of_device.h:5,
from drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c:17:
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c: In function '__dw_mipi_dsi_probe':
>> drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c:1067:23: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
1067 | dev_info(&pdev->dev, "Detected DW-MIPI version %06x\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c:1067:2: note: in expansion of macro 'dev_info'
1067 | dev_info(&pdev->dev, "Detected DW-MIPI version %06x\n",
| ^~~~~~~~
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c:1067:52: note: format string is defined here
1067 | dev_info(&pdev->dev, "Detected DW-MIPI version %06x\n",
| ~~~^
| |
| unsigned int
| %06lx
vim +1067 drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
1003
1004 static struct dw_mipi_dsi *
1005 __dw_mipi_dsi_probe(struct platform_device *pdev,
1006 const struct dw_mipi_dsi_plat_data *plat_data)
1007 {
1008 struct device *dev = &pdev->dev;
1009 struct reset_control *apb_rst;
1010 struct dw_mipi_dsi *dsi;
1011 int ret;
1012
1013 dsi = devm_kzalloc(dev, sizeof(*dsi), GFP_KERNEL);
1014 if (!dsi)
1015 return ERR_PTR(-ENOMEM);
1016
1017 dsi->dev = dev;
1018 dsi->plat_data = plat_data;
1019
1020 if (!plat_data->phy_ops->init || !plat_data->phy_ops->get_lane_mbps ||
1021 !plat_data->phy_ops->get_timing) {
1022 DRM_ERROR("Phy not properly configured\n");
1023 return ERR_PTR(-ENODEV);
1024 }
1025
1026 if (!plat_data->base) {
1027 dsi->base = devm_platform_ioremap_resource(pdev, 0);
1028 if (IS_ERR(dsi->base))
1029 return ERR_PTR(-ENODEV);
1030
1031 } else {
1032 dsi->base = plat_data->base;
1033 }
1034
1035 dsi->pclk = devm_clk_get(dev, "pclk");
1036 if (IS_ERR(dsi->pclk)) {
1037 ret = PTR_ERR(dsi->pclk);
1038 dev_err(dev, "Unable to get pclk: %d\n", ret);
1039 return ERR_PTR(ret);
1040 }
1041
1042 /*
1043 * Note that the reset was not defined in the initial device tree, so
1044 * we have to be prepared for it not being found.
1045 */
1046 apb_rst = devm_reset_control_get_optional_exclusive(dev, "apb");
1047 if (IS_ERR(apb_rst)) {
1048 ret = PTR_ERR(apb_rst);
1049
1050 if (ret != -EPROBE_DEFER)
1051 dev_err(dev, "Unable to get reset control: %d\n", ret);
1052
1053 return ERR_PTR(ret);
1054 }
1055
1056 ret = clk_prepare_enable(dsi->pclk);
1057 if (ret) {
1058 dev_err(dev, "%s: Failed to enable pclk\n", __func__);
1059 return ERR_PTR(ret);
1060 }
1061
1062 if (apb_rst) {
1063 reset_control_assert(apb_rst);
1064 usleep_range(10, 20);
1065 reset_control_deassert(apb_rst);
1066 }
> 1067 dev_info(&pdev->dev, "Detected DW-MIPI version %06x\n",
1068 dsi_read(dsi, DSI_VERSION) & VERSION);
1069
1070 clk_disable_unprepare(dsi->pclk);
1071
1072 dw_mipi_dsi_debugfs_init(dsi);
1073 pm_runtime_enable(dev);
1074
1075 dsi->dsi_host.ops = &dw_mipi_dsi_host_ops;
1076 dsi->dsi_host.dev = dev;
1077 ret = mipi_dsi_host_register(&dsi->dsi_host);
1078 if (ret) {
1079 dev_err(dev, "Failed to register MIPI host: %d\n", ret);
1080 dw_mipi_dsi_debugfs_remove(dsi);
1081 return ERR_PTR(ret);
1082 }
1083
1084 dsi->bridge.driver_private = dsi;
1085 dsi->bridge.funcs = &dw_mipi_dsi_bridge_funcs;
1086 #ifdef CONFIG_OF
1087 dsi->bridge.of_node = pdev->dev.of_node;
1088 #endif
1089
1090 return dsi;
1091 }
1092
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[linux-next:master 9615/13260] xtensa-linux-ld: spi-rspi.c:undefined reference to `__dma_request_channel'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 01830e6c042e8eb6eb202e05d7df8057135b4c26
commit: 959ed53808d171cf5203cdc74578db55d0c79822 [9615/13260] Merge tag 'drm-xilinx-dpsub-20200718' of git://linuxtv.org/pinchartl/media into drm-next
config: xtensa-randconfig-c004-20200731 (attached as .config)
compiler: xtensa-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
git checkout 959ed53808d171cf5203cdc74578db55d0c79822
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the linux-next/master HEAD 01830e6c042e8eb6eb202e05d7df8057135b4c26 builds fine.
It may have been fixed somewhere.
All errors (new ones prefixed by >>):
xtensa-linux-ld: drivers/gpu/drm/xlnx/zynqmp_disp.o: in function `zynqmp_disp_crtc_disable_vblank':
zynqmp_disp.c:(.text+0xf4): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/gpu/drm/xlnx/zynqmp_disp.o: in function `zynqmp_disp_layer_release_dma.isra.0':
zynqmp_disp.c:(.text+0x14c): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-bcm2835.o: in function `bcm2835_spi_setup':
spi-bcm2835.c:(.text+0x240): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-bcm2835.o: in function `bcm2835_dma_release':
spi-bcm2835.c:(.text+0x2ca): undefined reference to `dma_release_channel'
xtensa-linux-ld: spi-bcm2835.c:(.text+0x35e): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-bcm2835.o: in function `bcm2835_spi_shutdown':
spi-bcm2835.c:(.text+0x418): undefined reference to `dma_request_chan'
xtensa-linux-ld: spi-bcm2835.c:(.text+0x420): undefined reference to `dma_get_slave_caps'
xtensa-linux-ld: spi-bcm2835.c:(.text+0x45f): undefined reference to `dma_request_chan'
xtensa-linux-ld: spi-bcm2835.c:(.text+0x48b): undefined reference to `dma_request_chan'
xtensa-linux-ld: drivers/spi/spi-bcm2835.o: in function `bcm2835_dma_init':
spi-bcm2835.c:(.text+0x582): undefined reference to `dma_get_slave_caps'
xtensa-linux-ld: spi-bcm2835.c:(.text+0x6d6): undefined reference to `dma_get_slave_caps'
xtensa-linux-ld: drivers/spi/spi-fsl-lpspi.o: in function `fsl_lpspi_probe':
spi-fsl-lpspi.c:(.text+0x3df): undefined reference to `dma_request_chan'
xtensa-linux-ld: spi-fsl-lpspi.c:(.text+0x407): undefined reference to `dma_request_chan'
xtensa-linux-ld: spi-fsl-lpspi.c:(.text+0x45e): undefined reference to `dma_release_channel'
xtensa-linux-ld: spi-fsl-lpspi.c:(.text+0x474): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-img-spfi.o: in function `img_spfi_can_dma':
spi-img-spfi.c:(.text+0x7a): undefined reference to `dma_release_channel'
xtensa-linux-ld: spi-img-spfi.c:(.text+0x86): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-img-spfi.o: in function `img_spfi_probe':
spi-img-spfi.c:(.text+0x4c2): undefined reference to `dma_request_chan'
xtensa-linux-ld: spi-img-spfi.c:(.text+0x4d6): undefined reference to `dma_request_chan'
xtensa-linux-ld: spi-img-spfi.c:(.text+0x517): undefined reference to `dma_release_channel'
xtensa-linux-ld: spi-img-spfi.c:(.text+0x523): undefined reference to `dma_release_channel'
xtensa-linux-ld: spi-img-spfi.c:(.text+0x567): undefined reference to `dma_release_channel'
xtensa-linux-ld: spi-img-spfi.c:(.text+0x57a): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-omap2-mcspi.o: in function `omap2_mcspi_release_dma':
spi-omap2-mcspi.c:(.text+0xaa): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-omap2-mcspi.o:spi-omap2-mcspi.c:(.text+0xb8): more undefined references to `dma_release_channel' follow
xtensa-linux-ld: drivers/spi/spi-omap2-mcspi.o: in function `omap2_mcspi_probe':
spi-omap2-mcspi.c:(.text+0x1026): undefined reference to `dma_request_chan'
xtensa-linux-ld: spi-omap2-mcspi.c:(.text+0x1046): undefined reference to `dma_request_chan'
xtensa-linux-ld: spi-omap2-mcspi.c:(.text+0x105c): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-ti-qspi.o: in function `ti_qspi_remove':
spi-ti-qspi.c:(.text+0xa2): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-ti-qspi.o: in function `ti_qspi_setup':
spi-ti-qspi.c:(.text+0x27c): undefined reference to `dma_request_chan_by_mask'
xtensa-linux-ld: drivers/spi/spi-ti-qspi.o: in function `ti_qspi_probe':
spi-ti-qspi.c:(.text+0x429): undefined reference to `dma_request_chan_by_mask'
xtensa-linux-ld: spi-ti-qspi.c:(.text+0x470): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-pxa2xx-dma.o: in function `pxa2xx_spi_dma_stop':
spi-pxa2xx-dma.c:(.text+0x2d0): undefined reference to `dma_request_slave_channel'
xtensa-linux-ld: spi-pxa2xx-dma.c:(.text+0x2d4): undefined reference to `__dma_request_channel'
xtensa-linux-ld: drivers/spi/spi-pxa2xx-dma.o: in function `pxa2xx_spi_dma_setup':
spi-pxa2xx-dma.c:(.text+0x313): undefined reference to `dma_request_slave_channel'
xtensa-linux-ld: spi-pxa2xx-dma.c:(.text+0x33f): undefined reference to `__dma_request_channel'
xtensa-linux-ld: spi-pxa2xx-dma.c:(.text+0x35b): undefined reference to `dma_request_slave_channel'
xtensa-linux-ld: spi-pxa2xx-dma.c:(.text+0x386): undefined reference to `__dma_request_channel'
xtensa-linux-ld: spi-pxa2xx-dma.c:(.text+0x396): undefined reference to `dma_release_channel'
xtensa-linux-ld: spi-pxa2xx-dma.c:(.text+0x403): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-pxa2xx-dma.o: in function `pxa2xx_spi_dma_release':
spi-pxa2xx-dma.c:(.text+0x447): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-rspi.o: in function `rspi_rz_set_config_register':
spi-rspi.c:(.text+0xc9f): undefined reference to `dma_release_channel'
xtensa-linux-ld: spi-rspi.c:(.text+0xcaa): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-rspi.o: in function `rspi_remove':
spi-rspi.c:(.text+0xd4e): undefined reference to `dma_request_slave_channel'
>> xtensa-linux-ld: spi-rspi.c:(.text+0xd68): undefined reference to `__dma_request_channel'
xtensa-linux-ld: drivers/spi/spi-rspi.o: in function `rspi_request_irq':
spi-rspi.c:(.text+0xdc8): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-rspi.o: in function `rspi_probe':
spi-rspi.c:(.text+0x1066): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-s3c64xx.o: in function `s3c64xx_spi_can_dma':
spi-s3c64xx.c:(.text+0x6f): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-s3c64xx.o: in function `s3c64xx_spi_remove':
spi-s3c64xx.c:(.text+0x78): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-s3c64xx.o: in function `s3c64xx_spi_probe':
spi-s3c64xx.c:(.text+0x7b8): undefined reference to `dma_request_chan'
xtensa-linux-ld: spi-s3c64xx.c:(.text+0x7da): undefined reference to `dma_request_chan'
xtensa-linux-ld: spi-s3c64xx.c:(.text+0x91c): undefined reference to `dma_release_channel'
xtensa-linux-ld: spi-s3c64xx.c:(.text+0x932): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-uniphier.o: in function `uniphier_spi_unprepare_transfer_hardware':
spi-uniphier.c:(.text+0x116): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-uniphier.o: in function `uniphier_spi_remove':
spi-uniphier.c:(.text+0x126): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/spi/spi-uniphier.o: in function `uniphier_spi_probe':
spi-uniphier.c:(.text+0x2b8): undefined reference to `dma_request_chan'
xtensa-linux-ld: spi-uniphier.c:(.text+0x2f3): undefined reference to `dma_request_chan'
xtensa-linux-ld: spi-uniphier.c:(.text+0x360): undefined reference to `dma_get_slave_caps'
xtensa-linux-ld: spi-uniphier.c:(.text+0x38b): undefined reference to `dma_get_slave_caps'
xtensa-linux-ld: drivers/i2c/busses/i2c-mxs.o: in function `mxs_i2c_func':
i2c-mxs.c:(.text+0xc): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/i2c/busses/i2c-mxs.o: in function `mxs_i2c_remove':
i2c-mxs.c:(.text+0x23): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/i2c/busses/i2c-mxs.o: in function `mxs_i2c_reset':
i2c-mxs.c:(.text+0x270): undefined reference to `dma_request_chan'
xtensa-linux-ld: drivers/i2c/busses/i2c-mxs.o: in function `mxs_i2c_probe':
i2c-mxs.c:(.text+0x406): undefined reference to `dma_request_chan'
xtensa-linux-ld: drivers/i2c/busses/i2c-sh_mobile.o: in function `sh_mobile_i2c_init':
i2c-sh_mobile.c:(.text+0x262): undefined reference to `dma_release_channel'
xtensa-linux-ld: i2c-sh_mobile.c:(.text+0x277): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/i2c/busses/i2c-sh_mobile.o: in function `sh_mobile_i2c_remove':
i2c-sh_mobile.c:(.text+0x2ca): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/i2c/busses/i2c-sh_mobile.o: in function `sh_mobile_i2c_request_dma_chan':
i2c-sh_mobile.c:(.text+0x2f6): undefined reference to `dma_request_chan'
xtensa-linux-ld: i2c-sh_mobile.c:(.text+0x322): undefined reference to `dma_request_chan'
xtensa-linux-ld: drivers/i2c/busses/i2c-stm32.o:(.text+0x46): undefined reference to `dma_request_chan'
xtensa-linux-ld: drivers/i2c/busses/i2c-stm32.o: in function `stm32_i2c_dma_request':
i2c-stm32.c:(.text+0xc6): undefined reference to `dma_request_chan'
xtensa-linux-ld: i2c-stm32.c:(.text+0xf4): undefined reference to `dma_release_channel'
xtensa-linux-ld: i2c-stm32.c:(.text+0x148): undefined reference to `dma_release_channel'
xtensa-linux-ld: i2c-stm32.c:(.text+0x18e): undefined reference to `dma_release_channel'
xtensa-linux-ld: i2c-stm32.c:(.text+0x1a8): undefined reference to `dma_release_channel'
xtensa-linux-ld: i2c-stm32.c:(.text+0x1f6): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/i2c/busses/i2c-stm32.o:i2c-stm32.c:(.text+0x200): more undefined references to `dma_release_channel' follow
xtensa-linux-ld: drivers/crypto/atmel-tdes.o: in function `atmel_tdes_probe':
atmel-tdes.c:(.text+0x7ea): undefined reference to `dma_request_chan'
xtensa-linux-ld: atmel-tdes.c:(.text+0x826): undefined reference to `dma_request_chan'
xtensa-linux-ld: atmel-tdes.c:(.text+0x842): undefined reference to `dma_release_channel'
xtensa-linux-ld: atmel-tdes.c:(.text+0x97e): undefined reference to `dma_release_channel'
xtensa-linux-ld: atmel-tdes.c:(.text+0x987): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/crypto/img-hash.o: in function `img_hash_remove':
img-hash.c:(.text+0x344): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/crypto/img-hash.o: in function `img_hash_probe':
img-hash.c:(.text+0x853): undefined reference to `dma_release_channel'
xtensa-linux-ld: drivers/crypto/img-hash.o:img-hash.c:(.text+0x8f3): more undefined references to `dma_release_channel' follow
xtensa-linux-ld: drivers/crypto/img-hash.o: in function `img_hash_probe':
img-hash.c:(.text+0x96a): undefined reference to `dma_request_chan'
xtensa-linux-ld: drivers/crypto/qce/dma.o: in function `qce_dma_prep_sg.constprop.0':
dma.c:(.text+0x66): undefined reference to `dma_request_chan'
xtensa-linux-ld: drivers/crypto/qce/dma.o: in function `qce_dma_request':
dma.c:(.text+0x7f): undefined reference to `dma_request_chan'
xtensa-linux-ld: dma.c:(.text+0xa2): undefined reference to `dma_release_channel'
xtensa-linux-ld: dma.c:(.text+0xb8): undefined reference to `dma_release_channel'
xtensa-linux-ld: dma.c:(.text+0xc7): undefined reference to `dma_release_channel'
xtensa-linux-ld: dma.c:(.text+0xcf): undefined reference to `dma_release_channel'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[android-goldfish:android-3.18 12862/15873] drivers/char/mem.c:457:8: error: implicit declaration of function 'should_stop_iteration'
by kernel test robot
Hi Tetsuo,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/goldfish android-3.18
head: c4e5e93dd8dabdd1c215427adff3a048ae2c42da
commit: d8d7791979c3d6045b0904ddf8e17970401a5a80 [12862/15873] /dev/mem: Bail out upon SIGKILL.
config: s390-randconfig-r022-20200731 (attached as .config)
compiler: s390-linux-gcc (GCC) 5.5.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 checkout d8d7791979c3d6045b0904ddf8e17970401a5a80
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-5.5.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/timex.h:65:0,
from include/linux/jiffies.h:8,
from include/linux/ktime.h:25,
from include/linux/timer.h:5,
from include/linux/workqueue.h:8,
from include/linux/srcu.h:34,
from include/linux/notifier.h:15,
from include/linux/memory_hotplug.h:6,
from include/linux/mmzone.h:792,
from include/linux/gfp.h:5,
from include/linux/mm.h:9,
from drivers/char/mem.c:11:
arch/s390/include/asm/timex.h: In function 'get_tod_clock_ext':
arch/s390/include/asm/timex.h:76:32: warning: 'sizeof' on array function parameter 'clk' will return size of 'char *' [-Wsizeof-array-argument]
typedef struct { char _[sizeof(clk)]; } addrtype;
^
arch/s390/include/asm/timex.h:74:43: note: declared here
static inline void get_tod_clock_ext(char clk[16])
^
In file included from arch/s390/include/asm/pgtable.h:30:0,
from include/linux/mm.h:63,
from drivers/char/mem.c:11:
include/linux/sched.h: At top level:
include/linux/sched.h:1067:42: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
^
drivers/char/mem.c:259:12: warning: no previous prototype for 'phys_mem_access_prot_allowed' [-Wmissing-prototypes]
int __weak phys_mem_access_prot_allowed(struct file *file,
^
drivers/char/mem.c: In function 'read_kmem':
>> drivers/char/mem.c:457:8: error: implicit declaration of function 'should_stop_iteration' [-Werror=implicit-function-declaration]
if (should_stop_iteration()) {
^
cc1: some warnings being treated as errors
vim +/should_stop_iteration +457 drivers/char/mem.c
408
409 #ifdef CONFIG_DEVKMEM
410 /*
411 * This function reads the *virtual* memory as seen by the kernel.
412 */
413 static ssize_t read_kmem(struct file *file, char __user *buf,
414 size_t count, loff_t *ppos)
415 {
416 unsigned long p = *ppos;
417 ssize_t low_count, read, sz;
418 char *kbuf; /* k-addr because vread() takes vmlist_lock rwlock */
419 int err = 0;
420
421 read = 0;
422 if (p < (unsigned long) high_memory) {
423 low_count = count;
424 if (count > (unsigned long)high_memory - p)
425 low_count = (unsigned long)high_memory - p;
426
427 #ifdef __ARCH_HAS_NO_PAGE_ZERO_MAPPED
428 /* we don't have page 0 mapped on sparc and m68k.. */
429 if (p < PAGE_SIZE && low_count > 0) {
430 sz = size_inside_page(p, low_count);
431 if (clear_user(buf, sz))
432 return -EFAULT;
433 buf += sz;
434 p += sz;
435 read += sz;
436 low_count -= sz;
437 count -= sz;
438 }
439 #endif
440 while (low_count > 0) {
441 sz = size_inside_page(p, low_count);
442
443 /*
444 * On ia64 if a page has been mapped somewhere as
445 * uncached, then it must also be accessed uncached
446 * by the kernel or data corruption may occur
447 */
448 kbuf = xlate_dev_kmem_ptr((char *)p);
449
450 if (copy_to_user(buf, kbuf, sz))
451 return -EFAULT;
452 buf += sz;
453 p += sz;
454 read += sz;
455 low_count -= sz;
456 count -= sz;
> 457 if (should_stop_iteration()) {
458 count = 0;
459 break;
460 }
461 }
462 }
463
464 if (count > 0) {
465 kbuf = (char *)__get_free_page(GFP_KERNEL);
466 if (!kbuf)
467 return -ENOMEM;
468 while (count > 0) {
469 sz = size_inside_page(p, count);
470 if (!is_vmalloc_or_module_addr((void *)p)) {
471 err = -ENXIO;
472 break;
473 }
474 sz = vread(kbuf, (char *)p, sz);
475 if (!sz)
476 break;
477 if (copy_to_user(buf, kbuf, sz)) {
478 err = -EFAULT;
479 break;
480 }
481 count -= sz;
482 buf += sz;
483 read += sz;
484 p += sz;
485 if (should_stop_iteration())
486 break;
487 }
488 free_page((unsigned long)kbuf);
489 }
490 *ppos = p;
491 return read ? read : err;
492 }
493
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[linux-next:master 12562/13260] drivers/acpi/processor_idle.c:667:4: error: non-void function 'acpi_idle_enter_s2idle' should return a value
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 01830e6c042e8eb6eb202e05d7df8057135b4c26
commit: efe9711214e6138a5a2a46ca4068bfce50c03444 [12562/13260] cpuidle: change enter_s2idle() prototype
config: x86_64-randconfig-a001-20200731 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c23ae3f18ee3ff11671f4c62ffc66d150b1bcdc2)
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 checkout efe9711214e6138a5a2a46ca4068bfce50c03444
# 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/acpi/processor_idle.c:667:4: error: non-void function 'acpi_idle_enter_s2idle' should return a value [-Wreturn-type]
return;
^
drivers/acpi/processor_idle.c:671:4: error: non-void function 'acpi_idle_enter_s2idle' should return a value [-Wreturn-type]
return;
^
drivers/acpi/processor_idle.c:1085:12: warning: no previous prototype for function 'acpi_processor_ffh_lpi_probe' [-Wmissing-prototypes]
int __weak acpi_processor_ffh_lpi_probe(unsigned int cpu)
^
drivers/acpi/processor_idle.c:1085:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __weak acpi_processor_ffh_lpi_probe(unsigned int cpu)
^
static
drivers/acpi/processor_idle.c:1090:12: warning: no previous prototype for function 'acpi_processor_ffh_lpi_enter' [-Wmissing-prototypes]
int __weak acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)
^
drivers/acpi/processor_idle.c:1090:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __weak acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)
^
static
2 warnings and 2 errors generated.
vim +/acpi_idle_enter_s2idle +667 drivers/acpi/processor_idle.c
4f86d3a8e29720 Len Brown 2007-10-03 657
efe9711214e613 Neal Liu 2020-07-27 658 static int acpi_idle_enter_s2idle(struct cpuidle_device *dev,
5f5081852038d9 Rafael J. Wysocki 2015-02-11 659 struct cpuidle_driver *drv, int index)
5f5081852038d9 Rafael J. Wysocki 2015-02-11 660 {
5f5081852038d9 Rafael J. Wysocki 2015-02-11 661 struct acpi_processor_cx *cx = per_cpu(acpi_cstate[index], dev->cpu);
5f5081852038d9 Rafael J. Wysocki 2015-02-11 662
5f5081852038d9 Rafael J. Wysocki 2015-02-11 663 if (cx->type == ACPI_STATE_C3) {
5f5081852038d9 Rafael J. Wysocki 2015-02-11 664 struct acpi_processor *pr = __this_cpu_read(processors);
5f5081852038d9 Rafael J. Wysocki 2015-02-11 665
5f5081852038d9 Rafael J. Wysocki 2015-02-11 666 if (unlikely(!pr))
5f5081852038d9 Rafael J. Wysocki 2015-02-11 @667 return;
5f5081852038d9 Rafael J. Wysocki 2015-02-11 668
5f5081852038d9 Rafael J. Wysocki 2015-02-11 669 if (pr->flags.bm_check) {
5f5081852038d9 Rafael J. Wysocki 2015-02-11 670 acpi_idle_enter_bm(pr, cx, false);
5f5081852038d9 Rafael J. Wysocki 2015-02-11 671 return;
5f5081852038d9 Rafael J. Wysocki 2015-02-11 672 } else {
5f5081852038d9 Rafael J. Wysocki 2015-02-11 673 ACPI_FLUSH_CPU_CACHE();
5f5081852038d9 Rafael J. Wysocki 2015-02-11 674 }
5f5081852038d9 Rafael J. Wysocki 2015-02-11 675 }
5f5081852038d9 Rafael J. Wysocki 2015-02-11 676 acpi_idle_do_entry(cx);
efe9711214e613 Neal Liu 2020-07-27 677
efe9711214e613 Neal Liu 2020-07-27 678 return 0;
5f5081852038d9 Rafael J. Wysocki 2015-02-11 679 }
5f5081852038d9 Rafael J. Wysocki 2015-02-11 680
:::::: The code at line 667 was first introduced by commit
:::::: 5f5081852038d9a7b309190730bfb724b413235e ACPI / idle: Implement ->enter_freeze callback routine
:::::: TO: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
:::::: CC: Rafael J. Wysocki <rjw(a)rjwysocki.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months