[jlayton:ceph-fscrypt 38/39] fs/ceph/file.c:927:37: error: invalid type argument of unary (have 'u64' {aka 'long long unsigned int'})
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git ceph-fscrypt
head: 6b3ebb239173120d2d62579b9d2a27a24c444a45
commit: 3b7f98c91a9e727c828e4e80b9543672e4439166 [38/39] ceph: add a helper for adjusting offset and length
config: ia64-randconfig-s032-20210209 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.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-215-g0fb77bb6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git/commit/...
git remote add jlayton https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git
git fetch --no-tags jlayton ceph-fscrypt
git checkout 3b7f98c91a9e727c828e4e80b9543672e4439166
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=ia64
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 arch/ia64/include/asm/pgtable.h:154,
from include/linux/pgtable.h:6,
from arch/ia64/include/asm/uaccess.h:40,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/namei.h:5,
from fs/ceph/file.c:10:
arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
arch/ia64/include/asm/mmu_context.h:127:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
127 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
| ^~~~~~~
In file included from <command-line>:
fs/ceph/file.c: At top level:
include/linux/compiler_types.h:298:2: error: expected identifier or '(' before 'do'
298 | do { \
| ^~
include/linux/compiler_types.h:308:2: note: in expansion of macro '__compiletime_assert'
308 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
fs/ceph/file.c:27:1: note: in expansion of macro 'BUILD_BUG_ON'
27 | BUILD_BUG_ON(CEPH_FSCRYPT_BLOCK_SHIFT > PAGE_SHIFT);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:302:4: error: expected identifier or '(' before 'while'
302 | } while (0)
| ^~~~~
include/linux/compiler_types.h:308:2: note: in expansion of macro '__compiletime_assert'
308 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
fs/ceph/file.c:27:1: note: in expansion of macro 'BUILD_BUG_ON'
27 | BUILD_BUG_ON(CEPH_FSCRYPT_BLOCK_SHIFT > PAGE_SHIFT);
| ^~~~~~~~~~~~
fs/ceph/file.c: In function 'ceph_sync_read':
>> fs/ceph/file.c:927:37: error: invalid type argument of unary '*' (have 'u64' {aka 'long long unsigned int'})
927 | fscrypt_adjust_off_and_len(inode, *read_off, *read_len);
| ^~~~~~~~~
fs/ceph/file.c:927:48: error: invalid type argument of unary '*' (have 'u64' {aka 'long long unsigned int'})
927 | fscrypt_adjust_off_and_len(inode, *read_off, *read_len);
| ^~~~~~~~~
vim +927 fs/ceph/file.c
874
875 /*
876 * Completely synchronous read and write methods. Direct from __user
877 * buffer to osd, or directly to user pages (if O_DIRECT).
878 *
879 * If the read spans object boundary, just do multiple reads. (That's not
880 * atomic, but good enough for now.)
881 *
882 * If we get a short result from the OSD, check against i_size; we need to
883 * only return a short read to the caller if we hit EOF.
884 */
885 static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *to,
886 int *retry_op)
887 {
888 struct file *file = iocb->ki_filp;
889 struct inode *inode = file_inode(file);
890 struct ceph_inode_info *ci = ceph_inode(inode);
891 struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
892 struct ceph_osd_client *osdc = &fsc->client->osdc;
893 ssize_t ret;
894 u64 off = iocb->ki_pos;
895 u64 len = iov_iter_count(to);
896
897 dout("sync_read on file %p %llu~%u %s\n", file, off, (unsigned)len,
898 (file->f_flags & O_DIRECT) ? "O_DIRECT" : "");
899
900 if (!len)
901 return 0;
902
903 /*
904 * flush any page cache pages in this range. this
905 * will make concurrent normal and sync io slow,
906 * but it will at least behave sensibly when they are
907 * in sequence.
908 */
909 ret = filemap_write_and_wait_range(inode->i_mapping,
910 off, off + len - 1);
911 if (ret < 0)
912 return ret;
913
914 ret = 0;
915 while ((len = iov_iter_count(to)) > 0) {
916 struct ceph_osd_request *req;
917 struct page **pages;
918 int num_pages;
919 size_t page_off;
920 u64 i_size;
921 bool more;
922 int idx;
923 size_t left;
924 u64 read_off = off;
925 u64 read_len = len;
926
> 927 fscrypt_adjust_off_and_len(inode, *read_off, *read_len);
928
929 /* determine new offset/length if encrypted */
930 req = ceph_osdc_new_request(osdc, &ci->i_layout,
931 ci->i_vino, read_off, &read_len, 0, 1,
932 CEPH_OSD_OP_READ, CEPH_OSD_FLAG_READ,
933 NULL, ci->i_truncate_seq,
934 ci->i_truncate_size, false);
935 if (IS_ERR(req)) {
936 ret = PTR_ERR(req);
937 break;
938 }
939
940 more = read_len < iov_iter_count(to);
941
942 num_pages = calc_pages_for(read_off, read_len);
943 page_off = read_off & ~PAGE_MASK;
944 pages = ceph_alloc_page_vector(num_pages, GFP_KERNEL);
945 if (IS_ERR(pages)) {
946 ceph_osdc_put_request(req);
947 ret = PTR_ERR(pages);
948 break;
949 }
950
951 osd_req_op_extent_osd_data_pages(req, 0, pages, read_len, page_off,
952 false, false);
953 ret = ceph_osdc_start_request(osdc, req, false);
954 if (!ret)
955 ret = ceph_osdc_wait_request(osdc, req);
956
957 ceph_update_read_latency(&fsc->mdsc->metric,
958 req->r_start_latency,
959 req->r_end_latency,
960 ret);
961
962 ceph_osdc_put_request(req);
963
964
965 if (IS_ENCRYPTED(inode)) {
966 int i;
967 int baseblk = read_off >> CEPH_FSCRYPT_BLOCK_SHIFT;
968 int num_blocks = ceph_fscrypt_blocks(read_off, read_len);
969
970 for (i = 0; i < num_blocks; ++i) {
971 int blkoff = i << CEPH_FSCRYPT_BLOCK_SHIFT;
972 int pgidx = blkoff >> PAGE_SHIFT;
973 unsigned int pgoffs = blkoff & ~PAGE_MASK;
974
975 ret = fscrypt_decrypt_block_inplace(inode, pages[pgidx],
976 CEPH_FSCRYPT_BLOCK_SIZE, pgoffs,
977 baseblk + i);
978 if (ret < 0) {
979 ceph_release_page_vector(pages, num_pages);
980 goto out;
981 }
982 }
983 }
984
985 i_size = i_size_read(inode);
986 dout("sync_read %llu~%llu got %zd i_size %llu%s\n",
987 off, len, ret, i_size, (more ? " MORE" : ""));
988
989 if (ret == -ENOENT)
990 ret = 0;
991
992 page_off = off & ~PAGE_MASK;
993 if (ret >= 0 && ret < len && (off + ret < i_size)) {
994 int zlen = min(len - ret, i_size - off - ret);
995 int zoff = page_off + ret;
996 dout("sync_read zero gap %llu~%llu\n",
997 off + ret, off + ret + zlen);
998 ceph_zero_page_vector_range(zoff, zlen, pages);
999 ret += zlen;
1000 }
1001
1002 idx = 0;
1003 left = ret > 0 ? ret : 0;
1004 while (left > 0) {
1005 size_t len, copied;
1006 page_off = off & ~PAGE_MASK;
1007 len = min_t(size_t, left, PAGE_SIZE - page_off);
1008 SetPageUptodate(pages[idx]);
1009 copied = copy_page_to_iter(pages[idx++],
1010 page_off, len, to);
1011 off += copied;
1012 left -= copied;
1013 if (copied < len) {
1014 ret = -EFAULT;
1015 ceph_release_page_vector(pages, num_pages);
1016 break;
1017 }
1018 }
1019 ceph_release_page_vector(pages, num_pages);
1020
1021 if (ret < 0) {
1022 if (ret == -EBLOCKLISTED)
1023 fsc->blocklisted = true;
1024 break;
1025 }
1026
1027 if (off >= i_size || !more)
1028 break;
1029 }
1030
1031 if (off > iocb->ki_pos) {
1032 if (ret >= 0 &&
1033 iov_iter_count(to) > 0 && off >= i_size_read(inode))
1034 *retry_op = CHECK_EOF;
1035 ret = off - iocb->ki_pos;
1036 iocb->ki_pos = off;
1037 }
1038 out:
1039 dout("sync_read result %zd retry_op %d\n", ret, *retry_op);
1040 return ret;
1041 }
1042
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[powerpc:next-test 105/159] arch/powerpc/kernel/syscall_64.c:177:28: error: unused function 'prep_irq_for_enabled_exit'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test
head: 5811244192fc4e18c001c69300044c2acf30bd91
commit: 2a06bf3e95cd93e3640d431960181b8e47415f33 [105/159] powerpc/64: context tracking remove _TIF_NOHZ
config: powerpc-randconfig-r022-20210209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/...
git remote add powerpc https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
git fetch --no-tags powerpc next-test
git checkout 2a06bf3e95cd93e3640d431960181b8e47415f33
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/kernel/syscall_64.c:177:28: error: unused function 'prep_irq_for_enabled_exit' [-Werror,-Wunused-function]
static notrace inline bool prep_irq_for_enabled_exit(bool clear_ri, bool irqs_enabled)
^
1 error generated.
vim +/prep_irq_for_enabled_exit +177 arch/powerpc/kernel/syscall_64.c
176
> 177 static notrace inline bool prep_irq_for_enabled_exit(bool clear_ri, bool irqs_enabled)
178 {
179 if (__prep_irq_for_enabled_exit(clear_ri))
180 return true;
181
182 /*
183 * Must replay pending soft-masked interrupts now. Don't just
184 * local_irq_enabe(); local_irq_disable(); because if we are
185 * returning from an asynchronous interrupt here, another one
186 * might hit after irqs are enabled, and it would exit via this
187 * same path allowing another to fire, and so on unbounded.
188 *
189 * If interrupts were enabled when this interrupt exited,
190 * indicating a process context (synchronous) interrupt,
191 * local_irq_enable/disable can be used, which will enable
192 * interrupts rather than keeping them masked (unclear how
193 * much benefit this is over just replaying for all cases,
194 * because we immediately disable again, so all we're really
195 * doing is allowing hard interrupts to execute directly for
196 * a very small time, rather than being masked and replayed).
197 */
198 if (irqs_enabled) {
199 local_irq_enable();
200 local_irq_disable();
201 } else {
202 replay_soft_interrupts();
203 }
204
205 return false;
206 }
207
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
Re: [PATCH v4 6/7] ASoC: codecs: lpass-tx-macro: add support for lpass tx macro
by kernel test robot
Hi Srinivas,
I love your patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[also build test WARNING on v5.11-rc7 next-20210125]
[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/Srinivas-Kandagatla/ASoC-codecs-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/f89c637c64f13146c0b9117f3c8a6c43a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Srinivas-Kandagatla/ASoC-codecs-add-support-for-LPASS-Codec-TX-and-RX-macros/20210210-173746
git checkout f89c637c64f13146c0b9117f3c8a6c43adf5eeb3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32
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 >>):
sound/soc/codecs/lpass-tx-macro.c: In function 'tx_macro_tx_hpf_corner_freq_callback':
>> sound/soc/codecs/lpass-tx-macro.c:656:6: warning: variable 'adc_reg' set but not used [-Wunused-but-set-variable]
656 | u16 adc_reg;
| ^~~~~~~
vim +/adc_reg +656 sound/soc/codecs/lpass-tx-macro.c
647
648 static void tx_macro_tx_hpf_corner_freq_callback(struct work_struct *work)
649 {
650 struct delayed_work *hpf_delayed_work;
651 struct hpf_work *hpf_work;
652 struct tx_macro *tx;
653 struct snd_soc_component *component;
654 u16 dec_cfg_reg, hpf_gate_reg;
655 u8 hpf_cut_off_freq;
> 656 u16 adc_reg;
657
658 hpf_delayed_work = to_delayed_work(work);
659 hpf_work = container_of(hpf_delayed_work, struct hpf_work, dwork);
660 tx = hpf_work->tx;
661 component = tx->component;
662 hpf_cut_off_freq = hpf_work->hpf_cut_off_freq;
663
664 dec_cfg_reg = CDC_TXn_TX_PATH_CFG0(hpf_work->decimator);
665 hpf_gate_reg = CDC_TXn_TX_PATH_SEC2(hpf_work->decimator);
666
667 if (is_amic_enabled(component, hpf_work->decimator)) {
668 adc_reg = CDC_TX_INP_MUX_ADC_MUXn_CFG0(hpf_work->decimator);
669 snd_soc_component_write_field(component,
670 dec_cfg_reg,
671 CDC_TXn_HPF_CUT_FREQ_MASK,
672 hpf_cut_off_freq);
673 snd_soc_component_update_bits(component, hpf_gate_reg,
674 CDC_TXn_HPF_F_CHANGE_MASK |
675 CDC_TXn_HPF_ZERO_GATE_MASK,
676 0x02);
677 snd_soc_component_update_bits(component, hpf_gate_reg,
678 CDC_TXn_HPF_F_CHANGE_MASK |
679 CDC_TXn_HPF_ZERO_GATE_MASK,
680 0x01);
681 } else {
682 snd_soc_component_write_field(component, dec_cfg_reg,
683 CDC_TXn_HPF_CUT_FREQ_MASK,
684 hpf_cut_off_freq);
685 snd_soc_component_write_field(component, hpf_gate_reg,
686 CDC_TXn_HPF_F_CHANGE_MASK, 0x1);
687 /* Minimum 1 clk cycle delay is required as per HW spec */
688 usleep_range(1000, 1010);
689 snd_soc_component_write_field(component, hpf_gate_reg,
690 CDC_TXn_HPF_F_CHANGE_MASK, 0x0);
691 }
692 }
693
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
Re: [PATCH 2/3] kselftest: add support for skipped tests
by kernel test robot
Hi Timur,
I love your patch! Yet something to improve:
[auto build test ERROR on kselftest/next]
[also build test ERROR on linus/master hnaz-linux-mm/master v5.11-rc7 next-20210125]
[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/Timur-Tabi/add-support-for-never...
base: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next
config: h8300-randconfig-s031-20210209 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.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-215-g0fb77bb6-dirty
# https://github.com/0day-ci/linux/commit/4387344bd9c51be401880f17c193e4956...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Timur-Tabi/add-support-for-never-printing-hashed-addresses/20210210-131927
git checkout 4387344bd9c51be401880f17c193e4956036c067
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=h8300
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 lib/test_bitmap.c:17:
lib/test_bitmap.c: In function 'test_bitmap_init':
>> lib/../tools/testing/selftests/kselftest_module.h:45:48: error: 'skipped_tests' undeclared (first use in this function); did you mean 'failed_tests'?
45 | return kstm_report(total_tests, failed_tests, skipped_tests); \
| ^~~~~~~~~~~~~
lib/test_bitmap.c:637:1: note: in expansion of macro 'KSTM_MODULE_LOADERS'
637 | KSTM_MODULE_LOADERS(test_bitmap);
| ^~~~~~~~~~~~~~~~~~~
lib/../tools/testing/selftests/kselftest_module.h:45:48: note: each undeclared identifier is reported only once for each function it appears in
45 | return kstm_report(total_tests, failed_tests, skipped_tests); \
| ^~~~~~~~~~~~~
lib/test_bitmap.c:637:1: note: in expansion of macro 'KSTM_MODULE_LOADERS'
637 | KSTM_MODULE_LOADERS(test_bitmap);
| ^~~~~~~~~~~~~~~~~~~
lib/test_bitmap.c:637:1: error: control reaches end of non-void function [-Werror=return-type]
637 | KSTM_MODULE_LOADERS(test_bitmap);
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +45 lib/../tools/testing/selftests/kselftest_module.h
39
40 #define KSTM_MODULE_LOADERS(__module) \
41 static int __init __module##_init(void) \
42 { \
43 pr_info("loaded.\n"); \
44 selftest(); \
> 45 return kstm_report(total_tests, failed_tests, skipped_tests); \
46 } \
47 static void __exit __module##_exit(void) \
48 { \
49 pr_info("unloaded.\n"); \
50 } \
51 module_init(__module##_init); \
52 module_exit(__module##_exit)
53
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[kbuild] Re: [PATCH v2 4/5] ext4: improve cr 0 / cr 1 group scanning
by Dan Carpenter
Hi Harshad,
url: https://github.com/0day-ci/linux/commits/Harshad-Shirwadkar/ext4-drop-s_m...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
config: s390-randconfig-m031-20210209 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
fs/ext4/mballoc.c:930 ext4_mb_choose_next_group_cr1() error: uninitialized symbol 'avg_fragment_size'.
vim +/avg_fragment_size +930 fs/ext4/mballoc.c
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 878 static int ext4_mb_choose_next_group_cr1(struct ext4_allocation_context *ac,
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 879 int *new_cr, ext4_group_t *group, ext4_group_t ngroups)
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 880 {
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 881 struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb);
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 882 int avg_fragment_size, best_so_far;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 883 struct rb_node *node, *found;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 884 struct ext4_group_info *grp;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 885
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 886 /*
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 887 * If there is contention on the lock, instead of waiting for the lock
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 888 * to become available, just continue searching lineraly. We'll resume
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 889 * our rb tree search later starting at ac->ac_last_optimal_group.
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 890 */
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 891 if (!read_trylock(&sbi->s_mb_rb_lock))
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 892 return 1;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 893
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 894 if (ac->ac_flags & EXT4_MB_CR1_OPTIMIZED) {
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 895 /* We have found something at CR 1 in the past */
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 896 grp = ext4_get_group_info(ac->ac_sb, ac->ac_last_optimal_group);
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 897 for (found = rb_next(&grp->bb_avg_fragment_size_rb); found != NULL;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 898 found = rb_next(found)) {
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 899 grp = rb_entry(found, struct ext4_group_info,
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 900 bb_avg_fragment_size_rb);
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 901 /*
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 902 * Perform this check without locking, we'll lock later
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 903 * to confirm.
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 904 */
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 905 if (likely(ext4_mb_good_group(ac, grp->bb_group, 1)))
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 906 break;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 907 }
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 908
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 909 goto done;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 910 }
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 911
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 912 node = sbi->s_mb_avg_fragment_size_root.rb_node;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 913 best_so_far = 0;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 914 found = NULL;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 915
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 916 while (node) {
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 917 grp = rb_entry(node, struct ext4_group_info,
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 918 bb_avg_fragment_size_rb);
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 919 /*
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 920 * Perform this check without locking, we'll lock later to confirm.
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 921 */
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 922 if (ext4_mb_good_group(ac, grp->bb_group, 1)) {
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 923 avg_fragment_size = grp->bb_fragments ?
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 924 grp->bb_free / grp->bb_fragments : 0;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 925 if (!best_so_far || avg_fragment_size < best_so_far) {
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 926 best_so_far = avg_fragment_size;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 927 found = node;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 928 }
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 929 }
avg_fragment_size not initialized on else path.
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 @930 if (avg_fragment_size > ac->ac_g_ex.fe_len)
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 931 node = node->rb_right;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 932 else
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 933 node = node->rb_left;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 934 }
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 935
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 936 done:
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 937 if (found) {
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 938 grp = rb_entry(found, struct ext4_group_info,
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 939 bb_avg_fragment_size_rb);
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 940 *group = grp->bb_group;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 941 ac->ac_flags |= EXT4_MB_CR1_OPTIMIZED;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 942 } else {
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 943 *new_cr = 2;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 944 }
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 945
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 946 read_unlock(&sbi->s_mb_rb_lock);
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 947 ac->ac_last_optimal_group = *group;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 948 return 0;
ef4eebad9c018a Harshad Shirwadkar 2021-02-09 949 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
1 year, 7 months
include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_603' declared with attribute error: must adapt SMC_WR_TX_SIZE to sizeof(struct smc_llc_msg); if not all smc_wr upper layer protocols use the same message size any more, must start...
by kernel test robot
Hi Will,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e0756cfc7d7cd08c98a53b6009c091a3f6a50be6
commit: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h
date: 7 months ago
config: arm-randconfig-s032-20210209 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.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-215-g0fb77bb6-dirty
# 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 eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from <command-line>:
net/smc/smc_llc.c: In function 'smc_llc_add_pending_send':
include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_602' declared with attribute error: must increase SMC_WR_BUF_SIZE to at least sizeof(struct smc_llc_msg)
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
net/smc/smc_llc.c:348:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
348 | BUILD_BUG_ON_MSG(
| ^~~~~~~~~~~~~~~~
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_603' declared with attribute error: must adapt SMC_WR_TX_SIZE to sizeof(struct smc_llc_msg); if not all smc_wr upper layer protocols use the same message size any more, must start to set link->wr_tx_sges[i].length on each individual smc_wr_tx_send()
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
net/smc/smc_llc.c:351:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
351 | BUILD_BUG_ON_MSG(
| ^~~~~~~~~~~~~~~~
--
In file included from <command-line>:
In function 'smc_cdc_add_pending_send',
inlined from 'smc_cdc_msg_send' at net/smc/smc_cdc.c:101:2:
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_580' declared with attribute error: must increase SMC_WR_BUF_SIZE to at least sizeof(struct smc_cdc_msg)
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
net/smc/smc_cdc.c:78:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
78 | BUILD_BUG_ON_MSG(
| ^~~~~~~~~~~~~~~~
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_581' declared with attribute error: must adapt SMC_WR_TX_SIZE to sizeof(struct smc_cdc_msg); if not all smc_wr upper layer protocols use the same message size any more, must start to set link->wr_tx_sges[i].length on each individual smc_wr_tx_send()
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
net/smc/smc_cdc.c:81:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
81 | BUILD_BUG_ON_MSG(
| ^~~~~~~~~~~~~~~~
vim +/__compiletime_assert_603 +338 include/linux/compiler_types.h
324
325 #define _compiletime_assert(condition, msg, prefix, suffix) \
326 __compiletime_assert(condition, msg, prefix, suffix)
327
328 /**
329 * compiletime_assert - break build and emit msg if condition is false
330 * @condition: a compile-time constant condition to check
331 * @msg: a message to emit if condition is false
332 *
333 * In tradition of POSIX assert, this macro will break the build if the
334 * supplied condition is *false*, emitting the supplied error message if the
335 * compiler has support to do so.
336 */
337 #define compiletime_assert(condition, msg) \
> 338 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
339
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[kbuild] Re: [PATCH v2 net-next 2/3] qede: add per queue coalesce support for qede driver
by Dan Carpenter
Hi Bhaskar,
url: https://github.com/0day-ci/linux/commits/Bhaskar-Upadhaya/qede-add-netpol...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 6626a0266566c5aea16178c5e6cd7fc4db3f2f56
config: i386-randconfig-m021-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:2188 qede_get_per_coalesce() warn: assigning (-22) to unsigned variable 'rc'
Old smatch warnings:
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:2193 qede_get_per_coalesce() warn: assigning (-22) to unsigned variable 'rc'
vim +/rc +2188 drivers/net/ethernet/qlogic/qede/qede_ethtool.c
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2171 static int qede_get_per_coalesce(struct net_device *dev,
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2172 u32 queue,
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2173 struct ethtool_coalesce *coal)
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2174 {
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2175 void *rx_handle = NULL, *tx_handle = NULL;
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2176 struct qede_dev *edev = netdev_priv(dev);
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2177 u16 rx_coal, tx_coal, rc = 0;
"rc" needs to be int.
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2178 struct qede_fastpath *fp;
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2179
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2180 rx_coal = QED_DEFAULT_RX_USECS;
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2181 tx_coal = QED_DEFAULT_TX_USECS;
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2182
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2183 memset(coal, 0, sizeof(struct ethtool_coalesce));
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2184
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2185 __qede_lock(edev);
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2186 if (queue >= edev->num_queues) {
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2187 DP_INFO(edev, "Invalid queue\n");
75a56157c75052 Bhaskar Upadhaya 2021-02-09 @2188 rc = -EINVAL;
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2189 goto out;
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2190 }
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2191
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2192 if (edev->state != QEDE_STATE_OPEN) {
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2193 rc = -EINVAL;
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2194 goto out;
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2195 }
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2196
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2197 fp = &edev->fp_array[queue];
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2198
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2199 if (fp->type & QEDE_FASTPATH_RX)
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2200 rx_handle = fp->rxq->handle;
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2201
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2202 rc = edev->ops->get_coalesce(edev->cdev, &rx_coal,
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2203 rx_handle);
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2204 if (rc) {
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2205 DP_INFO(edev, "Read Rx coalesce error\n");
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2206 goto out;
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2207 }
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2208
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2209 fp = &edev->fp_array[queue];
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2210 if (fp->type & QEDE_FASTPATH_TX)
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2211 tx_handle = fp->txq->handle;
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2212
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2213 rc = edev->ops->get_coalesce(edev->cdev, &tx_coal,
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2214 tx_handle);
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2215 if (rc)
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2216 DP_INFO(edev, "Read Tx coalesce error\n");
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2217
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2218 out:
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2219 __qede_unlock(edev);
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2220
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2221 coal->rx_coalesce_usecs = rx_coal;
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2222 coal->tx_coalesce_usecs = tx_coal;
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2223
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2224 return rc;
75a56157c75052 Bhaskar Upadhaya 2021-02-09 2225 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
1 year, 7 months