Hi Rahul,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    
https://github.com/0day-ci/linux/commits/Rahul-Lakkireddy/fs-crashdd-add-API-to-collect-hardware-dump-in-second-kernel/20180324-193856
config: i386-randconfig-n0-201811 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   In file included from fs/crashdd/crashdd.c:8:0:
>> fs/crashdd/crashdd_internal.h:13:23: error: field 'bin_attr' has incomplete 
>> type
     struct bin_attribute bin_attr; /* Binary dump file's attributes */
                          ^~~~~~~~
   fs/crashdd/crashdd.c: In function 'crashdd_read':
>> fs/crashdd/crashdd.c:20:43: error: dereferencing pointer to incomplete type 
>> 'struct bin_attribute'
     struct crashdd_dump_node *dump = bin_attr->private;
                                              ^~
   fs/crashdd/crashdd.c: In function 'crashdd_mkdir':
>> fs/crashdd/crashdd.c:28:9: error: implicit declaration of function 
>> 'kobject_create_and_add'; did you mean 'proc_create_data'? 
>> [-Werror=implicit-function-declaration]
     return kobject_create_and_add(name, crashdd_kobj);
            ^~~~~~~~~~~~~~~~~~~~~~
            proc_create_data
>> fs/crashdd/crashdd.c:28:9: warning: return makes pointer from integer 
>> without a cast [-Wint-conversion]
     return kobject_create_and_add(name, crashdd_kobj);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/crashdd/crashdd.c: In function 'crashdd_add_file':
>> fs/crashdd/crashdd.c:40:9: error: implicit declaration of function 
>> 'sysfs_create_bin_file' [-Werror=implicit-function-declaration]
     return sysfs_create_bin_file(kobj, &dump->bin_attr);
            ^~~~~~~~~~~~~~~~~~~~~
   fs/crashdd/crashdd.c: In function 'crashdd_rmdir':
>> fs/crashdd/crashdd.c:45:2: error: implicit declaration of function 
>> 'kobject_put'; did you mean 'kref_put'? 
>> [-Werror=implicit-function-declaration]
     kobject_put(kobj);
     ^~~~~~~~~~~
     kref_put
   fs/crashdd/crashdd.c: In function 'crashdd_get_driver':
>> fs/crashdd/crashdd.c:102:25: error: dereferencing pointer to incomplete type 
>> 'struct kobject'
      if (!strcmp(node->kobj->name, name)) {
                            ^~
   fs/crashdd/crashdd.c: In function 'crashdd_init':
>> fs/crashdd/crashdd.c:228:51: error: 'kernel_kobj' undeclared (first use in 
>> this function); did you mean 'kernel_read'?
     crashdd_kobj = kobject_create_and_add("crashdd", kernel_kobj);
                                                      ^~~~~~~~~~~
                                                      kernel_read
   fs/crashdd/crashdd.c:228:51: note: each undeclared identifier is reported 
only once for each function it appears in
   fs/crashdd/crashdd.c: In function 'crashdd_add_file':
>> fs/crashdd/crashdd.c:41:1: warning: control reaches end of non-void function 
>> [-Wreturn-type]
    }
    ^
   cc1: some warnings being treated as errors

vim +/bin_attr +13 fs/crashdd/crashdd_internal.h

     6  
     7  /* Binary dump file's context internal to crashdd */
     8  struct crashdd_dump_node {
     9          /* Pointer to list of dumps under the driver sysfs entry */
    10          struct list_head list;
    11          void *buf;                     /* Buffer containing device's 
dump */
    12          unsigned long size;            /* Size of the buffer */
  > 13          struct bin_attribute bin_attr; /* Binary dump file's attributes 
*/
    14  };
    15  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to