drivers/gpio/gpiolib-cdev.c:795:3: warning: 'strncpy' specified bound 32 equals destination size
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 00e4db51259a5f936fec1424b884f029479d3981
commit: 925ca36913fc7dfee9d0bb7f36d81dd108a7b80f gpiolib: split character device into gpiolib-cdev
date: 7 weeks ago
config: arm64-randconfig-r002-20200811 (attached as .config)
compiler: aarch64-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
git checkout 925ca36913fc7dfee9d0bb7f36d81dd108a7b80f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 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/gpio/gpiolib-cdev.c: In function 'gpio_desc_to_lineinfo':
>> drivers/gpio/gpiolib-cdev.c:795:3: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation]
795 | strncpy(info->name, desc->name, sizeof(info->name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +795 drivers/gpio/gpiolib-cdev.c
774
775 static void gpio_desc_to_lineinfo(struct gpio_desc *desc,
776 struct gpioline_info *info)
777 {
778 struct gpio_chip *gc = desc->gdev->chip;
779 bool ok_for_pinctrl;
780 unsigned long flags;
781
782 /*
783 * This function takes a mutex so we must check this before taking
784 * the spinlock.
785 *
786 * FIXME: find a non-racy way to retrieve this information. Maybe a
787 * lock common to both frameworks?
788 */
789 ok_for_pinctrl =
790 pinctrl_gpio_can_use_line(gc->base + info->line_offset);
791
792 spin_lock_irqsave(&gpio_lock, flags);
793
794 if (desc->name) {
> 795 strncpy(info->name, desc->name, sizeof(info->name));
796 info->name[sizeof(info->name) - 1] = '\0';
797 } else {
798 info->name[0] = '\0';
799 }
800
801 if (desc->label) {
802 strncpy(info->consumer, desc->label, sizeof(info->consumer));
803 info->consumer[sizeof(info->consumer) - 1] = '\0';
804 } else {
805 info->consumer[0] = '\0';
806 }
807
808 /*
809 * Userspace only need to know that the kernel is using this GPIO so
810 * it can't use it.
811 */
812 info->flags = 0;
813 if (test_bit(FLAG_REQUESTED, &desc->flags) ||
814 test_bit(FLAG_IS_HOGGED, &desc->flags) ||
815 test_bit(FLAG_USED_AS_IRQ, &desc->flags) ||
816 test_bit(FLAG_EXPORT, &desc->flags) ||
817 test_bit(FLAG_SYSFS, &desc->flags) ||
818 !ok_for_pinctrl)
819 info->flags |= GPIOLINE_FLAG_KERNEL;
820 if (test_bit(FLAG_IS_OUT, &desc->flags))
821 info->flags |= GPIOLINE_FLAG_IS_OUT;
822 if (test_bit(FLAG_ACTIVE_LOW, &desc->flags))
823 info->flags |= GPIOLINE_FLAG_ACTIVE_LOW;
824 if (test_bit(FLAG_OPEN_DRAIN, &desc->flags))
825 info->flags |= (GPIOLINE_FLAG_OPEN_DRAIN |
826 GPIOLINE_FLAG_IS_OUT);
827 if (test_bit(FLAG_OPEN_SOURCE, &desc->flags))
828 info->flags |= (GPIOLINE_FLAG_OPEN_SOURCE |
829 GPIOLINE_FLAG_IS_OUT);
830 if (test_bit(FLAG_BIAS_DISABLE, &desc->flags))
831 info->flags |= GPIOLINE_FLAG_BIAS_DISABLE;
832 if (test_bit(FLAG_PULL_DOWN, &desc->flags))
833 info->flags |= GPIOLINE_FLAG_BIAS_PULL_DOWN;
834 if (test_bit(FLAG_PULL_UP, &desc->flags))
835 info->flags |= GPIOLINE_FLAG_BIAS_PULL_UP;
836
837 spin_unlock_irqrestore(&gpio_lock, flags);
838 }
839
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/usb/chipidea/usbmisc_imx.c:745 imx7d_charger_data_contact_detect() error: double unlocked 'usbmisc->lock' (orig line 725)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 00e4db51259a5f936fec1424b884f029479d3981
commit: 746f316b753a83e366bfc5f936cbf0d72d1c2d1d usb: chipidea: introduce imx7d USB charger detection
date: 3 months ago
config: h8300-randconfig-m031-20200811 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
drivers/usb/chipidea/usbmisc_imx.c:745 imx7d_charger_data_contact_detect() error: double unlocked 'usbmisc->lock' (orig line 725)
vim +745 drivers/usb/chipidea/usbmisc_imx.c
712
713 static int imx7d_charger_data_contact_detect(struct imx_usbmisc_data *data)
714 {
715 struct imx_usbmisc *usbmisc = dev_get_drvdata(data->dev);
716 unsigned long flags;
717 u32 val;
718 int i, data_pin_contact_count = 0;
719
720 /* Enable Data Contact Detect (DCD) per the USB BC 1.2 */
721 spin_lock_irqsave(&usbmisc->lock, flags);
722 val = readl(usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
723 writel(val | MX7D_USB_OTG_PHY_CFG2_CHRG_DCDENB,
724 usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
> 725 spin_unlock_irqrestore(&usbmisc->lock, flags);
726
727 for (i = 0; i < 100; i = i + 1) {
728 val = readl(usbmisc->base + MX7D_USB_OTG_PHY_STATUS);
729 if (!(val & MX7D_USB_OTG_PHY_STATUS_LINE_STATE0)) {
730 if (data_pin_contact_count++ > 5)
731 /* Data pin makes contact */
732 break;
733 usleep_range(5000, 10000);
734 } else {
735 data_pin_contact_count = 0;
736 usleep_range(5000, 6000);
737 }
738 }
739
740 /* Disable DCD after finished data contact check */
741 spin_lock_irqsave(&usbmisc->lock, flags);
742 val = readl(usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
743 writel(val & ~MX7D_USB_OTG_PHY_CFG2_CHRG_DCDENB,
744 usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
> 745 spin_unlock_irqrestore(&usbmisc->lock, flags);
746
747 if (i == 100) {
748 dev_err(data->dev,
749 "VBUS is coming from a dedicated power supply.\n");
750 return -ENXIO;
751 }
752
753 return 0;
754 }
755
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH 14/33] spmi: add hisi-spmi-controller to the building system
by kernel test robot
Hi Mauro,
I love your patch! Perhaps something to improve:
[auto build test WARNING on lee-mfd/for-mfd-next]
[also build test WARNING on regulator/for-next robh/for-next linus/master v5.8 next-20200811]
[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/Mauro-Carvalho-Chehab/Add-driver...
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
config: arc-allyesconfig (attached as .config)
compiler: arc-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
# 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 >>):
In file included from include/linux/device.h:15,
from include/linux/platform_device.h:13,
from drivers/spmi/hisi-spmi-controller.c:7:
drivers/spmi/hisi-spmi-controller.c: In function 'spmi_read_cmd':
>> drivers/spmi/hisi-spmi-controller.c:149:5: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
149 | , "spmi_controller supports 1..%d bytes per trans, but:%ld requested"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/spmi/hisi-spmi-controller.c:148:3: note: in expansion of macro 'dev_err'
148 | dev_err(spmi_controller->dev
| ^~~~~~~
drivers/spmi/hisi-spmi-controller.c:149:60: note: format string is defined here
149 | , "spmi_controller supports 1..%d bytes per trans, but:%ld requested"
| ~~^
| |
| long int
| %d
In file included from include/linux/device.h:15,
from include/linux/platform_device.h:13,
from drivers/spmi/hisi-spmi-controller.c:7:
drivers/spmi/hisi-spmi-controller.c:198:33: warning: format '%ld' expects argument of type 'long int', but argument 6 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
198 | dev_err(spmi_controller->dev, "spmi read wait timeout op:0x%x sid:%d addr:0x%x bc:%ld\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/spmi/hisi-spmi-controller.c:198:3: note: in expansion of macro 'dev_err'
198 | dev_err(spmi_controller->dev, "spmi read wait timeout op:0x%x sid:%d addr:0x%x bc:%ld\n",
| ^~~~~~~
drivers/spmi/hisi-spmi-controller.c:198:87: note: format string is defined here
198 | dev_err(spmi_controller->dev, "spmi read wait timeout op:0x%x sid:%d addr:0x%x bc:%ld\n",
| ~~^
| |
| long int
| %d
In file included from include/linux/device.h:15,
from include/linux/platform_device.h:13,
from drivers/spmi/hisi-spmi-controller.c:7:
drivers/spmi/hisi-spmi-controller.c: In function 'spmi_write_cmd':
drivers/spmi/hisi-spmi-controller.c:220:5: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
220 | , "spmi_controller supports 1..%d bytes per trans, but:%ld requested"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/spmi/hisi-spmi-controller.c:219:3: note: in expansion of macro 'dev_err'
219 | dev_err(spmi_controller->dev
| ^~~~~~~
drivers/spmi/hisi-spmi-controller.c:220:60: note: format string is defined here
220 | , "spmi_controller supports 1..%d bytes per trans, but:%ld requested"
| ~~^
| |
| long int
| %d
In file included from include/linux/device.h:15,
from include/linux/platform_device.h:13,
from drivers/spmi/hisi-spmi-controller.c:7:
drivers/spmi/hisi-spmi-controller.c:269:33: warning: format '%ld' expects argument of type 'long int', but argument 6 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
269 | dev_err(spmi_controller->dev, "spmi write wait timeout op:0x%x sid:%d addr:0x%x bc:%ld\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/spmi/hisi-spmi-controller.c:269:3: note: in expansion of macro 'dev_err'
269 | dev_err(spmi_controller->dev, "spmi write wait timeout op:0x%x sid:%d addr:0x%x bc:%ld\n",
| ^~~~~~~
drivers/spmi/hisi-spmi-controller.c:269:88: note: format string is defined here
269 | dev_err(spmi_controller->dev, "spmi write wait timeout op:0x%x sid:%d addr:0x%x bc:%ld\n",
| ~~^
| |
| long int
| %d
vim +149 drivers/spmi/hisi-spmi-controller.c
3f5f1801bf6c4a3 Mayulong 2020-08-11 135
3f5f1801bf6c4a3 Mayulong 2020-08-11 136 static int spmi_read_cmd(struct spmi_controller *ctrl,
a93f9ffda101599 Mauro Carvalho Chehab 2020-08-11 137 u8 opc, u8 sid, u16 addr, u8 *__buf, size_t bc)
3f5f1801bf6c4a3 Mayulong 2020-08-11 138 {
3f5f1801bf6c4a3 Mayulong 2020-08-11 139 struct spmi_controller_dev *spmi_controller = dev_get_drvdata(&ctrl->dev);
3f5f1801bf6c4a3 Mayulong 2020-08-11 140 unsigned long flags;
a93f9ffda101599 Mauro Carvalho Chehab 2020-08-11 141 u8 *buf = __buf;
3f5f1801bf6c4a3 Mayulong 2020-08-11 142 u32 cmd, data;
3f5f1801bf6c4a3 Mayulong 2020-08-11 143 int rc;
3f5f1801bf6c4a3 Mayulong 2020-08-11 144 u32 chnl_ofst = SPMI_CHANNEL_OFFSET * spmi_controller->channel;
3f5f1801bf6c4a3 Mayulong 2020-08-11 145 u8 op_code, i;
3f5f1801bf6c4a3 Mayulong 2020-08-11 146
3f5f1801bf6c4a3 Mayulong 2020-08-11 147 if (bc > SPMI_CONTROLLER_MAX_TRANS_BYTES) {
3f5f1801bf6c4a3 Mayulong 2020-08-11 148 dev_err(spmi_controller->dev
3f5f1801bf6c4a3 Mayulong 2020-08-11 @149 , "spmi_controller supports 1..%d bytes per trans, but:%ld requested"
3f5f1801bf6c4a3 Mayulong 2020-08-11 150 , SPMI_CONTROLLER_MAX_TRANS_BYTES, bc);
3f5f1801bf6c4a3 Mayulong 2020-08-11 151 return -EINVAL;
3f5f1801bf6c4a3 Mayulong 2020-08-11 152 }
3f5f1801bf6c4a3 Mayulong 2020-08-11 153
3f5f1801bf6c4a3 Mayulong 2020-08-11 154 /* Check the opcode */
43091a1c2b8d45e Mauro Carvalho Chehab 2020-08-11 155 if (opc == SPMI_CMD_READ) {
3f5f1801bf6c4a3 Mayulong 2020-08-11 156 op_code = SPMI_CMD_REG_READ;
43091a1c2b8d45e Mauro Carvalho Chehab 2020-08-11 157 } else if (opc == SPMI_CMD_EXT_READ) {
3f5f1801bf6c4a3 Mayulong 2020-08-11 158 op_code = SPMI_CMD_EXT_REG_READ;
43091a1c2b8d45e Mauro Carvalho Chehab 2020-08-11 159 } else if (opc == SPMI_CMD_EXT_READL) {
3f5f1801bf6c4a3 Mayulong 2020-08-11 160 op_code = SPMI_CMD_EXT_REG_READ_L;
43091a1c2b8d45e Mauro Carvalho Chehab 2020-08-11 161 } else {
3f5f1801bf6c4a3 Mayulong 2020-08-11 162 dev_err(spmi_controller->dev, "invalid read cmd 0x%x", opc);
3f5f1801bf6c4a3 Mayulong 2020-08-11 163 return -EINVAL;
3f5f1801bf6c4a3 Mayulong 2020-08-11 164 }
3f5f1801bf6c4a3 Mayulong 2020-08-11 165
43091a1c2b8d45e Mauro Carvalho Chehab 2020-08-11 166 cmd = SPMI_APB_SPMI_CMD_EN |
43091a1c2b8d45e Mauro Carvalho Chehab 2020-08-11 167 (op_code << SPMI_APB_SPMI_CMD_TYPE_OFFSET) |
43091a1c2b8d45e Mauro Carvalho Chehab 2020-08-11 168 ((bc - 1) << SPMI_APB_SPMI_CMD_LENGTH_OFFSET) |
3f5f1801bf6c4a3 Mayulong 2020-08-11 169 ((sid & 0xf) << SPMI_APB_SPMI_CMD_SLAVEID_OFFSET) | /* slvid */
3f5f1801bf6c4a3 Mayulong 2020-08-11 170 ((addr & 0xffff) << SPMI_APB_SPMI_CMD_ADDR_OFFSET); /* slave_addr */
3f5f1801bf6c4a3 Mayulong 2020-08-11 171
43091a1c2b8d45e Mauro Carvalho Chehab 2020-08-11 172 spin_lock_irqsave(&spmi_controller->lock, flags);
3f5f1801bf6c4a3 Mayulong 2020-08-11 173
43091a1c2b8d45e Mauro Carvalho Chehab 2020-08-11 174 writel(cmd, spmi_controller->base + chnl_ofst + SPMI_APB_SPMI_CMD_BASE_ADDR);
3f5f1801bf6c4a3 Mayulong 2020-08-11 175
afd5339d05a6fd2 Mauro Carvalho Chehab 2020-08-11 176 rc = spmi_controller_wait_for_done(spmi_controller,
afd5339d05a6fd2 Mauro Carvalho Chehab 2020-08-11 177 spmi_controller->base, sid, addr);
3f5f1801bf6c4a3 Mayulong 2020-08-11 178 if (rc)
3f5f1801bf6c4a3 Mayulong 2020-08-11 179 goto done;
3f5f1801bf6c4a3 Mayulong 2020-08-11 180
3f5f1801bf6c4a3 Mayulong 2020-08-11 181 i = 0;
3f5f1801bf6c4a3 Mayulong 2020-08-11 182 do {
43091a1c2b8d45e Mauro Carvalho Chehab 2020-08-11 183 data = readl(spmi_controller->base + chnl_ofst + SPMI_SLAVE_OFFSET * sid + SPMI_APB_SPMI_RDATA0_BASE_ADDR + i * SPMI_PER_DATAREG_BYTE);
afd5339d05a6fd2 Mauro Carvalho Chehab 2020-08-11 184 data = be32_to_cpu((__be32)data);
43091a1c2b8d45e Mauro Carvalho Chehab 2020-08-11 185 if ((bc - i * SPMI_PER_DATAREG_BYTE) >> 2) {
3f5f1801bf6c4a3 Mayulong 2020-08-11 186 memcpy(buf, &data, sizeof(data));
3f5f1801bf6c4a3 Mayulong 2020-08-11 187 buf += sizeof(data);
3f5f1801bf6c4a3 Mayulong 2020-08-11 188 } else {
43091a1c2b8d45e Mauro Carvalho Chehab 2020-08-11 189 memcpy(buf, &data, bc % SPMI_PER_DATAREG_BYTE);
3f5f1801bf6c4a3 Mayulong 2020-08-11 190 buf += (bc % SPMI_PER_DATAREG_BYTE);
3f5f1801bf6c4a3 Mayulong 2020-08-11 191 }
3f5f1801bf6c4a3 Mayulong 2020-08-11 192 i++;
3f5f1801bf6c4a3 Mayulong 2020-08-11 193 } while (bc > i * SPMI_PER_DATAREG_BYTE);
3f5f1801bf6c4a3 Mayulong 2020-08-11 194
3f5f1801bf6c4a3 Mayulong 2020-08-11 195 done:
3f5f1801bf6c4a3 Mayulong 2020-08-11 196 spin_unlock_irqrestore(&spmi_controller->lock, flags);
3f5f1801bf6c4a3 Mayulong 2020-08-11 197 if (rc)
3f5f1801bf6c4a3 Mayulong 2020-08-11 198 dev_err(spmi_controller->dev, "spmi read wait timeout op:0x%x sid:%d addr:0x%x bc:%ld\n",
3f5f1801bf6c4a3 Mayulong 2020-08-11 199 opc, sid, addr, bc + 1);
a93f9ffda101599 Mauro Carvalho Chehab 2020-08-11 200 else
a93f9ffda101599 Mauro Carvalho Chehab 2020-08-11 201 dev_dbg(spmi_controller->dev, "%s: id:%d addr:0x%x, read value: %*ph\n",
a93f9ffda101599 Mauro Carvalho Chehab 2020-08-11 202 __func__, sid, addr, (int)bc, __buf);
a93f9ffda101599 Mauro Carvalho Chehab 2020-08-11 203
3f5f1801bf6c4a3 Mayulong 2020-08-11 204 return rc;
43091a1c2b8d45e Mauro Carvalho Chehab 2020-08-11 205 }
3f5f1801bf6c4a3 Mayulong 2020-08-11 206
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2172 mpt3sas_send_diag_release() warn: inconsistent indenting
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 00e4db51259a5f936fec1424b884f029479d3981
commit: c6bdb6a10892d1130638a5e28d1523a813e45d5e scsi: mpt3sas: Print function name in which cmd timed out
date: 7 months ago
config: parisc-randconfig-m031-20200811 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2172 mpt3sas_send_diag_release() warn: inconsistent indenting
Old smatch warnings:
drivers/scsi/mpt3sas/mpt3sas_ctl.c:708 _ctl_do_mpt_command() error: copy_from_user() 'mpi_request' too small (65535 vs 4294967292)
drivers/scsi/mpt3sas/mpt3sas_ctl.c:1918 _ctl_diag_register() warn: potential spectre issue 'ioc->diag_buffer_status' [w]
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2060 _ctl_diag_query() warn: potential spectre issue 'ioc->diag_buffer' [r]
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2061 _ctl_diag_query() warn: possible spectre second half. 'request_data'
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2085 _ctl_diag_query() warn: potential spectre issue 'ioc->product_specific' [r]
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2087 _ctl_diag_query() warn: potential spectre issue 'ioc->diag_buffer_sz' [r]
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2089 _ctl_diag_query() warn: potential spectre issue 'ioc->unique_id' [r]
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2090 _ctl_diag_query() warn: potential spectre issue 'ioc->diagnostic_flags' [r]
vim +2172 drivers/scsi/mpt3sas/mpt3sas_ctl.c
f92363d1235949 Sreekanth Reddy 2012-11-30 2099
f92363d1235949 Sreekanth Reddy 2012-11-30 2100 /**
f92363d1235949 Sreekanth Reddy 2012-11-30 2101 * mpt3sas_send_diag_release - Diag Release Message
f92363d1235949 Sreekanth Reddy 2012-11-30 2102 * @ioc: per adapter object
4beb4867f049ae Bart Van Assche 2018-06-15 2103 * @buffer_type: specifies either TRACE, SNAPSHOT, or EXTENDED
4beb4867f049ae Bart Van Assche 2018-06-15 2104 * @issue_reset: specifies whether host reset is required.
f92363d1235949 Sreekanth Reddy 2012-11-30 2105 *
f92363d1235949 Sreekanth Reddy 2012-11-30 2106 */
f92363d1235949 Sreekanth Reddy 2012-11-30 2107 int
f92363d1235949 Sreekanth Reddy 2012-11-30 2108 mpt3sas_send_diag_release(struct MPT3SAS_ADAPTER *ioc, u8 buffer_type,
f92363d1235949 Sreekanth Reddy 2012-11-30 2109 u8 *issue_reset)
f92363d1235949 Sreekanth Reddy 2012-11-30 2110 {
f92363d1235949 Sreekanth Reddy 2012-11-30 2111 Mpi2DiagReleaseRequest_t *mpi_request;
f92363d1235949 Sreekanth Reddy 2012-11-30 2112 Mpi2DiagReleaseReply_t *mpi_reply;
f92363d1235949 Sreekanth Reddy 2012-11-30 2113 u16 smid;
f92363d1235949 Sreekanth Reddy 2012-11-30 2114 u16 ioc_status;
f92363d1235949 Sreekanth Reddy 2012-11-30 2115 u32 ioc_state;
f92363d1235949 Sreekanth Reddy 2012-11-30 2116 int rc;
c6bdb6a10892d1 Sreekanth Reddy 2019-12-26 2117 u8 reset_needed = 0;
f92363d1235949 Sreekanth Reddy 2012-11-30 2118
919d8a3f3fef99 Joe Perches 2018-09-17 2119 dctlprintk(ioc, ioc_info(ioc, "%s\n",
f92363d1235949 Sreekanth Reddy 2012-11-30 2120 __func__));
f92363d1235949 Sreekanth Reddy 2012-11-30 2121
f92363d1235949 Sreekanth Reddy 2012-11-30 2122 rc = 0;
f92363d1235949 Sreekanth Reddy 2012-11-30 2123 *issue_reset = 0;
f92363d1235949 Sreekanth Reddy 2012-11-30 2124
c6bdb6a10892d1 Sreekanth Reddy 2019-12-26 2125
f92363d1235949 Sreekanth Reddy 2012-11-30 2126 ioc_state = mpt3sas_base_get_iocstate(ioc, 1);
f92363d1235949 Sreekanth Reddy 2012-11-30 2127 if (ioc_state != MPI2_IOC_STATE_OPERATIONAL) {
f92363d1235949 Sreekanth Reddy 2012-11-30 2128 if (ioc->diag_buffer_status[buffer_type] &
f92363d1235949 Sreekanth Reddy 2012-11-30 2129 MPT3_DIAG_BUFFER_IS_REGISTERED)
f92363d1235949 Sreekanth Reddy 2012-11-30 2130 ioc->diag_buffer_status[buffer_type] |=
f92363d1235949 Sreekanth Reddy 2012-11-30 2131 MPT3_DIAG_BUFFER_IS_RELEASED;
919d8a3f3fef99 Joe Perches 2018-09-17 2132 dctlprintk(ioc,
919d8a3f3fef99 Joe Perches 2018-09-17 2133 ioc_info(ioc, "%s: skipping due to FAULT state\n",
f92363d1235949 Sreekanth Reddy 2012-11-30 2134 __func__));
f92363d1235949 Sreekanth Reddy 2012-11-30 2135 rc = -EAGAIN;
f92363d1235949 Sreekanth Reddy 2012-11-30 2136 goto out;
f92363d1235949 Sreekanth Reddy 2012-11-30 2137 }
f92363d1235949 Sreekanth Reddy 2012-11-30 2138
f92363d1235949 Sreekanth Reddy 2012-11-30 2139 if (ioc->ctl_cmds.status != MPT3_CMD_NOT_USED) {
919d8a3f3fef99 Joe Perches 2018-09-17 2140 ioc_err(ioc, "%s: ctl_cmd in use\n", __func__);
f92363d1235949 Sreekanth Reddy 2012-11-30 2141 rc = -EAGAIN;
f92363d1235949 Sreekanth Reddy 2012-11-30 2142 goto out;
f92363d1235949 Sreekanth Reddy 2012-11-30 2143 }
f92363d1235949 Sreekanth Reddy 2012-11-30 2144
f92363d1235949 Sreekanth Reddy 2012-11-30 2145 smid = mpt3sas_base_get_smid(ioc, ioc->ctl_cb_idx);
f92363d1235949 Sreekanth Reddy 2012-11-30 2146 if (!smid) {
919d8a3f3fef99 Joe Perches 2018-09-17 2147 ioc_err(ioc, "%s: failed obtaining a smid\n", __func__);
f92363d1235949 Sreekanth Reddy 2012-11-30 2148 rc = -EAGAIN;
f92363d1235949 Sreekanth Reddy 2012-11-30 2149 goto out;
f92363d1235949 Sreekanth Reddy 2012-11-30 2150 }
f92363d1235949 Sreekanth Reddy 2012-11-30 2151
f92363d1235949 Sreekanth Reddy 2012-11-30 2152 ioc->ctl_cmds.status = MPT3_CMD_PENDING;
f92363d1235949 Sreekanth Reddy 2012-11-30 2153 memset(ioc->ctl_cmds.reply, 0, ioc->reply_sz);
f92363d1235949 Sreekanth Reddy 2012-11-30 2154 mpi_request = mpt3sas_base_get_msg_frame(ioc, smid);
f92363d1235949 Sreekanth Reddy 2012-11-30 2155 ioc->ctl_cmds.smid = smid;
f92363d1235949 Sreekanth Reddy 2012-11-30 2156
f92363d1235949 Sreekanth Reddy 2012-11-30 2157 mpi_request->Function = MPI2_FUNCTION_DIAG_RELEASE;
f92363d1235949 Sreekanth Reddy 2012-11-30 2158 mpi_request->BufferType = buffer_type;
f92363d1235949 Sreekanth Reddy 2012-11-30 2159 mpi_request->VF_ID = 0; /* TODO */
f92363d1235949 Sreekanth Reddy 2012-11-30 2160 mpi_request->VP_ID = 0;
f92363d1235949 Sreekanth Reddy 2012-11-30 2161
f92363d1235949 Sreekanth Reddy 2012-11-30 2162 init_completion(&ioc->ctl_cmds.done);
078a4cc1380de7 Suganath Prabu S 2019-05-31 2163 ioc->put_smid_default(ioc, smid);
8bbb1cf63f5e34 Calvin Owens 2016-07-28 2164 wait_for_completion_timeout(&ioc->ctl_cmds.done,
f92363d1235949 Sreekanth Reddy 2012-11-30 2165 MPT3_IOCTL_DEFAULT_TIMEOUT*HZ);
f92363d1235949 Sreekanth Reddy 2012-11-30 2166
f92363d1235949 Sreekanth Reddy 2012-11-30 2167 if (!(ioc->ctl_cmds.status & MPT3_CMD_COMPLETE)) {
c6bdb6a10892d1 Sreekanth Reddy 2019-12-26 2168 mpt3sas_check_cmd_timeout(ioc,
d37306ca0eacdc Chaitra P B 2018-05-31 2169 ioc->ctl_cmds.status, mpi_request,
c6bdb6a10892d1 Sreekanth Reddy 2019-12-26 2170 sizeof(Mpi2DiagReleaseRequest_t)/4, reset_needed);
c6bdb6a10892d1 Sreekanth Reddy 2019-12-26 2171 *issue_reset = reset_needed;
f92363d1235949 Sreekanth Reddy 2012-11-30 @2172 rc = -EFAULT;
f92363d1235949 Sreekanth Reddy 2012-11-30 2173 goto out;
f92363d1235949 Sreekanth Reddy 2012-11-30 2174 }
f92363d1235949 Sreekanth Reddy 2012-11-30 2175
f92363d1235949 Sreekanth Reddy 2012-11-30 2176 /* process the completed Reply Message Frame */
f92363d1235949 Sreekanth Reddy 2012-11-30 2177 if ((ioc->ctl_cmds.status & MPT3_CMD_REPLY_VALID) == 0) {
919d8a3f3fef99 Joe Perches 2018-09-17 2178 ioc_err(ioc, "%s: no reply message\n", __func__);
f92363d1235949 Sreekanth Reddy 2012-11-30 2179 rc = -EFAULT;
f92363d1235949 Sreekanth Reddy 2012-11-30 2180 goto out;
f92363d1235949 Sreekanth Reddy 2012-11-30 2181 }
f92363d1235949 Sreekanth Reddy 2012-11-30 2182
f92363d1235949 Sreekanth Reddy 2012-11-30 2183 mpi_reply = ioc->ctl_cmds.reply;
f92363d1235949 Sreekanth Reddy 2012-11-30 2184 ioc_status = le16_to_cpu(mpi_reply->IOCStatus) & MPI2_IOCSTATUS_MASK;
f92363d1235949 Sreekanth Reddy 2012-11-30 2185
f92363d1235949 Sreekanth Reddy 2012-11-30 2186 if (ioc_status == MPI2_IOCSTATUS_SUCCESS) {
f92363d1235949 Sreekanth Reddy 2012-11-30 2187 ioc->diag_buffer_status[buffer_type] |=
f92363d1235949 Sreekanth Reddy 2012-11-30 2188 MPT3_DIAG_BUFFER_IS_RELEASED;
919d8a3f3fef99 Joe Perches 2018-09-17 2189 dctlprintk(ioc, ioc_info(ioc, "%s: success\n", __func__));
f92363d1235949 Sreekanth Reddy 2012-11-30 2190 } else {
919d8a3f3fef99 Joe Perches 2018-09-17 2191 ioc_info(ioc, "%s: ioc_status(0x%04x) log_info(0x%08x)\n",
919d8a3f3fef99 Joe Perches 2018-09-17 2192 __func__,
f92363d1235949 Sreekanth Reddy 2012-11-30 2193 ioc_status, le32_to_cpu(mpi_reply->IOCLogInfo));
f92363d1235949 Sreekanth Reddy 2012-11-30 2194 rc = -EFAULT;
f92363d1235949 Sreekanth Reddy 2012-11-30 2195 }
f92363d1235949 Sreekanth Reddy 2012-11-30 2196
f92363d1235949 Sreekanth Reddy 2012-11-30 2197 out:
f92363d1235949 Sreekanth Reddy 2012-11-30 2198 ioc->ctl_cmds.status = MPT3_CMD_NOT_USED;
f92363d1235949 Sreekanth Reddy 2012-11-30 2199 return rc;
f92363d1235949 Sreekanth Reddy 2012-11-30 2200 }
f92363d1235949 Sreekanth Reddy 2012-11-30 2201
:::::: The code at line 2172 was first introduced by commit
:::::: f92363d12359498f9a9960511de1a550f0ec41c2 [SCSI] mpt3sas: add new driver supporting 12GB SAS
:::::: TO: Sreekanth Reddy <Sreekanth.Reddy(a)lsi.com>
:::::: CC: James Bottomley <JBottomley(a)Parallels.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[jkirsher-next-queue:dev-queue 8/35] include/linux/prefetch.h:65:49: warning: declaration of 'struct page' will not be visible outside of this function
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git dev-queue
head: 1e38a2ae2ca4c1d7c81e5620e5c43e69c2c79854
commit: c2b9f24be5de6d9737de68d2d75ae3bc81f9b7db [8/35] i40e: optimise prefetch page refcount
config: arm-randconfig-r003-20200811 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 4f2ad15db535873dda9bfe248a2771023b64a43c)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git checkout c2b9f24be5de6d9737de68d2d75ae3bc81f9b7db
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
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 >>):
In file included from kernel/bounds.c:10:
In file included from include/linux/page-flags.h:10:
In file included from include/linux/bug.h:5:
In file included from arch/arm/include/asm/bug.h:60:
In file included from include/asm-generic/bug.h:20:
In file included from include/linux/kernel.h:12:
In file included from include/linux/bitops.h:29:
In file included from arch/arm/include/asm/bitops.h:243:
In file included from include/asm-generic/bitops/lock.h:5:
In file included from include/linux/atomic.h:7:
In file included from arch/arm/include/asm/atomic.h:12:
>> include/linux/prefetch.h:65:49: warning: declaration of 'struct page' will not be visible outside of this function [-Wvisibility]
static inline void prefetch_page_address(struct page *page)
^
1 warning generated.
--
In file included from arch/arm/kernel/asm-offsets.c:11:
In file included from include/linux/sched.h:12:
In file included from ./arch/arm/include/generated/asm/current.h:1:
In file included from include/asm-generic/current.h:5:
In file included from include/linux/thread_info.h:12:
In file included from include/linux/bug.h:5:
In file included from arch/arm/include/asm/bug.h:60:
In file included from include/asm-generic/bug.h:20:
In file included from include/linux/kernel.h:12:
In file included from include/linux/bitops.h:29:
In file included from arch/arm/include/asm/bitops.h:243:
In file included from include/asm-generic/bitops/lock.h:5:
In file included from include/linux/atomic.h:7:
In file included from arch/arm/include/asm/atomic.h:12:
>> include/linux/prefetch.h:65:49: warning: declaration of 'struct page' will not be visible outside of this function [-Wvisibility]
static inline void prefetch_page_address(struct page *page)
^
In file included from arch/arm/kernel/asm-offsets.c:13:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/arm/include/asm/io.h:438:
include/asm-generic/io.h:660:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
insb(addr, buffer, count);
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:204:34: note: expanded from macro 'insb'
#define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l)
^~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:202:65: note: expanded from macro '__ioaddr'
#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
^~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:194:86: note: expanded from macro '__ioaddrc'
#define __ioaddrc(port) ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)0 + (port)))
~~~~~~~~~~~~~~~~~ ^
In file included from arch/arm/kernel/asm-offsets.c:13:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/arm/include/asm/io.h:438:
include/asm-generic/io.h:668:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
insw(addr, buffer, count);
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:205:34: note: expanded from macro 'insw'
#define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l)
^~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:202:65: note: expanded from macro '__ioaddr'
#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
^~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:194:86: note: expanded from macro '__ioaddrc'
#define __ioaddrc(port) ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)0 + (port)))
~~~~~~~~~~~~~~~~~ ^
In file included from arch/arm/kernel/asm-offsets.c:13:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/arm/include/asm/io.h:438:
include/asm-generic/io.h:676:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
insl(addr, buffer, count);
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:206:34: note: expanded from macro 'insl'
#define insl(p,d,l) __raw_readsl(__ioaddr(p),d,l)
^~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:202:65: note: expanded from macro '__ioaddr'
#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
^~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:194:86: note: expanded from macro '__ioaddrc'
#define __ioaddrc(port) ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)0 + (port)))
~~~~~~~~~~~~~~~~~ ^
In file included from arch/arm/kernel/asm-offsets.c:13:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/arm/include/asm/io.h:438:
include/asm-generic/io.h:685:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outsb(addr, buffer, count);
^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:208:36: note: expanded from macro 'outsb'
#define outsb(p,d,l) __raw_writesb(__ioaddr(p),d,l)
^~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:202:65: note: expanded from macro '__ioaddr'
#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
^~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:194:86: note: expanded from macro '__ioaddrc'
#define __ioaddrc(port) ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)0 + (port)))
~~~~~~~~~~~~~~~~~ ^
In file included from arch/arm/kernel/asm-offsets.c:13:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/arm/include/asm/io.h:438:
include/asm-generic/io.h:694:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outsw(addr, buffer, count);
^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:209:36: note: expanded from macro 'outsw'
#define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l)
^~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:202:65: note: expanded from macro '__ioaddr'
#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
^~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:194:86: note: expanded from macro '__ioaddrc'
#define __ioaddrc(port) ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)0 + (port)))
~~~~~~~~~~~~~~~~~ ^
In file included from arch/arm/kernel/asm-offsets.c:13:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/arm/include/asm/io.h:438:
include/asm-generic/io.h:703:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outsl(addr, buffer, count);
^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:210:36: note: expanded from macro 'outsl'
#define outsl(p,d,l) __raw_writesl(__ioaddr(p),d,l)
^~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:202:65: note: expanded from macro '__ioaddr'
#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
^~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:194:86: note: expanded from macro '__ioaddrc'
#define __ioaddrc(port) ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)0 + (port)))
~~~~~~~~~~~~~~~~~ ^
7 warnings generated.
--
In file included from net/ipv6/exthdrs.c:22:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:8:
In file included from include/linux/kernel.h:12:
In file included from include/linux/bitops.h:29:
In file included from arch/arm/include/asm/bitops.h:243:
In file included from include/asm-generic/bitops/lock.h:5:
In file included from include/linux/atomic.h:7:
In file included from arch/arm/include/asm/atomic.h:12:
>> include/linux/prefetch.h:65:49: warning: declaration of 'struct page' will not be visible outside of this function [-Wvisibility]
static inline void prefetch_page_address(struct page *page)
^
In file included from net/ipv6/exthdrs.c:25:
In file included from include/linux/netdevice.h:37:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/arm/include/asm/io.h:438:
include/asm-generic/io.h:660:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
insb(addr, buffer, count);
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:204:34: note: expanded from macro 'insb'
#define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l)
^~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:202:65: note: expanded from macro '__ioaddr'
#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
^~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:194:86: note: expanded from macro '__ioaddrc'
#define __ioaddrc(port) ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)0 + (port)))
~~~~~~~~~~~~~~~~~ ^
In file included from net/ipv6/exthdrs.c:25:
In file included from include/linux/netdevice.h:37:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/arm/include/asm/io.h:438:
include/asm-generic/io.h:668:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
insw(addr, buffer, count);
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:205:34: note: expanded from macro 'insw'
#define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l)
^~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:202:65: note: expanded from macro '__ioaddr'
#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
^~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:194:86: note: expanded from macro '__ioaddrc'
#define __ioaddrc(port) ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)0 + (port)))
~~~~~~~~~~~~~~~~~ ^
In file included from net/ipv6/exthdrs.c:25:
In file included from include/linux/netdevice.h:37:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/arm/include/asm/io.h:438:
include/asm-generic/io.h:676:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
insl(addr, buffer, count);
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:206:34: note: expanded from macro 'insl'
#define insl(p,d,l) __raw_readsl(__ioaddr(p),d,l)
^~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:202:65: note: expanded from macro '__ioaddr'
#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
^~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:194:86: note: expanded from macro '__ioaddrc'
#define __ioaddrc(port) ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)0 + (port)))
~~~~~~~~~~~~~~~~~ ^
In file included from net/ipv6/exthdrs.c:25:
In file included from include/linux/netdevice.h:37:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/arm/include/asm/io.h:438:
include/asm-generic/io.h:685:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outsb(addr, buffer, count);
^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:208:36: note: expanded from macro 'outsb'
#define outsb(p,d,l) __raw_writesb(__ioaddr(p),d,l)
^~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:202:65: note: expanded from macro '__ioaddr'
#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
^~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:194:86: note: expanded from macro '__ioaddrc'
#define __ioaddrc(port) ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)0 + (port)))
~~~~~~~~~~~~~~~~~ ^
In file included from net/ipv6/exthdrs.c:25:
In file included from include/linux/netdevice.h:37:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/arm/include/asm/io.h:438:
include/asm-generic/io.h:694:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outsw(addr, buffer, count);
^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:209:36: note: expanded from macro 'outsw'
#define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l)
--
In file included from net/core/dev.c:71:
In file included from include/linux/uaccess.h:6:
In file included from include/linux/sched.h:12:
In file included from ./arch/arm/include/generated/asm/current.h:1:
In file included from include/asm-generic/current.h:5:
In file included from include/linux/thread_info.h:12:
In file included from include/linux/bug.h:5:
In file included from arch/arm/include/asm/bug.h:60:
In file included from include/asm-generic/bug.h:20:
In file included from include/linux/kernel.h:12:
In file included from include/linux/bitops.h:29:
In file included from arch/arm/include/asm/bitops.h:243:
In file included from include/asm-generic/bitops/lock.h:5:
In file included from include/linux/atomic.h:7:
In file included from arch/arm/include/asm/atomic.h:12:
>> include/linux/prefetch.h:65:49: warning: declaration of 'struct page' will not be visible outside of this function [-Wvisibility]
static inline void prefetch_page_address(struct page *page)
^
In file included from net/core/dev.c:89:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/arm/include/asm/io.h:438:
include/asm-generic/io.h:660:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
insb(addr, buffer, count);
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:204:34: note: expanded from macro 'insb'
#define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l)
^~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:202:65: note: expanded from macro '__ioaddr'
#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
^~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:194:86: note: expanded from macro '__ioaddrc'
#define __ioaddrc(port) ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)0 + (port)))
~~~~~~~~~~~~~~~~~ ^
In file included from net/core/dev.c:89:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/arm/include/asm/io.h:438:
include/asm-generic/io.h:668:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
insw(addr, buffer, count);
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:205:34: note: expanded from macro 'insw'
#define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l)
^~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:202:65: note: expanded from macro '__ioaddr'
#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
^~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:194:86: note: expanded from macro '__ioaddrc'
#define __ioaddrc(port) ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)0 + (port)))
~~~~~~~~~~~~~~~~~ ^
In file included from net/core/dev.c:89:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/arm/include/asm/io.h:438:
include/asm-generic/io.h:676:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
insl(addr, buffer, count);
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:206:34: note: expanded from macro 'insl'
#define insl(p,d,l) __raw_readsl(__ioaddr(p),d,l)
^~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:202:65: note: expanded from macro '__ioaddr'
#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
^~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:194:86: note: expanded from macro '__ioaddrc'
#define __ioaddrc(port) ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)0 + (port)))
~~~~~~~~~~~~~~~~~ ^
In file included from net/core/dev.c:89:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/arm/include/asm/io.h:438:
include/asm-generic/io.h:685:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outsb(addr, buffer, count);
^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:208:36: note: expanded from macro 'outsb'
#define outsb(p,d,l) __raw_writesb(__ioaddr(p),d,l)
^~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:202:65: note: expanded from macro '__ioaddr'
#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
^~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:194:86: note: expanded from macro '__ioaddrc'
#define __ioaddrc(port) ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)0 + (port)))
~~~~~~~~~~~~~~~~~ ^
In file included from net/core/dev.c:89:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/arm/include/asm/io.h:438:
include/asm-generic/io.h:694:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outsw(addr, buffer, count);
^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:209:36: note: expanded from macro 'outsw'
#define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l)
^~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:202:65: note: expanded from macro '__ioaddr'
#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
^~~~~~~~~~~~
arch/arm/mach-s3c24xx/include/mach/io.h:194:86: note: expanded from macro '__ioaddrc'
#define __ioaddrc(port) ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)0 + (port)))
~~~~~~~~~~~~~~~~~ ^
In file included from net/core/dev.c:89:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/arm/include/asm/io.h:438:
include/asm-generic/io.h:703:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outsl(addr, buffer, count);
..
vim +65 include/linux/prefetch.h
64
> 65 static inline void prefetch_page_address(struct page *page)
66 {
67 #if defined(WANT_PAGE_VIRTUAL) || defined(HASHED_PAGE_VIRTUAL)
68 prefetch(page);
69 #endif
70 }
71
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[djwong-xfs:scrub-fixes 272/304] fs/xfs/libxfs/xfs_rmap.c:41:23: warning: Same value in both branches of ternary operator.
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git scrub-fixes
head: 1acf4b5f989a50368c7400ebc9bcb8e694811472
commit: 7a79408119261e2bd09ad619b42678809f58f67e [272/304] xfs: prepare rmap functions to deal with rtrmapbt
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
In file included from fs/xfs/libxfs/xfs_rmap.c:
fs/xfs/libxfs/xfs_format.h:342:2: warning: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction]
return (sbp->sb_versionnum & XFS_SB_VERSION_ATTRBIT);
^
fs/xfs/libxfs/xfs_format.h:352:2: warning: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction]
return (sbp->sb_versionnum & XFS_SB_VERSION_QUOTABIT);
^
fs/xfs/libxfs/xfs_format.h:368:2: warning: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction]
return (sbp->sb_versionnum & XFS_SB_VERSION_DALIGNBIT);
^
fs/xfs/libxfs/xfs_format.h:379:2: warning: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction]
return (sbp->sb_versionnum & XFS_SB_VERSION_SECTORBIT);
^
fs/xfs/libxfs/xfs_format.h:384:2: warning: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction]
return (sbp->sb_versionnum & XFS_SB_VERSION_BORGBIT);
^
>> fs/xfs/libxfs/xfs_rmap.c:41:23: warning: Same value in both branches of ternary operator. [duplicateValueTernary]
XFS_RTRMAP_LEN_MAX : XFS_RMAP_LEN_MAX;
^
vim +41 fs/xfs/libxfs/xfs_rmap.c
34
35 /* Return the maximum length of an rmap record. */
36 static xfs_filblks_t
37 xfs_rmap_len_max(
38 struct xfs_btree_cur *cur)
39 {
40 return (cur->bc_flags & XFS_BTREE_LONG_PTRS) ?
> 41 XFS_RTRMAP_LEN_MAX : XFS_RMAP_LEN_MAX;
42 }
43
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[xlnx:master 137/137] ./usr/include/linux/xlnx-ai-engine.h:138:2: error: unknown type name 'u32'
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx master
head: 566441779cdc25e377c2baab9277342b09b4249b
commit: 566441779cdc25e377c2baab9277342b09b4249b [137/137] misc: xilinx-ai-engine: add setting shim dma bd operation
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):
git checkout 566441779cdc25e377c2baab9277342b09b4249b
# 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 errors (new ones prefixed by >>):
In file included from <command-line>:32:
./usr/include/linux/xlnx-ai-engine.h:56:2: error: unknown type name 'size_t'
56 | size_t offset;
| ^~~~~~
./usr/include/linux/xlnx-ai-engine.h:57:2: error: unknown type name 'size_t'
57 | size_t size;
| ^~~~~~
>> ./usr/include/linux/xlnx-ai-engine.h:138:2: error: unknown type name 'u32'
138 | u32 *bd;
| ^~~
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month