block: genhd errors when CONFIG_PROC_FS=n
Subsystems (2)
PATCH 1/1 block: genhd errors when CONFIG_PROC_FS=n
From: Randy Dunlap <[email protected]>
block/genhd.c has build errors when CONFIG_PROC_FS=n, so omit some of its functions in that case.
/local/linsrc/linux-next-20080523/block/genhd.c: In function 'diskstats_start':
/local/linsrc/linux-next-20080523/block/genhd.c:555: error: 'find_start' undeclared (first use in this function) /local/linsrc/linux-next-20080523/block/genhd.c:555: error: (Each undeclared identifier is reported only once /local/linsrc/linux-next-20080523/block/genhd.c:555: error: for each function it appears in.) make[2]: *** [block/genhd.o] Error 1
--- block/genhd.c | 2 ++ 1 file changed, 2 insertions(+)
block/genhd.c +2 -0
@@ -539,6 +539,7 @@ static struct device_type disk_type = { .release = disk_release, }; +#ifdef CONFIG_PROC_FS /* * aggregate disk stat collector. Uses the same stats that the sysfs * entries do, above, but makes them available through one seq_file.
@@ -644,6 +645,7 @@ const struct seq_operations diskstats_op .stop = diskstats_stop, .show = diskstats_show }; +#endif /* CONFIG_PROC_FS */ static void media_change_notify_thread (struct work_struct *work) {
Quoted 27 lines · On Fri, 23 May 2008 09:44:11 -0700 Randy Dunlap <[email protected]> wrote:
From: Randy Dunlap <[email protected]>
block/genhd.chas build errors whenCONFIG_PROC_FS=n, so omit some of its functions in that case./local/linsrc/linux-next-20080523/block/genhd.c: In function '
diskstats_start':
/local/linsrc/linux-next-20080523/block/genhd.c:555: error: 'find_start' undeclared (first use in this function) /local/linsrc/linux-next-20080523/block/genhd.c:555: error: (Each undeclared identifier is reported only once /local/linsrc/linux-next-20080523/block/genhd.c:555: error: for each function it appears in.) make[2]: *** [block/genhd.o] Error 1Signed-off-by Randy Dunlap <[email protected]>--- block/genhd.c | 2 ++ 1 file changed, 2 insertions(+)block/genhd.c +1
-0@@ -539,6 +539,7 @@ static struct device_type disk_type = { .release = disk_release, }; +#ifdef CONFIG_PROC_FS /* * aggregate disk stat collector. Uses the same stats that the sysfs * entries do, above, but makes them available through one seq_file.
block/genhd.c const struct seq_operations diskstats_op · line 651
Quoted 7 lines
block/genhd.c +1
-0@@ -644,6 +645,7 @@ const struct seq_operations diskstats_op .stop = diskstats_stop, .show = diskstats_show }; +#endif /* CONFIG_PROC_FS */ static void media_change_notify_thread (struct work_struct *work) {
This is a fix against
commit ce8568d9535b4756ea304a97ea803314ce895d3c
Author: Greg Kroah-Hartman <[email protected]> Date: Thu May 22 17:21:08 2008 -0400
block: make proc files seq_start use the class_find_device()
Use the proper class iterator function instead of mucking around in the internals of the class structures.
Quoted 43 lines · Andrew Morton
Quoted 27 lines · On Fri, 23 May 2008 09:44:11 -0700 Randy Dunlap <[email protected]> wrote:
From: Randy Dunlap <[email protected]>
block/genhd.chas build errors whenCONFIG_PROC_FS=n, so omit some of its functions in that case./local/linsrc/linux-next-20080523/block/genhd.c: In function '
diskstats_start':
/local/linsrc/linux-next-20080523/block/genhd.c:555: error: 'find_start' undeclared (first use in this function) /local/linsrc/linux-next-20080523/block/genhd.c:555: error: (Each undeclared identifier is reported only once /local/linsrc/linux-next-20080523/block/genhd.c:555: error: for each function it appears in.) make[2]: *** [block/genhd.o] Error 1Signed-off-by Randy Dunlap <[email protected]>--- block/genhd.c | 2 ++ 1 file changed, 2 insertions(+)block/genhd.c +1
-0@@ -539,6 +539,7 @@ static struct device_type disk_type = { .release = disk_release, }; +#ifdef CONFIG_PROC_FS /* * aggregate disk stat collector. Uses the same stats that the sysfs * entries do, above, but makes them available through one seq_file. block/genhd.c const struct seq_operations diskstats_op · line 651
Quoted 7 lines
block/genhd.c +1
-0@@ -644,6 +645,7 @@ const struct seq_operations diskstats_op .stop = diskstats_stop, .show = diskstats_show }; +#endif /* CONFIG_PROC_FS */ static void media_change_notify_thread (struct work_struct *work) {This is a fix against
commit
ce8568d9535b4756ea304a97ea803314ce895d3cAuthor: Greg Kroah-Hartman <[email protected]> Date: Thu May 22 17:21:08 2008 -0400
Quoted 7 lines
block: make proc files
seq_startuse theclass_find_device()Use the proper class iterator function instead of mucking around in the internals of the class structures.
Cc Kay Sievers <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
Yeah, sorry, missed that first time around, just added it to my tree about an hour ago and sent out a response to Randy about it :)
thanks,
greg k-h
Quoted 6 lines · On Tue, 27 May 2008 22:20:36 -0700 Andrew Morton <[email protected]>…
This is a fix against
commit
ce8568d9535b4756ea304a97ea803314ce895d3cAuthor: Greg Kroah-Hartman <[email protected]> Date: Thu May 22 17:21:08 2008 -0400
Yeah, Greg has added it to his series for tomorrow and I have added it to the end of linux-next for today.
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/