All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Krzysztof Wilczyński" <kw@linux.com>,
	"Bjorn Helgaas" <helgaas@kernel.org>
Cc: kbuild-all@lists.01.org,
	"Dan Williams" <dan.j.williams@intel.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>,
	"Kees Cook" <keescook@chromium.org>,
	"Pali Rohár" <pali@kernel.org>,
	"Oliver O'Halloran" <oohall@gmail.com>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 1/3] sysfs: Invoke iomem_get_mapping() from the sysfs open callback
Date: Sun, 27 Jun 2021 04:07:50 +0800	[thread overview]
Message-ID: <202106270339.Z56KqwAM-lkp@intel.com> (raw)
In-Reply-To: <20210626125735.2868256-2-kw@linux.com>

[-- Attachment #1: Type: text/plain, Size: 6136 bytes --]

Hi "Krzysztof,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pci/next]
[also build test ERROR on driver-core/driver-core-testing linus/master v5.13-rc7 next-20210625]
[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/Krzysztof-Wilczy-ski/Allow-deferred-execution-of-iomem_get_mapping/20210626-205836
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/e2a3b2d0e981d30bc58d044387dc17e55ab6ee03
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Krzysztof-Wilczy-ski/Allow-deferred-execution-of-iomem_get_mapping/20210626-205836
        git checkout e2a3b2d0e981d30bc58d044387dc17e55ab6ee03
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

Note: the linux-review/Krzysztof-Wilczy-ski/Allow-deferred-execution-of-iomem_get_mapping/20210626-205836 HEAD eef095b16d6c52c82c68e26f94558e39dc49f4ae builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   drivers/pci/pci-sysfs.c: In function 'pci_create_attr':
>> drivers/pci/pci-sysfs.c:1198:21: error: assignment to 'struct address_space * (*)(void)' from incompatible pointer type 'struct address_space *' [-Werror=incompatible-pointer-types]
    1198 |   res_attr->mapping = iomem_get_mapping();
         |                     ^
   cc1: some warnings being treated as errors


vim +1198 drivers/pci/pci-sysfs.c

45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1165  
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1166  static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine)
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1167  {
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1168  	/* allocate attribute structure, piggyback attribute name */
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1169  	int name_len = write_combine ? 13 : 10;
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1170  	struct bin_attribute *res_attr;
bd5174dfb6f171 Bjorn Helgaas                 2016-03-10  1171  	char *res_attr_name;
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1172  	int retval;
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1173  
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1174  	res_attr = kzalloc(sizeof(*res_attr) + name_len, GFP_ATOMIC);
bd5174dfb6f171 Bjorn Helgaas                 2016-03-10  1175  	if (!res_attr)
bd5174dfb6f171 Bjorn Helgaas                 2016-03-10  1176  		return -ENOMEM;
bd5174dfb6f171 Bjorn Helgaas                 2016-03-10  1177  
bd5174dfb6f171 Bjorn Helgaas                 2016-03-10  1178  	res_attr_name = (char *)(res_attr + 1);
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1179  
a07e4156a2ee63 Eric W. Biederman             2010-02-11  1180  	sysfs_bin_attr_init(res_attr);
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1181  	if (write_combine) {
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1182  		pdev->res_attr_wc[num] = res_attr;
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1183  		sprintf(res_attr_name, "resource%d_wc", num);
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1184  		res_attr->mmap = pci_mmap_resource_wc;
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1185  	} else {
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1186  		pdev->res_attr[num] = res_attr;
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1187  		sprintf(res_attr_name, "resource%d", num);
8633328be24267 Alex Williamson               2010-07-19  1188  		if (pci_resource_flags(pdev, num) & IORESOURCE_IO) {
8633328be24267 Alex Williamson               2010-07-19  1189  			res_attr->read = pci_read_resource_io;
8633328be24267 Alex Williamson               2010-07-19  1190  			res_attr->write = pci_write_resource_io;
e854d8b2a82ef7 David Woodhouse               2017-04-12  1191  			if (arch_can_pci_mmap_io())
e854d8b2a82ef7 David Woodhouse               2017-04-12  1192  				res_attr->mmap = pci_mmap_resource_uc;
e854d8b2a82ef7 David Woodhouse               2017-04-12  1193  		} else {
e854d8b2a82ef7 David Woodhouse               2017-04-12  1194  			res_attr->mmap = pci_mmap_resource_uc;
e854d8b2a82ef7 David Woodhouse               2017-04-12  1195  		}
8633328be24267 Alex Williamson               2010-07-19  1196  	}
636b21b50152d4 Daniel Vetter                 2021-02-04  1197  	if (res_attr->mmap)
636b21b50152d4 Daniel Vetter                 2021-02-04 @1198  		res_attr->mapping = iomem_get_mapping();
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1199  	res_attr->attr.name = res_attr_name;
e2154044dd4168 Kelsey Skunberg               2019-08-13  1200  	res_attr->attr.mode = 0600;
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1201  	res_attr->size = pci_resource_len(pdev, num);
dca40b186b757c David Woodhouse               2017-04-12  1202  	res_attr->private = (void *)(unsigned long)num;
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1203  	retval = sysfs_create_bin_file(&pdev->dev.kobj, res_attr);
b562ec8f74e4ed Bjorn Helgaas                 2016-03-10  1204  	if (retval)
b562ec8f74e4ed Bjorn Helgaas                 2016-03-10  1205  		kfree(res_attr);
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1206  
45aec1ae72fc59 venkatesh.pallipadi@intel.com 2008-03-18  1207  	return retval;
b19441af185559 Greg Kroah-Hartman            2006-08-28  1208  }
b19441af185559 Greg Kroah-Hartman            2006-08-28  1209  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 65239 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2 1/3] sysfs: Invoke iomem_get_mapping() from the sysfs open callback
Date: Sun, 27 Jun 2021 04:07:50 +0800	[thread overview]
Message-ID: <202106270339.Z56KqwAM-lkp@intel.com> (raw)
In-Reply-To: <20210626125735.2868256-2-kw@linux.com>

[-- Attachment #1: Type: text/plain, Size: 6270 bytes --]

Hi "Krzysztof,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pci/next]
[also build test ERROR on driver-core/driver-core-testing linus/master v5.13-rc7 next-20210625]
[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/Krzysztof-Wilczy-ski/Allow-deferred-execution-of-iomem_get_mapping/20210626-205836
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/e2a3b2d0e981d30bc58d044387dc17e55ab6ee03
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Krzysztof-Wilczy-ski/Allow-deferred-execution-of-iomem_get_mapping/20210626-205836
        git checkout e2a3b2d0e981d30bc58d044387dc17e55ab6ee03
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

Note: the linux-review/Krzysztof-Wilczy-ski/Allow-deferred-execution-of-iomem_get_mapping/20210626-205836 HEAD eef095b16d6c52c82c68e26f94558e39dc49f4ae builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   drivers/pci/pci-sysfs.c: In function 'pci_create_attr':
>> drivers/pci/pci-sysfs.c:1198:21: error: assignment to 'struct address_space * (*)(void)' from incompatible pointer type 'struct address_space *' [-Werror=incompatible-pointer-types]
    1198 |   res_attr->mapping = iomem_get_mapping();
         |                     ^
   cc1: some warnings being treated as errors


vim +1198 drivers/pci/pci-sysfs.c

45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1165  
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1166  static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine)
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1167  {
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1168  	/* allocate attribute structure, piggyback attribute name */
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1169  	int name_len = write_combine ? 13 : 10;
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1170  	struct bin_attribute *res_attr;
bd5174dfb6f171 Bjorn Helgaas                 2016-03-10  1171  	char *res_attr_name;
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1172  	int retval;
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1173  
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1174  	res_attr = kzalloc(sizeof(*res_attr) + name_len, GFP_ATOMIC);
bd5174dfb6f171 Bjorn Helgaas                 2016-03-10  1175  	if (!res_attr)
bd5174dfb6f171 Bjorn Helgaas                 2016-03-10  1176  		return -ENOMEM;
bd5174dfb6f171 Bjorn Helgaas                 2016-03-10  1177  
bd5174dfb6f171 Bjorn Helgaas                 2016-03-10  1178  	res_attr_name = (char *)(res_attr + 1);
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1179  
a07e4156a2ee63 Eric W. Biederman             2010-02-11  1180  	sysfs_bin_attr_init(res_attr);
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1181  	if (write_combine) {
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1182  		pdev->res_attr_wc[num] = res_attr;
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1183  		sprintf(res_attr_name, "resource%d_wc", num);
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1184  		res_attr->mmap = pci_mmap_resource_wc;
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1185  	} else {
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1186  		pdev->res_attr[num] = res_attr;
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1187  		sprintf(res_attr_name, "resource%d", num);
8633328be24267 Alex Williamson               2010-07-19  1188  		if (pci_resource_flags(pdev, num) & IORESOURCE_IO) {
8633328be24267 Alex Williamson               2010-07-19  1189  			res_attr->read = pci_read_resource_io;
8633328be24267 Alex Williamson               2010-07-19  1190  			res_attr->write = pci_write_resource_io;
e854d8b2a82ef7 David Woodhouse               2017-04-12  1191  			if (arch_can_pci_mmap_io())
e854d8b2a82ef7 David Woodhouse               2017-04-12  1192  				res_attr->mmap = pci_mmap_resource_uc;
e854d8b2a82ef7 David Woodhouse               2017-04-12  1193  		} else {
e854d8b2a82ef7 David Woodhouse               2017-04-12  1194  			res_attr->mmap = pci_mmap_resource_uc;
e854d8b2a82ef7 David Woodhouse               2017-04-12  1195  		}
8633328be24267 Alex Williamson               2010-07-19  1196  	}
636b21b50152d4 Daniel Vetter                 2021-02-04  1197  	if (res_attr->mmap)
636b21b50152d4 Daniel Vetter                 2021-02-04 @1198  		res_attr->mapping = iomem_get_mapping();
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1199  	res_attr->attr.name = res_attr_name;
e2154044dd4168 Kelsey Skunberg               2019-08-13  1200  	res_attr->attr.mode = 0600;
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1201  	res_attr->size = pci_resource_len(pdev, num);
dca40b186b757c David Woodhouse               2017-04-12  1202  	res_attr->private = (void *)(unsigned long)num;
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1203  	retval = sysfs_create_bin_file(&pdev->dev.kobj, res_attr);
b562ec8f74e4ed Bjorn Helgaas                 2016-03-10  1204  	if (retval)
b562ec8f74e4ed Bjorn Helgaas                 2016-03-10  1205  		kfree(res_attr);
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1206  
45aec1ae72fc59 venkatesh.pallipadi(a)intel.com 2008-03-18  1207  	return retval;
b19441af185559 Greg Kroah-Hartman            2006-08-28  1208  }
b19441af185559 Greg Kroah-Hartman            2006-08-28  1209  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 65239 bytes --]

  reply	other threads:[~2021-06-26 20:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-26 12:57 [PATCH v2 0/3] Allow deferred execution of iomem_get_mapping() Krzysztof Wilczyński
2021-06-26 12:57 ` [PATCH v2 1/3] sysfs: Invoke iomem_get_mapping() from the sysfs open callback Krzysztof Wilczyński
2021-06-26 20:07   ` kernel test robot [this message]
2021-06-26 20:07     ` kernel test robot
2021-06-26 12:57 ` [PATCH v2 2/3] PCI/sysfs: Pass iomem_get_mapping() as a function pointer Krzysztof Wilczyński
2021-06-26 12:57 ` [PATCH v2 3/3] sysfs: Rename struct bin_attribute member to f_mapping Krzysztof Wilczyński

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=202106270339.Z56KqwAM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=gregkh@linuxfoundation.org \
    --cc=helgaas@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=keescook@chromium.org \
    --cc=kw@linux.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=oohall@gmail.com \
    --cc=pali@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.