From: Jesper Juhl [resending this as it didn't seem to reach LKML on the first try - sorry if you recieve it twice] Remove redundant casts of k*alloc() return values in security/selinux/ss/services.c Signed-off-by: Jesper Juhl Cc: Stephen Smalley Cc: James Morris Signed-off-by: Andrew Morton --- security/selinux/ss/services.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff -puN security/selinux/ss/services.c~selinux-remove-unneeded-kalloc-return-value-casts security/selinux/ss/services.c --- devel/security/selinux/ss/services.c~selinux-remove-unneeded-kalloc-return-value-casts 2005-12-12 01:22:54.000000000 -0800 +++ devel-akpm/security/selinux/ss/services.c 2005-12-12 01:22:54.000000000 -0800 @@ -1712,11 +1712,11 @@ int security_get_bools(int *len, char ** goto out; } - *names = (char**)kcalloc(*len, sizeof(char*), GFP_ATOMIC); + *names = kcalloc(*len, sizeof(char*), GFP_ATOMIC); if (!*names) goto err; - *values = (int*)kcalloc(*len, sizeof(int), GFP_ATOMIC); + *values = kcalloc(*len, sizeof(int), GFP_ATOMIC); if (!*values) goto err; @@ -1724,7 +1724,7 @@ int security_get_bools(int *len, char ** size_t name_len; (*values)[i] = policydb.bool_val_to_struct[i]->state; name_len = strlen(policydb.p_bool_val_to_name[i]) + 1; - (*names)[i] = (char*)kmalloc(sizeof(char) * name_len, GFP_ATOMIC); + (*names)[i] = kmalloc(sizeof(char) * name_len, GFP_ATOMIC); if (!(*names)[i]) goto err; strncpy((*names)[i], policydb.p_bool_val_to_name[i], name_len); _