arch/arm/kernel/sys_oabi-compat.c:251:51: sparse: sparse: incorrect type in argument 3 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 136057256686de39cc3a07c2e39ef6bc43003ff6
commit: 7e2d8c29ecdd86afbcedb9d9a977bab8af527add ARM: 9111/1: oabi-compat: rework fcntl64() emulation
date: 3 months ago
config: arm-randconfig-s032-20211123 (https://download.01.org/0day-ci/archive/20211123/202111232352.1I2ZjeBh-lk...)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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.4-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 7e2d8c29ecdd86afbcedb9d9a977bab8af527add
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.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>
sparse warnings: (new ones prefixed by >>)
>> arch/arm/kernel/sys_oabi-compat.c:251:51: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected struct flock64 [noderef] __user *user @@ got struct flock64 * @@
arch/arm/kernel/sys_oabi-compat.c:251:51: sparse: expected struct flock64 [noderef] __user *user
arch/arm/kernel/sys_oabi-compat.c:251:51: sparse: got struct flock64 *
arch/arm/kernel/sys_oabi-compat.c:265:55: sparse: sparse: incorrect type in argument 4 (different address spaces) @@ expected struct flock64 [noderef] __user *user @@ got struct flock64 * @@
arch/arm/kernel/sys_oabi-compat.c:265:55: sparse: expected struct flock64 [noderef] __user *user
arch/arm/kernel/sys_oabi-compat.c:265:55: sparse: got struct flock64 *
arch/arm/kernel/sys_oabi-compat.c:292:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __poll_t [usertype] events @@ got unsigned int [addressable] [usertype] events @@
arch/arm/kernel/sys_oabi-compat.c:292:23: sparse: expected restricted __poll_t [usertype] events
arch/arm/kernel/sys_oabi-compat.c:292:23: sparse: got unsigned int [addressable] [usertype] events
arch/arm/kernel/sys_oabi-compat.c:312:21: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int __pu_val @@ got restricted __poll_t [usertype] revents @@
arch/arm/kernel/sys_oabi-compat.c:312:21: sparse: expected unsigned int __pu_val
arch/arm/kernel/sys_oabi-compat.c:312:21: sparse: got restricted __poll_t [usertype] revents
vim +251 arch/arm/kernel/sys_oabi-compat.c
230
231 asmlinkage long sys_oabi_fcntl64(unsigned int fd, unsigned int cmd,
232 unsigned long arg)
233 {
234 void __user *argp = (void __user *)arg;
235 struct fd f = fdget_raw(fd);
236 struct flock64 flock;
237 long err = -EBADF;
238
239 if (!f.file)
240 goto out;
241
242 switch (cmd) {
243 case F_GETLK64:
244 case F_OFD_GETLK:
245 err = security_file_fcntl(f.file, cmd, arg);
246 if (err)
247 break;
248 err = get_oabi_flock(&flock, argp);
249 if (err)
250 break;
> 251 err = fcntl_getlk64(f.file, cmd, &flock);
252 if (!err)
253 err = put_oabi_flock(&flock, argp);
254 break;
255 case F_SETLK64:
256 case F_SETLKW64:
257 case F_OFD_SETLK:
258 case F_OFD_SETLKW:
259 err = security_file_fcntl(f.file, cmd, arg);
260 if (err)
261 break;
262 err = get_oabi_flock(&flock, argp);
263 if (err)
264 break;
265 err = fcntl_setlk64(fd, f.file, cmd, &flock);
266 break;
267 default:
268 err = sys_fcntl64(fd, cmd, arg);
269 break;
270 }
271 fdput(f);
272 out:
273 return err;
274 }
275
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
Re: [net-next PATCH 2/2] net: dsa: qca8k: add LAG support
by kernel test robot
Hi Ansuel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Ansuel-Smith/Add-mirror-and-LAG-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 3b0e04140bc30f9f5c254a68013a901e5390b0a8
config: i386-randconfig-a012-20211123 (https://download.01.org/0day-ci/archive/20211123/202111232352.6wBDdqCJ-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 49e3838145dff1ec91c2e67a2cb562775c8d2a08)
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/8fe5def54ec185d13c952a5f4da988ee7...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ansuel-Smith/Add-mirror-and-LAG-support-to-qca8k/20211123-110018
git checkout 8fe5def54ec185d13c952a5f4da988ee7757ad78
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/dsa/qca8k.c:2231:44: warning: overlapping comparisons always evaluate to true [-Wtautological-overlap-compare]
if (info->hash_type != NETDEV_LAG_HASH_L2 ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
>> drivers/net/dsa/qca8k.c:2252:3: warning: variable 'hash' is uninitialized when used here [-Wuninitialized]
hash |= QCA8K_TRUNK_HASH_SIP_EN;
^~~~
drivers/net/dsa/qca8k.c:2246:10: note: initialize the variable 'hash' to silence this warning
u32 hash;
^
= 0
2 warnings generated.
vim +2231 drivers/net/dsa/qca8k.c
2208
2209 static bool
2210 qca8k_lag_can_offload(struct dsa_switch *ds,
2211 struct net_device *lag,
2212 struct netdev_lag_upper_info *info)
2213 {
2214 struct dsa_port *dp;
2215 int id, members = 0;
2216
2217 id = dsa_lag_id(ds->dst, lag);
2218 if (id < 0 || id >= ds->num_lag_ids)
2219 return false;
2220
2221 dsa_lag_foreach_port(dp, ds->dst, lag)
2222 /* Includes the port joining the LAG */
2223 members++;
2224
2225 if (members > QCA8K_NUM_PORTS_FOR_LAG)
2226 return false;
2227
2228 if (info->tx_type != NETDEV_LAG_TX_TYPE_HASH)
2229 return false;
2230
> 2231 if (info->hash_type != NETDEV_LAG_HASH_L2 ||
2232 info->hash_type != NETDEV_LAG_HASH_L23)
2233 return false;
2234
2235 return true;
2236 }
2237
2238 static int
2239 qca8k_lag_setup_hash(struct dsa_switch *ds,
2240 struct net_device *lag,
2241 struct netdev_lag_upper_info *info)
2242 {
2243 struct qca8k_priv *priv = ds->priv;
2244 bool unique_lag = true;
2245 int i, id;
2246 u32 hash;
2247
2248 id = dsa_lag_id(ds->dst, lag);
2249
2250 switch (info->hash_type) {
2251 case NETDEV_LAG_HASH_L23:
> 2252 hash |= QCA8K_TRUNK_HASH_SIP_EN;
2253 hash |= QCA8K_TRUNK_HASH_DIP_EN;
2254 fallthrough;
2255 case NETDEV_LAG_HASH_L2:
2256 hash |= QCA8K_TRUNK_HASH_SA_EN;
2257 hash |= QCA8K_TRUNK_HASH_DA_EN;
2258 break;
2259 default: /* We should NEVER reach this */
2260 return -EOPNOTSUPP;
2261 }
2262
2263 /* Check if we are the unique configured LAG */
2264 dsa_lags_foreach_id(i, ds->dst)
2265 if (i != id && dsa_lag_dev(ds->dst, i)) {
2266 unique_lag = false;
2267 break;
2268 }
2269
2270 /* Hash Mode is global. Make sure the same Hash Mode
2271 * is set to all the 4 possible lag.
2272 * If we are the unique LAG we can set whatever hash
2273 * mode we want.
2274 * To change hash mode it's needed to remove all LAG
2275 * and change the mode with the latest.
2276 */
2277 if (unique_lag) {
2278 priv->lag_hash_mode = hash;
2279 } else if (priv->lag_hash_mode != hash) {
2280 netdev_err(lag, "Error: Mismateched Hash Mode across different lag is not supported\n");
2281 return -EOPNOTSUPP;
2282 }
2283
2284 return regmap_update_bits(priv->regmap, QCA8K_TRUNK_HASH_EN_CTRL,
2285 QCA8K_TRUNK_HASH_MASK, hash);
2286 }
2287
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
Re: [PATCH 11/12] nvmet-auth: Diffie-Hellman key exchange support
by kernel test robot
Hi Hannes,
I love your patch! Perhaps something to improve:
[auto build test WARNING on herbert-cryptodev-2.6/master]
[also build test WARNING on linus/master v5.16-rc2 next-20211123]
[cannot apply to herbert-crypto-2.6/master linux-nvme/for-next]
[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/Hannes-Reinecke/nvme-In-band-aut...
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: mips-allmodconfig (https://download.01.org/0day-ci/archive/20211123/202111232322.YNIOiBE1-lk...)
compiler: mips-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/34bd34a0ee0dbaeeb36f3264e50be3a53...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Hannes-Reinecke/nvme-In-band-authentication-support/20211123-204008
git checkout 34bd34a0ee0dbaeeb36f3264e50be3a533491d97
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=mips
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/nvme/target/fabrics-cmd-auth.c: In function 'nvmet_auth_challenge':
>> <command-line>: warning: format '%lu' expects argument of type 'long unsigned int', but argument 9 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
drivers/nvme/target/fabrics-cmd-auth.c:7:21: note: in expansion of macro 'KBUILD_MODNAME'
7 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
| ^~~~~~~~~~~~~~
include/linux/dynamic_debug.h:134:29: note: in expansion of macro 'pr_fmt'
134 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:152:9: note: in expansion of macro '__dynamic_func_call'
152 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:162:9: note: in expansion of macro '_dynamic_func_call'
162 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:570:9: note: in expansion of macro 'dynamic_pr_debug'
570 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
drivers/nvme/target/fabrics-cmd-auth.c:350:9: note: in expansion of macro 'pr_debug'
350 | pr_debug("%s: ctrl %d qid %d seq %d transaction %d hl %d dhvlen %lu\n",
| ^~~~~~~~
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[jimc:vincent 3/5] lib/dynamic_debug.c:669:9: warning: function 'dynamic_trace' might be a candidate for 'gnu_printf' format attribute
by kernel test robot
tree: https://github.com/jimc/linux.git vincent
head: 019640b342b50f20562c48772b7a9383eee5f85e
commit: 94cdbcf9aa003a6bf6cb4d302d391693422f9903 [3/5] vincents dd.c code
config: mips-randconfig-r034-20211122 (https://download.01.org/0day-ci/archive/20211123/202111232328.GQdLmFxd-lk...)
compiler: mipsel-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/jimc/linux/commit/94cdbcf9aa003a6bf6cb4d302d391693422f...
git remote add jimc https://github.com/jimc/linux.git
git fetch --no-tags jimc vincent
git checkout 94cdbcf9aa003a6bf6cb4d302d391693422f9903
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=mips
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/dynamic_debug.c:95:11: error: '_DPRINTK_FLAGS_TRACE' undeclared here (not in a function)
95 | { _DPRINTK_FLAGS_TRACE, 'x' },
| ^~~~~~~~~~~~~~~~~~~~
lib/dynamic_debug.c: In function 'dynamic_trace':
>> lib/dynamic_debug.c:669:9: warning: function 'dynamic_trace' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
669 | len = vscnprintf(buf->buf, sizeof(buf->buf), fmt, args);
| ^~~
lib/dynamic_debug.c: In function 'dynamic_printk':
>> lib/dynamic_debug.c:697:17: warning: function 'dynamic_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
697 | vprintk(fmt, args);
| ^~~~~~~
lib/dynamic_debug.c: In function 'dynamic_dev_printk':
>> lib/dynamic_debug.c:718:17: warning: function 'dynamic_dev_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
718 | dev_vprintk_emit(LOGLEVEL_DEBUG, dev, fmt, args);
| ^~~~~~~~~~~~~~~~
vim +669 lib/dynamic_debug.c
650
651 static void dynamic_trace(const char *fmt, va_list args)
652 {
653 struct dynamic_trace_buf *buf;
654 int bufidx;
655 int len;
656
657 preempt_disable_notrace();
658
659 bufidx = __this_cpu_inc_return(dynamic_trace_reserve) - 1;
660
661 if (WARN_ON_ONCE(bufidx > DYNAMIC_TRACE_NESTING))
662 goto out;
663
664 /* For the same reasons as in __ftrace_trace_stack(). */
665 barrier();
666
667 buf = this_cpu_ptr(dynamic_trace_bufs.bufs) + bufidx;
668
> 669 len = vscnprintf(buf->buf, sizeof(buf->buf), fmt, args);
670 trace_dyndbg(buf->buf, len);
671
672 out:
673 /* As above. */
674 barrier();
675 __this_cpu_dec(dynamic_trace_reserve);
676 preempt_enable_notrace();
677 }
678
679 static void dynamic_printk(unsigned int flags, const char *fmt, ...)
680 {
681 if (flags & _DPRINTK_FLAGS_TRACE) {
682 va_list args;
683
684 va_start(args, fmt);
685 /*
686 * All callers include the KERN_DEBUG prefix to keep the
687 * vprintk case simple; strip it out for tracing.
688 */
689 dynamic_trace(fmt + strlen(KERN_DEBUG), args);
690 va_end(args);
691 }
692
693 if (flags & _DPRINTK_FLAGS_PRINTK) {
694 va_list args;
695
696 va_start(args, fmt);
> 697 vprintk(fmt, args);
698 va_end(args);
699 }
700 }
701
702 static void dynamic_dev_printk(unsigned int flags, const struct device *dev,
703 const char *fmt, ...)
704 {
705
706 if (flags & _DPRINTK_FLAGS_TRACE) {
707 va_list args;
708
709 va_start(args, fmt);
710 dynamic_trace(fmt, args);
711 va_end(args);
712 }
713
714 if (flags & _DPRINTK_FLAGS_PRINTK) {
715 va_list args;
716
717 va_start(args, fmt);
> 718 dev_vprintk_emit(LOGLEVEL_DEBUG, dev, fmt, args);
719 va_end(args);
720 }
721 }
722
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[android-common:android-4.14-stable 19681/25403] drivers/mmc/core/crypto.c:14:6: warning: no previous declaration for 'mmc_crypto_setup_queue'
by kernel test robot
Hi Satya,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/common android-4.14-stable
head: df8b534e51541e55a1b1f0009ebcbb6a49f34b18
commit: 86556e67a9fde013721c184f1590930b5811505f [19681/25403] ANDROID: mmc: MMC crypto API
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20211123/202111232214.WdTOlJEp-lk...)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-4.14-stable
git checkout 86556e67a9fde013721c184f1590930b5811505f
# save the config file to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/mmc/core/crypto.c:14:6: warning: no previous declaration for 'mmc_crypto_setup_queue' [-Wmissing-declarations]
void mmc_crypto_setup_queue(struct mmc_host *host, struct request_queue *q)
^~~~~~~~~~~~~~~~~~~~~~
>> drivers/mmc/core/crypto.c:21:6: warning: no previous declaration for 'mmc_crypto_free_host' [-Wmissing-declarations]
void mmc_crypto_free_host(struct mmc_host *host)
^~~~~~~~~~~~~~~~~~~~
>> drivers/mmc/core/crypto.c:26:6: warning: no previous declaration for 'mmc_crypto_prepare_req' [-Wmissing-declarations]
void mmc_crypto_prepare_req(struct mmc_queue_req *mqrq)
^~~~~~~~~~~~~~~~~~~~~~
vim +/mmc_crypto_setup_queue +14 drivers/mmc/core/crypto.c
13
> 14 void mmc_crypto_setup_queue(struct mmc_host *host, struct request_queue *q)
15 {
16 if (host->caps2 & MMC_CAP2_CRYPTO)
17 q->ksm = host->ksm;
18 }
19 EXPORT_SYMBOL_GPL(mmc_crypto_setup_queue);
20
> 21 void mmc_crypto_free_host(struct mmc_host *host)
22 {
23 keyslot_manager_destroy(host->ksm);
24 }
25
> 26 void mmc_crypto_prepare_req(struct mmc_queue_req *mqrq)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[linux-next:master 2931/3119] arch/sparc/kernel/led.c:125:44: error: 'led_proc_ops' undeclared; did you mean 'proc_ops'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: aacdecce8147c20b01f865b4e214bb8dbe8c4af1
commit: a5bfe17b6ef2aa73b93002aacd368e67fd5e802b [2931/3119] proc: Make the proc_create[_data]() stubs static inlines
config: sparc-buildonly-randconfig-r002-20211123 (https://download.01.org/0day-ci/archive/20211123/202111232211.EGcf1OEb-lk...)
compiler: sparc-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# 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 a5bfe17b6ef2aa73b93002aacd368e67fd5e802b
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sparc SHELL=/bin/bash arch/sparc/kernel/
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/sparc/kernel/led.c: In function 'led_init':
>> arch/sparc/kernel/led.c:125:44: error: 'led_proc_ops' undeclared (first use in this function); did you mean 'proc_ops'?
125 | led = proc_create("led", 0, NULL, &led_proc_ops);
| ^~~~~~~~~~~~
| proc_ops
arch/sparc/kernel/led.c:125:44: note: each undeclared identifier is reported only once for each function it appears in
vim +125 arch/sparc/kernel/led.c
ee1858d3122ded Lars Kotthoff 2005-11-07 120
ee1858d3122ded Lars Kotthoff 2005-11-07 121 static int __init led_init(void)
ee1858d3122ded Lars Kotthoff 2005-11-07 122 {
db275f2a02cd35 Kees Cook 2017-10-09 123 timer_setup(&led_blink_timer, led_blink, 0);
ee1858d3122ded Lars Kotthoff 2005-11-07 124
97a32539b9568b Alexey Dobriyan 2020-02-03 @125 led = proc_create("led", 0, NULL, &led_proc_ops);
ee1858d3122ded Lars Kotthoff 2005-11-07 126 if (!led)
ee1858d3122ded Lars Kotthoff 2005-11-07 127 return -ENOMEM;
ee1858d3122ded Lars Kotthoff 2005-11-07 128
ee1858d3122ded Lars Kotthoff 2005-11-07 129 printk(KERN_INFO
ee1858d3122ded Lars Kotthoff 2005-11-07 130 "led: version %s, Lars Kotthoff <metalhead(a)metalhead.ws>\n",
ee1858d3122ded Lars Kotthoff 2005-11-07 131 LED_VERSION);
ee1858d3122ded Lars Kotthoff 2005-11-07 132
ee1858d3122ded Lars Kotthoff 2005-11-07 133 return 0;
ee1858d3122ded Lars Kotthoff 2005-11-07 134 }
ee1858d3122ded Lars Kotthoff 2005-11-07 135
:::::: The code at line 125 was first introduced by commit
:::::: 97a32539b9568bb653683349e5a76d02ff3c3e2c proc: convert everything to "struct proc_ops"
:::::: TO: Alexey Dobriyan <adobriyan(a)gmail.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
Re: [PATCH v2] i2c: tegra: Add ACPI support
by kernel test robot
Hi Akhil,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tegra/for-next]
[also build test ERROR on v5.16-rc2 next-20211123]
[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/Akhil-R/i2c-tegra-Add-ACPI-suppo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next
config: m68k-randconfig-r011-20211123 (https://download.01.org/0day-ci/archive/20211123/202111232153.mpoejDRV-lk...)
compiler: m68k-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/dec174be801f41a9e42f4381c59c2357c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Akhil-R/i2c-tegra-Add-ACPI-support/20211123-151636
git checkout dec174be801f41a9e42f4381c59c2357c25e40fb
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.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/i2c/busses/i2c-tegra.c: In function 'tegra_i2c_init':
>> drivers/i2c/busses/i2c-tegra.c:623:23: error: implicit declaration of function 'acpi_has_method'; did you mean 'acpi_has_watchdog'? [-Werror=implicit-function-declaration]
623 | if (handle && acpi_has_method(handle, "_RST"))
| ^~~~~~~~~~~~~~~
| acpi_has_watchdog
cc1: some warnings being treated as errors
vim +623 drivers/i2c/busses/i2c-tegra.c
608
609 static int tegra_i2c_init(struct tegra_i2c_dev *i2c_dev)
610 {
611 u32 val, clk_divisor, clk_multiplier, tsu_thd, tlow, thigh, non_hs_mode;
612 acpi_handle handle = ACPI_HANDLE(i2c_dev->dev);
613 int err;
614
615 /*
616 * The reset shouldn't ever fail in practice. The failure will be a
617 * sign of a severe problem that needs to be resolved. Still we don't
618 * want to fail the initialization completely because this may break
619 * kernel boot up since voltage regulators use I2C. Hence, we will
620 * emit a noisy warning on error, which won't stay unnoticed and
621 * won't hose machine entirely.
622 */
> 623 if (handle && acpi_has_method(handle, "_RST"))
624 err = (acpi_evaluate_object(handle, "_RST", NULL, NULL));
625 else
626 err = reset_control_reset(i2c_dev->rst);
627
628 WARN_ON_ONCE(err);
629
630 if (i2c_dev->is_dvc)
631 tegra_dvc_init(i2c_dev);
632
633 val = I2C_CNFG_NEW_MASTER_FSM | I2C_CNFG_PACKET_MODE_EN |
634 FIELD_PREP(I2C_CNFG_DEBOUNCE_CNT, 2);
635
636 if (i2c_dev->hw->has_multi_master_mode)
637 val |= I2C_CNFG_MULTI_MASTER_MODE;
638
639 i2c_writel(i2c_dev, val, I2C_CNFG);
640 i2c_writel(i2c_dev, 0, I2C_INT_MASK);
641
642 if (i2c_dev->is_vi)
643 tegra_i2c_vi_init(i2c_dev);
644
645 switch (i2c_dev->bus_clk_rate) {
646 case I2C_MAX_STANDARD_MODE_FREQ + 1 ... I2C_MAX_FAST_MODE_PLUS_FREQ:
647 default:
648 tlow = i2c_dev->hw->tlow_fast_fastplus_mode;
649 thigh = i2c_dev->hw->thigh_fast_fastplus_mode;
650 tsu_thd = i2c_dev->hw->setup_hold_time_fast_fast_plus_mode;
651
652 if (i2c_dev->bus_clk_rate > I2C_MAX_FAST_MODE_FREQ)
653 non_hs_mode = i2c_dev->hw->clk_divisor_fast_plus_mode;
654 else
655 non_hs_mode = i2c_dev->hw->clk_divisor_fast_mode;
656 break;
657
658 case 0 ... I2C_MAX_STANDARD_MODE_FREQ:
659 tlow = i2c_dev->hw->tlow_std_mode;
660 thigh = i2c_dev->hw->thigh_std_mode;
661 tsu_thd = i2c_dev->hw->setup_hold_time_std_mode;
662 non_hs_mode = i2c_dev->hw->clk_divisor_std_mode;
663 break;
664 }
665
666 /* make sure clock divisor programmed correctly */
667 clk_divisor = FIELD_PREP(I2C_CLK_DIVISOR_HSMODE,
668 i2c_dev->hw->clk_divisor_hs_mode) |
669 FIELD_PREP(I2C_CLK_DIVISOR_STD_FAST_MODE, non_hs_mode);
670 i2c_writel(i2c_dev, clk_divisor, I2C_CLK_DIVISOR);
671
672 if (i2c_dev->hw->has_interface_timing_reg) {
673 val = FIELD_PREP(I2C_INTERFACE_TIMING_THIGH, thigh) |
674 FIELD_PREP(I2C_INTERFACE_TIMING_TLOW, tlow);
675 i2c_writel(i2c_dev, val, I2C_INTERFACE_TIMING_0);
676 }
677
678 /*
679 * Configure setup and hold times only when tsu_thd is non-zero.
680 * Otherwise, preserve the chip default values.
681 */
682 if (i2c_dev->hw->has_interface_timing_reg && tsu_thd)
683 i2c_writel(i2c_dev, tsu_thd, I2C_INTERFACE_TIMING_1);
684
685 clk_multiplier = (tlow + thigh + 2) * (non_hs_mode + 1);
686
687 err = clk_set_rate(i2c_dev->div_clk,
688 i2c_dev->bus_clk_rate * clk_multiplier);
689 if (err) {
690 dev_err(i2c_dev->dev, "failed to set div-clk rate: %d\n", err);
691 return err;
692 }
693
694 if (!i2c_dev->is_dvc && !i2c_dev->is_vi) {
695 u32 sl_cfg = i2c_readl(i2c_dev, I2C_SL_CNFG);
696
697 sl_cfg |= I2C_SL_CNFG_NACK | I2C_SL_CNFG_NEWSL;
698 i2c_writel(i2c_dev, sl_cfg, I2C_SL_CNFG);
699 i2c_writel(i2c_dev, 0xfc, I2C_SL_ADDR1);
700 i2c_writel(i2c_dev, 0x00, I2C_SL_ADDR2);
701 }
702
703 err = tegra_i2c_flush_fifos(i2c_dev);
704 if (err)
705 return err;
706
707 if (i2c_dev->multimaster_mode && i2c_dev->hw->has_slcg_override_reg)
708 i2c_writel(i2c_dev, I2C_MST_CORE_CLKEN_OVR, I2C_CLKEN_OVERRIDE);
709
710 err = tegra_i2c_wait_for_config_load(i2c_dev);
711 if (err)
712 return err;
713
714 return 0;
715 }
716
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 136057256686de39cc3a07c2e39ef6bc43003ff6
commit: 6e1e90ec027509a7e8d4efbd77a65b32b5a8b3ec regmap: mmio: add config option to allow relaxed MMIO accesses
date: 1 year, 1 month ago
config: h8300-randconfig-s031-20211117 (https://download.01.org/0day-ci/archive/20211123/202111232102.j4IfMUMj-lk...)
compiler: h8300-linux-gcc (GCC) 11.2.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.4-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 6e1e90ec027509a7e8d4efbd77a65b32b5a8b3ec
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.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>
sparse warnings: (new ones prefixed by >>)
drivers/base/regmap/regmap-mmio.c: note: in included file (through include/linux/io.h):
arch/h8300/include/asm/io.h:32:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:32:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:38:11: sparse: sparse: cast removes address space '__iomem' of expression
drivers/base/regmap/regmap-mmio.c: note: in included file (through arch/h8300/include/asm/io.h, include/linux/io.h):
>> include/asm-generic/io.h:291:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] b @@ got restricted __le16 [usertype] @@
include/asm-generic/io.h:291:22: sparse: expected unsigned short [usertype] b
include/asm-generic/io.h:291:22: sparse: got restricted __le16 [usertype]
drivers/base/regmap/regmap-mmio.c: note: in included file (through include/linux/io.h):
arch/h8300/include/asm/io.h:38:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:38:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
drivers/base/regmap/regmap-mmio.c: note: in included file (through arch/h8300/include/asm/io.h, include/linux/io.h):
include/asm-generic/io.h:299:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] b @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:299:22: sparse: expected unsigned int [usertype] b
include/asm-generic/io.h:299:22: sparse: got restricted __le32 [usertype]
drivers/base/regmap/regmap-mmio.c: note: in included file (through include/linux/io.h):
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:14:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:14:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:20:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:20:18: sparse: sparse: cast removes address space '__iomem' of expression
drivers/base/regmap/regmap-mmio.c: note: in included file (through arch/h8300/include/asm/io.h, include/linux/io.h):
include/asm-generic/io.h:259:16: sparse: sparse: cast to restricted __le16
include/asm-generic/io.h:259:16: sparse: sparse: cast to restricted __le16
include/asm-generic/io.h:259:16: sparse: sparse: cast to restricted __le16
include/asm-generic/io.h:259:16: sparse: sparse: cast to restricted __le16
drivers/base/regmap/regmap-mmio.c: note: in included file (through include/linux/io.h):
arch/h8300/include/asm/io.h:20:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:20:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:20:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:20:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:20:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:20:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
drivers/base/regmap/regmap-mmio.c: note: in included file (through arch/h8300/include/asm/io.h, include/linux/io.h):
include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:267:16: sparse: sparse: cast to restricted __le32
drivers/base/regmap/regmap-mmio.c: note: in included file (through include/linux/io.h):
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
vim +291 include/asm-generic/io.h
9439eb3ab9d1ec Will Deacon 2013-09-03 286
9439eb3ab9d1ec Will Deacon 2013-09-03 287 #ifndef writew_relaxed
a71e7c44ffb7ba Sinan Kaya 2018-04-06 288 #define writew_relaxed writew_relaxed
a71e7c44ffb7ba Sinan Kaya 2018-04-06 289 static inline void writew_relaxed(u16 value, volatile void __iomem *addr)
a71e7c44ffb7ba Sinan Kaya 2018-04-06 290 {
a71e7c44ffb7ba Sinan Kaya 2018-04-06 @291 __raw_writew(cpu_to_le16(value), addr);
a71e7c44ffb7ba Sinan Kaya 2018-04-06 292 }
9439eb3ab9d1ec Will Deacon 2013-09-03 293 #endif
9439eb3ab9d1ec Will Deacon 2013-09-03 294
:::::: The code at line 291 was first introduced by commit
:::::: a71e7c44ffb7baea0c0795824afc34cc0bc1a301 io: change writeX_relaxed() to remove barriers
:::::: TO: Sinan Kaya <okaya(a)codeaurora.org>
:::::: CC: Arnd Bergmann <arnd(a)arndb.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months