git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
s390
/
kernel
/
debug.c
diff --git
a/arch/s390/kernel/debug.c
b/arch/s390/kernel/debug.c
index
896d39d
..
bb57bc0
100644
(file)
--- a/
arch/s390/kernel/debug.c
+++ b/
arch/s390/kernel/debug.c
@@
-10,7
+10,6
@@
* Bugreports to: <Linux390@de.ibm.com>
*/
* Bugreports to: <Linux390@de.ibm.com>
*/
-#include <linux/config.h>
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/errno.h>
@@
-192,28
+191,25
@@
debug_areas_alloc(int pages_per_area, int nr_areas)
debug_entry_t*** areas;
int i,j;
debug_entry_t*** areas;
int i,j;
- areas =
(debug_entry_t ***)
kmalloc(nr_areas *
+ areas = kmalloc(nr_areas *
sizeof(debug_entry_t**),
GFP_KERNEL);
if (!areas)
goto fail_malloc_areas;
for (i = 0; i < nr_areas; i++) {
sizeof(debug_entry_t**),
GFP_KERNEL);
if (!areas)
goto fail_malloc_areas;
for (i = 0; i < nr_areas; i++) {
- areas[i] =
(debug_entry_t**)
kmalloc(pages_per_area *
+ areas[i] = kmalloc(pages_per_area *
sizeof(debug_entry_t*),GFP_KERNEL);
if (!areas[i]) {
goto fail_malloc_areas2;
}
for(j = 0; j < pages_per_area; j++) {
sizeof(debug_entry_t*),GFP_KERNEL);
if (!areas[i]) {
goto fail_malloc_areas2;
}
for(j = 0; j < pages_per_area; j++) {
- areas[i][j] = (debug_entry_t*)kmalloc(PAGE_SIZE,
- GFP_KERNEL);
+ areas[i][j] = kzalloc(PAGE_SIZE, GFP_KERNEL);
if(!areas[i][j]) {
for(j--; j >=0 ; j--) {
kfree(areas[i][j]);
}
kfree(areas[i]);
goto fail_malloc_areas2;
if(!areas[i][j]) {
for(j--; j >=0 ; j--) {
kfree(areas[i][j]);
}
kfree(areas[i]);
goto fail_malloc_areas2;
- } else {
- memset(areas[i][j],0,PAGE_SIZE);
}
}
}
}
}
}
@@
-246,17
+242,15
@@
debug_info_alloc(char *name, int pages_per_area, int nr_areas, int buf_size,
/* alloc everything */
/* alloc everything */
- rc =
(debug_info_t*)
kmalloc(sizeof(debug_info_t), GFP_KERNEL);
+ rc = kmalloc(sizeof(debug_info_t), GFP_KERNEL);
if(!rc)
goto fail_malloc_rc;
if(!rc)
goto fail_malloc_rc;
- rc->active_entries =
(int*)kmalloc(nr_areas *
sizeof(int), GFP_KERNEL);
+ rc->active_entries =
kcalloc(nr_areas,
sizeof(int), GFP_KERNEL);
if(!rc->active_entries)
goto fail_malloc_active_entries;
if(!rc->active_entries)
goto fail_malloc_active_entries;
- memset(rc->active_entries, 0, nr_areas * sizeof(int));
- rc->active_pages = (int*)kmalloc(nr_areas * sizeof(int), GFP_KERNEL);
+ rc->active_pages = kcalloc(nr_areas, sizeof(int), GFP_KERNEL);
if(!rc->active_pages)
goto fail_malloc_active_pages;
if(!rc->active_pages)
goto fail_malloc_active_pages;
- memset(rc->active_pages, 0, nr_areas * sizeof(int));
if((mode == ALL_AREAS) && (pages_per_area != 0)){
rc->areas = debug_areas_alloc(pages_per_area, nr_areas);
if(!rc->areas)
if((mode == ALL_AREAS) && (pages_per_area != 0)){
rc->areas = debug_areas_alloc(pages_per_area, nr_areas);
if(!rc->areas)
@@
-609,13
+603,13
@@
debug_open(struct inode *inode, struct file *file)
debug_info_t *debug_info, *debug_info_snapshot;
down(&debug_lock);
debug_info_t *debug_info, *debug_info_snapshot;
down(&debug_lock);
- debug_info =
(struct debug_info*)file->f_dentry->d_inode->u.generic_ip
;
+ debug_info =
file->f_path.dentry->d_inode->i_private
;
/* find debug view */
for (i = 0; i < DEBUG_MAX_VIEWS; i++) {
if (!debug_info->views[i])
continue;
else if (debug_info->debugfs_entries[i] ==
/* find debug view */
for (i = 0; i < DEBUG_MAX_VIEWS; i++) {
if (!debug_info->views[i])
continue;
else if (debug_info->debugfs_entries[i] ==
- file->f_dentry) {
+ file->f_
path.
dentry) {
goto found; /* found view ! */
}
}
goto found; /* found view ! */
}
}
@@
-640,7
+634,7
@@
found:
rc = -ENOMEM;
goto out;
}
rc = -ENOMEM;
goto out;
}
- p_info =
(file_private_info_t *)
kmalloc(sizeof(file_private_info_t),
+ p_info = kmalloc(sizeof(file_private_info_t),
GFP_KERNEL);
if(!p_info){
if(debug_info_snapshot)
GFP_KERNEL);
if(!p_info){
if(debug_info_snapshot)