From: Bjorn Helgaas <helgaas@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: D Scott Phillips <scott@os.amperecomputing.com>,
oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [linux-next:master 14769/15220] drivers/pci/hotplug/acpiphp_ampere_altra.c:63:75: warning: suggest parentheses around arithmetic in operand of '|'
Date: Tue, 31 Oct 2023 10:23:11 -0500 [thread overview]
Message-ID: <20231031152311.GA10429@bhelgaas> (raw)
In-Reply-To: <202310270037.19V5rqDL-lkp@intel.com>
On Fri, Oct 27, 2023 at 12:51:23AM +0800, kernel test robot wrote:
> 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@intel.com/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@intel.com/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@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202310270037.19V5rqDL-lkp@intel.com/
>
> 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)
> | ^~~~~~~~~~~
Just for the record, this should be resolved by
https://git.kernel.org/cgit/linux/kernel/git/pci/pci.git/commit/?id=820f59ed9680,
which is in the current PCI -next branch.
> 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
prev parent reply other threads:[~2023-10-31 15:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-26 16:51 kernel test robot
2023-10-31 15:23 ` Bjorn Helgaas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231031152311.GA10429@bhelgaas \
--to=helgaas@kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=scott@os.amperecomputing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox