[zen-kernel-zen-kernel:5.10/clearlinux 9/25] lib/raid6/algos.c:130:28: warning: variable 'gen_fallback' set but not used
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.10/clearlinux
head: f913bdc4bdb24521c1309755d426d7bac427ad2f
commit: f32b62caf790b6f63e5b447108b90febb9c009eb [9/25] raid6: add Kconfig option to skip raid6 benchmarking
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/zen-kernel/zen-kernel/commit/f32b62caf790b6f63e5b44710...
git remote add zen-kernel-zen-kernel https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.10/clearlinux
git checkout f32b62caf790b6f63e5b447108b90febb9c009eb
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
lib/raid6/algos.c: In function 'raid6_select_algo':
>> lib/raid6/algos.c:130:28: warning: variable 'gen_fallback' set but not used [-Wunused-but-set-variable]
130 | const struct raid6_calls *gen_fallback;
| ^~~~~~~~~~~~
vim +/gen_fallback +130 lib/raid6/algos.c
123
124 #ifdef CONFIG_RAID6_FORCE_ALGO
125 /* TODO don't compile in algos that will never be used */
126 int __init raid6_select_algo(void)
127 {
128 const struct raid6_recov_calls *recov_fallback = &raid6_recov_intx1;
129 const struct raid6_recov_calls *recov_algo;
> 130 const struct raid6_calls *gen_fallback;
131 const struct raid6_calls *gen_algo;
132
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[zen-kernel-zen-kernel:5.10/clearlinux 9/25] lib/raid6/algos.c:138:3: error: #error "TODO"
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.10/clearlinux
head: f913bdc4bdb24521c1309755d426d7bac427ad2f
commit: f32b62caf790b6f63e5b447108b90febb9c009eb [9/25] raid6: add Kconfig option to skip raid6 benchmarking
config: m68k-allmodconfig (attached as .config)
compiler: m68k-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/zen-kernel/zen-kernel/commit/f32b62caf790b6f63e5b44710...
git remote add zen-kernel-zen-kernel https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.10/clearlinux
git checkout f32b62caf790b6f63e5b447108b90febb9c009eb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
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 >>):
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for NEED_MULTIPLE_NODES
Depends on DISCONTIGMEM || NUMA
Selected by
- SINGLE_MEMORY_CHUNK && MMU
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/blkdev.h:5,
from include/linux/raid/pq.h:15,
from lib/raid6/algos.c:14:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
lib/raid6/algos.c: In function 'raid6_select_algo':
>> lib/raid6/algos.c:138:3: error: #error "TODO"
138 | # error "TODO"
| ^~~~~
lib/raid6/algos.c:130:28: warning: unused variable 'gen_fallback' [-Wunused-variable]
130 | const struct raid6_calls *gen_fallback;
| ^~~~~~~~~~~~
vim +/TODO +138 lib/raid6/algos.c
123
124 #ifdef CONFIG_RAID6_FORCE_ALGO
125 /* TODO don't compile in algos that will never be used */
126 int __init raid6_select_algo(void)
127 {
128 const struct raid6_recov_calls *recov_fallback = &raid6_recov_intx1;
129 const struct raid6_recov_calls *recov_algo;
130 const struct raid6_calls *gen_fallback;
131 const struct raid6_calls *gen_algo;
132
133 #if defined(__i386__)
134 gen_fallback = &raid6_intx32;
135 #elif defined(__x86_64__)
136 gen_fallback = &raid6_sse2x2;
137 #else
> 138 # error "TODO"
139 #endif
140
---
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 12600/13311] mm/kfence/kfence_test.c:668:39: sparse: sparse: restricted gfp_t degrades to integer
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 9317f948b0b188b8d2fded75957e6d42c460df1b
commit: 50ddd24e216f46c656833753a719f85c5d38238f [12600/13311] kfence: add test suite
config: x86_64-randconfig-s022-20201216 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-184-g1b896707-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 50ddd24e216f46c656833753a719f85c5d38238f
# 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 >>)"
>> mm/kfence/kfence_test.c:668:39: sparse: sparse: restricted gfp_t degrades to integer
>> mm/kfence/kfence_test.c:668:50: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted gfp_t [usertype] @@ got unsigned int @@
mm/kfence/kfence_test.c:668:50: sparse: expected restricted gfp_t [usertype]
mm/kfence/kfence_test.c:668:50: sparse: got unsigned int
vim +668 mm/kfence/kfence_test.c
641
642 /* Test krealloc(). */
643 static void test_krealloc(struct kunit *test)
644 {
645 const size_t size = 32;
646 const struct expect_report expect = {
647 .type = KFENCE_ERROR_UAF,
648 .fn = test_krealloc,
649 .addr = test_alloc(test, size, GFP_KERNEL, ALLOCATE_ANY),
650 };
651 char *buf = expect.addr;
652 int i;
653
654 KUNIT_EXPECT_FALSE(test, test_cache);
655 KUNIT_EXPECT_EQ(test, ksize(buf), size); /* Precise size match after KFENCE alloc. */
656 for (i = 0; i < size; i++)
657 buf[i] = i + 1;
658
659 /* Check that we successfully change the size. */
660 buf = krealloc(buf, size * 3, GFP_KERNEL); /* Grow. */
661 /* Note: Might no longer be a KFENCE alloc. */
662 KUNIT_EXPECT_GE(test, ksize(buf), size * 3);
663 for (i = 0; i < size; i++)
664 KUNIT_EXPECT_EQ(test, buf[i], (char)(i + 1));
665 for (; i < size * 3; i++) /* Fill to extra bytes. */
666 buf[i] = i + 1;
667
> 668 buf = krealloc(buf, size * 2, GFP_KERNEL * 2); /* Shrink. */
669 KUNIT_EXPECT_GE(test, ksize(buf), size * 2);
670 for (i = 0; i < size * 2; i++)
671 KUNIT_EXPECT_EQ(test, buf[i], (char)(i + 1));
672
673 buf = krealloc(buf, 0, GFP_KERNEL); /* Free. */
674 KUNIT_EXPECT_EQ(test, (unsigned long)buf, (unsigned long)ZERO_SIZE_PTR);
675 KUNIT_ASSERT_FALSE(test, report_available()); /* No reports yet! */
676
677 READ_ONCE(*expect.addr); /* Ensure krealloc() actually freed earlier KFENCE object. */
678 KUNIT_ASSERT_TRUE(test, report_matches(&expect));
679 }
680
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[iio:testing 12/12] drivers/iio/trigger/iio-trig-hrtimer.c:67: undefined reference to `__udivdi3'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git testing
head: e5cfcce2ab02eabe42d31fa5d29ffdbebfd48675
commit: e5cfcce2ab02eabe42d31fa5d29ffdbebfd48675 [12/12] iio: hrtimer: Allow sub Hz granularity
config: i386-randconfig-a005-20201215 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/commit/?id=...
git remote add iio https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
git fetch --no-tags iio testing
git checkout e5cfcce2ab02eabe42d31fa5d29ffdbebfd48675
# 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 errors (new ones prefixed by >>):
ld: drivers/iio/trigger/iio-trig-hrtimer.o: in function `iio_hrtimer_store_sampling_frequency':
>> drivers/iio/trigger/iio-trig-hrtimer.c:67: undefined reference to `__udivdi3'
vim +67 drivers/iio/trigger/iio-trig-hrtimer.c
45
46 static
47 ssize_t iio_hrtimer_store_sampling_frequency(struct device *dev,
48 struct device_attribute *attr,
49 const char *buf, size_t len)
50 {
51 struct iio_trigger *trig = to_iio_trigger(dev);
52 struct iio_hrtimer_info *info = iio_trigger_get_drvdata(trig);
53 unsigned long long val;
54 int integer, fract, ret;
55
56 ret = iio_str_to_fixpoint(buf, 100, &integer, &fract);
57 if (ret)
58 return ret;
59
60 val = fract + 1000 * integer;
61
62 if (!val || val > NSEC_PER_SEC * 1000)
63 return -EINVAL;
64
65 info->sampling_frequency[0] = integer;
66 info->sampling_frequency[1] = fract * 1000;
> 67 info->period = NSEC_PER_SEC * 1000 / val;
68
69 return len;
70 }
71
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[zen-kernel-zen-kernel:5.10/zen-sauce 6/19] drivers/scsi/bfa/bfa_fcs_lport.c:2152:1: warning: the frame size of 1708 bytes is larger than 1024 bytes
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.10/zen-sauce
head: b7b24b494b62e02c21a9a349da2d036849f9dd8b
commit: b81ab9b618d694217a54b5d2de70c7f37d3f3e07 [6/19] ZEN: Disable stack conservation for GCC
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-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/zen-kernel/zen-kernel/commit/b81ab9b618d694217a54b5d2d...
git remote add zen-kernel-zen-kernel https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.10/zen-sauce
git checkout b81ab9b618d694217a54b5d2de70c7f37d3f3e07
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
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/bfa/bfa_fcs_lport.c: In function 'bfa_fcs_lport_fdmi_build_rhba_pyld':
>> drivers/scsi/bfa/bfa_fcs_lport.c:2152:1: warning: the frame size of 1708 bytes is larger than 1024 bytes [-Wframe-larger-than=]
2152 | }
| ^
vim +2152 drivers/scsi/bfa/bfa_fcs_lport.c
a36c61f9025b892 Krishna Gudipati 2010-09-15 1898
a36c61f9025b892 Krishna Gudipati 2010-09-15 1899 static u16
a36c61f9025b892 Krishna Gudipati 2010-09-15 1900 bfa_fcs_lport_fdmi_build_rhba_pyld(struct bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld)
a36c61f9025b892 Krishna Gudipati 2010-09-15 1901 {
a36c61f9025b892 Krishna Gudipati 2010-09-15 1902 struct bfa_fcs_lport_s *port = fdmi->ms->port;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1903 struct bfa_fcs_fdmi_hba_attr_s hba_attr;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1904 struct bfa_fcs_fdmi_hba_attr_s *fcs_hba_attr = &hba_attr;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1905 struct fdmi_rhba_s *rhba = (struct fdmi_rhba_s *) pyld;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1906 struct fdmi_attr_s *attr;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1907 u8 *curr_ptr;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1908 u16 len, count;
50444a340028119 Maggie 2010-11-29 1909 u16 templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1910
a36c61f9025b892 Krishna Gudipati 2010-09-15 1911 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 1912 * get hba attributes
a36c61f9025b892 Krishna Gudipati 2010-09-15 1913 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 1914 bfa_fcs_fdmi_get_hbaattr(fdmi, fcs_hba_attr);
a36c61f9025b892 Krishna Gudipati 2010-09-15 1915
a36c61f9025b892 Krishna Gudipati 2010-09-15 1916 rhba->hba_id = bfa_fcs_lport_get_pwwn(port);
ba816ea8e2eacbf Jing Huang 2010-10-18 1917 rhba->port_list.num_ports = cpu_to_be32(1);
a36c61f9025b892 Krishna Gudipati 2010-09-15 1918 rhba->port_list.port_entry = bfa_fcs_lport_get_pwwn(port);
a36c61f9025b892 Krishna Gudipati 2010-09-15 1919
a36c61f9025b892 Krishna Gudipati 2010-09-15 1920 len = sizeof(rhba->hba_id) + sizeof(rhba->port_list);
a36c61f9025b892 Krishna Gudipati 2010-09-15 1921
a36c61f9025b892 Krishna Gudipati 2010-09-15 1922 count = 0;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1923 len += sizeof(rhba->hba_attr_blk.attr_count);
a36c61f9025b892 Krishna Gudipati 2010-09-15 1924
a36c61f9025b892 Krishna Gudipati 2010-09-15 1925 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 1926 * fill out the invididual entries of the HBA attrib Block
a36c61f9025b892 Krishna Gudipati 2010-09-15 1927 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 1928 curr_ptr = (u8 *) &rhba->hba_attr_blk.hba_attr;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1929
a36c61f9025b892 Krishna Gudipati 2010-09-15 1930 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 1931 * Node Name
a36c61f9025b892 Krishna Gudipati 2010-09-15 1932 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 1933 attr = (struct fdmi_attr_s *) curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 1934 attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_NODENAME);
50444a340028119 Maggie 2010-11-29 1935 templen = sizeof(wwn_t);
50444a340028119 Maggie 2010-11-29 1936 memcpy(attr->value, &bfa_fcs_lport_get_nwwn(port), templen);
50444a340028119 Maggie 2010-11-29 1937 curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 1938 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1939 count++;
50444a340028119 Maggie 2010-11-29 1940 attr->len = cpu_to_be16(templen + sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 1941 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 1942
a36c61f9025b892 Krishna Gudipati 2010-09-15 1943 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 1944 * Manufacturer
a36c61f9025b892 Krishna Gudipati 2010-09-15 1945 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 1946 attr = (struct fdmi_attr_s *) curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 1947 attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_MANUFACTURER);
50444a340028119 Maggie 2010-11-29 1948 templen = (u16) strlen(fcs_hba_attr->manufacturer);
50444a340028119 Maggie 2010-11-29 1949 memcpy(attr->value, fcs_hba_attr->manufacturer, templen);
50444a340028119 Maggie 2010-11-29 1950 templen = fc_roundup(templen, sizeof(u32));
50444a340028119 Maggie 2010-11-29 1951 curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 1952 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1953 count++;
50444a340028119 Maggie 2010-11-29 1954 attr->len = cpu_to_be16(templen + sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 1955 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 1956
a36c61f9025b892 Krishna Gudipati 2010-09-15 1957 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 1958 * Serial Number
a36c61f9025b892 Krishna Gudipati 2010-09-15 1959 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 1960 attr = (struct fdmi_attr_s *) curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 1961 attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_SERIALNUM);
50444a340028119 Maggie 2010-11-29 1962 templen = (u16) strlen(fcs_hba_attr->serial_num);
50444a340028119 Maggie 2010-11-29 1963 memcpy(attr->value, fcs_hba_attr->serial_num, templen);
50444a340028119 Maggie 2010-11-29 1964 templen = fc_roundup(templen, sizeof(u32));
50444a340028119 Maggie 2010-11-29 1965 curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 1966 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1967 count++;
50444a340028119 Maggie 2010-11-29 1968 attr->len = cpu_to_be16(templen + sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 1969 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 1970
a36c61f9025b892 Krishna Gudipati 2010-09-15 1971 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 1972 * Model
a36c61f9025b892 Krishna Gudipati 2010-09-15 1973 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 1974 attr = (struct fdmi_attr_s *) curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 1975 attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_MODEL);
50444a340028119 Maggie 2010-11-29 1976 templen = (u16) strlen(fcs_hba_attr->model);
50444a340028119 Maggie 2010-11-29 1977 memcpy(attr->value, fcs_hba_attr->model, templen);
50444a340028119 Maggie 2010-11-29 1978 templen = fc_roundup(templen, sizeof(u32));
50444a340028119 Maggie 2010-11-29 1979 curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 1980 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1981 count++;
50444a340028119 Maggie 2010-11-29 1982 attr->len = cpu_to_be16(templen + sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 1983 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 1984
a36c61f9025b892 Krishna Gudipati 2010-09-15 1985 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 1986 * Model Desc
a36c61f9025b892 Krishna Gudipati 2010-09-15 1987 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 1988 attr = (struct fdmi_attr_s *) curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 1989 attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_MODEL_DESC);
50444a340028119 Maggie 2010-11-29 1990 templen = (u16) strlen(fcs_hba_attr->model_desc);
50444a340028119 Maggie 2010-11-29 1991 memcpy(attr->value, fcs_hba_attr->model_desc, templen);
50444a340028119 Maggie 2010-11-29 1992 templen = fc_roundup(templen, sizeof(u32));
50444a340028119 Maggie 2010-11-29 1993 curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 1994 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1995 count++;
50444a340028119 Maggie 2010-11-29 1996 attr->len = cpu_to_be16(templen + sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 1997 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 1998
a36c61f9025b892 Krishna Gudipati 2010-09-15 1999 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 2000 * H/W Version
a36c61f9025b892 Krishna Gudipati 2010-09-15 2001 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 2002 if (fcs_hba_attr->hw_version[0] != '\0') {
a36c61f9025b892 Krishna Gudipati 2010-09-15 2003 attr = (struct fdmi_attr_s *) curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 2004 attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_HW_VERSION);
50444a340028119 Maggie 2010-11-29 2005 templen = (u16) strlen(fcs_hba_attr->hw_version);
50444a340028119 Maggie 2010-11-29 2006 memcpy(attr->value, fcs_hba_attr->hw_version, templen);
50444a340028119 Maggie 2010-11-29 2007 templen = fc_roundup(templen, sizeof(u32));
50444a340028119 Maggie 2010-11-29 2008 curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 2009 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 2010 count++;
50444a340028119 Maggie 2010-11-29 2011 attr->len = cpu_to_be16(templen + sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 2012 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 2013 }
a36c61f9025b892 Krishna Gudipati 2010-09-15 2014
a36c61f9025b892 Krishna Gudipati 2010-09-15 2015 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 2016 * Driver Version
a36c61f9025b892 Krishna Gudipati 2010-09-15 2017 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 2018 attr = (struct fdmi_attr_s *) curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 2019 attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_DRIVER_VERSION);
50444a340028119 Maggie 2010-11-29 2020 templen = (u16) strlen(fcs_hba_attr->driver_version);
50444a340028119 Maggie 2010-11-29 2021 memcpy(attr->value, fcs_hba_attr->driver_version, templen);
50444a340028119 Maggie 2010-11-29 2022 templen = fc_roundup(templen, sizeof(u32));
50444a340028119 Maggie 2010-11-29 2023 curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
dd5aaf4536c5111 Krishna Gudipati 2011-06-13 2024 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 2025 count++;
50444a340028119 Maggie 2010-11-29 2026 attr->len = cpu_to_be16(templen + sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 2027 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 2028
a36c61f9025b892 Krishna Gudipati 2010-09-15 2029 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 2030 * Option Rom Version
a36c61f9025b892 Krishna Gudipati 2010-09-15 2031 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 2032 if (fcs_hba_attr->option_rom_ver[0] != '\0') {
a36c61f9025b892 Krishna Gudipati 2010-09-15 2033 attr = (struct fdmi_attr_s *) curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 2034 attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_ROM_VERSION);
50444a340028119 Maggie 2010-11-29 2035 templen = (u16) strlen(fcs_hba_attr->option_rom_ver);
50444a340028119 Maggie 2010-11-29 2036 memcpy(attr->value, fcs_hba_attr->option_rom_ver, templen);
50444a340028119 Maggie 2010-11-29 2037 templen = fc_roundup(templen, sizeof(u32));
50444a340028119 Maggie 2010-11-29 2038 curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 2039 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 2040 count++;
50444a340028119 Maggie 2010-11-29 2041 attr->len = cpu_to_be16(templen + sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 2042 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 2043 }
a36c61f9025b892 Krishna Gudipati 2010-09-15 2044
a36c61f9025b892 Krishna Gudipati 2010-09-15 2045 attr = (struct fdmi_attr_s *) curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 2046 attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_FW_VERSION);
b480a32e69b7b3c Krishna Gudipati 2012-09-21 2047 templen = (u16) strlen(fcs_hba_attr->fw_version);
b480a32e69b7b3c Krishna Gudipati 2012-09-21 2048 memcpy(attr->value, fcs_hba_attr->fw_version, templen);
50444a340028119 Maggie 2010-11-29 2049 templen = fc_roundup(templen, sizeof(u32));
50444a340028119 Maggie 2010-11-29 2050 curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 2051 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 2052 count++;
50444a340028119 Maggie 2010-11-29 2053 attr->len = cpu_to_be16(templen + sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 2054 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 2055
a36c61f9025b892 Krishna Gudipati 2010-09-15 2056 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 2057 * OS Name
a36c61f9025b892 Krishna Gudipati 2010-09-15 2058 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 2059 if (fcs_hba_attr->os_name[0] != '\0') {
a36c61f9025b892 Krishna Gudipati 2010-09-15 2060 attr = (struct fdmi_attr_s *) curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 2061 attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_OS_NAME);
50444a340028119 Maggie 2010-11-29 2062 templen = (u16) strlen(fcs_hba_attr->os_name);
50444a340028119 Maggie 2010-11-29 2063 memcpy(attr->value, fcs_hba_attr->os_name, templen);
50444a340028119 Maggie 2010-11-29 2064 templen = fc_roundup(templen, sizeof(u32));
50444a340028119 Maggie 2010-11-29 2065 curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 2066 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 2067 count++;
50444a340028119 Maggie 2010-11-29 2068 attr->len = cpu_to_be16(templen + sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 2069 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 2070 }
a36c61f9025b892 Krishna Gudipati 2010-09-15 2071
a36c61f9025b892 Krishna Gudipati 2010-09-15 2072 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 2073 * MAX_CT_PAYLOAD
a36c61f9025b892 Krishna Gudipati 2010-09-15 2074 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 2075 attr = (struct fdmi_attr_s *) curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 2076 attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_MAX_CT);
50444a340028119 Maggie 2010-11-29 2077 templen = sizeof(fcs_hba_attr->max_ct_pyld);
50444a340028119 Maggie 2010-11-29 2078 memcpy(attr->value, &fcs_hba_attr->max_ct_pyld, templen);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2079 templen = fc_roundup(templen, sizeof(u32));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2080 curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2081 len += templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2082 count++;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2083 attr->len = cpu_to_be16(templen + sizeof(attr->type) +
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2084 sizeof(templen));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2085 /*
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2086 * Send extended attributes ( FOS 7.1 support )
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2087 */
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2088 if (fdmi->retry_cnt == 0) {
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2089 attr = (struct fdmi_attr_s *) curr_ptr;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2090 attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_NODE_SYM_NAME);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2091 templen = sizeof(fcs_hba_attr->node_sym_name);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2092 memcpy(attr->value, &fcs_hba_attr->node_sym_name, templen);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2093 templen = fc_roundup(templen, sizeof(u32));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2094 curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2095 len += templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2096 count++;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2097 attr->len = cpu_to_be16(templen + sizeof(attr->type) +
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2098 sizeof(templen));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2099
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2100 attr = (struct fdmi_attr_s *) curr_ptr;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2101 attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_VENDOR_ID);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2102 templen = sizeof(fcs_hba_attr->vendor_info);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2103 memcpy(attr->value, &fcs_hba_attr->vendor_info, templen);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2104 templen = fc_roundup(templen, sizeof(u32));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2105 curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2106 len += templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2107 count++;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2108 attr->len = cpu_to_be16(templen + sizeof(attr->type) +
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2109 sizeof(templen));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2110
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2111 attr = (struct fdmi_attr_s *) curr_ptr;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2112 attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_NUM_PORTS);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2113 templen = sizeof(fcs_hba_attr->num_ports);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2114 memcpy(attr->value, &fcs_hba_attr->num_ports, templen);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2115 templen = fc_roundup(templen, sizeof(u32));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2116 curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2117 len += templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2118 count++;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2119 attr->len = cpu_to_be16(templen + sizeof(attr->type) +
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2120 sizeof(templen));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2121
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2122 attr = (struct fdmi_attr_s *) curr_ptr;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2123 attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_FABRIC_NAME);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2124 templen = sizeof(fcs_hba_attr->fabric_name);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2125 memcpy(attr->value, &fcs_hba_attr->fabric_name, templen);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2126 templen = fc_roundup(templen, sizeof(u32));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2127 curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 2128 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 2129 count++;
50444a340028119 Maggie 2010-11-29 2130 attr->len = cpu_to_be16(templen + sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 2131 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 2132
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2133 attr = (struct fdmi_attr_s *) curr_ptr;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2134 attr->type = cpu_to_be16(FDMI_HBA_ATTRIB_BIOS_VER);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2135 templen = sizeof(fcs_hba_attr->bios_ver);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2136 memcpy(attr->value, &fcs_hba_attr->bios_ver, templen);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2137 templen = fc_roundup(attr->len, sizeof(u32));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2138 curr_ptr += sizeof(attr->type) + sizeof(templen) + templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2139 len += templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2140 count++;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2141 attr->len = cpu_to_be16(templen + sizeof(attr->type) +
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2142 sizeof(templen));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2143 }
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2144
a36c61f9025b892 Krishna Gudipati 2010-09-15 2145 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 2146 * Update size of payload
a36c61f9025b892 Krishna Gudipati 2010-09-15 2147 */
5fbe25c7a664601 Jing Huang 2010-10-18 2148 len += ((sizeof(attr->type) + sizeof(attr->len)) * count);
a36c61f9025b892 Krishna Gudipati 2010-09-15 2149
ba816ea8e2eacbf Jing Huang 2010-10-18 2150 rhba->hba_attr_blk.attr_count = cpu_to_be32(count);
a36c61f9025b892 Krishna Gudipati 2010-09-15 2151 return len;
a36c61f9025b892 Krishna Gudipati 2010-09-15 @2152 }
a36c61f9025b892 Krishna Gudipati 2010-09-15 2153
:::::: The code at line 2152 was first introduced by commit
:::::: a36c61f9025b8924f99f54d518763bee7aa84085 [SCSI] bfa: cleanup driver
:::::: TO: Krishna Gudipati <kgudipat(a)brocade.com>
:::::: CC: James Bottomley <James.Bottomley(a)suse.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[zen-kernel-zen-kernel:5.10/zen-sauce 3/19] drivers/i2c/busses/i2c-nct6775.c:221:18: warning: this statement may fall through
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.10/zen-sauce
head: b7b24b494b62e02c21a9a349da2d036849f9dd8b
commit: 5b3d9f2372600c3b908b1bd0e8c9b8c6ed351fa2 [3/19] ZEN: Add OpenRGB patches
config: nios2-allyesconfig (attached as .config)
compiler: nios2-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/zen-kernel/zen-kernel/commit/5b3d9f2372600c3b908b1bd0e...
git remote add zen-kernel-zen-kernel https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.10/zen-sauce
git checkout 5b3d9f2372600c3b908b1bd0e8c9b8c6ed351fa2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
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/i2c/busses/i2c-nct6775.c: In function 'nct6775_access':
>> drivers/i2c/busses/i2c-nct6775.c:221:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
221 | tmp_data.byte = data->byte;
| ~~~~~~~~~~~~~~^~~~~~~~~~~~
drivers/i2c/busses/i2c-nct6775.c:222:3: note: here
222 | case I2C_SMBUS_BYTE:
| ^~~~
At top level:
drivers/i2c/busses/i2c-nct6775.c:93:27: warning: 'nct6775_device_names' defined but not used [-Wunused-const-variable=]
93 | static const char * const nct6775_device_names[] = {
| ^~~~~~~~~~~~~~~~~~~~
vim +221 drivers/i2c/busses/i2c-nct6775.c
197
198 /* Return negative errno on error. */
199 static s32 nct6775_access(struct i2c_adapter * adap, u16 addr,
200 unsigned short flags, char read_write,
201 u8 command, int size, union i2c_smbus_data * data)
202 {
203 struct i2c_nct6775_adapdata *adapdata = i2c_get_adapdata(adap);
204 unsigned short nuvoton_nct6793d_smba = adapdata->smba;
205 int i, len, cnt;
206 union i2c_smbus_data tmp_data;
207 int timeout = 0;
208
209 tmp_data.word = 0;
210 cnt = 0;
211 len = 0;
212
213 outb_p(NCT6793D_SOFT_RESET, SMBHSTCTL);
214
215 switch (size) {
216 case I2C_SMBUS_QUICK:
217 outb_p((addr << 1) | read_write,
218 SMBHSTADD);
219 break;
220 case I2C_SMBUS_BYTE_DATA:
> 221 tmp_data.byte = data->byte;
222 case I2C_SMBUS_BYTE:
223 outb_p((addr << 1) | read_write,
224 SMBHSTADD);
225 outb_p(command, SMBHSTIDX);
226 if (read_write == I2C_SMBUS_WRITE) {
227 outb_p(tmp_data.byte, SMBHSTDAT);
228 outb_p(NCT6793D_WRITE_BYTE, SMBHSTCMD);
229 }
230 else {
231 outb_p(NCT6793D_READ_BYTE, SMBHSTCMD);
232 }
233 break;
234 case I2C_SMBUS_WORD_DATA:
235 outb_p((addr << 1) | read_write,
236 SMBHSTADD);
237 outb_p(command, SMBHSTIDX);
238 if (read_write == I2C_SMBUS_WRITE) {
239 outb_p(data->word & 0xff, SMBHSTDAT);
240 outb_p((data->word & 0xff00) >> 8, SMBHSTDAT);
241 outb_p(NCT6793D_WRITE_WORD, SMBHSTCMD);
242 }
243 else {
244 outb_p(NCT6793D_READ_WORD, SMBHSTCMD);
245 }
246 break;
247 case I2C_SMBUS_BLOCK_DATA:
248 outb_p((addr << 1) | read_write,
249 SMBHSTADD);
250 outb_p(command, SMBHSTIDX);
251 if (read_write == I2C_SMBUS_WRITE) {
252 len = data->block[0];
253 if (len == 0 || len > I2C_SMBUS_BLOCK_MAX)
254 return -EINVAL;
255 outb_p(len, SMBBLKSZ);
256
257 cnt = 1;
258 if (len >= 4) {
259 for (i = cnt; i <= 4; i++) {
260 outb_p(data->block[i], SMBHSTDAT);
261 }
262
263 len -= 4;
264 cnt += 4;
265 }
266 else {
267 for (i = cnt; i <= len; i++ ) {
268 outb_p(data->block[i], SMBHSTDAT);
269 }
270
271 len = 0;
272 }
273
274 outb_p(NCT6793D_WRITE_BLOCK, SMBHSTCMD);
275 }
276 else {
277 return -ENOTSUPP;
278 }
279 break;
280 default:
281 dev_warn(&adap->dev, "Unsupported transaction %d\n", size);
282 return -EOPNOTSUPP;
283 }
284
285 outb_p(NCT6793D_MANUAL_START, SMBHSTCTL);
286
287 while ((size == I2C_SMBUS_BLOCK_DATA) && (len > 0)) {
288 if (read_write == I2C_SMBUS_WRITE) {
289 timeout = 0;
290 while ((inb_p(SMBHSTSTS) & NCT6793D_FIFO_EMPTY) == 0)
291 {
292 if(timeout > MAX_RETRIES)
293 {
294 return -ETIMEDOUT;
295 }
296 usleep_range(250, 500);
297 timeout++;
298 }
299
300 //Load more bytes into FIFO
301 if (len >= 4) {
302 for (i = cnt; i <= (cnt + 4); i++) {
303 outb_p(data->block[i], SMBHSTDAT);
304 }
305
306 len -= 4;
307 cnt += 4;
308 }
309 else {
310 for (i = cnt; i <= (cnt + len); i++) {
311 outb_p(data->block[i], SMBHSTDAT);
312 }
313
314 len = 0;
315 }
316 }
317 else {
318 return -ENOTSUPP;
319 }
320
321 }
322
323 //wait for manual mode to complete
324 timeout = 0;
325 while ((inb_p(SMBHSTSTS) & NCT6793D_MANUAL_ACTIVE) != 0)
326 {
327 if(timeout > MAX_RETRIES)
328 {
329 return -ETIMEDOUT;
330 }
331 usleep_range(250, 500);
332 timeout++;
333 }
334
335 if ((inb_p(SMBHSTERR) & NCT6793D_NO_ACK) != 0) {
336 return -ENXIO;
337 }
338 else if ((read_write == I2C_SMBUS_WRITE) || (size == I2C_SMBUS_QUICK)) {
339 return 0;
340 }
341
342 switch (size) {
343 case I2C_SMBUS_QUICK:
344 case I2C_SMBUS_BYTE_DATA:
345 data->byte = inb_p(SMBHSTDAT);
346 break;
347 case I2C_SMBUS_WORD_DATA:
348 data->word = inb_p(SMBHSTDAT) + (inb_p(SMBHSTDAT) << 8);
349 break;
350 }
351 return 0;
352 }
353
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[arm-platforms:hack/devm_cast_abuse 17/17] drivers/char/hw_random/meson-rng.c:57:9: error: implicit declaration of function 'devm_clk_prepare_enable'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git hack/devm_cast_abuse
head: 542cb40d75bf747a26ac91aa28f1a1ecb19b89e3
commit: 542cb40d75bf747a26ac91aa28f1a1ecb19b89e3 [17/17] treewide: Bulk conversion to devm_clk_prepare_enable()
config: m68k-randconfig-r012-20201215 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/com...
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms hack/devm_cast_abuse
git checkout 542cb40d75bf747a26ac91aa28f1a1ecb19b89e3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
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/char/hw_random/meson-rng.c: In function 'meson_rng_probe':
>> drivers/char/hw_random/meson-rng.c:57:9: error: implicit declaration of function 'devm_clk_prepare_enable'; did you mean 'clk_prepare_enable'? [-Werror=implicit-function-declaration]
57 | ret = devm_clk_prepare_enable(dev, data->core_clk);
| ^~~~~~~~~~~~~~~~~~~~~~~
| clk_prepare_enable
cc1: some warnings being treated as errors
vim +57 drivers/char/hw_random/meson-rng.c
35
36 static int meson_rng_probe(struct platform_device *pdev)
37 {
38 struct device *dev = &pdev->dev;
39 struct meson_rng_data *data;
40 int ret;
41
42 data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
43 if (!data)
44 return -ENOMEM;
45
46 data->pdev = pdev;
47
48 data->base = devm_platform_ioremap_resource(pdev, 0);
49 if (IS_ERR(data->base))
50 return PTR_ERR(data->base);
51
52 data->core_clk = devm_clk_get(dev, "core");
53 if (IS_ERR(data->core_clk))
54 data->core_clk = NULL;
55
56 if (data->core_clk) {
> 57 ret = devm_clk_prepare_enable(dev, data->core_clk);
58 if (ret)
59 return ret;
60 }
61
62 data->rng.name = pdev->name;
63 data->rng.read = meson_rng_read;
64
65 platform_set_drvdata(pdev, data);
66
67 return devm_hwrng_register(dev, &data->rng);
68 }
69
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[arm-platforms:hack/devm_cast_abuse 16/17] drivers/rtc/rtc-jz4740.c:333:8: error: implicit declaration of function 'devm_clk_prepare_enable'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git hack/devm_cast_abuse
head: 542cb40d75bf747a26ac91aa28f1a1ecb19b89e3
commit: fe1aec9b36b68f59f0c78233d76d4fdd4153a5a2 [16/17] rtc: Bulk conversion to devm_clk_prepare_enable()
config: powerpc-randconfig-r025-20201215 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project a29ecca7819a6ed4250d3689b12b1f664bb790d7)
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/maz/arm-platforms.git/com...
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms hack/devm_cast_abuse
git checkout fe1aec9b36b68f59f0c78233d76d4fdd4153a5a2
# 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 >>):
^~~~~~~~~~~~~~
<scratch space>:133:1: note: expanded from here
__do_outl
^
arch/powerpc/include/asm/io.h:537:62: note: expanded from macro '__do_outl'
#define __do_outl(val, port) writel(val,(PCI_IO_ADDR)_IO_BASE+port);
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/rtc/rtc-jz4740.c:9:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:43:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:147:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/rtc/rtc-jz4740.c:9:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:149:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/rtc/rtc-jz4740.c:9:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:151:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/rtc/rtc-jz4740.c:9:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:153:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/rtc/rtc-jz4740.c:9:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:155:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/rtc/rtc-jz4740.c:9:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:157:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
drivers/rtc/rtc-jz4740.c:317:14: warning: cast to smaller integer type 'enum jz4740_rtc_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
rtc->type = (enum jz4740_rtc_type)device_get_match_data(dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/rtc/rtc-jz4740.c:333:8: error: implicit declaration of function 'devm_clk_prepare_enable' [-Werror,-Wimplicit-function-declaration]
ret = devm_clk_prepare_enable(dev, clk);
^
drivers/rtc/rtc-jz4740.c:333:8: note: did you mean 'clk_prepare_enable'?
include/linux/clk.h:936:19: note: 'clk_prepare_enable' declared here
static inline int clk_prepare_enable(struct clk *clk)
^
13 warnings and 1 error generated.
--
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:128:1: note: expanded from here
__do_outl
^
arch/powerpc/include/asm/io.h:537:62: note: expanded from macro '__do_outl'
#define __do_outl(val, port) writel(val,(PCI_IO_ADDR)_IO_BASE+port);
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/rtc/rtc-snvs.c:6:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:43:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:142:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/rtc/rtc-snvs.c:6:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:144:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/rtc/rtc-snvs.c:6:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:146:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/rtc/rtc-snvs.c:6:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:148:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/rtc/rtc-snvs.c:6:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:150:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/rtc/rtc-snvs.c:6:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:152:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> drivers/rtc/rtc-snvs.c:342:9: error: implicit declaration of function 'devm_clk_prepare_enable' [-Werror,-Wimplicit-function-declaration]
ret = devm_clk_prepare_enable(&pdev->dev, data->clk);
^
drivers/rtc/rtc-snvs.c:342:9: note: did you mean 'clk_prepare_enable'?
include/linux/clk.h:936:19: note: 'clk_prepare_enable' declared here
static inline int clk_prepare_enable(struct clk *clk)
^
12 warnings and 1 error generated.
vim +/devm_clk_prepare_enable +333 drivers/rtc/rtc-jz4740.c
303
304 static int jz4740_rtc_probe(struct platform_device *pdev)
305 {
306 struct device *dev = &pdev->dev;
307 struct device_node *np = dev->of_node;
308 struct jz4740_rtc *rtc;
309 unsigned long rate;
310 struct clk *clk;
311 int ret, irq;
312
313 rtc = devm_kzalloc(dev, sizeof(*rtc), GFP_KERNEL);
314 if (!rtc)
315 return -ENOMEM;
316
317 rtc->type = (enum jz4740_rtc_type)device_get_match_data(dev);
318
319 irq = platform_get_irq(pdev, 0);
320 if (irq < 0)
321 return irq;
322
323 rtc->base = devm_platform_ioremap_resource(pdev, 0);
324 if (IS_ERR(rtc->base))
325 return PTR_ERR(rtc->base);
326
327 clk = devm_clk_get(dev, "rtc");
328 if (IS_ERR(clk)) {
329 dev_err(dev, "Failed to get RTC clock\n");
330 return PTR_ERR(clk);
331 }
332
> 333 ret = devm_clk_prepare_enable(dev, clk);
334 if (ret) {
335 dev_err(dev, "Failed to register devm action\n");
336 return ret;
337 }
338
339 spin_lock_init(&rtc->lock);
340
341 platform_set_drvdata(pdev, rtc);
342
343 device_init_wakeup(dev, 1);
344
345 ret = dev_pm_set_wake_irq(dev, irq);
346 if (ret) {
347 dev_err(dev, "Failed to set wake irq: %d\n", ret);
348 return ret;
349 }
350
351 rtc->rtc = devm_rtc_allocate_device(dev);
352 if (IS_ERR(rtc->rtc)) {
353 ret = PTR_ERR(rtc->rtc);
354 dev_err(dev, "Failed to allocate rtc device: %d\n", ret);
355 return ret;
356 }
357
358 rtc->rtc->ops = &jz4740_rtc_ops;
359 rtc->rtc->range_max = U32_MAX;
360
361 rate = clk_get_rate(clk);
362 jz4740_rtc_set_wakeup_params(rtc, np, rate);
363
364 /* Each 1 Hz pulse should happen after (rate) ticks */
365 jz4740_rtc_reg_write(rtc, JZ_REG_RTC_REGULATOR, rate - 1);
366
367 ret = devm_rtc_register_device(rtc->rtc);
368 if (ret)
369 return ret;
370
371 ret = devm_request_irq(dev, irq, jz4740_rtc_irq, 0,
372 pdev->name, rtc);
373 if (ret) {
374 dev_err(dev, "Failed to request rtc irq: %d\n", ret);
375 return ret;
376 }
377
378 if (of_device_is_system_power_controller(np)) {
379 dev_for_power_off = dev;
380
381 if (!pm_power_off)
382 pm_power_off = jz4740_rtc_power_off;
383 else
384 dev_warn(dev, "Poweroff handler already present!\n");
385 }
386
387 return 0;
388 }
389
---
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 12693/13311] lib/crypto/blake2s-generic.c:40:6: warning: stack frame size of 4288 bytes in function 'blake2s_compress_generic'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 9317f948b0b188b8d2fded75957e6d42c460df1b
commit: bd06731ef42b0b0fb321a06c182ffd83029f69f5 [12693/13311] ubsan: enable for all*config builds
config: powerpc-randconfig-r006-20201216 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project a29ecca7819a6ed4250d3689b12b1f664bb790d7)
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/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout bd06731ef42b0b0fb321a06c182ffd83029f69f5
# 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 warnings (new ones prefixed by >>):
>> lib/crypto/blake2s-generic.c:40:6: warning: stack frame size of 4288 bytes in function 'blake2s_compress_generic' [-Wframe-larger-than=]
void blake2s_compress_generic(struct blake2s_state *state,const u8 *block,
^
1 warning generated.
vim +/blake2s_compress_generic +40 lib/crypto/blake2s-generic.c
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 39
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 @40 void blake2s_compress_generic(struct blake2s_state *state,const u8 *block,
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 41 size_t nblocks, const u32 inc)
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 42 {
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 43 u32 m[16];
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 44 u32 v[16];
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 45 int i;
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 46
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 47 WARN_ON(IS_ENABLED(DEBUG) &&
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 48 (nblocks > 1 && inc != BLAKE2S_BLOCK_SIZE));
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 49
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 50 while (nblocks > 0) {
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 51 blake2s_increment_counter(state, inc);
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 52 memcpy(m, block, BLAKE2S_BLOCK_SIZE);
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 53 le32_to_cpu_array(m, ARRAY_SIZE(m));
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 54 memcpy(v, state->h, 32);
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 55 v[ 8] = BLAKE2S_IV0;
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 56 v[ 9] = BLAKE2S_IV1;
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 57 v[10] = BLAKE2S_IV2;
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 58 v[11] = BLAKE2S_IV3;
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 59 v[12] = BLAKE2S_IV4 ^ state->t[0];
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 60 v[13] = BLAKE2S_IV5 ^ state->t[1];
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 61 v[14] = BLAKE2S_IV6 ^ state->f[0];
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 62 v[15] = BLAKE2S_IV7 ^ state->f[1];
66d7fb94e4ffe5a Jason A. Donenfeld 2019-11-08 63
:::::: The code at line 40 was first introduced by commit
:::::: 66d7fb94e4ffe5acc589e0b2b4710aecc1f07a28 crypto: blake2s - generic C library implementation and selftest
:::::: TO: Jason A. Donenfeld <Jason(a)zx2c4.com>
:::::: CC: Herbert Xu <herbert(a)gondor.apana.org.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[arm-platforms:hack/devm_cast_abuse 17/17] drivers/iio/imu/adis16480.c:1266:9: error: implicit declaration of function 'devm_clk_prepare_enable'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git hack/devm_cast_abuse
head: 542cb40d75bf747a26ac91aa28f1a1ecb19b89e3
commit: 542cb40d75bf747a26ac91aa28f1a1ecb19b89e3 [17/17] treewide: Bulk conversion to devm_clk_prepare_enable()
config: parisc-randconfig-r036-20201215 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/com...
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms hack/devm_cast_abuse
git checkout 542cb40d75bf747a26ac91aa28f1a1ecb19b89e3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/iio/imu/adis16480.c: In function 'adis16480_probe':
>> drivers/iio/imu/adis16480.c:1266:9: error: implicit declaration of function 'devm_clk_prepare_enable'; did you mean 'clk_prepare_enable'? [-Werror=implicit-function-declaration]
1266 | ret = devm_clk_prepare_enable(&spi->dev, st->ext_clk);
| ^~~~~~~~~~~~~~~~~~~~~~~
| clk_prepare_enable
cc1: some warnings being treated as errors
vim +1266 drivers/iio/imu/adis16480.c
1215
1216 static int adis16480_probe(struct spi_device *spi)
1217 {
1218 const struct spi_device_id *id = spi_get_device_id(spi);
1219 const struct adis_data *adis16480_data;
1220 struct iio_dev *indio_dev;
1221 struct adis16480 *st;
1222 int ret;
1223
1224 indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
1225 if (indio_dev == NULL)
1226 return -ENOMEM;
1227
1228 spi_set_drvdata(spi, indio_dev);
1229
1230 st = iio_priv(indio_dev);
1231
1232 st->chip_info = &adis16480_chip_info[id->driver_data];
1233 indio_dev->name = spi_get_device_id(spi)->name;
1234 indio_dev->channels = st->chip_info->channels;
1235 indio_dev->num_channels = st->chip_info->num_channels;
1236 indio_dev->info = &adis16480_info;
1237 indio_dev->modes = INDIO_DIRECT_MODE;
1238
1239 adis16480_data = &st->chip_info->adis_data;
1240
1241 ret = adis_init(&st->adis, indio_dev, spi, adis16480_data);
1242 if (ret)
1243 return ret;
1244
1245 ret = __adis_initial_startup(&st->adis);
1246 if (ret)
1247 return ret;
1248
1249 ret = devm_add_action_or_reset(&spi->dev, adis16480_stop, indio_dev);
1250 if (ret)
1251 return ret;
1252
1253 ret = adis16480_config_irq_pin(spi->dev.of_node, st);
1254 if (ret)
1255 return ret;
1256
1257 ret = adis16480_get_ext_clocks(st);
1258 if (ret)
1259 return ret;
1260
1261 if (!IS_ERR_OR_NULL(st->ext_clk)) {
1262 ret = adis16480_ext_clk_config(st, spi->dev.of_node, true);
1263 if (ret)
1264 return ret;
1265
> 1266 ret = devm_clk_prepare_enable(&spi->dev, st->ext_clk);
1267 if (ret)
1268 return ret;
1269
1270 st->clk_freq = clk_get_rate(st->ext_clk);
1271 st->clk_freq *= 1000; /* micro */
1272 } else {
1273 st->clk_freq = st->chip_info->int_clk;
1274 }
1275
1276 ret = devm_adis_setup_buffer_and_trigger(&st->adis, indio_dev, NULL);
1277 if (ret)
1278 return ret;
1279
1280 ret = devm_iio_device_register(&spi->dev, indio_dev);
1281 if (ret)
1282 return ret;
1283
1284 adis16480_debugfs_init(indio_dev);
1285
1286 return 0;
1287 }
1288
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months