13/13 2.4.22-rc2 fix __FUNCTION__ warnings net/irda [7/7]
PATCH RESEND 1/1 13/13 2.4.22-rc2 fix __FUNCTION__ warnings net/irda [7/7]
Hi people,
this patch fix the warning: concatenation of string literals with __FUNCTION__ is deprecated
irda_device.c | 48 +++++++++++------------ irias_object.c | 35 ++++++++--------- irqueue.c | 10 ++-- irttp.c | 116 ++++++++++++++++++++++++++++----------------------------- parameters.c | 54 +++++++++++++------------- qos.c | 30 ++++++-------- wrapper.c | 25 +++++------- 7 files changed, 156 insertions(+), 162 deletions(-)
net/irda/irda_device.c +24 -24
@@ -174,7 +174,7 @@void irda_device_cleanup (void ) { -IRDA_DEBUG (4 , __FUNCTION__"()\n" ); +IRDA_DEBUG (4 ,"%s()\n" , __FUNCTION__);hashbin_delete (tasks, (FREE_FUNC ) __irda_task_delete);hashbin_delete (dongles,NULL );
@@ -190,7 +190,7 @@ {struct irlap_cb *self; -IRDA_DEBUG (4 , __FUNCTION__"(%s)\n" , status ?"TRUE" :"FALSE" ); +IRDA_DEBUG (4 ,"%s(%s)\n" , __FUNCTION__, status ?"TRUE" :"FALSE" ); self = (struct irlap_cb *) dev->atalk_ptr;
@@ -215,11 +215,11 @@struct if_irda_req req;int ret; -IRDA_DEBUG (2 , __FUNCTION__"()\n" ); +IRDA_DEBUG (2 ,"%s()\n" , __FUNCTION__);if (!dev->do_ioctl) { -ERROR (__FUNCTION__"(), do_ioctl not impl. by " -"device driver\n" ); +ERROR ("%s(), do_ioctl not impl. by device driver\n" , + __FUNCTION__);return -1 ; }
@@ -236,11 +236,11 @@struct if_irda_req req;int ret; -IRDA_DEBUG (2 , __FUNCTION__"()\n" ); +IRDA_DEBUG (2 ,"%s()\n" , __FUNCTION__);if (!dev->do_ioctl) { -ERROR (__FUNCTION__"(), do_ioctl not impl. by " -"device driver\n" ); +ERROR ("%s(), do_ioctl not impl. by device driver\n" , + __FUNCTION__);return -1 ; }
@@ -262,11 +262,11 @@struct if_irda_req req;int ret; -IRDA_DEBUG (2 , __FUNCTION__"()\n" ); +IRDA_DEBUG (2 ,"%s()\n" , __FUNCTION__);if (!dev->do_ioctl) { -ERROR (__FUNCTION__"(), do_ioctl not impl. by " -"device driver\n" ); +ERROR ("%s(), do_ioctl not impl. by device driver\n" , + __FUNCTION__);return -1 ; }
@@ -279,7 +279,7 @@void irda_task_next_state (struct irda_task *task,IRDA_TASK_STATE state) { -IRDA_DEBUG (2 , __FUNCTION__"(), state = %s\n" , task_state[state]); +IRDA_DEBUG (2 ,"%s(), state = %s\n" , __FUNCTION__, task_state[state]); task->state = state; }
@@ -313,7 +313,7 @@int count =0 ;int timeout; -IRDA_DEBUG (2 , __FUNCTION__"()\n" ); +IRDA_DEBUG (2 ,"%s()\n" , __FUNCTION__); ASSERT(task != NULL, return -1;); ASSERT(task->magic == IRDA_TASK_MAGIC, return -1;);
@@ -322,14 +322,14 @@do { timeout = task->function (task);if (count++ >100 ) { -ERROR (__FUNCTION__"(), error in task handler!\n" ); +ERROR ("%s(), error in task handler!\n" , __FUNCTION__);irda_task_delete (task);return TRUE; } }while ((timeout ==0 ) && (task->state !=IRDA_TASK_DONE ));if (timeout <0 ) { -ERROR (__FUNCTION__"(), Error executing task!\n" ); +ERROR ("%s(), Error executing task!\n" , __FUNCTION__);irda_task_delete (task);return TRUE; }
@@ -361,8 +361,8 @@ irda_task_timer_expired); finished = FALSE; }else { -IRDA_DEBUG (0 , __FUNCTION__ -"(), not finished, and no timeout!\n" ); +IRDA_DEBUG (0 ,"%s(), not finished, and no timeout!\n" , + __FUNCTION__); finished = FALSE; }
@@ -391,7 +391,7 @@struct irda_task *task;int ret; -IRDA_DEBUG (2 , __FUNCTION__"()\n" ); +IRDA_DEBUG (2 ,"%s()\n" , __FUNCTION__); task =kmalloc (sizeof (struct irda_task ),GFP_ATOMIC );if (!task)
@@ -428,7 +428,7 @@ {struct irda_task *task; -IRDA_DEBUG (2 , __FUNCTION__"()\n" ); +IRDA_DEBUG (2 ,"%s()\n" , __FUNCTION__); task = (struct irda_task *) data;
@@ -547,7 +547,7 @@ {/* Check if this dongle has been registred before */ if (hashbin_find (dongles, new->type,NULL )) { -MESSAGE (__FUNCTION__"(), Dongle already registered\n" ); +MESSAGE ("%s(), Dongle already registered\n" , __FUNCTION__);return 0 ; }
@@ -569,7 +569,7 @@ node =hashbin_remove (dongles, dongle->type,NULL );if (!node) { -ERROR (__FUNCTION__"(), dongle not found!\n" ); +ERROR ("%s(), dongle not found!\n" , __FUNCTION__);return ; } }
@@ -586,11 +586,11 @@struct if_irda_req req;int ret; -IRDA_DEBUG (0 , __FUNCTION__"()\n" ); +IRDA_DEBUG (0 ,"%s()\n" , __FUNCTION__);if (!dev->do_ioctl) { -ERROR (__FUNCTION__"(), set_raw_mode not impl. by " -"device driver\n" ); +ERROR ("%s(), set_raw_mode not impl. by device driver\n" , + __FUNCTION__);return -1 ; }
net/irda/irias_object.c +17 -18
@@ -59,7 +59,7 @@/* Allocate new string */ new_str =kmalloc (len +1 ,GFP_ATOMIC );if (new_str ==NULL ) { -WARNING (__FUNCTION__"(), Unable to kmalloc!\n" ); +WARNING ("%s(), Unable to kmalloc!\n" , __FUNCTION__);return NULL ; }
@@ -80,12 +80,12 @@ {struct ias_object *obj; -IRDA_DEBUG (4 , __FUNCTION__"()\n" ); +IRDA_DEBUG (4 ,"%s()\n" , __FUNCTION__); obj = (struct ias_object *)kmalloc (sizeof (struct ias_object ),GFP_ATOMIC );if (obj ==NULL ) { -IRDA_DEBUG (0 , __FUNCTION__"(), Unable to allocate object!\n" ); +IRDA_DEBUG (0 ,"%s(), Unable to allocate object!\n" , __FUNCTION__);return NULL ; }memset (obj,0 ,sizeof (struct ias_object ));
@@ -272,7 +272,7 @@/* Find object */ obj =hashbin_find (objects,0 , obj_name);if (obj ==NULL ) { -WARNING (__FUNCTION__"(), Unable to find object: %s\n" , +WARNING ("%s(), Unable to find object: %s\n" , __FUNCTION__, obj_name);return -1 ; }
@@ -280,14 +280,14 @@/* Find attribute */ attrib =hashbin_find (obj->attribs,0 , attrib_name);if (attrib ==NULL ) { -WARNING (__FUNCTION__"(), Unable to find attribute: %s\n" , +WARNING ("%s(), Unable to find attribute: %s\n" , __FUNCTION__, attrib_name);return -1 ; }if ( attrib->value->type != new_value->type) { -IRDA_DEBUG (0 , __FUNCTION__ -"(), changing value type not allowed!\n" ); +IRDA_DEBUG (0 ,"%s(), changing value type not allowed!\n" , + __FUNCTION__);return -1 ; }
@@ -319,7 +319,7 @@ attrib = (struct ias_attrib *)kmalloc (sizeof (struct ias_attrib ),GFP_ATOMIC );if (attrib ==NULL ) { -WARNING (__FUNCTION__"(), Unable to allocate attribute!\n" ); +WARNING ("%s(), Unable to allocate attribute!\n" , __FUNCTION__);return ; }memset (attrib,0 ,sizeof (struct ias_attrib ));
@@ -354,8 +354,7 @@ attrib = (struct ias_attrib *)kmalloc (sizeof (struct ias_attrib ),GFP_ATOMIC );if (attrib ==NULL ) { -WARNING (__FUNCTION__ -"(), Unable to allocate attribute!\n" ); +WARNING ("%s(), Unable to allocate attribute!\n" , __FUNCTION__);return ; }memset (attrib,0 ,sizeof (struct ias_attrib ));
@@ -388,7 +387,7 @@ attrib = (struct ias_attrib *)kmalloc (sizeof (struct ias_attrib ),GFP_ATOMIC );if (attrib ==NULL ) { -WARNING (__FUNCTION__"(), Unable to allocate attribute!\n" ); +WARNING ("%s(), Unable to allocate attribute!\n" , __FUNCTION__);return ; }memset (attrib,0 ,sizeof (struct ias_attrib ));
@@ -413,7 +412,7 @@ value =kmalloc (sizeof (struct ias_value ),GFP_ATOMIC );if (value ==NULL ) { -WARNING (__FUNCTION__"(), Unable to kmalloc!\n" ); +WARNING ("%s(), Unable to kmalloc!\n" , __FUNCTION__);return NULL ; }memset (value,0 ,sizeof (struct ias_value ));
@@ -438,7 +437,7 @@ value =kmalloc (sizeof (struct ias_value ),GFP_ATOMIC );if (value ==NULL ) { -WARNING (__FUNCTION__"(), Unable to kmalloc!\n" ); +WARNING ("%s(), Unable to kmalloc!\n" , __FUNCTION__);return NULL ; }memset ( value,0 ,sizeof (struct ias_value ));
@@ -465,7 +464,7 @@ value =kmalloc (sizeof (struct ias_value ),GFP_ATOMIC );if (value ==NULL ) { -WARNING (__FUNCTION__"(), Unable to kmalloc!\n" ); +WARNING ("%s(), Unable to kmalloc!\n" , __FUNCTION__);return NULL ; }memset (value,0 ,sizeof (struct ias_value ));
@@ -478,7 +477,7 @@ value->t.oct_seq =kmalloc (len,GFP_ATOMIC );if (value->t.oct_seq ==NULL ){ -WARNING (__FUNCTION__"(), Unable to kmalloc!\n" ); +WARNING ("%s(), Unable to kmalloc!\n" , __FUNCTION__);kfree (value);return NULL ; }
@@ -492,7 +491,7 @@ value =kmalloc (sizeof (struct ias_value ),GFP_ATOMIC );if (value ==NULL ) { -WARNING (__FUNCTION__"(), Unable to kmalloc!\n" ); +WARNING ("%s(), Unable to kmalloc!\n" , __FUNCTION__);return NULL ; }memset (value,0 ,sizeof (struct ias_value ));
@@ -511,7 +510,7 @@*/ void irias_delete_value (struct ias_value *value) { -IRDA_DEBUG (4 , __FUNCTION__"()\n" ); +IRDA_DEBUG (4 ,"%s()\n" , __FUNCTION__); ASSERT(value != NULL, return;);
@@ -531,7 +530,7 @@kfree (value->t.oct_seq);break ;default : -IRDA_DEBUG (0 , __FUNCTION__"(), Unknown value type!\n" ); +IRDA_DEBUG (0 ,"%s(), Unknown value type!\n" , __FUNCTION__);break ; }kfree (value);
net/irda/irqueue.c +5 -5
@@ -154,7 +154,7 @@unsigned long flags =0 ;int bin; -IRDA_DEBUG (4 , __FUNCTION__"()\n" ); +IRDA_DEBUG (4 ,"%s()\n" , __FUNCTION__); ASSERT( hashbin != NULL, return;); ASSERT( hashbin->magic == HB_MAGIC, return;);
@@ -308,7 +308,7 @@unsigned long flags =0 ;irda_queue_t * entry; -IRDA_DEBUG (4 , __FUNCTION__"()\n" ); +IRDA_DEBUG (4 ,"%s()\n" , __FUNCTION__); ASSERT( hashbin != NULL, return NULL;); ASSERT( hashbin->magic == HB_MAGIC, return NULL;);
@@ -407,7 +407,7 @@int bin;__u32 hashv; -IRDA_DEBUG (4 , __FUNCTION__"()\n" ); +IRDA_DEBUG (4 ,"%s()\n" , __FUNCTION__); ASSERT( hashbin != NULL, return NULL;); ASSERT( hashbin->magic == HB_MAGIC, return NULL;);
@@ -553,7 +553,7 @@*/ static void __enqueue_last (irda_queue_t **queue,irda_queue_t * element) { -IRDA_DEBUG (4 , __FUNCTION__"()\n" ); +IRDA_DEBUG (4 ,"%s()\n" , __FUNCTION__);/* * Check if queue is empty.
@@ -596,7 +596,7 @@void enqueue_first (irda_queue_t **queue,irda_queue_t * element) { -IRDA_DEBUG (4 , __FUNCTION__"()\n" ); +IRDA_DEBUG (4 ,"%s()\n" , __FUNCTION__);/* * Check if queue is empty.
net/irda/irttp.c +58 -58
414 lines not on this page · raw message
net/irda/parameters.c +27 -27
156 lines not on this page · raw message
net/irda/qos.c +13 -17
@@ -348,7 +348,7 @@__u32 line_capacity;int index; -IRDA_DEBUG (2 , __FUNCTION__"()\n" ); +IRDA_DEBUG (2 ,"%s()\n" , __FUNCTION__);/* * Make sure the mintt is sensible.
@@ -374,9 +374,8 @@if ((qos->baud_rate.value <115200 ) && (qos->max_turn_time.value <500 )) { -IRDA_DEBUG (0 , __FUNCTION__ -"(), adjusting max turn time from %d to 500 ms\n" , - qos->max_turn_time.value); +IRDA_DEBUG (0 ,"%s(), adjusting max turn time from %d to 500 ms\n" , + __FUNCTION__, qos->max_turn_time.value); qos->max_turn_time.value =500 ; }
@@ -391,8 +390,7 @@#ifdef CONFIG_IRDA_DYNAMIC_WINDOW while ((qos->data_size.value > line_capacity) && (index >0 )) { qos->data_size.value = data_sizes[index--]; -IRDA_DEBUG (2 , __FUNCTION__ -"(), reducing data size to %d\n" , +IRDA_DEBUG (2 ,"%s(), reducing data size to %d\n" , __FUNCTION__, qos->data_size.value); }#else /* Use method described in section 6.6.11 of IrLAP */
@@ -402,16 +400,14 @@/* Must be able to send at least one frame */ if (qos->window_size.value >1 ) { qos->window_size.value--; -IRDA_DEBUG (2 , __FUNCTION__ -"(), reducing window size to %d\n" , - qos->window_size.value); +IRDA_DEBUG (2 ,"%s(), reducing window size to %d\n" , + __FUNCTION__, qos->window_size.value); }else if (index >1 ) { qos->data_size.value = data_sizes[index--]; -IRDA_DEBUG (2 , __FUNCTION__ -"(), reducing data size to %d\n" , - qos->data_size.value); +IRDA_DEBUG (2 ,"%s(), reducing data size to %d\n" , + __FUNCTION__, qos->data_size.value); }else { -WARNING (__FUNCTION__"(), nothing more we can do!\n" ); +WARNING ("%s(), nothing more we can do!\n" , __FUNCTION__); } }#endif /* CONFIG_IRDA_DYNAMIC_WINDOW */
@@ -545,7 +541,7 @@if (get) { param->pv.i = self->qos_rx.baud_rate.bits; -IRDA_DEBUG (2 , __FUNCTION__"(), baud rate = 0x%02x\n" , +IRDA_DEBUG (2 ,"%s(), baud rate = 0x%02x\n" , __FUNCTION__, param->pv.i); }else {/*
@@ -718,7 +714,7 @@__u32 line_capacity;int i,j; -IRDA_DEBUG (2 , __FUNCTION__"(), speed=%d, max_turn_time=%d\n" , +IRDA_DEBUG (2 ,"%s(), speed=%d, max_turn_time=%d\n" , __FUNCTION__, speed, max_turn_time); i =value_index (speed, baud_rates,10 );
@@ -729,7 +725,7 @@ line_capacity = max_line_capacities[i][j]; -IRDA_DEBUG (2 , __FUNCTION__"(), line capacity=%d bytes\n" , +IRDA_DEBUG (2 ,"%s(), line capacity=%d bytes\n" , __FUNCTION__, line_capacity);return line_capacity;
@@ -743,7 +739,7 @@irlap_min_turn_time_in_bytes (qos->baud_rate.value, qos->min_turn_time.value); -IRDA_DEBUG (2 , __FUNCTION__"(), requested line capacity=%d\n" , +IRDA_DEBUG (2 ,"%s(), requested line capacity=%d\n" , __FUNCTION__, line_capacity);return line_capacity;
net/irda/wrapper.c +12 -13
@@ -93,16 +93,16 @@* Nothing to worry about, but we set the default number of * BOF's */ -IRDA_DEBUG (1 , __FUNCTION__"(), wrong magic in skb!\n" ); +IRDA_DEBUG (1 ,"%s(), wrong magic in skb!\n" , __FUNCTION__); xbofs =10 ; }else xbofs = cb->xbofs + cb->xbofs_delay; -IRDA_DEBUG (4 , __FUNCTION__"(), xbofs=%d\n" , xbofs); +IRDA_DEBUG (4 ,"%s(), xbofs=%d\n" , __FUNCTION__, xbofs);/* Check that we never use more than 115 + 48 xbofs */ if (xbofs >163 ) { -IRDA_DEBUG (0 , __FUNCTION__"(), too many xbofs (%d)\n" , xbofs); +IRDA_DEBUG (0 ,"%s(), too many xbofs (%d)\n" , __FUNCTION__, xbofs); xbofs =163 ; }
@@ -265,7 +265,7 @@case EOF :/* Abort frame */ rx_buff->state =OUTSIDE_FRAME ; -IRDA_DEBUG (1 , __FUNCTION__"(), abort frame\n" ); +IRDA_DEBUG (1 ,"%s(), abort frame\n" , __FUNCTION__); stats->rx_errors++; stats->rx_frame_errors++;break ;
@@ -289,13 +289,13 @@ {switch (byte) {case BOF :/* New frame? */ -IRDA_DEBUG (1 , __FUNCTION__ -"(), Discarding incomplete frame\n" ); +IRDA_DEBUG (1 ,"%s(), Discarding incomplete frame\n" , + __FUNCTION__); rx_buff->state =BEGIN_FRAME ;irda_device_set_media_busy (dev, TRUE);break ;case CE : -WARNING (__FUNCTION__"(), state not defined\n" ); +WARNING ("%s(), state not defined\n" , __FUNCTION__);break ;case EOF :/* Abort frame */ rx_buff->state =OUTSIDE_FRAME ;
@@ -311,7 +311,7 @@ rx_buff->fcs =irda_fcs (rx_buff->fcs, byte); rx_buff->state =INSIDE_FRAME ; }else { -IRDA_DEBUG (1 , __FUNCTION__"(), rx buffer overflow\n" ); +IRDA_DEBUG (1 ,"%s(), rx buffer overflow\n" , __FUNCTION__); rx_buff->state =OUTSIDE_FRAME ; }break ;
@@ -332,8 +332,7 @@switch (byte) {case BOF :/* New frame? */ -IRDA_DEBUG (1 , __FUNCTION__ -"(), Discarding incomplete frame\n" ); +IRDA_DEBUG (1 ,"%s(), Discarding incomplete frame\n" , __FUNCTION__); rx_buff->state =BEGIN_FRAME ;irda_device_set_media_busy (dev, TRUE);break ;
@@ -354,7 +353,7 @@/* Wrong CRC, discard frame! */ irda_device_set_media_busy (dev, TRUE); -IRDA_DEBUG (1 , __FUNCTION__"(), crc error\n" ); +IRDA_DEBUG (1 ,"%s(), crc error\n" , __FUNCTION__); stats->rx_errors++; stats->rx_crc_errors++; }
@@ -364,8 +363,8 @@ rx_buff->data[rx_buff->len++] = byte; rx_buff->fcs =irda_fcs (rx_buff->fcs, byte); }else { -IRDA_DEBUG (1 , __FUNCTION__ -"(), Rx buffer overflow, aborting\n" ); +IRDA_DEBUG (1 ,"%s(), Rx buffer overflow, aborting\n" , + __FUNCTION__); rx_buff->state =OUTSIDE_FRAME ; }break ;
ciao,
djgera
Signature · 4 lines
Gerardo Exequiel Pozzi ( djgera ) http://www.vmlinuz.com.ar http://www.djgera.com.ar KeyID: 0x1B8C330D Key fingerprint = 0CAA D5D4 CD85 4434 A219 76ED 39AB 221B 1B8C 330D