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 <[email protected]>

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/[email protected]

Attachment: .config.gz
Description: application/gzip

Reply via email to