[android-common:android12-5.4 4/9] drivers/dma-buf/heaps/page_pool.c:236:17: sparse: sparse: symbol 'pool_shrinker' was not declared. Should it be static?
by kernel test robot
Hi John,
First bad commit (maybe != root cause):
tree: https://android.googlesource.com/kernel/common android12-5.4
head: 82c67a98c7494b4e71dcbea03335509e9ccecfa5
commit: 44008f99d9ca0793e2562967e1da01fa74ee4a41 [4/9] ANDROID: dma-buf: system_heap: Add pagepool support to system heap
config: i386-randconfig-s001-20210812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.4
git checkout 44008f99d9ca0793e2562967e1da01fa74ee4a41
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/dma-buf/heaps/ kernel/
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 >>)
>> drivers/dma-buf/heaps/page_pool.c:236:17: sparse: sparse: symbol 'pool_shrinker' was not declared. Should it be static?
drivers/dma-buf/heaps/page_pool.c:243:5: sparse: sparse: symbol 'dmabuf_page_pool_init_shrinker' was not declared. Should it be static?
vim +/pool_shrinker +236 drivers/dma-buf/heaps/page_pool.c
bd4db96bfc247a John Stultz 2020-10-02 235
bd4db96bfc247a John Stultz 2020-10-02 @236 struct shrinker pool_shrinker = {
bd4db96bfc247a John Stultz 2020-10-02 237 .count_objects = dmabuf_page_pool_shrink_count,
bd4db96bfc247a John Stultz 2020-10-02 238 .scan_objects = dmabuf_page_pool_shrink_scan,
bd4db96bfc247a John Stultz 2020-10-02 239 .seeks = DEFAULT_SEEKS,
bd4db96bfc247a John Stultz 2020-10-02 240 .batch = 0,
bd4db96bfc247a John Stultz 2020-10-02 241 };
bd4db96bfc247a John Stultz 2020-10-02 242
:::::: The code at line 236 was first introduced by commit
:::::: bd4db96bfc247afdaf7a4cfde85fd8147522f3e6 ANDROID: dma-buf: heaps: Add a shrinker controlled page pool
:::::: TO: John Stultz <john.stultz(a)linaro.org>
:::::: CC: John Stultz <john.stultz(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[djwong-xfs:xfs-5.15-merge-next 39/58] fs/ext4/super.c:5843:6: error: variable 'enable_quota' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git xfs-5.15-merge-next
head: f63862d45f0c08bf8e32883decfacd2150c74a1b
commit: 7f47a994841800acc1f0d7a9c897065e2c4d86ac [39/58] xfs: don't crash with assfail
config: parisc-randconfig-r034-20210811 (attached as .config)
compiler: hppa-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/comm...
git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git fetch --no-tags djwong-xfs xfs-5.15-merge-next
git checkout 7f47a994841800acc1f0d7a9c897065e2c4d86ac
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
fs/ext4/super.c: In function 'ext4_remount':
>> fs/ext4/super.c:5843:6: error: variable 'enable_quota' set but not used [-Werror=unused-but-set-variable]
5843 | int enable_quota = 0;
| ^~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/enable_quota +5843 fs/ext4/super.c
673c610033a820 Theodore Ts'o 2010-12-15 5836
617ba13b31fbf5 Mingming Cao 2006-10-11 5837 static int ext4_remount(struct super_block *sb, int *flags, char *data)
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5838 {
617ba13b31fbf5 Mingming Cao 2006-10-11 5839 struct ext4_super_block *es;
617ba13b31fbf5 Mingming Cao 2006-10-11 5840 struct ext4_sb_info *sbi = EXT4_SB(sb);
f25391ebb475d3 Lukas Czerner 2020-07-23 5841 unsigned long old_sb_flags, vfs_flags;
617ba13b31fbf5 Mingming Cao 2006-10-11 5842 struct ext4_mount_options old_opts;
c79d967de3741c Christoph Hellwig 2010-05-19 @5843 int enable_quota = 0;
8a266467b8c484 Theodore Ts'o 2008-07-26 5844 ext4_group_t g;
c5e06d101aaf72 Johann Lombardi 2011-05-24 5845 int err = 0;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5846 #ifdef CONFIG_QUOTA
03dafb5f59bd31 Chen Gang 2013-01-24 5847 int i, j;
33458eaba4dfe7 Theodore Ts'o 2018-10-12 5848 char *to_free[EXT4_MAXQUOTAS];
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5849 #endif
d4c402d9fd97a5 Curt Wohlgemuth 2010-05-16 5850 char *orig_data = kstrdup(data, GFP_KERNEL);
b237e3044450fc Harshad Shirwadkar 2021-04-01 5851 struct ext4_parsed_options parsed_opts;
b237e3044450fc Harshad Shirwadkar 2021-04-01 5852
b237e3044450fc Harshad Shirwadkar 2021-04-01 5853 parsed_opts.journal_ioprio = DEFAULT_JOURNAL_IOPRIO;
b237e3044450fc Harshad Shirwadkar 2021-04-01 5854 parsed_opts.journal_devnum = 0;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5855
21ac738ede0b49 Chengguang Xu 2018-07-29 5856 if (data && !orig_data)
21ac738ede0b49 Chengguang Xu 2018-07-29 5857 return -ENOMEM;
21ac738ede0b49 Chengguang Xu 2018-07-29 5858
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5859 /* Store the original options */
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5860 old_sb_flags = sb->s_flags;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5861 old_opts.s_mount_opt = sbi->s_mount_opt;
a2595b8aa67011 Theodore Ts'o 2010-12-15 5862 old_opts.s_mount_opt2 = sbi->s_mount_opt2;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5863 old_opts.s_resuid = sbi->s_resuid;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5864 old_opts.s_resgid = sbi->s_resgid;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5865 old_opts.s_commit_interval = sbi->s_commit_interval;
30773840c19cea Theodore Ts'o 2009-01-03 5866 old_opts.s_min_batch_time = sbi->s_min_batch_time;
30773840c19cea Theodore Ts'o 2009-01-03 5867 old_opts.s_max_batch_time = sbi->s_max_batch_time;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5868 #ifdef CONFIG_QUOTA
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5869 old_opts.s_jquota_fmt = sbi->s_jquota_fmt;
a2d4a646e61954 Jan Kara 2014-09-11 5870 for (i = 0; i < EXT4_MAXQUOTAS; i++)
03dafb5f59bd31 Chen Gang 2013-01-24 5871 if (sbi->s_qf_names[i]) {
33458eaba4dfe7 Theodore Ts'o 2018-10-12 5872 char *qf_name = get_qf_name(sb, sbi, i);
33458eaba4dfe7 Theodore Ts'o 2018-10-12 5873
33458eaba4dfe7 Theodore Ts'o 2018-10-12 5874 old_opts.s_qf_names[i] = kstrdup(qf_name, GFP_KERNEL);
03dafb5f59bd31 Chen Gang 2013-01-24 5875 if (!old_opts.s_qf_names[i]) {
03dafb5f59bd31 Chen Gang 2013-01-24 5876 for (j = 0; j < i; j++)
03dafb5f59bd31 Chen Gang 2013-01-24 5877 kfree(old_opts.s_qf_names[j]);
3e36a16375eee3 Wei Yongjun 2013-03-02 5878 kfree(orig_data);
03dafb5f59bd31 Chen Gang 2013-01-24 5879 return -ENOMEM;
03dafb5f59bd31 Chen Gang 2013-01-24 5880 }
03dafb5f59bd31 Chen Gang 2013-01-24 5881 } else
03dafb5f59bd31 Chen Gang 2013-01-24 5882 old_opts.s_qf_names[i] = NULL;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5883 #endif
b3881f74b31b7d Theodore Ts'o 2009-01-05 5884 if (sbi->s_journal && sbi->s_journal->j_task->io_context)
b237e3044450fc Harshad Shirwadkar 2021-04-01 5885 parsed_opts.journal_ioprio =
b237e3044450fc Harshad Shirwadkar 2021-04-01 5886 sbi->s_journal->j_task->io_context->ioprio;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5887
f25391ebb475d3 Lukas Czerner 2020-07-23 5888 /*
f25391ebb475d3 Lukas Czerner 2020-07-23 5889 * Some options can be enabled by ext4 and/or by VFS mount flag
f25391ebb475d3 Lukas Czerner 2020-07-23 5890 * either way we need to make sure it matches in both *flags and
f25391ebb475d3 Lukas Czerner 2020-07-23 5891 * s_flags. Copy those selected flags from *flags to s_flags
f25391ebb475d3 Lukas Czerner 2020-07-23 5892 */
f25391ebb475d3 Lukas Czerner 2020-07-23 5893 vfs_flags = SB_LAZYTIME | SB_I_VERSION;
f25391ebb475d3 Lukas Czerner 2020-07-23 5894 sb->s_flags = (sb->s_flags & ~vfs_flags) | (*flags & vfs_flags);
f25391ebb475d3 Lukas Czerner 2020-07-23 5895
b237e3044450fc Harshad Shirwadkar 2021-04-01 5896 if (!parse_options(data, sb, &parsed_opts, 1)) {
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5897 err = -EINVAL;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5898 goto restore_opts;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5899 }
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5900
6b992ff2565836 Darrick J. Wong 2014-10-30 5901 if ((old_opts.s_mount_opt & EXT4_MOUNT_JOURNAL_CHECKSUM) ^
c6d3d56dd0ef6c Darrick J. Wong 2014-11-25 5902 test_opt(sb, JOURNAL_CHECKSUM)) {
c6d3d56dd0ef6c Darrick J. Wong 2014-11-25 5903 ext4_msg(sb, KERN_ERR, "changing journal_checksum "
2d5b86e048780c Eric Sandeen 2015-02-12 5904 "during remount not supported; ignoring");
2d5b86e048780c Eric Sandeen 2015-02-12 5905 sbi->s_mount_opt ^= EXT4_MOUNT_JOURNAL_CHECKSUM;
6b992ff2565836 Darrick J. Wong 2014-10-30 5906 }
6b992ff2565836 Darrick J. Wong 2014-10-30 5907
6ae6514b33f941 Piotr Sarna 2013-08-08 5908 if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA) {
6ae6514b33f941 Piotr Sarna 2013-08-08 5909 if (test_opt2(sb, EXPLICIT_DELALLOC)) {
6ae6514b33f941 Piotr Sarna 2013-08-08 5910 ext4_msg(sb, KERN_ERR, "can't mount with "
6ae6514b33f941 Piotr Sarna 2013-08-08 5911 "both data=journal and delalloc");
6ae6514b33f941 Piotr Sarna 2013-08-08 5912 err = -EINVAL;
6ae6514b33f941 Piotr Sarna 2013-08-08 5913 goto restore_opts;
6ae6514b33f941 Piotr Sarna 2013-08-08 5914 }
6ae6514b33f941 Piotr Sarna 2013-08-08 5915 if (test_opt(sb, DIOREAD_NOLOCK)) {
6ae6514b33f941 Piotr Sarna 2013-08-08 5916 ext4_msg(sb, KERN_ERR, "can't mount with "
6ae6514b33f941 Piotr Sarna 2013-08-08 5917 "both data=journal and dioread_nolock");
6ae6514b33f941 Piotr Sarna 2013-08-08 5918 err = -EINVAL;
6ae6514b33f941 Piotr Sarna 2013-08-08 5919 goto restore_opts;
6ae6514b33f941 Piotr Sarna 2013-08-08 5920 }
ab04df78181b27 Jan Kara 2016-12-03 5921 } else if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_ORDERED_DATA) {
ab04df78181b27 Jan Kara 2016-12-03 5922 if (test_opt(sb, JOURNAL_ASYNC_COMMIT)) {
ab04df78181b27 Jan Kara 2016-12-03 5923 ext4_msg(sb, KERN_ERR, "can't mount with "
ab04df78181b27 Jan Kara 2016-12-03 5924 "journal_async_commit in data=ordered mode");
ab04df78181b27 Jan Kara 2016-12-03 5925 err = -EINVAL;
ab04df78181b27 Jan Kara 2016-12-03 5926 goto restore_opts;
ab04df78181b27 Jan Kara 2016-12-03 5927 }
923ae0ff925043 Ross Zwisler 2015-02-16 5928 }
923ae0ff925043 Ross Zwisler 2015-02-16 5929
cdb7ee4c632759 Tahsin Erdogan 2017-06-22 5930 if ((sbi->s_mount_opt ^ old_opts.s_mount_opt) & EXT4_MOUNT_NO_MBCACHE) {
cdb7ee4c632759 Tahsin Erdogan 2017-06-22 5931 ext4_msg(sb, KERN_ERR, "can't enable nombcache during remount");
cdb7ee4c632759 Tahsin Erdogan 2017-06-22 5932 err = -EINVAL;
cdb7ee4c632759 Tahsin Erdogan 2017-06-22 5933 goto restore_opts;
cdb7ee4c632759 Tahsin Erdogan 2017-06-22 5934 }
cdb7ee4c632759 Tahsin Erdogan 2017-06-22 5935
9b5f6c9b83d912 Harshad Shirwadkar 2020-11-05 5936 if (ext4_test_mount_flag(sb, EXT4_MF_FS_ABORTED))
54d3adbc29f0c7 Theodore Ts'o 2020-03-28 5937 ext4_abort(sb, EXT4_ERR_ESHUTDOWN, "Abort forced by user");
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5938
1751e8a6cb935e Linus Torvalds 2017-11-27 5939 sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
1751e8a6cb935e Linus Torvalds 2017-11-27 5940 (test_opt(sb, POSIX_ACL) ? SB_POSIXACL : 0);
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5941
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5942 es = sbi->s_es;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5943
b3881f74b31b7d Theodore Ts'o 2009-01-05 5944 if (sbi->s_journal) {
617ba13b31fbf5 Mingming Cao 2006-10-11 5945 ext4_init_journal_params(sb, sbi->s_journal);
b237e3044450fc Harshad Shirwadkar 2021-04-01 5946 set_task_ioprio(sbi->s_journal->j_task, parsed_opts.journal_ioprio);
b3881f74b31b7d Theodore Ts'o 2009-01-05 5947 }
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5948
c92dc856848f32 Jan Kara 2020-11-27 5949 /* Flush outstanding errors before changing fs state */
c92dc856848f32 Jan Kara 2020-11-27 5950 flush_work(&sbi->s_error_work);
c92dc856848f32 Jan Kara 2020-11-27 5951
1751e8a6cb935e Linus Torvalds 2017-11-27 5952 if ((bool)(*flags & SB_RDONLY) != sb_rdonly(sb)) {
9b5f6c9b83d912 Harshad Shirwadkar 2020-11-05 5953 if (ext4_test_mount_flag(sb, EXT4_MF_FS_ABORTED)) {
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5954 err = -EROFS;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5955 goto restore_opts;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5956 }
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5957
1751e8a6cb935e Linus Torvalds 2017-11-27 5958 if (*flags & SB_RDONLY) {
38c03b34391dd2 Theodore Ts'o 2014-03-13 5959 err = sync_filesystem(sb);
38c03b34391dd2 Theodore Ts'o 2014-03-13 5960 if (err < 0)
38c03b34391dd2 Theodore Ts'o 2014-03-13 5961 goto restore_opts;
0f0dd62fddcbd0 Christoph Hellwig 2010-05-19 5962 err = dquot_suspend(sb, -1);
0f0dd62fddcbd0 Christoph Hellwig 2010-05-19 5963 if (err < 0)
c79d967de3741c Christoph Hellwig 2010-05-19 5964 goto restore_opts;
c79d967de3741c Christoph Hellwig 2010-05-19 5965
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5966 /*
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5967 * First of all, the unconditional stuff we have to do
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5968 * to disable replay of the journal when we next remount
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5969 */
1751e8a6cb935e Linus Torvalds 2017-11-27 5970 sb->s_flags |= SB_RDONLY;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5971
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5972 /*
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5973 * OK, test if we are remounting a valid rw partition
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5974 * readonly, and if so set the rdonly flag and then
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5975 * mark the partition as valid again.
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5976 */
617ba13b31fbf5 Mingming Cao 2006-10-11 5977 if (!(es->s_state & cpu_to_le16(EXT4_VALID_FS)) &&
617ba13b31fbf5 Mingming Cao 2006-10-11 5978 (sbi->s_mount_state & EXT4_VALID_FS))
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5979 es->s_state = cpu_to_le16(sbi->s_mount_state);
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5980
11215630aada28 Jan Kara 2020-07-10 5981 if (sbi->s_journal) {
11215630aada28 Jan Kara 2020-07-10 5982 /*
11215630aada28 Jan Kara 2020-07-10 5983 * We let remount-ro finish even if marking fs
11215630aada28 Jan Kara 2020-07-10 5984 * as clean failed...
11215630aada28 Jan Kara 2020-07-10 5985 */
617ba13b31fbf5 Mingming Cao 2006-10-11 5986 ext4_mark_recovery_complete(sb, es);
11215630aada28 Jan Kara 2020-07-10 5987 }
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5988 } else {
a13fb1a4533f26 Eric Sandeen 2009-08-18 5989 /* Make sure we can mount this feature set readwrite */
e2b911c53584a9 Darrick J. Wong 2015-10-17 5990 if (ext4_has_feature_readonly(sb) ||
2cb5cc8b09c939 Darrick J. Wong 2015-02-12 5991 !ext4_feature_set_ok(sb, 0)) {
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5992 err = -EROFS;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5993 goto restore_opts;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 5994 }
8a266467b8c484 Theodore Ts'o 2008-07-26 5995 /*
8a266467b8c484 Theodore Ts'o 2008-07-26 5996 * Make sure the group descriptor checksums
0b8e58a140cae2 Andreas Dilger 2009-06-03 5997 * are sane. If they aren't, refuse to remount r/w.
8a266467b8c484 Theodore Ts'o 2008-07-26 5998 */
8a266467b8c484 Theodore Ts'o 2008-07-26 5999 for (g = 0; g < sbi->s_groups_count; g++) {
8a266467b8c484 Theodore Ts'o 2008-07-26 6000 struct ext4_group_desc *gdp =
8a266467b8c484 Theodore Ts'o 2008-07-26 6001 ext4_get_group_desc(sb, g, NULL);
8a266467b8c484 Theodore Ts'o 2008-07-26 6002
feb0ab32a57e4e Darrick J. Wong 2012-04-29 6003 if (!ext4_group_desc_csum_verify(sb, g, gdp)) {
b31e15527a9bb7 Eric Sandeen 2009-06-04 6004 ext4_msg(sb, KERN_ERR,
b31e15527a9bb7 Eric Sandeen 2009-06-04 6005 "ext4_remount: Checksum for group %u failed (%u!=%u)",
e2b911c53584a9 Darrick J. Wong 2015-10-17 6006 g, le16_to_cpu(ext4_group_desc_csum(sb, g, gdp)),
8a266467b8c484 Theodore Ts'o 2008-07-26 6007 le16_to_cpu(gdp->bg_checksum));
6a797d27378389 Darrick J. Wong 2015-10-17 6008 err = -EFSBADCRC;
8a266467b8c484 Theodore Ts'o 2008-07-26 6009 goto restore_opts;
8a266467b8c484 Theodore Ts'o 2008-07-26 6010 }
8a266467b8c484 Theodore Ts'o 2008-07-26 6011 }
8a266467b8c484 Theodore Ts'o 2008-07-26 6012
ead6596b9e776a Eric Sandeen 2007-02-10 6013 /*
ead6596b9e776a Eric Sandeen 2007-02-10 6014 * If we have an unprocessed orphan list hanging
ead6596b9e776a Eric Sandeen 2007-02-10 6015 * around from a previously readonly bdev mount,
ead6596b9e776a Eric Sandeen 2007-02-10 6016 * require a full umount/remount for now.
ead6596b9e776a Eric Sandeen 2007-02-10 6017 */
ead6596b9e776a Eric Sandeen 2007-02-10 6018 if (es->s_last_orphan) {
b31e15527a9bb7 Eric Sandeen 2009-06-04 6019 ext4_msg(sb, KERN_WARNING, "Couldn't "
ead6596b9e776a Eric Sandeen 2007-02-10 6020 "remount RDWR because of unprocessed "
ead6596b9e776a Eric Sandeen 2007-02-10 6021 "orphan inode list. Please "
b31e15527a9bb7 Eric Sandeen 2009-06-04 6022 "umount/remount instead");
ead6596b9e776a Eric Sandeen 2007-02-10 6023 err = -EINVAL;
ead6596b9e776a Eric Sandeen 2007-02-10 6024 goto restore_opts;
ead6596b9e776a Eric Sandeen 2007-02-10 6025 }
ead6596b9e776a Eric Sandeen 2007-02-10 6026
ac27a0ec112a08 Dave Kleikamp 2006-10-11 6027 /*
ac27a0ec112a08 Dave Kleikamp 2006-10-11 6028 * Mounting a RDONLY partition read-write, so reread
ac27a0ec112a08 Dave Kleikamp 2006-10-11 6029 * and store the current valid flag. (It may have
ac27a0ec112a08 Dave Kleikamp 2006-10-11 6030 * been changed by e2fsck since we originally mounted
ac27a0ec112a08 Dave Kleikamp 2006-10-11 6031 * the partition.)
ac27a0ec112a08 Dave Kleikamp 2006-10-11 6032 */
11215630aada28 Jan Kara 2020-07-10 6033 if (sbi->s_journal) {
11215630aada28 Jan Kara 2020-07-10 6034 err = ext4_clear_journal_err(sb, es);
11215630aada28 Jan Kara 2020-07-10 6035 if (err)
11215630aada28 Jan Kara 2020-07-10 6036 goto restore_opts;
11215630aada28 Jan Kara 2020-07-10 6037 }
ac27a0ec112a08 Dave Kleikamp 2006-10-11 6038 sbi->s_mount_state = le16_to_cpu(es->s_state);
c89128a0083814 Jaegeuk Kim 2018-05-13 6039
c89128a0083814 Jaegeuk Kim 2018-05-13 6040 err = ext4_setup_super(sb, es, 0);
c89128a0083814 Jaegeuk Kim 2018-05-13 6041 if (err)
c89128a0083814 Jaegeuk Kim 2018-05-13 6042 goto restore_opts;
c89128a0083814 Jaegeuk Kim 2018-05-13 6043
1751e8a6cb935e Linus Torvalds 2017-11-27 6044 sb->s_flags &= ~SB_RDONLY;
e2b911c53584a9 Darrick J. Wong 2015-10-17 6045 if (ext4_has_feature_mmp(sb))
c5e06d101aaf72 Johann Lombardi 2011-05-24 6046 if (ext4_multi_mount_protect(sb,
c5e06d101aaf72 Johann Lombardi 2011-05-24 6047 le64_to_cpu(es->s_mmp_block))) {
c5e06d101aaf72 Johann Lombardi 2011-05-24 6048 err = -EROFS;
c5e06d101aaf72 Johann Lombardi 2011-05-24 6049 goto restore_opts;
c5e06d101aaf72 Johann Lombardi 2011-05-24 6050 }
c79d967de3741c Christoph Hellwig 2010-05-19 6051 enable_quota = 1;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 6052 }
ac27a0ec112a08 Dave Kleikamp 2006-10-11 6053 }
bfff68738f1cb5 Lukas Czerner 2010-10-27 6054
bfff68738f1cb5 Lukas Czerner 2010-10-27 6055 /*
bfff68738f1cb5 Lukas Czerner 2010-10-27 6056 * Reinitialize lazy itable initialization thread based on
bfff68738f1cb5 Lukas Czerner 2010-10-27 6057 * current settings
bfff68738f1cb5 Lukas Czerner 2010-10-27 6058 */
bc98a42c1f7d0f David Howells 2017-07-17 6059 if (sb_rdonly(sb) || !test_opt(sb, INIT_INODE_TABLE))
bfff68738f1cb5 Lukas Czerner 2010-10-27 6060 ext4_unregister_li_request(sb);
bfff68738f1cb5 Lukas Czerner 2010-10-27 6061 else {
bfff68738f1cb5 Lukas Czerner 2010-10-27 6062 ext4_group_t first_not_zeroed;
bfff68738f1cb5 Lukas Czerner 2010-10-27 6063 first_not_zeroed = ext4_has_uninit_itable(sb);
bfff68738f1cb5 Lukas Czerner 2010-10-27 6064 ext4_register_li_request(sb, first_not_zeroed);
bfff68738f1cb5 Lukas Czerner 2010-10-27 6065 }
bfff68738f1cb5 Lukas Czerner 2010-10-27 6066
0f5bde1db174f6 Jan Kara 2020-07-28 6067 /*
0f5bde1db174f6 Jan Kara 2020-07-28 6068 * Handle creation of system zone data early because it can fail.
0f5bde1db174f6 Jan Kara 2020-07-28 6069 * Releasing of existing data is done when we are sure remount will
0f5bde1db174f6 Jan Kara 2020-07-28 6070 * succeed.
0f5bde1db174f6 Jan Kara 2020-07-28 6071 */
dd0db94f305c9f Chunguang Xu 2020-09-24 6072 if (test_opt(sb, BLOCK_VALIDITY) && !sbi->s_system_blks) {
d176b1f62f242a Jan Kara 2020-07-28 6073 err = ext4_setup_system_zone(sb);
d176b1f62f242a Jan Kara 2020-07-28 6074 if (err)
d176b1f62f242a Jan Kara 2020-07-28 6075 goto restore_opts;
0f5bde1db174f6 Jan Kara 2020-07-28 6076 }
d176b1f62f242a Jan Kara 2020-07-28 6077
c89128a0083814 Jaegeuk Kim 2018-05-13 6078 if (sbi->s_journal == NULL && !(old_sb_flags & SB_RDONLY)) {
4392fbc4bab57d Jan Kara 2020-12-16 6079 err = ext4_commit_super(sb);
c89128a0083814 Jaegeuk Kim 2018-05-13 6080 if (err)
c89128a0083814 Jaegeuk Kim 2018-05-13 6081 goto restore_opts;
c89128a0083814 Jaegeuk Kim 2018-05-13 6082 }
0390131ba84fd3 Frank Mayhar 2009-01-07 6083
:::::: The code at line 5843 was first introduced by commit
:::::: c79d967de3741ceb60c5bbbf1b6f97eab9a89838 quota: move remount handling into the filesystem
:::::: TO: Christoph Hellwig <hch(a)infradead.org>
:::::: CC: Jan Kara <jack(a)suse.cz>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH v2 1/3] drivers/clocksource/timer-of: Remove __init markings
by kernel test robot
Hi Chunyan,
I love your patch! Yet something to improve:
[auto build test ERROR on tip/timers/core]
[also build test ERROR on linux/master linus/master v5.14-rc3 next-20210730]
[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/Chunyan-Zhang/Add-module-build-s...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 2d0a9eb23ccfdf11308bec6db0bc007585d919d2
config: s390-buildonly-randconfig-r003-20210728 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project c49df15c278857adecd12db6bb1cdc96885f7079)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://github.com/0day-ci/linux/commit/8e3c2c4da32affdbca933979110050e56...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Chunyan-Zhang/Add-module-build-support-for-timer-driver/20210715-145711
git checkout 8e3c2c4da32affdbca933979110050e564351c84
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=s390 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 >>):
s390x-linux-gnu-ld: drivers/tty/ipwireless/main.o: in function `ipwireless_attach':
main.c:(.text+0x21a): undefined reference to `iounmap'
s390x-linux-gnu-ld: main.c:(.text+0x270): undefined reference to `iounmap'
s390x-linux-gnu-ld: drivers/tty/ipwireless/main.o: in function `ipwireless_detach':
main.c:(.text+0x478): undefined reference to `iounmap'
s390x-linux-gnu-ld: main.c:(.text+0x4d4): undefined reference to `iounmap'
s390x-linux-gnu-ld: drivers/tty/ipwireless/main.o: in function `ipwireless_probe':
main.c:(.text+0x70c): undefined reference to `ioremap'
s390x-linux-gnu-ld: main.c:(.text+0x83e): undefined reference to `iounmap'
s390x-linux-gnu-ld: main.c:(.text+0x8b6): undefined reference to `ioremap'
s390x-linux-gnu-ld: main.c:(.text+0x93a): undefined reference to `iounmap'
s390x-linux-gnu-ld: drivers/char/xillybus/xillybus_of.o: in function `xilly_drv_probe':
xillybus_of.c:(.text+0x9a): undefined reference to `devm_platform_ioremap_resource'
s390x-linux-gnu-ld: drivers/net/arcnet/arc-rimi.o: in function `check_mirror':
arc-rimi.c:(.text+0x5c): undefined reference to `ioremap'
s390x-linux-gnu-ld: arc-rimi.c:(.text+0xc2): undefined reference to `iounmap'
s390x-linux-gnu-ld: drivers/net/arcnet/arc-rimi.o: in function `arc_rimi_exit':
arc-rimi.c:(.exit.text+0x44): undefined reference to `iounmap'
s390x-linux-gnu-ld: drivers/net/arcnet/arc-rimi.o: in function `arcrimi_found':
arc-rimi.c:(.init.text+0x37c): undefined reference to `ioremap'
s390x-linux-gnu-ld: arc-rimi.c:(.init.text+0x3c8): undefined reference to `iounmap'
s390x-linux-gnu-ld: arc-rimi.c:(.init.text+0x614): undefined reference to `iounmap'
s390x-linux-gnu-ld: arc-rimi.c:(.init.text+0x674): undefined reference to `ioremap'
s390x-linux-gnu-ld: arc-rimi.c:(.init.text+0x6de): undefined reference to `iounmap'
s390x-linux-gnu-ld: drivers/net/ethernet/fujitsu/fmvj18x_cs.o: in function `fmvj18x_probe':
fmvj18x_cs.c:(.text+0x756): undefined reference to `ioremap'
s390x-linux-gnu-ld: fmvj18x_cs.c:(.text+0x788): undefined reference to `iounmap'
s390x-linux-gnu-ld: fmvj18x_cs.c:(.text+0x7e0): undefined reference to `iounmap'
s390x-linux-gnu-ld: drivers/net/ethernet/fujitsu/fmvj18x_cs.o: in function `fmvj18x_detach':
fmvj18x_cs.c:(.text+0xce0): undefined reference to `iounmap'
s390x-linux-gnu-ld: drivers/net/ethernet/fujitsu/fmvj18x_cs.o: in function `fmvj18x_get_hwinfo':
fmvj18x_cs.c:(.text+0x27d4): undefined reference to `ioremap'
s390x-linux-gnu-ld: fmvj18x_cs.c:(.text+0x2940): undefined reference to `iounmap'
s390x-linux-gnu-ld: drivers/pcmcia/cistpl.o: in function `release_cis_mem':
cistpl.c:(.text+0x9c): undefined reference to `iounmap'
s390x-linux-gnu-ld: drivers/pcmcia/cistpl.o: in function `set_cis_map':
cistpl.c:(.text+0x46c): undefined reference to `ioremap'
s390x-linux-gnu-ld: cistpl.c:(.text+0x4a8): undefined reference to `iounmap'
s390x-linux-gnu-ld: cistpl.c:(.text+0x4e6): undefined reference to `iounmap'
s390x-linux-gnu-ld: cistpl.c:(.text+0x4f8): undefined reference to `ioremap'
s390x-linux-gnu-ld: drivers/crypto/ccree/cc_driver.o: in function `ccree_probe':
cc_driver.c:(.text+0x5a8): undefined reference to `devm_ioremap_resource'
s390x-linux-gnu-ld: drivers/crypto/ccree/cc_debugfs.o: in function `cc_debugfs_init':
cc_debugfs.c:(.text+0xac): undefined reference to `debugfs_create_regset32'
s390x-linux-gnu-ld: cc_debugfs.c:(.text+0x190): undefined reference to `debugfs_create_regset32'
s390x-linux-gnu-ld: drivers/clocksource/timer-of.o: in function `timer_of_init':
timer-of.c:(.text+0x104): undefined reference to `of_iomap'
>> s390x-linux-gnu-ld: timer-of.c:(.text+0x306): undefined reference to `iounmap'
s390x-linux-gnu-ld: drivers/clocksource/timer-of.o: in function `timer_of_cleanup':
timer-of.c:(.text+0x5f2): undefined reference to `iounmap'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [RFC PATCH] nvmet: Fix conventional passthru
by kernel test robot
Hi Adam,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on linus/master]
[also build test ERROR on v5.14-rc5 next-20210812]
[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/Adam-Manzanares/nvmet-Fix-conven...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f8fbb47c6e86c0b75f8df864db702c3e3f757361
config: x86_64-randconfig-r014-20210809 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 767496d19cb9a1fbba57ff08095faa161998ee36)
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/05175480696ae235d783d7a46b5cc1f42...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Adam-Manzanares/nvmet-Fix-conventional-passthru/20210813-051456
git checkout 05175480696ae235d783d7a46b5cc1f42a0ad4c6
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/nvme/target/
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/nvme/target/core.c:1369:6: error: expected value in expression
#elif
^
1 error generated.
vim +1369 drivers/nvme/target/core.c
1330
1331 u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn,
1332 struct nvmet_req *req, u32 kato, struct nvmet_ctrl **ctrlp)
1333 {
1334 struct nvmet_subsys *subsys;
1335 struct nvmet_ctrl *ctrl;
1336 int ret;
1337 u16 status;
1338
1339 status = NVME_SC_CONNECT_INVALID_PARAM | NVME_SC_DNR;
1340 subsys = nvmet_find_get_subsys(req->port, subsysnqn);
1341 if (!subsys) {
1342 pr_warn("connect request for invalid subsystem %s!\n",
1343 subsysnqn);
1344 req->cqe->result.u32 = IPO_IATTR_CONNECT_DATA(subsysnqn);
1345 req->error_loc = offsetof(struct nvme_common_command, dptr);
1346 goto out;
1347 }
1348
1349 down_read(&nvmet_config_sem);
1350 if (!nvmet_host_allowed(subsys, hostnqn)) {
1351 pr_info("connect by host %s for subsystem %s not allowed\n",
1352 hostnqn, subsysnqn);
1353 req->cqe->result.u32 = IPO_IATTR_CONNECT_DATA(hostnqn);
1354 up_read(&nvmet_config_sem);
1355 status = NVME_SC_CONNECT_INVALID_HOST | NVME_SC_DNR;
1356 req->error_loc = offsetof(struct nvme_common_command, dptr);
1357 goto out_put_subsystem;
1358 }
1359 up_read(&nvmet_config_sem);
1360
1361 status = NVME_SC_INTERNAL;
1362 ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
1363 if (!ctrl)
1364 goto out_put_subsystem;
1365 mutex_init(&ctrl->lock);
1366
1367 #ifdef CONFIG_NVME_TARGET_PASSTHRU
1368 nvmet_init_cap(ctrl, subsys->passthru_ctrl);
> 1369 #elif
1370 nvmet_init_cap(ctrl, NULL);
1371 #endif
1372
1373 ctrl->port = req->port;
1374
1375 INIT_WORK(&ctrl->async_event_work, nvmet_async_event_work);
1376 INIT_LIST_HEAD(&ctrl->async_events);
1377 INIT_RADIX_TREE(&ctrl->p2p_ns_map, GFP_KERNEL);
1378 INIT_WORK(&ctrl->fatal_err_work, nvmet_fatal_error_handler);
1379 INIT_DELAYED_WORK(&ctrl->ka_work, nvmet_keep_alive_timer);
1380
1381 memcpy(ctrl->subsysnqn, subsysnqn, NVMF_NQN_SIZE);
1382 memcpy(ctrl->hostnqn, hostnqn, NVMF_NQN_SIZE);
1383
1384 kref_init(&ctrl->ref);
1385 ctrl->subsys = subsys;
1386 WRITE_ONCE(ctrl->aen_enabled, NVMET_AEN_CFG_OPTIONAL);
1387
1388 ctrl->changed_ns_list = kmalloc_array(NVME_MAX_CHANGED_NAMESPACES,
1389 sizeof(__le32), GFP_KERNEL);
1390 if (!ctrl->changed_ns_list)
1391 goto out_free_ctrl;
1392
1393 ctrl->sqs = kcalloc(subsys->max_qid + 1,
1394 sizeof(struct nvmet_sq *),
1395 GFP_KERNEL);
1396 if (!ctrl->sqs)
1397 goto out_free_changed_ns_list;
1398
1399 if (subsys->cntlid_min > subsys->cntlid_max)
1400 goto out_free_sqs;
1401
1402 ret = ida_simple_get(&cntlid_ida,
1403 subsys->cntlid_min, subsys->cntlid_max,
1404 GFP_KERNEL);
1405 if (ret < 0) {
1406 status = NVME_SC_CONNECT_CTRL_BUSY | NVME_SC_DNR;
1407 goto out_free_sqs;
1408 }
1409 ctrl->cntlid = ret;
1410
1411 ctrl->ops = req->ops;
1412
1413 /*
1414 * Discovery controllers may use some arbitrary high value
1415 * in order to cleanup stale discovery sessions
1416 */
1417 if ((ctrl->subsys->type == NVME_NQN_DISC) && !kato)
1418 kato = NVMET_DISC_KATO_MS;
1419
1420 /* keep-alive timeout in seconds */
1421 ctrl->kato = DIV_ROUND_UP(kato, 1000);
1422
1423 ctrl->err_counter = 0;
1424 spin_lock_init(&ctrl->error_lock);
1425
1426 nvmet_start_keep_alive_timer(ctrl);
1427
1428 mutex_lock(&subsys->lock);
1429 list_add_tail(&ctrl->subsys_entry, &subsys->ctrls);
1430 nvmet_setup_p2p_ns_map(ctrl, req);
1431 mutex_unlock(&subsys->lock);
1432
1433 *ctrlp = ctrl;
1434 return 0;
1435
1436 out_free_sqs:
1437 kfree(ctrl->sqs);
1438 out_free_changed_ns_list:
1439 kfree(ctrl->changed_ns_list);
1440 out_free_ctrl:
1441 kfree(ctrl);
1442 out_put_subsystem:
1443 nvmet_subsys_put(subsys);
1444 out:
1445 return status;
1446 }
1447
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [RFC PATCH] nvmet: Fix conventional passthru
by kernel test robot
Hi Adam,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on linus/master]
[also build test ERROR on v5.14-rc5 next-20210812]
[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/Adam-Manzanares/nvmet-Fix-conven...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f8fbb47c6e86c0b75f8df864db702c3e3f757361
config: microblaze-randconfig-r015-20210809 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/05175480696ae235d783d7a46b5cc1f42...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Adam-Manzanares/nvmet-Fix-conventional-passthru/20210813-051456
git checkout 05175480696ae235d783d7a46b5cc1f42a0ad4c6
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=microblaze SHELL=/bin/bash drivers/nvme/target/
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/nvme/target/core.c: In function 'nvmet_alloc_ctrl':
>> drivers/nvme/target/core.c:1369:6: error: #elif with no expression
1369 | #elif
| ^
At top level:
drivers/nvme/target/core.c:1199:13: warning: 'nvmet_init_cap' defined but not used [-Wunused-function]
1199 | static void nvmet_init_cap(struct nvmet_ctrl *ctrl, struct nvme_ctrl *ptctrl)
| ^~~~~~~~~~~~~~
vim +1369 drivers/nvme/target/core.c
1330
1331 u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn,
1332 struct nvmet_req *req, u32 kato, struct nvmet_ctrl **ctrlp)
1333 {
1334 struct nvmet_subsys *subsys;
1335 struct nvmet_ctrl *ctrl;
1336 int ret;
1337 u16 status;
1338
1339 status = NVME_SC_CONNECT_INVALID_PARAM | NVME_SC_DNR;
1340 subsys = nvmet_find_get_subsys(req->port, subsysnqn);
1341 if (!subsys) {
1342 pr_warn("connect request for invalid subsystem %s!\n",
1343 subsysnqn);
1344 req->cqe->result.u32 = IPO_IATTR_CONNECT_DATA(subsysnqn);
1345 req->error_loc = offsetof(struct nvme_common_command, dptr);
1346 goto out;
1347 }
1348
1349 down_read(&nvmet_config_sem);
1350 if (!nvmet_host_allowed(subsys, hostnqn)) {
1351 pr_info("connect by host %s for subsystem %s not allowed\n",
1352 hostnqn, subsysnqn);
1353 req->cqe->result.u32 = IPO_IATTR_CONNECT_DATA(hostnqn);
1354 up_read(&nvmet_config_sem);
1355 status = NVME_SC_CONNECT_INVALID_HOST | NVME_SC_DNR;
1356 req->error_loc = offsetof(struct nvme_common_command, dptr);
1357 goto out_put_subsystem;
1358 }
1359 up_read(&nvmet_config_sem);
1360
1361 status = NVME_SC_INTERNAL;
1362 ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
1363 if (!ctrl)
1364 goto out_put_subsystem;
1365 mutex_init(&ctrl->lock);
1366
1367 #ifdef CONFIG_NVME_TARGET_PASSTHRU
1368 nvmet_init_cap(ctrl, subsys->passthru_ctrl);
> 1369 #elif
1370 nvmet_init_cap(ctrl, NULL);
1371 #endif
1372
1373 ctrl->port = req->port;
1374
1375 INIT_WORK(&ctrl->async_event_work, nvmet_async_event_work);
1376 INIT_LIST_HEAD(&ctrl->async_events);
1377 INIT_RADIX_TREE(&ctrl->p2p_ns_map, GFP_KERNEL);
1378 INIT_WORK(&ctrl->fatal_err_work, nvmet_fatal_error_handler);
1379 INIT_DELAYED_WORK(&ctrl->ka_work, nvmet_keep_alive_timer);
1380
1381 memcpy(ctrl->subsysnqn, subsysnqn, NVMF_NQN_SIZE);
1382 memcpy(ctrl->hostnqn, hostnqn, NVMF_NQN_SIZE);
1383
1384 kref_init(&ctrl->ref);
1385 ctrl->subsys = subsys;
1386 WRITE_ONCE(ctrl->aen_enabled, NVMET_AEN_CFG_OPTIONAL);
1387
1388 ctrl->changed_ns_list = kmalloc_array(NVME_MAX_CHANGED_NAMESPACES,
1389 sizeof(__le32), GFP_KERNEL);
1390 if (!ctrl->changed_ns_list)
1391 goto out_free_ctrl;
1392
1393 ctrl->sqs = kcalloc(subsys->max_qid + 1,
1394 sizeof(struct nvmet_sq *),
1395 GFP_KERNEL);
1396 if (!ctrl->sqs)
1397 goto out_free_changed_ns_list;
1398
1399 if (subsys->cntlid_min > subsys->cntlid_max)
1400 goto out_free_sqs;
1401
1402 ret = ida_simple_get(&cntlid_ida,
1403 subsys->cntlid_min, subsys->cntlid_max,
1404 GFP_KERNEL);
1405 if (ret < 0) {
1406 status = NVME_SC_CONNECT_CTRL_BUSY | NVME_SC_DNR;
1407 goto out_free_sqs;
1408 }
1409 ctrl->cntlid = ret;
1410
1411 ctrl->ops = req->ops;
1412
1413 /*
1414 * Discovery controllers may use some arbitrary high value
1415 * in order to cleanup stale discovery sessions
1416 */
1417 if ((ctrl->subsys->type == NVME_NQN_DISC) && !kato)
1418 kato = NVMET_DISC_KATO_MS;
1419
1420 /* keep-alive timeout in seconds */
1421 ctrl->kato = DIV_ROUND_UP(kato, 1000);
1422
1423 ctrl->err_counter = 0;
1424 spin_lock_init(&ctrl->error_lock);
1425
1426 nvmet_start_keep_alive_timer(ctrl);
1427
1428 mutex_lock(&subsys->lock);
1429 list_add_tail(&ctrl->subsys_entry, &subsys->ctrls);
1430 nvmet_setup_p2p_ns_map(ctrl, req);
1431 mutex_unlock(&subsys->lock);
1432
1433 *ctrlp = ctrl;
1434 return 0;
1435
1436 out_free_sqs:
1437 kfree(ctrl->sqs);
1438 out_free_changed_ns_list:
1439 kfree(ctrl->changed_ns_list);
1440 out_free_ctrl:
1441 kfree(ctrl);
1442 out_put_subsystem:
1443 nvmet_subsys_put(subsys);
1444 out:
1445 return status;
1446 }
1447
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [Intel-gfx] [v4 7/7] drm/i915/dsi: Send proper brightness value via MIPI DCS command
by kernel test robot
Hi Lee,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip v5.14-rc5 next-20210812]
[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/Lee-Shawn-C/MIPI-DSI-driver-enha...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-s002-20210812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
# https://github.com/0day-ci/linux/commit/ba1a887b66f9314179885cc890152e2a2...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Lee-Shawn-C/MIPI-DSI-driver-enhancements/20210812-234252
git checkout ba1a887b66f9314179885cc890152e2a257eac89
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
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 >>)
>> drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c:69:20: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] data @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c:69:20: sparse: expected unsigned short [usertype] data
drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c:69:20: sparse: got restricted __be16 [usertype]
vim +69 drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c
64
65 static void dcs_set_backlight(const struct drm_connector_state *conn_state, u32 level)
66 {
67 struct intel_dsi *intel_dsi = enc_to_intel_dsi(to_intel_encoder(conn_state->best_encoder));
68 struct mipi_dsi_device *dsi_device;
> 69 u16 data = cpu_to_be16(level);
70 enum port port;
71
72 for_each_dsi_port(port, intel_dsi->dcs_backlight_ports) {
73 dsi_device = intel_dsi->dsi_hosts[port]->device;
74 mipi_dsi_dcs_write(dsi_device, MIPI_DCS_SET_DISPLAY_BRIGHTNESS,
75 &data, sizeof(data));
76 }
77 }
78
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
drivers/scsi/elx/libefc/efc_device.c:932:6: warning: cast to smaller integer type 'enum efc_nport_topology' from 'void *'
by kernel test robot
Hi James,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f8fbb47c6e86c0b75f8df864db702c3e3f757361
commit: ebc076b3eddc807729bd81f7bc48e798a3ddc477 scsi: elx: efct: Tie into kernel Kconfig and build process
date: 8 weeks ago
config: x86_64-randconfig-a004-20210813 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 767496d19cb9a1fbba57ff08095faa161998ee36)
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/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ebc076b3eddc807729bd81f7bc48e798a3ddc477
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/scsi/elx/libefc/efc_device.c:932:6: warning: cast to smaller integer type 'enum efc_nport_topology' from 'void *' [-Wvoid-pointer-to-enum-cast]
(enum efc_nport_topology)arg;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +932 drivers/scsi/elx/libefc/efc_device.c
202bfdffae27a5 James Smart 2021-06-01 909
202bfdffae27a5 James Smart 2021-06-01 910 void
202bfdffae27a5 James Smart 2021-06-01 911 __efc_d_wait_topology_notify(struct efc_sm_ctx *ctx,
202bfdffae27a5 James Smart 2021-06-01 912 enum efc_sm_event evt, void *arg)
202bfdffae27a5 James Smart 2021-06-01 913 {
202bfdffae27a5 James Smart 2021-06-01 914 int rc;
202bfdffae27a5 James Smart 2021-06-01 915 struct efc_node *node = ctx->app;
202bfdffae27a5 James Smart 2021-06-01 916
202bfdffae27a5 James Smart 2021-06-01 917 efc_node_evt_set(ctx, evt, __func__);
202bfdffae27a5 James Smart 2021-06-01 918
202bfdffae27a5 James Smart 2021-06-01 919 node_sm_trace();
202bfdffae27a5 James Smart 2021-06-01 920
202bfdffae27a5 James Smart 2021-06-01 921 switch (evt) {
202bfdffae27a5 James Smart 2021-06-01 922 case EFC_EVT_ENTER:
202bfdffae27a5 James Smart 2021-06-01 923 efc_node_hold_frames(node);
202bfdffae27a5 James Smart 2021-06-01 924 break;
202bfdffae27a5 James Smart 2021-06-01 925
202bfdffae27a5 James Smart 2021-06-01 926 case EFC_EVT_EXIT:
202bfdffae27a5 James Smart 2021-06-01 927 efc_node_accept_frames(node);
202bfdffae27a5 James Smart 2021-06-01 928 break;
202bfdffae27a5 James Smart 2021-06-01 929
202bfdffae27a5 James Smart 2021-06-01 930 case EFC_EVT_NPORT_TOPOLOGY_NOTIFY: {
202bfdffae27a5 James Smart 2021-06-01 931 enum efc_nport_topology topology =
202bfdffae27a5 James Smart 2021-06-01 @932 (enum efc_nport_topology)arg;
202bfdffae27a5 James Smart 2021-06-01 933
202bfdffae27a5 James Smart 2021-06-01 934 WARN_ON(node->nport->domain->attached);
202bfdffae27a5 James Smart 2021-06-01 935
202bfdffae27a5 James Smart 2021-06-01 936 WARN_ON(node->send_ls_acc != EFC_NODE_SEND_LS_ACC_PLOGI);
202bfdffae27a5 James Smart 2021-06-01 937
202bfdffae27a5 James Smart 2021-06-01 938 node_printf(node, "topology notification, topology=%d\n",
202bfdffae27a5 James Smart 2021-06-01 939 topology);
202bfdffae27a5 James Smart 2021-06-01 940
202bfdffae27a5 James Smart 2021-06-01 941 /* At the time the PLOGI was received, the topology was unknown,
202bfdffae27a5 James Smart 2021-06-01 942 * so we didn't know which node would perform the domain attach:
202bfdffae27a5 James Smart 2021-06-01 943 * 1. The node from which the PLOGI was sent (p2p) or
202bfdffae27a5 James Smart 2021-06-01 944 * 2. The node to which the FLOGI was sent (fabric).
202bfdffae27a5 James Smart 2021-06-01 945 */
202bfdffae27a5 James Smart 2021-06-01 946 if (topology == EFC_NPORT_TOPO_P2P) {
202bfdffae27a5 James Smart 2021-06-01 947 /* if this is p2p, need to attach to the domain using
202bfdffae27a5 James Smart 2021-06-01 948 * the d_id from the PLOGI received
202bfdffae27a5 James Smart 2021-06-01 949 */
202bfdffae27a5 James Smart 2021-06-01 950 efc_domain_attach(node->nport->domain,
202bfdffae27a5 James Smart 2021-06-01 951 node->ls_acc_did);
202bfdffae27a5 James Smart 2021-06-01 952 }
202bfdffae27a5 James Smart 2021-06-01 953 /* else, if this is fabric, the domain attach
202bfdffae27a5 James Smart 2021-06-01 954 * should be performed by the fabric node (node sending FLOGI);
202bfdffae27a5 James Smart 2021-06-01 955 * just wait for attach to complete
202bfdffae27a5 James Smart 2021-06-01 956 */
202bfdffae27a5 James Smart 2021-06-01 957
202bfdffae27a5 James Smart 2021-06-01 958 efc_node_transition(node, __efc_d_wait_domain_attach, NULL);
202bfdffae27a5 James Smart 2021-06-01 959 break;
202bfdffae27a5 James Smart 2021-06-01 960 }
202bfdffae27a5 James Smart 2021-06-01 961 case EFC_EVT_DOMAIN_ATTACH_OK:
202bfdffae27a5 James Smart 2021-06-01 962 WARN_ON(!node->nport->domain->attached);
202bfdffae27a5 James Smart 2021-06-01 963 node_printf(node, "domain attach ok\n");
202bfdffae27a5 James Smart 2021-06-01 964 /* sm: / efc_node_attach */
202bfdffae27a5 James Smart 2021-06-01 965 rc = efc_node_attach(node);
202bfdffae27a5 James Smart 2021-06-01 966 efc_node_transition(node, __efc_d_wait_node_attach, NULL);
202bfdffae27a5 James Smart 2021-06-01 967 if (rc < 0)
202bfdffae27a5 James Smart 2021-06-01 968 efc_node_post_event(node,
202bfdffae27a5 James Smart 2021-06-01 969 EFC_EVT_NODE_ATTACH_FAIL, NULL);
202bfdffae27a5 James Smart 2021-06-01 970
202bfdffae27a5 James Smart 2021-06-01 971 break;
202bfdffae27a5 James Smart 2021-06-01 972
202bfdffae27a5 James Smart 2021-06-01 973 default:
202bfdffae27a5 James Smart 2021-06-01 974 __efc_d_common(__func__, ctx, evt, arg);
202bfdffae27a5 James Smart 2021-06-01 975 }
202bfdffae27a5 James Smart 2021-06-01 976 }
202bfdffae27a5 James Smart 2021-06-01 977
:::::: The code at line 932 was first introduced by commit
:::::: 202bfdffae27a50d6fae0a259cde1333d9833127 scsi: elx: libefc: FC node ELS and state handling
:::::: TO: James Smart <jsmart2021(a)gmail.com>
:::::: CC: Martin K. Petersen <martin.petersen(a)oracle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[kees:kspp/memcpy/next-20210803/v2-devel 70/86] drivers/video/fbdev/atmel_lcdfb.c:362:9: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/memcpy/next-20210803/v2-devel
head: 4752984fc24104f399e70f99d48afa047d86a381
commit: 28c76742b0c2f562e9cdc38621f12b4c10ee22db [70/86] fortify: Detect struct member overflows in memset() at compile-time
config: powerpc-randconfig-s031-20210810 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 10.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id...
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees kspp/memcpy/next-20210803/v2-devel
git checkout 28c76742b0c2f562e9cdc38621f12b4c10ee22db
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc
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 >>)
drivers/video/fbdev/atmel_lcdfb.c:354:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char [noderef] __iomem *screen_base @@ got void * @@
drivers/video/fbdev/atmel_lcdfb.c:354:27: sparse: expected char [noderef] __iomem *screen_base
drivers/video/fbdev/atmel_lcdfb.c:354:27: sparse: got void *
>> drivers/video/fbdev/atmel_lcdfb.c:362:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got char [noderef] __iomem *screen_base @@
drivers/video/fbdev/atmel_lcdfb.c:362:9: sparse: expected void const *
drivers/video/fbdev/atmel_lcdfb.c:362:9: sparse: got char [noderef] __iomem *screen_base
>> drivers/video/fbdev/atmel_lcdfb.c:362:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got char [noderef] __iomem *screen_base @@
drivers/video/fbdev/atmel_lcdfb.c:362:9: sparse: expected void const *
drivers/video/fbdev/atmel_lcdfb.c:362:9: sparse: got char [noderef] __iomem *screen_base
drivers/video/fbdev/atmel_lcdfb.c:362:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got char [noderef] __iomem *screen_base @@
drivers/video/fbdev/atmel_lcdfb.c:362:9: sparse: expected void *
drivers/video/fbdev/atmel_lcdfb.c:362:9: sparse: got char [noderef] __iomem *screen_base
drivers/video/fbdev/atmel_lcdfb.c:333:59: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void *cpu_addr @@ got char [noderef] __iomem *screen_base @@
drivers/video/fbdev/atmel_lcdfb.c:333:59: sparse: expected void *cpu_addr
drivers/video/fbdev/atmel_lcdfb.c:333:59: sparse: got char [noderef] __iomem *screen_base
drivers/video/fbdev/atmel_lcdfb.c:333:59: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void *cpu_addr @@ got char [noderef] __iomem *screen_base @@
drivers/video/fbdev/atmel_lcdfb.c:333:59: sparse: expected void *cpu_addr
drivers/video/fbdev/atmel_lcdfb.c:333:59: sparse: got char [noderef] __iomem *screen_base
vim +362 drivers/video/fbdev/atmel_lcdfb.c
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 336
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 337 /**
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 338 * atmel_lcdfb_alloc_video_memory - Allocate framebuffer memory
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 339 * @sinfo: the frame buffer to allocate memory for
1d01e83557105e drivers/video/atmel_lcdfb.c Krzysztof Helt 2009-07-08 340 *
1d01e83557105e drivers/video/atmel_lcdfb.c Krzysztof Helt 2009-07-08 341 * This function is called only from the atmel_lcdfb_probe()
1d01e83557105e drivers/video/atmel_lcdfb.c Krzysztof Helt 2009-07-08 342 * so no locking by fb_info->mm_lock around smem_len setting is needed.
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 343 */
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 344 static int atmel_lcdfb_alloc_video_memory(struct atmel_lcdfb_info *sinfo)
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 345 {
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 346 struct fb_info *info = sinfo->info;
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 347 struct fb_var_screeninfo *var = &info->var;
ea757acad5a518 drivers/video/atmel_lcdfb.c Haavard Skinnemoen 2008-08-12 348 unsigned int smem_len;
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 349
ea757acad5a518 drivers/video/atmel_lcdfb.c Haavard Skinnemoen 2008-08-12 350 smem_len = (var->xres_virtual * var->yres_virtual
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 351 * ((var->bits_per_pixel + 7) / 8));
ea757acad5a518 drivers/video/atmel_lcdfb.c Haavard Skinnemoen 2008-08-12 352 info->fix.smem_len = max(smem_len, sinfo->smem_len);
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 353
f6e45661f9be54 drivers/video/fbdev/atmel_lcdfb.c Luis R. Rodriguez 2016-01-22 354 info->screen_base = dma_alloc_wc(info->device, info->fix.smem_len,
f6e45661f9be54 drivers/video/fbdev/atmel_lcdfb.c Luis R. Rodriguez 2016-01-22 355 (dma_addr_t *)&info->fix.smem_start,
f6e45661f9be54 drivers/video/fbdev/atmel_lcdfb.c Luis R. Rodriguez 2016-01-22 356 GFP_KERNEL);
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 357
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 358 if (!info->screen_base) {
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 359 return -ENOMEM;
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 360 }
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 361
01d3a5e7fab773 drivers/video/atmel_lcdfb.c Haavard Skinnemoen 2008-04-28 @362 memset(info->screen_base, 0, info->fix.smem_len);
01d3a5e7fab773 drivers/video/atmel_lcdfb.c Haavard Skinnemoen 2008-04-28 363
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 364 return 0;
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 365 }
14340586148e7c drivers/video/atmel_lcdfb.c Nicolas Ferre 2007-05-10 366
:::::: The code at line 362 was first introduced by commit
:::::: 01d3a5e7fab7732cfc5d5d4533e9378ea435295a atmel_lcdfb: don't initialize a pre-allocated framebuffer
:::::: TO: Haavard Skinnemoen <hskinnemoen(a)atmel.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, 1 month