Commit 67b5d6ea authored by Martin Dalecki's avatar Martin Dalecki Committed by Linus Torvalds

[PATCH] kill warnings 11/19

irias_object missused __FUNCTION__ too.
parent 3e9048cd
...@@ -59,7 +59,7 @@ char *strndup(char *str, int max) ...@@ -59,7 +59,7 @@ char *strndup(char *str, int max)
/* Allocate new string */ /* Allocate new string */
new_str = kmalloc(len + 1, GFP_ATOMIC); new_str = kmalloc(len + 1, GFP_ATOMIC);
if (new_str == NULL) { if (new_str == NULL) {
WARNING(__FUNCTION__"(), Unable to kmalloc!\n"); WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
return NULL; return NULL;
} }
...@@ -272,7 +272,7 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name, ...@@ -272,7 +272,7 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name,
/* Find object */ /* Find object */
obj = hashbin_find(objects, 0, obj_name); obj = hashbin_find(objects, 0, obj_name);
if (obj == NULL) { if (obj == NULL) {
WARNING(__FUNCTION__ "(), Unable to find object: %s\n", WARNING("%s: Unable to find object: %s\n", __FUNCTION__,
obj_name); obj_name);
return -1; return -1;
} }
...@@ -280,7 +280,7 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name, ...@@ -280,7 +280,7 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name,
/* Find attribute */ /* Find attribute */
attrib = hashbin_find(obj->attribs, 0, attrib_name); attrib = hashbin_find(obj->attribs, 0, attrib_name);
if (attrib == NULL) { if (attrib == NULL) {
WARNING(__FUNCTION__ "(), Unable to find attribute: %s\n", WARNING("%s: Unable to find attribute: %s\n", __FUNCTION__,
attrib_name); attrib_name);
return -1; return -1;
} }
...@@ -319,7 +319,7 @@ void irias_add_integer_attrib(struct ias_object *obj, char *name, int value, ...@@ -319,7 +319,7 @@ void irias_add_integer_attrib(struct ias_object *obj, char *name, int value,
attrib = (struct ias_attrib *) kmalloc(sizeof(struct ias_attrib), attrib = (struct ias_attrib *) kmalloc(sizeof(struct ias_attrib),
GFP_ATOMIC); GFP_ATOMIC);
if (attrib == NULL) { if (attrib == NULL) {
WARNING(__FUNCTION__ "(), Unable to allocate attribute!\n"); WARNING("%s: Unable to allocate attribute!\n", __FUNCTION__);
return; return;
} }
memset(attrib, 0, sizeof( struct ias_attrib)); memset(attrib, 0, sizeof( struct ias_attrib));
...@@ -354,8 +354,7 @@ void irias_add_octseq_attrib(struct ias_object *obj, char *name, __u8 *octets, ...@@ -354,8 +354,7 @@ void irias_add_octseq_attrib(struct ias_object *obj, char *name, __u8 *octets,
attrib = (struct ias_attrib *) kmalloc(sizeof(struct ias_attrib), attrib = (struct ias_attrib *) kmalloc(sizeof(struct ias_attrib),
GFP_ATOMIC); GFP_ATOMIC);
if (attrib == NULL) { if (attrib == NULL) {
WARNING(__FUNCTION__ WARNING("%s: Unable to allocate attribute!\n", __FUNCTION__);
"(), Unable to allocate attribute!\n");
return; return;
} }
memset(attrib, 0, sizeof( struct ias_attrib)); memset(attrib, 0, sizeof( struct ias_attrib));
...@@ -388,7 +387,7 @@ void irias_add_string_attrib(struct ias_object *obj, char *name, char *value, ...@@ -388,7 +387,7 @@ void irias_add_string_attrib(struct ias_object *obj, char *name, char *value,
attrib = (struct ias_attrib *) kmalloc(sizeof( struct ias_attrib), attrib = (struct ias_attrib *) kmalloc(sizeof( struct ias_attrib),
GFP_ATOMIC); GFP_ATOMIC);
if (attrib == NULL) { if (attrib == NULL) {
WARNING(__FUNCTION__ "(), Unable to allocate attribute!\n"); WARNING("%s: Unable to allocate attribute!\n", __FUNCTION__);
return; return;
} }
memset(attrib, 0, sizeof( struct ias_attrib)); memset(attrib, 0, sizeof( struct ias_attrib));
...@@ -413,7 +412,7 @@ struct ias_value *irias_new_integer_value(int integer) ...@@ -413,7 +412,7 @@ struct ias_value *irias_new_integer_value(int integer)
value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC); value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC);
if (value == NULL) { if (value == NULL) {
WARNING(__FUNCTION__ "(), Unable to kmalloc!\n"); WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
return NULL; return NULL;
} }
memset(value, 0, sizeof(struct ias_value)); memset(value, 0, sizeof(struct ias_value));
...@@ -438,7 +437,7 @@ struct ias_value *irias_new_string_value(char *string) ...@@ -438,7 +437,7 @@ struct ias_value *irias_new_string_value(char *string)
value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC); value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC);
if (value == NULL) { if (value == NULL) {
WARNING(__FUNCTION__ "(), Unable to kmalloc!\n"); WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
return NULL; return NULL;
} }
memset( value, 0, sizeof( struct ias_value)); memset( value, 0, sizeof( struct ias_value));
...@@ -465,7 +464,7 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len) ...@@ -465,7 +464,7 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len)
value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC); value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC);
if (value == NULL) { if (value == NULL) {
WARNING(__FUNCTION__ "(), Unable to kmalloc!\n"); WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
return NULL; return NULL;
} }
memset(value, 0, sizeof(struct ias_value)); memset(value, 0, sizeof(struct ias_value));
...@@ -478,7 +477,7 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len) ...@@ -478,7 +477,7 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len)
value->t.oct_seq = kmalloc(len, GFP_ATOMIC); value->t.oct_seq = kmalloc(len, GFP_ATOMIC);
if (value->t.oct_seq == NULL){ if (value->t.oct_seq == NULL){
WARNING(__FUNCTION__"(), Unable to kmalloc!\n"); WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
kfree(value); kfree(value);
return NULL; return NULL;
} }
...@@ -492,7 +491,7 @@ struct ias_value *irias_new_missing_value(void) ...@@ -492,7 +491,7 @@ struct ias_value *irias_new_missing_value(void)
value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC); value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC);
if (value == NULL) { if (value == NULL) {
WARNING(__FUNCTION__ "(), Unable to kmalloc!\n"); WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
return NULL; return NULL;
} }
memset(value, 0, sizeof(struct ias_value)); memset(value, 0, sizeof(struct ias_value));
...@@ -536,6 +535,3 @@ void irias_delete_value(struct ias_value *value) ...@@ -536,6 +535,3 @@ void irias_delete_value(struct ias_value *value)
} }
kfree(value); kfree(value);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment