drivers/clocksource/timer-pistachio.c:74:22: warning: variable 'overflow' set but not used
by kernel test robot
Hi Drew,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4c388a8e740d3235a194f330c8ef327deef710f6
commit: a47d7ef4550d08fb428ea4c3f1a9c71674212208 clocksource/drivers/pistachio: Fix trivial typo
date: 8 months ago
config: mips-randconfig-r012-20210927 (attached as .config)
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://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 a47d7ef4550d08fb428ea4c3f1a9c71674212208
# save the attached .config 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/clocksource/timer-pistachio.c: In function 'pistachio_clocksource_read_cycles':
>> drivers/clocksource/timer-pistachio.c:74:22: warning: variable 'overflow' set but not used [-Wunused-but-set-variable]
74 | u32 counter, overflow;
| ^~~~~~~~
vim +/overflow +74 drivers/clocksource/timer-pistachio.c
69
70 static u64 notrace
71 pistachio_clocksource_read_cycles(struct clocksource *cs)
72 {
73 struct pistachio_clocksource *pcs = to_pistachio_clocksource(cs);
> 74 u32 counter, overflow;
75 unsigned long flags;
76
77 /*
78 * The counter value is only refreshed after the overflow value is read.
79 * And they must be read in strict order, hence raw spin lock added.
80 */
81
82 raw_spin_lock_irqsave(&pcs->lock, flags);
83 overflow = gpt_readl(pcs->base, TIMER_CURRENT_OVERFLOW_VALUE, 0);
84 counter = gpt_readl(pcs->base, TIMER_CURRENT_VALUE, 0);
85 raw_spin_unlock_irqrestore(&pcs->lock, flags);
86
87 return (u64)~counter;
88 }
89
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
drivers/gpu/drm/gud/gud_drv.c:95:28: sparse: sparse: cast to restricted __le32
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4c388a8e740d3235a194f330c8ef327deef710f6
commit: 40e1a70b4aedf2859a1829991b48ef0ebe650bf2 drm: Add GUD USB Display driver
date: 8 months ago
config: mips-randconfig-s032-20211116 (attached as .config)
compiler: mipsel-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 40e1a70b4aedf2859a1829991b48ef0ebe650bf2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/ block// drivers/ kernel// net/
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 >>)
command-line: note: in included file:
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
builtin:0:0: sparse: this was the original definition
>> drivers/gpu/drm/gud/gud_drv.c:95:28: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/gud/gud_drv.c:95:17: sparse: sparse: restricted __le32 degrades to integer
vim +95 drivers/gpu/drm/gud/gud_drv.c
76
77 static int gud_get_display_descriptor(struct usb_interface *intf,
78 struct gud_display_descriptor_req *desc)
79 {
80 void *buf;
81 int ret;
82
83 buf = kmalloc(sizeof(*desc), GFP_KERNEL);
84 if (!buf)
85 return -ENOMEM;
86
87 ret = gud_usb_control_msg(intf, true, GUD_REQ_GET_DESCRIPTOR, 0, buf, sizeof(*desc));
88 memcpy(desc, buf, sizeof(*desc));
89 kfree(buf);
90 if (ret < 0)
91 return ret;
92 if (ret != sizeof(*desc))
93 return -EIO;
94
> 95 if (desc->magic != le32_to_cpu(GUD_DISPLAY_MAGIC))
96 return -ENODATA;
97
98 DRM_DEV_DEBUG_DRIVER(&intf->dev,
99 "version=%u flags=0x%x compression=0x%x max_buffer_size=%u\n",
100 desc->version, le32_to_cpu(desc->flags), desc->compression,
101 le32_to_cpu(desc->max_buffer_size));
102
103 if (!desc->version || !desc->max_width || !desc->max_height ||
104 le32_to_cpu(desc->min_width) > le32_to_cpu(desc->max_width) ||
105 le32_to_cpu(desc->min_height) > le32_to_cpu(desc->max_height))
106 return -EINVAL;
107
108 return 0;
109 }
110
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
drivers/firmware/stratix10-svc.c:823 stratix10_svc_send() warn: inconsistent indenting
by kernel test robot
Hi Krzysztof,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4c388a8e740d3235a194f330c8ef327deef710f6
commit: 4a9a1a5602d82c079325bf37466af0b67d6c0b9e arm64: socfpga: merge Agilex and N5X into ARCH_INTEL_SOCFPGA
date: 8 months ago
config: arm64-randconfig-m031-20211116 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
drivers/firmware/stratix10-svc.c:823 stratix10_svc_send() warn: inconsistent indenting
vim +823 drivers/firmware/stratix10-svc.c
7ca5ce896524f5 Richard Gong 2018-11-13 791
7ca5ce896524f5 Richard Gong 2018-11-13 792 /**
7ca5ce896524f5 Richard Gong 2018-11-13 793 * stratix10_svc_send() - send a message data to the remote
7ca5ce896524f5 Richard Gong 2018-11-13 794 * @chan: service channel assigned to the client
7ca5ce896524f5 Richard Gong 2018-11-13 795 * @msg: message data to be sent, in the format of
7ca5ce896524f5 Richard Gong 2018-11-13 796 * "struct stratix10_svc_client_msg"
7ca5ce896524f5 Richard Gong 2018-11-13 797 *
7ca5ce896524f5 Richard Gong 2018-11-13 798 * This function is used by service client to add a message to the service
7ca5ce896524f5 Richard Gong 2018-11-13 799 * layer driver's queue for being sent to the secure world.
7ca5ce896524f5 Richard Gong 2018-11-13 800 *
7ca5ce896524f5 Richard Gong 2018-11-13 801 * Return: 0 for success, -ENOMEM or -ENOBUFS on error.
7ca5ce896524f5 Richard Gong 2018-11-13 802 */
7ca5ce896524f5 Richard Gong 2018-11-13 803 int stratix10_svc_send(struct stratix10_svc_chan *chan, void *msg)
7ca5ce896524f5 Richard Gong 2018-11-13 804 {
7ca5ce896524f5 Richard Gong 2018-11-13 805 struct stratix10_svc_client_msg
7ca5ce896524f5 Richard Gong 2018-11-13 806 *p_msg = (struct stratix10_svc_client_msg *)msg;
7ca5ce896524f5 Richard Gong 2018-11-13 807 struct stratix10_svc_data_mem *p_mem;
7ca5ce896524f5 Richard Gong 2018-11-13 808 struct stratix10_svc_data *p_data;
7ca5ce896524f5 Richard Gong 2018-11-13 809 int ret = 0;
7ca5ce896524f5 Richard Gong 2018-11-13 810 unsigned int cpu = 0;
7ca5ce896524f5 Richard Gong 2018-11-13 811
7ca5ce896524f5 Richard Gong 2018-11-13 812 p_data = kzalloc(sizeof(*p_data), GFP_KERNEL);
7ca5ce896524f5 Richard Gong 2018-11-13 813 if (!p_data)
7ca5ce896524f5 Richard Gong 2018-11-13 814 return -ENOMEM;
7ca5ce896524f5 Richard Gong 2018-11-13 815
7ca5ce896524f5 Richard Gong 2018-11-13 816 /* first client will create kernel thread */
7ca5ce896524f5 Richard Gong 2018-11-13 817 if (!chan->ctrl->task) {
7ca5ce896524f5 Richard Gong 2018-11-13 818 chan->ctrl->task =
7ca5ce896524f5 Richard Gong 2018-11-13 819 kthread_create_on_node(svc_normal_to_secure_thread,
7ca5ce896524f5 Richard Gong 2018-11-13 820 (void *)chan->ctrl,
7ca5ce896524f5 Richard Gong 2018-11-13 821 cpu_to_node(cpu),
7ca5ce896524f5 Richard Gong 2018-11-13 822 "svc_smc_hvc_thread");
7ca5ce896524f5 Richard Gong 2018-11-13 @823 if (IS_ERR(chan->ctrl->task)) {
7ca5ce896524f5 Richard Gong 2018-11-13 824 dev_err(chan->ctrl->dev,
b5dc75c915cdae Richard Gong 2019-09-03 825 "failed to create svc_smc_hvc_thread\n");
7ca5ce896524f5 Richard Gong 2018-11-13 826 kfree(p_data);
7ca5ce896524f5 Richard Gong 2018-11-13 827 return -EINVAL;
7ca5ce896524f5 Richard Gong 2018-11-13 828 }
7ca5ce896524f5 Richard Gong 2018-11-13 829 kthread_bind(chan->ctrl->task, cpu);
7ca5ce896524f5 Richard Gong 2018-11-13 830 wake_up_process(chan->ctrl->task);
7ca5ce896524f5 Richard Gong 2018-11-13 831 }
7ca5ce896524f5 Richard Gong 2018-11-13 832
7ca5ce896524f5 Richard Gong 2018-11-13 833 pr_debug("%s: sent P-va=%p, P-com=%x, P-size=%u\n", __func__,
7ca5ce896524f5 Richard Gong 2018-11-13 834 p_msg->payload, p_msg->command,
7ca5ce896524f5 Richard Gong 2018-11-13 835 (unsigned int)p_msg->payload_length);
7ca5ce896524f5 Richard Gong 2018-11-13 836
7ca5ce896524f5 Richard Gong 2018-11-13 837 if (list_empty(&svc_data_mem)) {
7ca5ce896524f5 Richard Gong 2018-11-13 838 if (p_msg->command == COMMAND_RECONFIG) {
7ca5ce896524f5 Richard Gong 2018-11-13 839 struct stratix10_svc_command_config_type *ct =
7ca5ce896524f5 Richard Gong 2018-11-13 840 (struct stratix10_svc_command_config_type *)
7ca5ce896524f5 Richard Gong 2018-11-13 841 p_msg->payload;
7ca5ce896524f5 Richard Gong 2018-11-13 842 p_data->flag = ct->flags;
7ca5ce896524f5 Richard Gong 2018-11-13 843 }
7ca5ce896524f5 Richard Gong 2018-11-13 844 } else {
7ca5ce896524f5 Richard Gong 2018-11-13 845 list_for_each_entry(p_mem, &svc_data_mem, node)
7ca5ce896524f5 Richard Gong 2018-11-13 846 if (p_mem->vaddr == p_msg->payload) {
7ca5ce896524f5 Richard Gong 2018-11-13 847 p_data->paddr = p_mem->paddr;
7ca5ce896524f5 Richard Gong 2018-11-13 848 break;
7ca5ce896524f5 Richard Gong 2018-11-13 849 }
7ca5ce896524f5 Richard Gong 2018-11-13 850 }
7ca5ce896524f5 Richard Gong 2018-11-13 851
7ca5ce896524f5 Richard Gong 2018-11-13 852 p_data->command = p_msg->command;
7ca5ce896524f5 Richard Gong 2018-11-13 853 p_data->arg[0] = p_msg->arg[0];
7ca5ce896524f5 Richard Gong 2018-11-13 854 p_data->arg[1] = p_msg->arg[1];
7ca5ce896524f5 Richard Gong 2018-11-13 855 p_data->arg[2] = p_msg->arg[2];
7ca5ce896524f5 Richard Gong 2018-11-13 856 p_data->size = p_msg->payload_length;
7ca5ce896524f5 Richard Gong 2018-11-13 857 p_data->chan = chan;
7ca5ce896524f5 Richard Gong 2018-11-13 858 pr_debug("%s: put to FIFO pa=0x%016x, cmd=%x, size=%u\n", __func__,
7ca5ce896524f5 Richard Gong 2018-11-13 859 (unsigned int)p_data->paddr, p_data->command,
7ca5ce896524f5 Richard Gong 2018-11-13 860 (unsigned int)p_data->size);
7ca5ce896524f5 Richard Gong 2018-11-13 861 ret = kfifo_in_spinlocked(&chan->ctrl->svc_fifo, p_data,
7ca5ce896524f5 Richard Gong 2018-11-13 862 sizeof(*p_data),
7ca5ce896524f5 Richard Gong 2018-11-13 863 &chan->ctrl->svc_fifo_lock);
7ca5ce896524f5 Richard Gong 2018-11-13 864
7ca5ce896524f5 Richard Gong 2018-11-13 865 kfree(p_data);
7ca5ce896524f5 Richard Gong 2018-11-13 866
7ca5ce896524f5 Richard Gong 2018-11-13 867 if (!ret)
7ca5ce896524f5 Richard Gong 2018-11-13 868 return -ENOBUFS;
7ca5ce896524f5 Richard Gong 2018-11-13 869
7ca5ce896524f5 Richard Gong 2018-11-13 870 return 0;
7ca5ce896524f5 Richard Gong 2018-11-13 871 }
7ca5ce896524f5 Richard Gong 2018-11-13 872 EXPORT_SYMBOL_GPL(stratix10_svc_send);
7ca5ce896524f5 Richard Gong 2018-11-13 873
:::::: The code at line 823 was first introduced by commit
:::::: 7ca5ce896524f5292e610b27d168269e5ab74951 firmware: add Intel Stratix10 service layer driver
:::::: TO: Richard Gong <richard.gong(a)intel.com>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
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! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.16-rc1 next-20211118]
[cannot apply to herbert-cryptodev-2.6/master 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/torvalds/linux.git 5833291ab6de9c3e2374336b51c814e515e8f3a5
config: arm64-buildonly-randconfig-r006-20211119 (attached as .config)
compiler: aarch64-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/745a999743a81a5cc9e23b5d558ab6d29...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Hannes-Reinecke/nvme-In-band-authentication-support/20211112-210112
git checkout 745a999743a81a5cc9e23b5d558ab6d2976561c8
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
aarch64-linux-ld: Unexpected GOT/PLT entries detected!
aarch64-linux-ld: Unexpected run-time procedure linkages detected!
aarch64-linux-ld: drivers/nvme/target/configfs.o: in function `nvmet_host_dhchap_dhgroup_store':
>> configfs.c:(.text+0x24): undefined reference to `nvme_auth_dhgroup_id'
>> aarch64-linux-ld: configfs.c:(.text+0x6c): undefined reference to `nvme_auth_dhgroup_kpp'
aarch64-linux-ld: drivers/nvme/target/configfs.o: in function `nvmet_host_dhchap_dhgroup_show':
>> configfs.c:(.text+0xdc): undefined reference to `nvme_auth_dhgroup_name'
aarch64-linux-ld: drivers/nvme/target/configfs.o: in function `nvmet_host_dhchap_hash_show':
configfs.c:(.text+0x94c): undefined reference to `nvme_auth_hmac_name'
aarch64-linux-ld: drivers/nvme/target/configfs.o: in function `nvmet_host_dhchap_hash_store':
configfs.c:(.text+0x9c4): undefined reference to `nvme_auth_hmac_id'
aarch64-linux-ld: configfs.c:(.text+0x9e4): undefined reference to `nvme_auth_hmac_name'
aarch64-linux-ld: drivers/nvme/target/fabrics-cmd-auth.o: in function `nvmet_auth_negotiate':
fabrics-cmd-auth.c:(.text+0x340): undefined reference to `nvme_auth_dhgroup_name'
aarch64-linux-ld: drivers/nvme/target/fabrics-cmd-auth.o: in function `nvmet_auth_challenge':
fabrics-cmd-auth.c:(.text+0x790): undefined reference to `nvme_auth_hmac_hash_len'
aarch64-linux-ld: drivers/nvme/target/fabrics-cmd-auth.o: in function `nvmet_execute_auth_receive':
fabrics-cmd-auth.c:(.text+0x1380): undefined reference to `nvme_auth_hmac_hash_len'
aarch64-linux-ld: drivers/nvme/target/auth.o: in function `nvmet_auth_set_host_key':
auth.c:(.text+0x9c): undefined reference to `nvme_auth_hmac_name'
aarch64-linux-ld: drivers/nvme/target/auth.o: in function `nvmet_auth_set_ctrl_key':
auth.c:(.text+0x1dc): undefined reference to `nvme_auth_hmac_name'
aarch64-linux-ld: drivers/nvme/target/auth.o: in function `nvmet_setup_dhgroup':
>> auth.c:(.text+0x37c): undefined reference to `nvme_auth_dhgroup_kpp'
>> aarch64-linux-ld: auth.c:(.text+0x460): undefined reference to `nvme_auth_dhgroup_pubkey_size'
>> aarch64-linux-ld: auth.c:(.text+0x4ac): undefined reference to `nvme_auth_gen_privkey'
>> aarch64-linux-ld: auth.c:(.text+0x530): undefined reference to `nvme_auth_gen_pubkey'
aarch64-linux-ld: drivers/nvme/target/auth.o: in function `nvmet_setup_auth':
auth.c:(.text+0x81c): undefined reference to `nvme_auth_hmac_name'
aarch64-linux-ld: auth.c:(.text+0x874): undefined reference to `nvme_auth_extract_secret'
aarch64-linux-ld: auth.c:(.text+0x920): undefined reference to `nvme_auth_hmac_name'
aarch64-linux-ld: auth.c:(.text+0x9a4): undefined reference to `nvme_auth_extract_secret'
aarch64-linux-ld: auth.c:(.text+0xa3c): undefined reference to `nvme_auth_hmac_name'
aarch64-linux-ld: drivers/nvme/target/auth.o: in function `nvmet_auth_host_hash':
auth.c:(.text+0xc5c): undefined reference to `nvme_auth_hmac_name'
aarch64-linux-ld: auth.c:(.text+0xd54): undefined reference to `nvme_auth_transform_key'
>> aarch64-linux-ld: auth.c:(.text+0xdf8): undefined reference to `nvme_auth_augmented_challenge'
aarch64-linux-ld: drivers/nvme/target/auth.o: in function `nvmet_auth_ctrl_hash':
auth.c:(.text+0x111c): undefined reference to `nvme_auth_hmac_name'
aarch64-linux-ld: auth.c:(.text+0x1214): undefined reference to `nvme_auth_transform_key'
aarch64-linux-ld: auth.c:(.text+0x12b8): undefined reference to `nvme_auth_augmented_challenge'
aarch64-linux-ld: drivers/nvme/target/auth.o: in function `nvmet_auth_ctrl_sesskey':
>> auth.c:(.text+0x16e4): undefined reference to `nvme_auth_dhgroup_privkey_size'
>> aarch64-linux-ld: auth.c:(.text+0x1724): undefined reference to `nvme_auth_gen_shared_secret'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[brgl:gpio/for-next 2/2] drivers/gpio/gpio-xlp.c:267:11: error: 'struct gpio_chip' has no member named 'of_node'
by kernel test robot
Hi Rob,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next
head: ea708ac5bf419d9735354f9deada384c1059700f
commit: ea708ac5bf419d9735354f9deada384c1059700f [2/2] gpio: xlp: Remove Netlogic XLP variants
config: ia64-randconfig-r012-20211116 (attached as .config)
compiler: ia64-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/brgl/linux.git/commit/?id...
git remote add brgl https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git
git fetch --no-tags brgl gpio/for-next
git checkout ea708ac5bf419d9735354f9deada384c1059700f
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/
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/gpio/gpio-xlp.c: In function 'xlp_gpio_probe':
>> drivers/gpio/gpio-xlp.c:267:11: error: 'struct gpio_chip' has no member named 'of_node'
267 | gc->of_node = pdev->dev.of_node;
| ^~
drivers/gpio/gpio-xlp.c: At top level:
>> drivers/gpio/gpio-xlp.c:300:23: error: 'GPIO_VARIANT_VULCAN' undeclared here (not in a function)
300 | { "BRCM9006", GPIO_VARIANT_VULCAN },
| ^~~~~~~~~~~~~~~~~~~
vim +267 drivers/gpio/gpio-xlp.c
ff718800067952 Kamlakant Patel 2015-04-28 230
ff718800067952 Kamlakant Patel 2015-04-28 231 static int xlp_gpio_probe(struct platform_device *pdev)
ff718800067952 Kamlakant Patel 2015-04-28 232 {
ff718800067952 Kamlakant Patel 2015-04-28 233 struct gpio_chip *gc;
c7e66e48c05ac2 Linus Walleij 2019-08-09 234 struct gpio_irq_chip *girq;
ff718800067952 Kamlakant Patel 2015-04-28 235 struct xlp_gpio_priv *priv;
ff718800067952 Kamlakant Patel 2015-04-28 236 void __iomem *gpio_base;
ea708ac5bf419d Rob Herring 2021-11-09 237 int irq, err;
ff718800067952 Kamlakant Patel 2015-04-28 238
ff718800067952 Kamlakant Patel 2015-04-28 239 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
ff718800067952 Kamlakant Patel 2015-04-28 240 if (!priv)
ff718800067952 Kamlakant Patel 2015-04-28 241 return -ENOMEM;
ff718800067952 Kamlakant Patel 2015-04-28 242
3883de0287d0b9 Enrico Weigelt, metux IT consult 2019-03-11 243 gpio_base = devm_platform_ioremap_resource(pdev, 0);
ff718800067952 Kamlakant Patel 2015-04-28 244 if (IS_ERR(gpio_base))
ff718800067952 Kamlakant Patel 2015-04-28 245 return PTR_ERR(gpio_base);
ff718800067952 Kamlakant Patel 2015-04-28 246
ff718800067952 Kamlakant Patel 2015-04-28 247 irq = platform_get_irq(pdev, 0);
ff718800067952 Kamlakant Patel 2015-04-28 248 if (irq < 0)
ff718800067952 Kamlakant Patel 2015-04-28 249 return irq;
ff718800067952 Kamlakant Patel 2015-04-28 250
ff718800067952 Kamlakant Patel 2015-04-28 251 priv->gpio_out_en = gpio_base + GPIO_9XX_OUTPUT_EN;
ff718800067952 Kamlakant Patel 2015-04-28 252 priv->gpio_paddrv = gpio_base + GPIO_9XX_PADDRV;
ff718800067952 Kamlakant Patel 2015-04-28 253 priv->gpio_intr_stat = gpio_base + GPIO_9XX_INT_STAT;
ff718800067952 Kamlakant Patel 2015-04-28 254 priv->gpio_intr_type = gpio_base + GPIO_9XX_INT_TYPE;
ff718800067952 Kamlakant Patel 2015-04-28 255 priv->gpio_intr_pol = gpio_base + GPIO_9XX_INT_POL;
ff718800067952 Kamlakant Patel 2015-04-28 256 priv->gpio_intr_en = gpio_base + GPIO_9XX_INT_EN00;
ff718800067952 Kamlakant Patel 2015-04-28 257
ff718800067952 Kamlakant Patel 2015-04-28 258 bitmap_zero(priv->gpio_enabled_mask, XLP_MAX_NR_GPIO);
ff718800067952 Kamlakant Patel 2015-04-28 259
ff718800067952 Kamlakant Patel 2015-04-28 260 gc = &priv->chip;
ff718800067952 Kamlakant Patel 2015-04-28 261
b8a3f52e982484 Axel Lin 2015-05-07 262 gc->owner = THIS_MODULE;
b8a3f52e982484 Axel Lin 2015-05-07 263 gc->label = dev_name(&pdev->dev);
ff718800067952 Kamlakant Patel 2015-04-28 264 gc->base = 0;
58383c78425e4e Linus Walleij 2015-11-04 265 gc->parent = &pdev->dev;
ea708ac5bf419d Rob Herring 2021-11-09 266 gc->ngpio = 70;
ff718800067952 Kamlakant Patel 2015-04-28 @267 gc->of_node = pdev->dev.of_node;
ff718800067952 Kamlakant Patel 2015-04-28 268 gc->direction_output = xlp_gpio_dir_output;
ff718800067952 Kamlakant Patel 2015-04-28 269 gc->direction_input = xlp_gpio_dir_input;
ff718800067952 Kamlakant Patel 2015-04-28 270 gc->set = xlp_gpio_set;
ff718800067952 Kamlakant Patel 2015-04-28 271 gc->get = xlp_gpio_get;
ff718800067952 Kamlakant Patel 2015-04-28 272
ff718800067952 Kamlakant Patel 2015-04-28 273 spin_lock_init(&priv->lock);
1630a0624a1b8e Kamlakant Patel 2016-06-05 274
c7e66e48c05ac2 Linus Walleij 2019-08-09 275 girq = &gc->irq;
c7e66e48c05ac2 Linus Walleij 2019-08-09 276 girq->chip = &xlp_gpio_irq_chip;
c7e66e48c05ac2 Linus Walleij 2019-08-09 277 girq->parent_handler = xlp_gpio_generic_handler;
c7e66e48c05ac2 Linus Walleij 2019-08-09 278 girq->num_parents = 1;
c7e66e48c05ac2 Linus Walleij 2019-08-09 279 girq->parents = devm_kcalloc(&pdev->dev, 1,
c7e66e48c05ac2 Linus Walleij 2019-08-09 280 sizeof(*girq->parents),
c7e66e48c05ac2 Linus Walleij 2019-08-09 281 GFP_KERNEL);
c7e66e48c05ac2 Linus Walleij 2019-08-09 282 if (!girq->parents)
c7e66e48c05ac2 Linus Walleij 2019-08-09 283 return -ENOMEM;
c7e66e48c05ac2 Linus Walleij 2019-08-09 284 girq->parents[0] = irq;
ea708ac5bf419d Rob Herring 2021-11-09 285 girq->first = 0;
c7e66e48c05ac2 Linus Walleij 2019-08-09 286 girq->default_type = IRQ_TYPE_NONE;
c7e66e48c05ac2 Linus Walleij 2019-08-09 287 girq->handler = handle_level_irq;
c7e66e48c05ac2 Linus Walleij 2019-08-09 288
e730a5953af4c5 Linus Walleij 2015-12-07 289 err = gpiochip_add_data(gc, priv);
ff718800067952 Kamlakant Patel 2015-04-28 290 if (err < 0)
31bd86d9834fc1 Bartosz Golaszewski 2017-03-04 291 return err;
ff718800067952 Kamlakant Patel 2015-04-28 292
ff718800067952 Kamlakant Patel 2015-04-28 293 dev_info(&pdev->dev, "registered %d GPIOs\n", gc->ngpio);
ff718800067952 Kamlakant Patel 2015-04-28 294
ff718800067952 Kamlakant Patel 2015-04-28 295 return 0;
ff718800067952 Kamlakant Patel 2015-04-28 296 }
ff718800067952 Kamlakant Patel 2015-04-28 297
baa1b920a84081 Kamlakant Patel 2016-06-05 298 #ifdef CONFIG_ACPI
baa1b920a84081 Kamlakant Patel 2016-06-05 299 static const struct acpi_device_id xlp_gpio_acpi_match[] = {
baa1b920a84081 Kamlakant Patel 2016-06-05 @300 { "BRCM9006", GPIO_VARIANT_VULCAN },
529f75d8ca214a Jayachandran C 2017-03-12 301 { "CAV9006", GPIO_VARIANT_VULCAN },
baa1b920a84081 Kamlakant Patel 2016-06-05 302 {},
baa1b920a84081 Kamlakant Patel 2016-06-05 303 };
baa1b920a84081 Kamlakant Patel 2016-06-05 304 MODULE_DEVICE_TABLE(acpi, xlp_gpio_acpi_match);
baa1b920a84081 Kamlakant Patel 2016-06-05 305 #endif
baa1b920a84081 Kamlakant Patel 2016-06-05 306
:::::: The code at line 267 was first introduced by commit
:::::: ff71880006795290f371caae13e740491ec76956 gpio: xlp: GPIO controller for Netlogic XLP SoCs
:::::: TO: Kamlakant Patel <kamlakant.patel(a)broadcom.com>
:::::: CC: Linus Walleij <linus.walleij(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
include/linux/atomic/atomic-instrumented.h:476:16: sparse: sparse: cast truncates bits from constant value (ffffffffaaa31337 becomes 37)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4c388a8e740d3235a194f330c8ef327deef710f6
commit: e3d18cee258b898017b298b5b93f8134dd62aee3 locking/atomic: centralize generated headers
date: 4 months ago
config: ia64-randconfig-s032-20211025 (attached as .config)
compiler: ia64-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 e3d18cee258b898017b298b5b93f8134dd62aee3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=ia64 SHELL=/bin/bash
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 >>)
lib/atomic64_test.c: note: in included file (through include/linux/atomic.h):
>> include/linux/atomic/atomic-instrumented.h:476:16: sparse: sparse: cast truncates bits from constant value (ffffffffaaa31337 becomes 37)
include/linux/atomic/atomic-instrumented.h:476:16: sparse: sparse: cast truncates bits from constant value (ffffffffaaa31337 becomes 1337)
include/linux/atomic/atomic-instrumented.h:483:16: sparse: sparse: cast truncates bits from constant value (ffffffffaaa31337 becomes 37)
include/linux/atomic/atomic-instrumented.h:483:16: sparse: sparse: cast truncates bits from constant value (ffffffffaaa31337 becomes 1337)
include/linux/atomic/atomic-instrumented.h:490:16: sparse: sparse: cast truncates bits from constant value (ffffffffaaa31337 becomes 37)
include/linux/atomic/atomic-instrumented.h:490:16: sparse: sparse: cast truncates bits from constant value (ffffffffaaa31337 becomes 1337)
include/linux/atomic/atomic-instrumented.h:497:16: sparse: sparse: cast truncates bits from constant value (ffffffffaaa31337 becomes 37)
include/linux/atomic/atomic-instrumented.h:497:16: sparse: sparse: cast truncates bits from constant value (ffffffffaaa31337 becomes 1337)
>> include/linux/atomic/atomic-instrumented.h:476:16: sparse: sparse: cast truncates bits from constant value (11112222 becomes 22)
include/linux/atomic/atomic-instrumented.h:476:16: sparse: sparse: cast truncates bits from constant value (11112222 becomes 2222)
include/linux/atomic/atomic-instrumented.h:483:16: sparse: sparse: cast truncates bits from constant value (11112222 becomes 22)
include/linux/atomic/atomic-instrumented.h:483:16: sparse: sparse: cast truncates bits from constant value (11112222 becomes 2222)
include/linux/atomic/atomic-instrumented.h:490:16: sparse: sparse: cast truncates bits from constant value (11112222 becomes 22)
include/linux/atomic/atomic-instrumented.h:490:16: sparse: sparse: cast truncates bits from constant value (11112222 becomes 2222)
include/linux/atomic/atomic-instrumented.h:497:16: sparse: sparse: cast truncates bits from constant value (11112222 becomes 22)
include/linux/atomic/atomic-instrumented.h:497:16: sparse: sparse: cast truncates bits from constant value (11112222 becomes 2222)
>> include/linux/atomic/atomic-instrumented.h:1054:16: sparse: sparse: cast truncates bits from constant value (aaa31337c001d00d becomes d)
>> include/linux/atomic/atomic-instrumented.h:1054:16: sparse: sparse: cast truncates bits from constant value (aaa31337c001d00d becomes d00d)
>> include/linux/atomic/atomic-instrumented.h:1054:16: sparse: sparse: cast truncates bits from constant value (aaa31337c001d00d becomes c001d00d)
include/linux/atomic/atomic-instrumented.h:1061:16: sparse: sparse: cast truncates bits from constant value (aaa31337c001d00d becomes d)
include/linux/atomic/atomic-instrumented.h:1061:16: sparse: sparse: cast truncates bits from constant value (aaa31337c001d00d becomes d00d)
include/linux/atomic/atomic-instrumented.h:1061:16: sparse: sparse: cast truncates bits from constant value (aaa31337c001d00d becomes c001d00d)
include/linux/atomic/atomic-instrumented.h:1068:16: sparse: sparse: cast truncates bits from constant value (aaa31337c001d00d becomes d)
include/linux/atomic/atomic-instrumented.h:1068:16: sparse: sparse: cast truncates bits from constant value (aaa31337c001d00d becomes d00d)
include/linux/atomic/atomic-instrumented.h:1068:16: sparse: sparse: cast truncates bits from constant value (aaa31337c001d00d becomes c001d00d)
include/linux/atomic/atomic-instrumented.h:1075:16: sparse: sparse: cast truncates bits from constant value (aaa31337c001d00d becomes d)
include/linux/atomic/atomic-instrumented.h:1075:16: sparse: sparse: cast truncates bits from constant value (aaa31337c001d00d becomes d00d)
include/linux/atomic/atomic-instrumented.h:1075:16: sparse: sparse: cast truncates bits from constant value (aaa31337c001d00d becomes c001d00d)
>> include/linux/atomic/atomic-instrumented.h:1054:16: sparse: sparse: cast truncates bits from constant value (faceabadf00df001 becomes 1)
>> include/linux/atomic/atomic-instrumented.h:1054:16: sparse: sparse: cast truncates bits from constant value (faceabadf00df001 becomes f001)
>> include/linux/atomic/atomic-instrumented.h:1054:16: sparse: sparse: cast truncates bits from constant value (faceabadf00df001 becomes f00df001)
include/linux/atomic/atomic-instrumented.h:1061:16: sparse: sparse: cast truncates bits from constant value (faceabadf00df001 becomes 1)
include/linux/atomic/atomic-instrumented.h:1061:16: sparse: sparse: cast truncates bits from constant value (faceabadf00df001 becomes f001)
include/linux/atomic/atomic-instrumented.h:1061:16: sparse: sparse: cast truncates bits from constant value (faceabadf00df001 becomes f00df001)
include/linux/atomic/atomic-instrumented.h:1068:16: sparse: sparse: cast truncates bits from constant value (faceabadf00df001 becomes 1)
include/linux/atomic/atomic-instrumented.h:1068:16: sparse: sparse: cast truncates bits from constant value (faceabadf00df001 becomes f001)
include/linux/atomic/atomic-instrumented.h:1068:16: sparse: sparse: cast truncates bits from constant value (faceabadf00df001 becomes f00df001)
include/linux/atomic/atomic-instrumented.h:1075:16: sparse: sparse: cast truncates bits from constant value (faceabadf00df001 becomes 1)
include/linux/atomic/atomic-instrumented.h:1075:16: sparse: sparse: cast truncates bits from constant value (faceabadf00df001 becomes f001)
include/linux/atomic/atomic-instrumented.h:1075:16: sparse: sparse: cast truncates bits from constant value (faceabadf00df001 becomes f00df001)
vim +476 include/linux/atomic/atomic-instrumented.h
aa525d063851a9 include/asm-generic/atomic-instrumented.h Mark Rutland 2018-09-04 471
c020395b6634b7 include/asm-generic/atomic-instrumented.h Marco Elver 2019-11-26 472 static __always_inline int
aa525d063851a9 include/asm-generic/atomic-instrumented.h Mark Rutland 2018-09-04 473 atomic_cmpxchg(atomic_t *v, int old, int new)
aa525d063851a9 include/asm-generic/atomic-instrumented.h Mark Rutland 2018-09-04 474 {
3570a1bcf45e9a include/asm-generic/atomic-instrumented.h Marco Elver 2020-07-24 475 instrument_atomic_read_write(v, sizeof(*v));
aa525d063851a9 include/asm-generic/atomic-instrumented.h Mark Rutland 2018-09-04 @476 return arch_atomic_cmpxchg(v, old, new);
aa525d063851a9 include/asm-generic/atomic-instrumented.h Mark Rutland 2018-09-04 477 }
aa525d063851a9 include/asm-generic/atomic-instrumented.h Mark Rutland 2018-09-04 478
:::::: The code at line 476 was first introduced by commit
:::::: aa525d063851a98e020b827fdd1d7776ae652301 locking/atomics: Switch to generated instrumentation
:::::: TO: Mark Rutland <mark.rutland(a)arm.com>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[intel-lts:5.4/yocto 14047/18530] drivers/spi/spi-dw-pci.c:155:5: sparse: sparse: undefined preprocessor identifier 'CONFIG_PM'
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 10c3d69bc60059b194dcfa816cbc1240ffb0431d
commit: 2e228f3df9479e9e061cc7e0b7aba0c071ea22bf [14047/18530] REVERT-ME: Temporary Enable D0i3 flow for PSE IOs
config: m68k-randconfig-s031-20211117 (attached as .config)
compiler: m68k-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://github.com/intel/linux-intel-lts/commit/2e228f3df9479e9e061cc7e0b...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.4/yocto
git checkout 2e228f3df9479e9e061cc7e0b7aba0c071ea22bf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=m68k SHELL=/bin/bash drivers/gpu/drm/ drivers/spi/
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/spi/spi-dw-pci.c:155:5: sparse: sparse: undefined preprocessor identifier 'CONFIG_PM'
drivers/spi/spi-dw-pci.c: note: in included file:
drivers/spi/spi-dw.h:188:16: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/spi/spi-dw.h:198:9: sparse: sparse: cast removes address space '<asn:2>' of expression
vim +/CONFIG_PM +155 drivers/spi/spi-dw-pci.c
154
> 155 #if CONFIG_PM
156 static int dw_spi_runtime_suspend(struct device *dev)
157 {
158 struct dw_spi *dws = dev_get_drvdata(dev);
159 unsigned long j0, j1, delay;
160 u32 d0i3c_reg;
161 u32 cgsr_reg;
162
163 delay = msecs_to_jiffies(100);
164 j0 = jiffies;
165 j1 = j0 + delay;
166
167
168 cgsr_reg = dw_readl(dws, PSE_SPI_CGSR);
169 dw_writel(dws, PSE_SPI_CGSR, PSE_SPI_D0I3_RR);
170
171 d0i3c_reg = dw_readl(dws, PSE_SPI_D0I3C);
172
173 if (d0i3c_reg & PSE_SPI_D0I3_CIP) {
174 dev_info(dev, "%s d0i3c CIP detected", __func__);
175 } else {
176 dw_writel(dws, PSE_SPI_D0I3C, PSE_SPI_D0I3_EN);
177 d0i3c_reg = dw_readl(dws, PSE_SPI_D0I3C);
178 }
179
180 while (time_before(jiffies, j1)) {
181 d0i3c_reg = dw_readl(dws, PSE_SPI_D0I3C);
182 if (!(d0i3c_reg & PSE_SPI_D0I3_CIP))
183 break;
184 }
185
186 if (d0i3c_reg & PSE_SPI_D0I3_CIP)
187 dev_info(dev, "%s: timeout waiting CIP to be cleared",
188 __func__);
189
190 return 0;
191 }
192
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[pinctrl-intel:review-andy 18/19] drivers/pinctrl/pinctrl-zynqmp.c:825:13: warning: variable 'pin' is uninitialized when used here
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel.git review-andy
head: c25441ca551164c56b34885df3d657e2ea4d623f
commit: 9122cda6a325f80564f02b7899cc063009f5e1f9 [18/19] pinctrl: zynqmp: Unify pin naming
config: arm64-buildonly-randconfig-r004-20211118 (attached as .config)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel.git/commit/...
git remote add pinctrl-intel https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel.git
git fetch --no-tags pinctrl-intel review-andy
git checkout 9122cda6a325f80564f02b7899cc063009f5e1f9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
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/pinctrl/pinctrl-zynqmp.c:825:13: warning: variable 'pin' is uninitialized when used here [-Wuninitialized]
if (IS_ERR(pin->name))
^~~
drivers/pinctrl/pinctrl-zynqmp.c:811:37: note: initialize the variable 'pin' to silence this warning
struct pinctrl_pin_desc *pins, *pin;
^
= NULL
1 warning generated.
vim +/pin +825 drivers/pinctrl/pinctrl-zynqmp.c
794
795 /**
796 * zynqmp_pinctrl_prepare_pin_desc() - prepare pin description info
797 * @dev: Device pointer.
798 * @zynqmp_pins: Pin information.
799 * @npins: Number of pins.
800 *
801 * Query number of pins information from firmware and prepare pin
802 * description containing pin number and pin name.
803 *
804 * Return: 0 on success else error code.
805 */
806 static int zynqmp_pinctrl_prepare_pin_desc(struct device *dev,
807 const struct pinctrl_pin_desc
808 **zynqmp_pins,
809 unsigned int *npins)
810 {
811 struct pinctrl_pin_desc *pins, *pin;
812 char **pin_names;
813 int ret;
814 int i;
815
816 ret = zynqmp_pinctrl_get_num_pins(npins);
817 if (ret)
818 return ret;
819
820 pins = devm_kzalloc(dev, sizeof(*pins) * *npins, GFP_KERNEL);
821 if (!pins)
822 return -ENOMEM;
823
824 pin_names = devm_kasprintf_strarray(dev, ZYNQMP_PIN_PREFIX, *npins);
> 825 if (IS_ERR(pin->name))
826 return PTR_ERR(pin_names);
827
828 for (i = 0; i < *npins; i++) {
829 pin = &pins[i];
830 pin->number = i;
831 pin->name = pin_names[i];
832 }
833
834 *zynqmp_pins = pins;
835
836 return 0;
837 }
838
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
arch/x86/hyperv/hv_init.c:70:30: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4c388a8e740d3235a194f330c8ef327deef710f6
commit: faff44069ff538ccdfef187c4d7ec83d22dfb3a4 x86/hyperv: Add Write/Read MSR registers via ghcb page
date: 3 weeks ago
config: i386-randconfig-s002-20211109 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# 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 faff44069ff538ccdfef187c4d7ec83d22dfb3a4
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/x86/hyperv/hv_init.c:70:30: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got union hv_ghcb [noderef] __percpu ** @@
arch/x86/hyperv/hv_init.c:70:30: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/hyperv/hv_init.c:70:30: sparse: got union hv_ghcb [noderef] __percpu **
arch/x86/hyperv/hv_init.c:214:36: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got union hv_ghcb [noderef] __percpu ** @@
arch/x86/hyperv/hv_init.c:214:36: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/hyperv/hv_init.c:214:36: sparse: got union hv_ghcb [noderef] __percpu **
arch/x86/hyperv/hv_init.c:363:24: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void [noderef] __percpu ** @@
arch/x86/hyperv/hv_init.c:363:24: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/hyperv/hv_init.c:363:24: sparse: got void [noderef] __percpu **
arch/x86/hyperv/hv_init.c:363:21: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct hv_get_partition_id *output_page @@ got void [noderef] __percpu * @@
arch/x86/hyperv/hv_init.c:363:21: sparse: expected struct hv_get_partition_id *output_page
arch/x86/hyperv/hv_init.c:363:21: sparse: got void [noderef] __percpu *
>> arch/x86/hyperv/hv_init.c:409:28: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected union hv_ghcb [noderef] __percpu **[addressable] [toplevel] hv_ghcb_pg @@ got union hv_ghcb *[noderef] __percpu * @@
arch/x86/hyperv/hv_init.c:409:28: sparse: expected union hv_ghcb [noderef] __percpu **[addressable] [toplevel] hv_ghcb_pg
arch/x86/hyperv/hv_init.c:409:28: sparse: got union hv_ghcb *[noderef] __percpu *
>> arch/x86/hyperv/hv_init.c:510:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __percpu *__pdata @@ got union hv_ghcb [noderef] __percpu **[addressable] [toplevel] hv_ghcb_pg @@
arch/x86/hyperv/hv_init.c:510:21: sparse: expected void [noderef] __percpu *__pdata
arch/x86/hyperv/hv_init.c:510:21: sparse: got union hv_ghcb [noderef] __percpu **[addressable] [toplevel] hv_ghcb_pg
vim +70 arch/x86/hyperv/hv_init.c
a46d15cc1ae5af9 Vitaly Kuznetsov 2018-03-20 47
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 48 static int hyperv_init_ghcb(void)
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 49 {
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 50 u64 ghcb_gpa;
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 51 void *ghcb_va;
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 52 void **ghcb_base;
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 53
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 54 if (!hv_isolation_type_snp())
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 55 return 0;
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 56
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 57 if (!hv_ghcb_pg)
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 58 return -EINVAL;
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 59
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 60 /*
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 61 * GHCB page is allocated by paravisor. The address
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 62 * returned by MSR_AMD64_SEV_ES_GHCB is above shared
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 63 * memory boundary and map it here.
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 64 */
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 65 rdmsrl(MSR_AMD64_SEV_ES_GHCB, ghcb_gpa);
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 66 ghcb_va = memremap(ghcb_gpa, HV_HYP_PAGE_SIZE, MEMREMAP_WB);
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 67 if (!ghcb_va)
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 68 return -ENOMEM;
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 69
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 @70 ghcb_base = (void **)this_cpu_ptr(hv_ghcb_pg);
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 71 *ghcb_base = ghcb_va;
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 72
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 73 return 0;
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 74 }
0cc4f6d9f0b9f20 Tianyu Lan 2021-10-25 75
:::::: The code at line 70 was first introduced by commit
:::::: 0cc4f6d9f0b9f20f3f1e1149bdb6737c0b4e134a x86/hyperv: Initialize GHCB page in Isolation VM
:::::: TO: Tianyu Lan <Tianyu.Lan(a)microsoft.com>
:::::: CC: Wei Liu <wei.liu(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months