linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mihai Carabas <mihai.carabas@oracle.com>, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, gregkh@linuxfoundation.org,
	arnd@arndb.de, bobo.shaobowang@huawei.com, rdunlap@infradead.org,
	Mihai Carabas <mihai.carabas@oracle.com>
Subject: Re: [PATCH v5 3/3] misc/pvpanic: add PCI driver
Date: Wed, 17 Mar 2021 08:02:25 +0800	[thread overview]
Message-ID: <202103170722.w0s6ixQi-lkp@intel.com> (raw)
In-Reply-To: <1615897229-4055-4-git-send-email-mihai.carabas@oracle.com>

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

Hi Mihai,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v5.12-rc3 next-20210316]
[cannot apply to char-misc/char-misc-testing soc/for-next]
[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/Mihai-Carabas/misc-pvpanic-split-up-generic-and-platform-dependent-code/20210316-212047
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a74e6a014c9d4d4161061f770c9b4f98372ac778
config: arc-allyesconfig (attached as .config)
compiler: arceb-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
        # https://github.com/0day-ci/linux/commit/6e945cc8314339e4fd5fc2076a2a2abbd32fc1da
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Mihai-Carabas/misc-pvpanic-split-up-generic-and-platform-dependent-code/20210316-212047
        git checkout 6e945cc8314339e4fd5fc2076a2a2abbd32fc1da
        # 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@intel.com>

All errors (new ones prefixed by >>):

>> drivers/misc/pvpanic/pvpanic-pci.c:22:34: error: 'PVPANIC_PANICKED' undeclared here (not in a function)
      22 | static unsigned int capability = PVPANIC_PANICKED | PVPANIC_CRASH_LOADED;
         |                                  ^~~~~~~~~~~~~~~~
>> drivers/misc/pvpanic/pvpanic-pci.c:22:53: error: 'PVPANIC_CRASH_LOADED' undeclared here (not in a function)
      22 | static unsigned int capability = PVPANIC_PANICKED | PVPANIC_CRASH_LOADED;
         |                                                     ^~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kobject.h:20,
                    from include/linux/module.h:20,
                    from drivers/misc/pvpanic/pvpanic-pci.c:9:
>> drivers/misc/pvpanic/pvpanic-pci.c:64:18: error: 'pvpanici_pci_dev_attrs' undeclared here (not in a function); did you mean 'pvpanic_pci_dev_attrs'?
      64 | ATTRIBUTE_GROUPS(pvpanici_pci_dev);
         |                  ^~~~~~~~~~~~~~~~
   include/linux/sysfs.h:161:11: note: in definition of macro 'ATTRIBUTE_GROUPS'
     161 |  .attrs = _name##_attrs,     \
         |           ^~~~~
   drivers/misc/pvpanic/pvpanic-pci.c: In function 'pvpanic_pci_probe':
   drivers/misc/pvpanic/pvpanic-pci.c:70:18: warning: unused variable 'res' [-Wunused-variable]
      70 |  struct resource res;
         |                  ^~~
   drivers/misc/pvpanic/pvpanic-pci.c: At top level:
>> drivers/misc/pvpanic/pvpanic-pci.c:97:18: error: 'pvpanic_pci_dev_groups' undeclared here (not in a function); did you mean 'pvpanici_pci_dev_groups'?
      97 |  .groups =       pvpanic_pci_dev_groups,
         |                  ^~~~~~~~~~~~~~~~~~~~~~
         |                  pvpanici_pci_dev_groups
   In file included from include/linux/kobject.h:20,
                    from include/linux/module.h:20,
                    from drivers/misc/pvpanic/pvpanic-pci.c:9:
   drivers/misc/pvpanic/pvpanic-pci.c:64:18: warning: 'pvpanici_pci_dev_groups' defined but not used [-Wunused-variable]
      64 | ATTRIBUTE_GROUPS(pvpanici_pci_dev);
         |                  ^~~~~~~~~~~~~~~~
   include/linux/sysfs.h:154:38: note: in definition of macro '__ATTRIBUTE_GROUPS'
     154 | static const struct attribute_group *_name##_groups[] = { \
         |                                      ^~~~~
   drivers/misc/pvpanic/pvpanic-pci.c:64:1: note: in expansion of macro 'ATTRIBUTE_GROUPS'
      64 | ATTRIBUTE_GROUPS(pvpanici_pci_dev);
         | ^~~~~~~~~~~~~~~~
   drivers/misc/pvpanic/pvpanic-pci.c:59:26: warning: 'pvpanic_pci_dev_attrs' defined but not used [-Wunused-variable]
      59 | static struct attribute *pvpanic_pci_dev_attrs[] = {
         |                          ^~~~~~~~~~~~~~~~~~~~~


vim +/PVPANIC_PANICKED +22 drivers/misc/pvpanic/pvpanic-pci.c

    16	
    17	static void __iomem *base;
    18	static const struct pci_device_id pvpanic_pci_id_tbl[]  = {
    19		{ PCI_DEVICE(PCI_VENDOR_ID_REDHAT, PCI_DEVICE_ID_REDHAT_PVPANIC),},
    20		{}
    21	};
  > 22	static unsigned int capability = PVPANIC_PANICKED | PVPANIC_CRASH_LOADED;
    23	static unsigned int events;
    24	
    25	static ssize_t capability_show(struct device *dev,
    26				       struct device_attribute *attr, char *buf)
    27	{
    28		return sysfs_emit(buf, "%x\n", capability);
    29	}
    30	static DEVICE_ATTR_RO(capability);
    31	
    32	static ssize_t events_show(struct device *dev,  struct device_attribute *attr, char *buf)
    33	{
    34		return sysfs_emit(buf, "%x\n", events);
    35	}
    36	
    37	static ssize_t events_store(struct device *dev,  struct device_attribute *attr,
    38				    const char *buf, size_t count)
    39	{
    40		unsigned int tmp;
    41		int err;
    42	
    43		err = kstrtouint(buf, 16, &tmp);
    44		if (err)
    45			return err;
    46	
    47		if ((tmp & capability) != tmp)
    48			return -EINVAL;
    49	
    50		events = tmp;
    51	
    52		pvpanic_set_events(base, events);
    53	
    54		return count;
    55	
    56	}
    57	static DEVICE_ATTR_RW(events);
    58	
    59	static struct attribute *pvpanic_pci_dev_attrs[] = {
    60		&dev_attr_capability.attr,
    61		&dev_attr_events.attr,
    62		NULL
    63	};
  > 64	ATTRIBUTE_GROUPS(pvpanici_pci_dev);
    65	
    66	static int pvpanic_pci_probe(struct pci_dev *pdev,
    67				     const struct pci_device_id *ent)
    68	{
    69		int ret;
    70		struct resource res;
    71	
    72		ret = pci_enable_device(pdev);
    73		if (ret < 0)
    74			return ret;
    75	
    76		base = pci_iomap(pdev, 0, 0);
    77		if (IS_ERR(base))
    78			return PTR_ERR(base);
    79	
    80		/* initlize capability by RDPT */
    81		capability &= ioread8(base);
    82		events = capability;
    83	
    84		return pvpanic_probe(base, capability);
    85	}
    86	
    87	static void pvpanic_pci_remove(struct pci_dev *pdev)
    88	{
    89		pvpanic_remove(base);
    90		iounmap(base);
    91		pci_disable_device(pdev);
    92	}
    93	
    94	static struct pci_driver pvpanic_pci_driver = {
    95		.name =         "pvpanic-pci",
    96		.id_table =     pvpanic_pci_id_tbl,
  > 97		.groups =       pvpanic_pci_dev_groups,
    98		.probe =        pvpanic_pci_probe,
    99		.remove =       pvpanic_pci_remove,
   100	};
   101	

---
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: 67479 bytes --]

      parent reply	other threads:[~2021-03-17  0:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 12:20 [PATCH v5] add support for pci in the pvpanic driver Mihai Carabas
2021-03-16 12:20 ` [PATCH v5 1/3] misc/pvpanic: split-up generic and platform dependent code Mihai Carabas
2021-03-16 16:44   ` Greg KH
2021-03-16 12:20 ` [PATCH v5 2/3] misc/pvpanic: probe multiple instances Mihai Carabas
2021-03-16 16:46   ` Greg KH
2021-03-16 12:20 ` [PATCH v5 3/3] misc/pvpanic: add PCI driver Mihai Carabas
2021-03-16 16:48   ` Greg KH
2021-03-16 17:08     ` Mihai Carabas
2021-03-16 17:29       ` Greg KH
2021-03-16 18:02         ` Mihai Carabas
2021-03-16 18:16           ` Greg KH
2021-03-17  0:02   ` 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=202103170722.w0s6ixQi-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=arnd@arndb.de \
    --cc=bobo.shaobowang@huawei.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mihai.carabas@oracle.com \
    --cc=rdunlap@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).