aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda/parameters.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-03-05 23:47:47 -0500
committerDavid S. Miller <davem@davemloft.net>2008-03-05 23:47:47 -0500
commit0dc47877a3de00ceadea0005189656ae8dc52669 (patch)
tree7440a87385fe318cb42f0ae161be195f5e967d82 /net/irda/parameters.c
parent6387c4bed539539b05fa773cf2ff26529dc3074c (diff)
net: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda/parameters.c')
-rw-r--r--net/irda/parameters.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/net/irda/parameters.c b/net/irda/parameters.c
index 722bbe044d9c..fc1a20565e2d 100644
--- a/net/irda/parameters.c
+++ b/net/irda/parameters.c
@@ -148,23 +148,23 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
148 */ 148 */
149 if (p.pl == 0) { 149 if (p.pl == 0) {
150 if (p.pv.i < 0xff) { 150 if (p.pv.i < 0xff) {
151 IRDA_DEBUG(2, "%s(), using 1 byte\n", __FUNCTION__); 151 IRDA_DEBUG(2, "%s(), using 1 byte\n", __func__);
152 p.pl = 1; 152 p.pl = 1;
153 } else if (p.pv.i < 0xffff) { 153 } else if (p.pv.i < 0xffff) {
154 IRDA_DEBUG(2, "%s(), using 2 bytes\n", __FUNCTION__); 154 IRDA_DEBUG(2, "%s(), using 2 bytes\n", __func__);
155 p.pl = 2; 155 p.pl = 2;
156 } else { 156 } else {
157 IRDA_DEBUG(2, "%s(), using 4 bytes\n", __FUNCTION__); 157 IRDA_DEBUG(2, "%s(), using 4 bytes\n", __func__);
158 p.pl = 4; /* Default length */ 158 p.pl = 4; /* Default length */
159 } 159 }
160 } 160 }
161 /* Check if buffer is long enough for insertion */ 161 /* Check if buffer is long enough for insertion */
162 if (len < (2+p.pl)) { 162 if (len < (2+p.pl)) {
163 IRDA_WARNING("%s: buffer too short for insertion!\n", 163 IRDA_WARNING("%s: buffer too short for insertion!\n",
164 __FUNCTION__); 164 __func__);
165 return -1; 165 return -1;
166 } 166 }
167 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __FUNCTION__, 167 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __func__,
168 p.pi, p.pl, p.pv.i); 168 p.pi, p.pl, p.pv.i);
169 switch (p.pl) { 169 switch (p.pl) {
170 case 1: 170 case 1:
@@ -187,7 +187,7 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
187 break; 187 break;
188 default: 188 default:
189 IRDA_WARNING("%s: length %d not supported\n", 189 IRDA_WARNING("%s: length %d not supported\n",
190 __FUNCTION__, p.pl); 190 __func__, p.pl);
191 /* Skip parameter */ 191 /* Skip parameter */
192 return -1; 192 return -1;
193 } 193 }
@@ -218,7 +218,7 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
218 if (len < (2+p.pl)) { 218 if (len < (2+p.pl)) {
219 IRDA_WARNING("%s: buffer too short for parsing! " 219 IRDA_WARNING("%s: buffer too short for parsing! "
220 "Need %d bytes, but len is only %d\n", 220 "Need %d bytes, but len is only %d\n",
221 __FUNCTION__, p.pl, len); 221 __func__, p.pl, len);
222 return -1; 222 return -1;
223 } 223 }
224 224
@@ -230,7 +230,7 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
230 if (((type & PV_MASK) != PV_INTEGER) && ((type & PV_MASK) != p.pl)) { 230 if (((type & PV_MASK) != PV_INTEGER) && ((type & PV_MASK) != p.pl)) {
231 IRDA_ERROR("%s: invalid parameter length! " 231 IRDA_ERROR("%s: invalid parameter length! "
232 "Expected %d bytes, but value had %d bytes!\n", 232 "Expected %d bytes, but value had %d bytes!\n",
233 __FUNCTION__, type & PV_MASK, p.pl); 233 __func__, type & PV_MASK, p.pl);
234 234
235 /* Most parameters are bit/byte fields or little endian, 235 /* Most parameters are bit/byte fields or little endian,
236 * so it's ok to only extract a subset of it (the subset 236 * so it's ok to only extract a subset of it (the subset
@@ -268,13 +268,13 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
268 break; 268 break;
269 default: 269 default:
270 IRDA_WARNING("%s: length %d not supported\n", 270 IRDA_WARNING("%s: length %d not supported\n",
271 __FUNCTION__, p.pl); 271 __func__, p.pl);
272 272
273 /* Skip parameter */ 273 /* Skip parameter */
274 return p.pl+2; 274 return p.pl+2;
275 } 275 }
276 276
277 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __FUNCTION__, 277 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __func__,
278 p.pi, p.pl, p.pv.i); 278 p.pi, p.pl, p.pv.i);
279 /* Call handler for this parameter */ 279 /* Call handler for this parameter */
280 err = (*func)(self, &p, PV_PUT); 280 err = (*func)(self, &p, PV_PUT);
@@ -294,19 +294,19 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
294 irda_param_t p; 294 irda_param_t p;
295 int err; 295 int err;
296 296
297 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 297 IRDA_DEBUG(2, "%s()\n", __func__);
298 298
299 p.pi = pi; /* In case handler needs to know */ 299 p.pi = pi; /* In case handler needs to know */
300 p.pl = buf[1]; /* Extract length of value */ 300 p.pl = buf[1]; /* Extract length of value */
301 301
302 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d\n", __FUNCTION__, 302 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d\n", __func__,
303 p.pi, p.pl); 303 p.pi, p.pl);
304 304
305 /* Check if buffer is long enough for parsing */ 305 /* Check if buffer is long enough for parsing */
306 if (len < (2+p.pl)) { 306 if (len < (2+p.pl)) {
307 IRDA_WARNING("%s: buffer too short for parsing! " 307 IRDA_WARNING("%s: buffer too short for parsing! "
308 "Need %d bytes, but len is only %d\n", 308 "Need %d bytes, but len is only %d\n",
309 __FUNCTION__, p.pl, len); 309 __func__, p.pl, len);
310 return -1; 310 return -1;
311 } 311 }
312 312
@@ -314,7 +314,7 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
314 * checked that the buffer is long enough */ 314 * checked that the buffer is long enough */
315 strncpy(str, buf+2, p.pl); 315 strncpy(str, buf+2, p.pl);
316 316
317 IRDA_DEBUG(2, "%s(), str=0x%02x 0x%02x\n", __FUNCTION__, 317 IRDA_DEBUG(2, "%s(), str=0x%02x 0x%02x\n", __func__,
318 (__u8) str[0], (__u8) str[1]); 318 (__u8) str[0], (__u8) str[1]);
319 319
320 /* Null terminate string */ 320 /* Null terminate string */
@@ -345,11 +345,11 @@ static int irda_extract_octseq(void *self, __u8 *buf, int len, __u8 pi,
345 if (len < (2+p.pl)) { 345 if (len < (2+p.pl)) {
346 IRDA_WARNING("%s: buffer too short for parsing! " 346 IRDA_WARNING("%s: buffer too short for parsing! "
347 "Need %d bytes, but len is only %d\n", 347 "Need %d bytes, but len is only %d\n",
348 __FUNCTION__, p.pl, len); 348 __func__, p.pl, len);
349 return -1; 349 return -1;
350 } 350 }
351 351
352 IRDA_DEBUG(0, "%s(), not impl\n", __FUNCTION__); 352 IRDA_DEBUG(0, "%s(), not impl\n", __func__);
353 353
354 return p.pl+2; /* Extracted pl+2 bytes */ 354 return p.pl+2; /* Extracted pl+2 bytes */
355} 355}
@@ -473,7 +473,7 @@ int irda_param_insert(void *self, __u8 pi, __u8 *buf, int len,
473 (pi_minor > info->tables[pi_major].len-1)) 473 (pi_minor > info->tables[pi_major].len-1))
474 { 474 {
475 IRDA_DEBUG(0, "%s(), no handler for parameter=0x%02x\n", 475 IRDA_DEBUG(0, "%s(), no handler for parameter=0x%02x\n",
476 __FUNCTION__, pi); 476 __func__, pi);
477 477
478 /* Skip this parameter */ 478 /* Skip this parameter */
479 return -1; 479 return -1;
@@ -487,7 +487,7 @@ int irda_param_insert(void *self, __u8 pi, __u8 *buf, int len,
487 487
488 /* Check if handler has been implemented */ 488 /* Check if handler has been implemented */
489 if (!pi_minor_info->func) { 489 if (!pi_minor_info->func) {
490 IRDA_MESSAGE("%s: no handler for pi=%#x\n", __FUNCTION__, pi); 490 IRDA_MESSAGE("%s: no handler for pi=%#x\n", __func__, pi);
491 /* Skip this parameter */ 491 /* Skip this parameter */
492 return -1; 492 return -1;
493 } 493 }
@@ -527,7 +527,7 @@ static int irda_param_extract(void *self, __u8 *buf, int len,
527 (pi_minor > info->tables[pi_major].len-1)) 527 (pi_minor > info->tables[pi_major].len-1))
528 { 528 {
529 IRDA_DEBUG(0, "%s(), no handler for parameter=0x%02x\n", 529 IRDA_DEBUG(0, "%s(), no handler for parameter=0x%02x\n",
530 __FUNCTION__, buf[0]); 530 __func__, buf[0]);
531 531
532 /* Skip this parameter */ 532 /* Skip this parameter */
533 return 2 + buf[n + 1]; /* Continue */ 533 return 2 + buf[n + 1]; /* Continue */
@@ -539,13 +539,13 @@ static int irda_param_extract(void *self, __u8 *buf, int len,
539 /* Find expected data type for this parameter identifier (pi)*/ 539 /* Find expected data type for this parameter identifier (pi)*/
540 type = pi_minor_info->type; 540 type = pi_minor_info->type;
541 541
542 IRDA_DEBUG(3, "%s(), pi=[%d,%d], type=%d\n", __FUNCTION__, 542 IRDA_DEBUG(3, "%s(), pi=[%d,%d], type=%d\n", __func__,
543 pi_major, pi_minor, type); 543 pi_major, pi_minor, type);
544 544
545 /* Check if handler has been implemented */ 545 /* Check if handler has been implemented */
546 if (!pi_minor_info->func) { 546 if (!pi_minor_info->func) {
547 IRDA_MESSAGE("%s: no handler for pi=%#x\n", 547 IRDA_MESSAGE("%s: no handler for pi=%#x\n",
548 __FUNCTION__, buf[n]); 548 __func__, buf[n]);
549 /* Skip this parameter */ 549 /* Skip this parameter */
550 return 2 + buf[n + 1]; /* Continue */ 550 return 2 + buf[n + 1]; /* Continue */
551 } 551 }