mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Pali Rohár" <pali@kernel.org>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Bjorn Helgaas" <helgaas@kernel.org>
Cc: kbuild-all@lists.01.org, linux-pci@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: mvebu: Fix endianity when accessing pci emul bridge members
Date: Sat, 13 Aug 2022 05:12:45 +0800	[thread overview]
Message-ID: <202208130542.WpzYnXZ3-lkp@intel.com> (raw)
In-Reply-To: <20220812094058.16141-1-pali@kernel.org>

Hi "Pali,

I love your patch! Perhaps something to improve:

[auto build test WARNING on helgaas-pci/next]
[also build test WARNING on linus/master v5.19 next-20220812]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Pali-Roh-r/PCI-mvebu-Fix-endianity-when-accessing-pci-emul-bridge-members/20220812-174306
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: arm-randconfig-s041-20220812 (https://download.01.org/0day-ci/archive/20220813/202208130542.WpzYnXZ3-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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-39-gce1a6720-dirty
        # https://github.com/intel-lab-lkp/linux/commit/525898e0a8389f8bb560edbce3f07a3ec2550968
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Pali-Roh-r/PCI-mvebu-Fix-endianity-when-accessing-pci-emul-bridge-members/20220812-174306
        git checkout 525898e0a8389f8bb560edbce3f07a3ec2550968
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash drivers/pci/controller/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

sparse warnings: (new ones prefixed by >>)
   drivers/pci/controller/pci-mvebu.c:538:25: sparse: sparse: restricted __le16 degrades to integer
>> drivers/pci/controller/pci-mvebu.c:538:25: sparse: sparse: cast to restricted __le16
   drivers/pci/controller/pci-mvebu.c:541:26: sparse: sparse: restricted __le16 degrades to integer
   drivers/pci/controller/pci-mvebu.c:541:26: sparse: sparse: cast to restricted __le16

vim +538 drivers/pci/controller/pci-mvebu.c

   518	
   519	static int mvebu_pcie_handle_iobase_change(struct mvebu_pcie_port *port)
   520	{
   521		struct mvebu_pcie_window desired = {};
   522		struct pci_bridge_emul_conf *conf = &port->bridge.conf;
   523	
   524		/* Are the new iobase/iolimit values invalid? */
   525		if (conf->iolimit < conf->iobase ||
   526		    le16_to_cpu(conf->iolimitupper) < le16_to_cpu(conf->iobaseupper))
   527			return mvebu_pcie_set_window(port, port->io_target, port->io_attr,
   528						     &desired, &port->iowin);
   529	
   530		/*
   531		 * We read the PCI-to-PCI bridge emulated registers, and
   532		 * calculate the base address and size of the address decoding
   533		 * window to setup, according to the PCI-to-PCI bridge
   534		 * specifications. iobase is the bus address, port->iowin_base
   535		 * is the CPU address.
   536		 */
   537		desired.remap = ((conf->iobase & 0xF0) << 8) |
 > 538				le16_to_cpu(conf->iobaseupper << 16);
   539		desired.base = port->pcie->io.start + desired.remap;
   540		desired.size = ((0xFFF | ((conf->iolimit & 0xF0) << 8) |
   541				 le16_to_cpu(conf->iolimitupper << 16)) -
   542				desired.remap) +
   543			       1;
   544	
   545		return mvebu_pcie_set_window(port, port->io_target, port->io_attr, &desired,
   546					     &port->iowin);
   547	}
   548	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

      parent reply	other threads:[~2022-08-12 21:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12  9:40 Pali Rohár
2022-08-12 10:32 ` Robin Murphy
2022-08-12 13:58   ` Pali Rohár
2022-08-12 14:11 ` [PATCH v2] " Pali Rohár
2022-08-23 10:23   ` Lorenzo Pieralisi
2022-08-12 21:12 ` kernel test robot [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=202208130542.WpzYnXZ3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=helgaas@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kw@linux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=pali@kernel.org \
    --cc=thomas.petazzoni@bootlin.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

all inboxes | Powered by JetHome®