[linux-next:master 14769/15220] drivers/pci/hotplug/acpiphp_ampere_altra.c:63:75: warning: suggest parentheses around arithmetic in operand of '|'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   2ef7141596eed0b4b45ef18b3626f428a6b0a822
commit: 13ba8a09c4f6fd87b4919ed2dc5e0dbf27c3de7e [14769/15220] PCI: hotplug: Add Ampere Altra Attention Indicator extension driver
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20231027/202310270037.19V5rqDL-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231027/202310270037.19V5rqDL-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310270037.19V5rqDL-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   In file included from include/linux/psci.h:10,
                    from arch/arm64/include/asm/acpi.h:14,
                    from include/acpi/acpi_io.h:7,
                    from include/linux/acpi.h:37,
                    from include/linux/pci_hotplug.h:92,
                    from drivers/pci/hotplug/acpiphp_ampere_altra.c:14:
   drivers/pci/hotplug/acpiphp_ampere_altra.c: In function 'set_attention_status':
>> drivers/pci/hotplug/acpiphp_ampere_altra.c:63:75: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
      63 |                      PCI_SLOT(root_port->devfn) << 4 | pci_domain_nr(bus) & 0xf,
         |                                                        ~~~~~~~~~~~~~~~~~~~^~~~~
   include/linux/arm-smccc.h:380:44: note: in definition of macro 'arm_smccc_smc'
     380 | #define arm_smccc_smc(...) __arm_smccc_smc(__VA_ARGS__, NULL)
         |                                            ^~~~~~~~~~~


vim +63 drivers/pci/hotplug/acpiphp_ampere_altra.c

    38	
    39	static int set_attention_status(struct hotplug_slot *slot, u8 status)
    40	{
    41		struct arm_smccc_res res;
    42		struct pci_bus *bus;
    43		struct pci_dev *root_port;
    44		unsigned long flags;
    45		u32 handle;
    46		int ret = 0;
    47	
    48		bus = slot->pci_slot->bus;
    49		root_port = pcie_find_root_port(bus->self);
    50		if (!root_port)
    51			return -ENODEV;
    52	
    53		local_irq_save(flags);
    54		arm_smccc_smc(HANDLE_OPEN, led_service_id[0], led_service_id[1],
    55			      led_service_id[2], led_service_id[3], 0, 0, 0, &res);
    56		if (res.a0) {
    57			ret = -ENODEV;
    58			goto out;
    59		}
    60		handle = res.a1 & 0xffff0000;
    61	
    62		arm_smccc_smc(REQUEST, LED_CMD, led_status(status), LED_ATTENTION,
  > 63			     PCI_SLOT(root_port->devfn) << 4 | pci_domain_nr(bus) & 0xf,
    64			     0, 0, handle, &res);
    65		if (res.a0)
    66			ret = -ENODEV;
    67	
    68		arm_smccc_smc(HANDLE_CLOSE, handle, 0, 0, 0, 0, 0, 0, &res);
    69	
    70	 out:
    71		local_irq_restore(flags);
    72		return ret;
    73	}
    74	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux