From: kbuild test robot <lkp@intel.com>
To: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Cc: kbuild-all@01.org, netdev@vger.kernel.org,
linux-fsdevel@vger.kernel.org, kexec@lists.infradead.org,
linux-kernel@vger.kernel.org, davem@davemloft.net,
viro@zeniv.linux.org.uk, ebiederm@xmission.com,
stephen@networkplumber.org, akpm@linux-foundation.org,
torvalds@linux-foundation.org, ganeshgr@chelsio.com,
nirranjan@chelsio.com, indranil@chelsio.com,
Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Subject: Re: [PATCH net-next 1/2] fs/crashdd: add API to collect hardware dump in second kernel
Date: Sat, 24 Mar 2018 20:29:00 +0800 [thread overview]
Message-ID: <201803242014.2zYLK1Sn%fengguang.wu@intel.com> (raw)
In-Reply-To: <f0c38b01859cc6abf32201764311dd48123399c9.1521793455.git.rahul.lakkireddy@chelsio.com>
[-- Attachment #1: Type: text/plain, Size: 4322 bytes --]
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-s0-201811 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (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' [-Werror=implicit-function-declaration]
return kobject_create_and_add(name, crashdd_kobj);
^~~~~~~~~~~~~~~~~~~~~~
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' [-Werror=implicit-function-declaration]
kobject_put(kobj);
^~~~~~~~~~~
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)
crashdd_kobj = kobject_create_and_add("crashdd", kernel_kobj);
^~~~~~~~~~~
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 +/kobject_create_and_add +28 fs/crashdd/crashdd.c
7
> 8 #include "crashdd_internal.h"
9
10 static LIST_HEAD(crashdd_list);
11 static DEFINE_MUTEX(crashdd_mutex);
12
13 #define CRASHDD_SYSFS_MODE 444 /* S_IRUGO */
14 static struct kobject *crashdd_kobj;
15
16 static ssize_t crashdd_read(struct file *filp, struct kobject *kobj,
17 struct bin_attribute *bin_attr,
18 char *buf, loff_t fpos, size_t count)
19 {
20 struct crashdd_dump_node *dump = bin_attr->private;
21
22 memcpy(buf, dump->buf + fpos, count);
23 return count;
24 }
25
26 static struct kobject *crashdd_mkdir(const char *name)
27 {
> 28 return kobject_create_and_add(name, crashdd_kobj);
29 }
30
31 static int crashdd_add_file(struct kobject *kobj, const char *name,
32 struct crashdd_dump_node *dump)
33 {
34 dump->bin_attr.attr.name = name;
35 dump->bin_attr.attr.mode = CRASHDD_SYSFS_MODE;
36 dump->bin_attr.size = dump->size;
37 dump->bin_attr.read = crashdd_read;
38 dump->bin_attr.private = dump;
39
40 return sysfs_create_bin_file(kobj, &dump->bin_attr);
41 }
42
43 static void crashdd_rmdir(struct kobject *kobj)
44 {
> 45 kobject_put(kobj);
46 }
47
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28489 bytes --]
next prev parent reply other threads:[~2018-03-24 12:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-23 8:30 [PATCH net-next 0/2] kernel: add support to collect hardware logs in crash recovery kernel Rahul Lakkireddy
[not found] ` <cover.1521793455.git.rahul.lakkireddy-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2018-03-23 8:31 ` [PATCH net-next 1/2] fs/crashdd: add API to collect hardware dump in second kernel Rahul Lakkireddy
2018-03-24 12:29 ` kbuild test robot [this message]
2018-03-24 12:42 ` kbuild test robot
2018-03-23 8:31 ` [PATCH net-next 2/2] cxgb4: " Rahul Lakkireddy
2018-03-23 12:46 ` [PATCH net-next 0/2] kernel: add support to collect hardware logs in crash recovery kernel Andrew Lunn
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=201803242014.2zYLK1Sn%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=ganeshgr@chelsio.com \
--cc=indranil@chelsio.com \
--cc=kbuild-all@01.org \
--cc=kexec@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nirranjan@chelsio.com \
--cc=rahul.lakkireddy@chelsio.com \
--cc=stephen@networkplumber.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/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).