Skip to content

Commit 71cc2c2

Browse files
hharrisontorvalds
authored andcommitted
serial: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent bf9d892 commit 71cc2c2

13 files changed

Lines changed: 54 additions & 54 deletions

File tree

‎drivers/serial/68360serial.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,7 @@ static int rs_360_tiocmget(struct tty_struct *tty, struct file *file)
12471247
#ifdef modem_control
12481248
unsigned char control, status;
12491249

1250-
if (serial_paranoia_check(info, tty->name, __FUNCTION__))
1250+
if (serial_paranoia_check(info, tty->name, __func__))
12511251
return -ENODEV;
12521252

12531253
if (tty->flags & (1 << TTY_IO_ERROR))
@@ -1278,7 +1278,7 @@ static int rs_360_tiocmset(struct tty_struct *tty, struct file *file,
12781278
ser_info_t *info = (ser_info_t *)tty->driver_data;
12791279
unsigned int arg;
12801280

1281-
if (serial_paranoia_check(info, tty->name, __FUNCTION__))
1281+
if (serial_paranoia_check(info, tty->name, __func__))
12821282
return -ENODEV;
12831283

12841284
if (tty->flags & (1 << TTY_IO_ERROR))

‎drivers/serial/8250_early.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static int __init parse_options(struct early_serial8250_device *device,
156156
port->membase = ioremap(port->mapbase, 64);
157157
if (!port->membase) {
158158
printk(KERN_ERR "%s: Couldn't ioremap 0x%llx\n",
159-
__FUNCTION__,
159+
__func__,
160160
(unsigned long long)port->mapbase);
161161
return -ENOMEM;
162162
}

‎drivers/serial/bfin_5xx.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
762762
break;
763763
default:
764764
printk(KERN_ERR "%s: word lengh not supported\n",
765-
__FUNCTION__);
765+
__func__);
766766
}
767767

768768
if (termios->c_cflag & CSTOPB)
@@ -1029,7 +1029,7 @@ bfin_serial_console_get_options(struct bfin_serial_port *uart, int *baud,
10291029

10301030
*baud = get_sclk() / (16*(dll | dlh << 8));
10311031
}
1032-
pr_debug("%s:baud = %d, parity = %c, bits= %d\n", __FUNCTION__, *baud, *parity, *bits);
1032+
pr_debug("%s:baud = %d, parity = %c, bits= %d\n", __func__, *baud, *parity, *bits);
10331033
}
10341034
#endif
10351035

‎drivers/serial/cpm_uart/cpm_uart_core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@ int cpm_uart_drv_get_platform_data(struct platform_device *pdev, int is_con)
11171117

11181118
line = cpm_uart_id2nr(idx);
11191119
if(line < 0) {
1120-
printk(KERN_ERR"%s(): port %d is not registered", __FUNCTION__, idx);
1120+
printk(KERN_ERR"%s(): port %d is not registered", __func__, idx);
11211121
return -EINVAL;
11221122
}
11231123

‎drivers/serial/crisv10.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1788,7 +1788,7 @@ static unsigned int handle_descr_data(struct e100_serial *info,
17881788

17891789
if (info->recv_cnt + recvl > 65536) {
17901790
printk(KERN_CRIT
1791-
"%s: Too much pending incoming serial data! Dropping %u bytes.\n", __FUNCTION__, recvl);
1791+
"%s: Too much pending incoming serial data! Dropping %u bytes.\n", __func__, recvl);
17921792
return 0;
17931793
}
17941794

@@ -1801,7 +1801,7 @@ static unsigned int handle_descr_data(struct e100_serial *info,
18011801
append_recv_buffer(info, buffer);
18021802

18031803
if (!(buffer = alloc_recv_buffer(SERIAL_DESCR_BUF_SIZE)))
1804-
panic("%s: Failed to allocate memory for receive buffer!\n", __FUNCTION__);
1804+
panic("%s: Failed to allocate memory for receive buffer!\n", __func__);
18051805

18061806
descr->buf = virt_to_phys(buffer->buffer);
18071807

@@ -1925,7 +1925,7 @@ static int start_recv_dma(struct e100_serial *info)
19251925
/* Set up the receiving descriptors */
19261926
for (i = 0; i < SERIAL_RECV_DESCRIPTORS; i++) {
19271927
if (!(buffer = alloc_recv_buffer(SERIAL_DESCR_BUF_SIZE)))
1928-
panic("%s: Failed to allocate memory for receive buffer!\n", __FUNCTION__);
1928+
panic("%s: Failed to allocate memory for receive buffer!\n", __func__);
19291929

19301930
descr[i].ctrl = d_int;
19311931
descr[i].buf = virt_to_phys(buffer->buffer);
@@ -4519,7 +4519,7 @@ rs_init(void)
45194519

45204520
if (request_irq(SERIAL_IRQ_NBR, ser_interrupt,
45214521
IRQF_SHARED | IRQF_DISABLED, "serial ", driver))
4522-
panic("%s: Failed to request irq8", __FUNCTION__);
4522+
panic("%s: Failed to request irq8", __func__);
45234523

45244524
#endif
45254525
#endif /* CONFIG_SVINTO_SIM */

‎drivers/serial/ioc3_serial.c‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static unsigned int Submodule_slot;
5252
#define DPRINT_CONFIG(_x...) ;
5353
//#define DPRINT_CONFIG(_x...) printk _x
5454
#define NOT_PROGRESS() ;
55-
//#define NOT_PROGRESS() printk("%s : fails %d\n", __FUNCTION__, __LINE__)
55+
//#define NOT_PROGRESS() printk("%s : fails %d\n", __func__, __LINE__)
5656

5757
/* number of characters we want to transmit to the lower level at a time */
5858
#define MAX_CHARS 256
@@ -445,7 +445,7 @@ static int inline port_init(struct ioc3_port *port)
445445
sbbr_h = &idd->vma->sbbr_h;
446446
ring_pci_addr = (unsigned long __iomem)port->ip_dma_ringbuf;
447447
DPRINT_CONFIG(("%s: ring_pci_addr 0x%p\n",
448-
__FUNCTION__, (void *)ring_pci_addr));
448+
__func__, (void *)ring_pci_addr));
449449

450450
writel((unsigned int)((uint64_t) ring_pci_addr >> 32), sbbr_h);
451451
writel((unsigned int)ring_pci_addr | BUF_SIZE_BIT, sbbr_l);
@@ -593,7 +593,7 @@ config_port(struct ioc3_port *port,
593593

594594
DPRINT_CONFIG(("%s: line %d baud %d byte_size %d stop %d parenb %d "
595595
"parodd %d\n",
596-
__FUNCTION__, ((struct uart_port *)port->ip_port)->line,
596+
__func__, ((struct uart_port *)port->ip_port)->line,
597597
baud, byte_size, stop_bits, parenb, parodd));
598598

599599
if (set_baud(port, baud))
@@ -871,14 +871,14 @@ static int ioc3_set_proto(struct ioc3_port *port, int proto)
871871
default:
872872
case PROTO_RS232:
873873
/* Clear the appropriate GIO pin */
874-
DPRINT_CONFIG(("%s: rs232\n", __FUNCTION__));
874+
DPRINT_CONFIG(("%s: rs232\n", __func__));
875875
writel(0, (&port->ip_idd->vma->gppr[0]
876876
+ hooks->rs422_select_pin));
877877
break;
878878

879879
case PROTO_RS422:
880880
/* Set the appropriate GIO pin */
881-
DPRINT_CONFIG(("%s: rs422\n", __FUNCTION__));
881+
DPRINT_CONFIG(("%s: rs422\n", __func__));
882882
writel(1, (&port->ip_idd->vma->gppr[0]
883883
+ hooks->rs422_select_pin));
884884
break;
@@ -988,7 +988,7 @@ ioc3_change_speed(struct uart_port *the_port,
988988
}
989989
baud = uart_get_baud_rate(the_port, new_termios, old_termios,
990990
MIN_BAUD_SUPPORTED, MAX_BAUD_SUPPORTED);
991-
DPRINT_CONFIG(("%s: returned baud %d for line %d\n", __FUNCTION__, baud,
991+
DPRINT_CONFIG(("%s: returned baud %d for line %d\n", __func__, baud,
992992
the_port->line));
993993

994994
if (!the_port->fifosize)
@@ -1026,7 +1026,7 @@ ioc3_change_speed(struct uart_port *the_port,
10261026
DPRINT_CONFIG(("%s : port 0x%p line %d cflag 0%o "
10271027
"config_port(baud %d data %d stop %d penable %d "
10281028
" parity %d), notification 0x%x\n",
1029-
__FUNCTION__, (void *)port, the_port->line, cflag, baud,
1029+
__func__, (void *)port, the_port->line, cflag, baud,
10301030
new_data, new_stop, new_parity_enable, new_parity,
10311031
the_port->ignore_status_mask));
10321032

@@ -1919,7 +1919,7 @@ static inline int ioc3_serial_core_attach( struct ioc3_submodule *is,
19191919
struct pci_dev *pdev = idd->pdev;
19201920

19211921
DPRINT_CONFIG(("%s: attach pdev 0x%p - card_ptr 0x%p\n",
1922-
__FUNCTION__, pdev, (void *)card_ptr));
1922+
__func__, pdev, (void *)card_ptr));
19231923

19241924
if (!card_ptr)
19251925
return -ENODEV;
@@ -1933,7 +1933,7 @@ static inline int ioc3_serial_core_attach( struct ioc3_submodule *is,
19331933
port->ip_port = the_port;
19341934

19351935
DPRINT_CONFIG(("%s: attach the_port 0x%p / port 0x%p [%d/%d]\n",
1936-
__FUNCTION__, (void *)the_port, (void *)port,
1936+
__func__, (void *)the_port, (void *)port,
19371937
phys_port, ii));
19381938

19391939
/* membase, iobase and mapbase just need to be non-0 */
@@ -1950,7 +1950,7 @@ static inline int ioc3_serial_core_attach( struct ioc3_submodule *is,
19501950
if (uart_add_one_port(&ioc3_uart, the_port) < 0) {
19511951
printk(KERN_WARNING
19521952
"%s: unable to add port %d bus %d\n",
1953-
__FUNCTION__, the_port->line, pdev->bus->number);
1953+
__func__, the_port->line, pdev->bus->number);
19541954
} else {
19551955
DPRINT_CONFIG(("IOC3 serial port %d irq %d bus %d\n",
19561956
the_port->line, the_port->irq, pdev->bus->number));
@@ -2017,7 +2017,7 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd)
20172017
struct ioc3_port *ports[PORTS_PER_CARD];
20182018
int phys_port;
20192019

2020-
DPRINT_CONFIG(("%s (0x%p, 0x%p)\n", __FUNCTION__, is, idd));
2020+
DPRINT_CONFIG(("%s (0x%p, 0x%p)\n", __func__, is, idd));
20212021

20222022
card_ptr = kzalloc(sizeof(struct ioc3_card), GFP_KERNEL);
20232023
if (!card_ptr) {
@@ -2067,7 +2067,7 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd)
20672067

20682068
DPRINT_CONFIG(("%s : Port A ip_serial_regs 0x%p "
20692069
"ip_uart_regs 0x%p\n",
2070-
__FUNCTION__,
2070+
__func__,
20712071
(void *)port->ip_serial_regs,
20722072
(void *)port->ip_uart_regs));
20732073

@@ -2082,7 +2082,7 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd)
20822082
DPRINT_CONFIG(("%s : Port A ip_cpu_ringbuf 0x%p "
20832083
"ip_dma_ringbuf 0x%p, ip_inring 0x%p "
20842084
"ip_outring 0x%p\n",
2085-
__FUNCTION__,
2085+
__func__,
20862086
(void *)port->ip_cpu_ringbuf,
20872087
(void *)port->ip_dma_ringbuf,
20882088
(void *)port->ip_inring,
@@ -2094,7 +2094,7 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd)
20942094

20952095
DPRINT_CONFIG(("%s : Port B ip_serial_regs 0x%p "
20962096
"ip_uart_regs 0x%p\n",
2097-
__FUNCTION__,
2097+
__func__,
20982098
(void *)port->ip_serial_regs,
20992099
(void *)port->ip_uart_regs));
21002100

@@ -2108,15 +2108,15 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd)
21082108
DPRINT_CONFIG(("%s : Port B ip_cpu_ringbuf 0x%p "
21092109
"ip_dma_ringbuf 0x%p, ip_inring 0x%p "
21102110
"ip_outring 0x%p\n",
2111-
__FUNCTION__,
2111+
__func__,
21122112
(void *)port->ip_cpu_ringbuf,
21132113
(void *)port->ip_dma_ringbuf,
21142114
(void *)port->ip_inring,
21152115
(void *)port->ip_outring));
21162116
}
21172117

21182118
DPRINT_CONFIG(("%s : port %d [addr 0x%p] card_ptr 0x%p",
2119-
__FUNCTION__,
2119+
__func__,
21202120
phys_port, (void *)port, (void *)card_ptr));
21212121
DPRINT_CONFIG((" ip_serial_regs 0x%p ip_uart_regs 0x%p\n",
21222122
(void *)port->ip_serial_regs,
@@ -2127,7 +2127,7 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd)
21272127

21282128
DPRINT_CONFIG(("%s: phys_port %d port 0x%p inring 0x%p "
21292129
"outring 0x%p\n",
2130-
__FUNCTION__,
2130+
__func__,
21312131
phys_port, (void *)port,
21322132
(void *)port->ip_inring,
21332133
(void *)port->ip_outring));
@@ -2170,7 +2170,7 @@ static int __devinit ioc3uart_init(void)
21702170
if ((ret = uart_register_driver(&ioc3_uart)) < 0) {
21712171
printk(KERN_WARNING
21722172
"%s: Couldn't register IOC3 uart serial driver\n",
2173-
__FUNCTION__);
2173+
__func__);
21742174
return ret;
21752175
}
21762176
ret = ioc3_register_submodule(&ioc3uart_submodule);

‎drivers/serial/ioc4_serial.c‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ static int inline port_init(struct ioc4_port *port)
889889

890890
ring_pci_addr = (unsigned long __iomem)port->ip_dma_ringbuf;
891891
DPRINT_CONFIG(("%s: ring_pci_addr 0x%lx\n",
892-
__FUNCTION__, ring_pci_addr));
892+
__func__, ring_pci_addr));
893893

894894
writel((unsigned int)((uint64_t)ring_pci_addr >> 32), sbbr_h);
895895
writel((unsigned int)ring_pci_addr | IOC4_BUF_SIZE_BIT, sbbr_l);
@@ -1028,7 +1028,7 @@ static irqreturn_t ioc4_intr(int irq, void *arg)
10281028
spin_lock_irqsave(&soft->is_ir_lock, flag);
10291029
printk ("%s : %d : mem 0x%p sio_ir 0x%x sio_ies 0x%x "
10301030
"other_ir 0x%x other_ies 0x%x mask 0x%x\n",
1031-
__FUNCTION__, __LINE__,
1031+
__func__, __LINE__,
10321032
(void *)mem, readl(&mem->sio_ir.raw),
10331033
readl(&mem->sio_ies.raw),
10341034
readl(&mem->other_ir.raw),
@@ -1155,14 +1155,14 @@ static int inline ioc4_attach_local(struct ioc4_driver_data *idd)
11551155
(TOTAL_RING_BUF_SIZE - 1)) == 0));
11561156
DPRINT_CONFIG(("%s : ip_cpu_ringbuf 0x%p "
11571157
"ip_dma_ringbuf 0x%p\n",
1158-
__FUNCTION__,
1158+
__func__,
11591159
(void *)port->ip_cpu_ringbuf,
11601160
(void *)port->ip_dma_ringbuf));
11611161
port->ip_inring = RING(port, RX_0_OR_2);
11621162
port->ip_outring = RING(port, TX_0_OR_2);
11631163
}
11641164
DPRINT_CONFIG(("%s : port %d [addr 0x%p] control 0x%p",
1165-
__FUNCTION__,
1165+
__func__,
11661166
port_number, (void *)port, (void *)control));
11671167
DPRINT_CONFIG((" ip_serial_regs 0x%p ip_uart_regs 0x%p\n",
11681168
(void *)port->ip_serial_regs,
@@ -1173,7 +1173,7 @@ static int inline ioc4_attach_local(struct ioc4_driver_data *idd)
11731173

11741174
DPRINT_CONFIG(("%s: port_number %d port 0x%p inring 0x%p "
11751175
"outring 0x%p\n",
1176-
__FUNCTION__,
1176+
__func__,
11771177
port_number, (void *)port,
11781178
(void *)port->ip_inring,
11791179
(void *)port->ip_outring));
@@ -1317,7 +1317,7 @@ config_port(struct ioc4_port *port,
13171317
int spiniter = 0;
13181318

13191319
DPRINT_CONFIG(("%s: baud %d byte_size %d stop %d parenb %d parodd %d\n",
1320-
__FUNCTION__, baud, byte_size, stop_bits, parenb, parodd));
1320+
__func__, baud, byte_size, stop_bits, parenb, parodd));
13211321

13221322
if (set_baud(port, baud))
13231323
return 1;
@@ -1725,7 +1725,7 @@ ioc4_change_speed(struct uart_port *the_port,
17251725
}
17261726
baud = uart_get_baud_rate(the_port, new_termios, old_termios,
17271727
MIN_BAUD_SUPPORTED, MAX_BAUD_SUPPORTED);
1728-
DPRINT_CONFIG(("%s: returned baud %d\n", __FUNCTION__, baud));
1728+
DPRINT_CONFIG(("%s: returned baud %d\n", __func__, baud));
17291729

17301730
/* default is 9600 */
17311731
if (!baud)
@@ -1765,7 +1765,7 @@ ioc4_change_speed(struct uart_port *the_port,
17651765
DPRINT_CONFIG(("%s : port 0x%p cflag 0%o "
17661766
"config_port(baud %d data %d stop %d p enable %d parity %d),"
17671767
" notification 0x%x\n",
1768-
__FUNCTION__, (void *)port, cflag, baud, new_data, new_stop,
1768+
__func__, (void *)port, cflag, baud, new_data, new_stop,
17691769
new_parity_enable, new_parity, the_port->ignore_status_mask));
17701770

17711771
if ((config_port(port, baud, /* baud */
@@ -2715,7 +2715,7 @@ ioc4_serial_core_attach(struct pci_dev *pdev, int port_type)
27152715

27162716

27172717
DPRINT_CONFIG(("%s: attach pdev 0x%p - control 0x%p\n",
2718-
__FUNCTION__, pdev, (void *)control));
2718+
__func__, pdev, (void *)control));
27192719

27202720
if (!control)
27212721
return -ENODEV;
@@ -2734,7 +2734,7 @@ ioc4_serial_core_attach(struct pci_dev *pdev, int port_type)
27342734
port->ip_all_ports[port_type_idx] = the_port;
27352735

27362736
DPRINT_CONFIG(("%s: attach the_port 0x%p / port 0x%p : type %s\n",
2737-
__FUNCTION__, (void *)the_port,
2737+
__func__, (void *)the_port,
27382738
(void *)port,
27392739
port_type == PROTO_RS232 ? "rs232" : "rs422"));
27402740

@@ -2752,7 +2752,7 @@ ioc4_serial_core_attach(struct pci_dev *pdev, int port_type)
27522752
if (uart_add_one_port(u_driver, the_port) < 0) {
27532753
printk(KERN_WARNING
27542754
"%s: unable to add port %d bus %d\n",
2755-
__FUNCTION__, the_port->line, pdev->bus->number);
2755+
__func__, the_port->line, pdev->bus->number);
27562756
} else {
27572757
DPRINT_CONFIG(
27582758
("IOC4 serial port %d irq = %d, bus %d\n",
@@ -2777,7 +2777,7 @@ ioc4_serial_attach_one(struct ioc4_driver_data *idd)
27772777
int ret = 0;
27782778

27792779

2780-
DPRINT_CONFIG(("%s (0x%p, 0x%p)\n", __FUNCTION__, idd->idd_pdev,
2780+
DPRINT_CONFIG(("%s (0x%p, 0x%p)\n", __func__, idd->idd_pdev,
27812781
idd->idd_pci_id));
27822782

27832783
/* PCI-RT does not bring out serial connections.
@@ -2806,7 +2806,7 @@ ioc4_serial_attach_one(struct ioc4_driver_data *idd)
28062806
goto out2;
28072807
}
28082808
DPRINT_CONFIG(("%s : mem 0x%p, serial 0x%p\n",
2809-
__FUNCTION__, (void *)idd->idd_misc_regs,
2809+
__func__, (void *)idd->idd_misc_regs,
28102810
(void *)serial));
28112811

28122812
/* Get memory for the new card */
@@ -2858,7 +2858,7 @@ ioc4_serial_attach_one(struct ioc4_driver_data *idd)
28582858
} else {
28592859
printk(KERN_WARNING
28602860
"%s : request_irq fails for IRQ 0x%x\n ",
2861-
__FUNCTION__, idd->idd_pdev->irq);
2861+
__func__, idd->idd_pdev->irq);
28622862
}
28632863
ret = ioc4_attach_local(idd);
28642864
if (ret)
@@ -2911,13 +2911,13 @@ int ioc4_serial_init(void)
29112911
if ((ret = uart_register_driver(&ioc4_uart_rs232)) < 0) {
29122912
printk(KERN_WARNING
29132913
"%s: Couldn't register rs232 IOC4 serial driver\n",
2914-
__FUNCTION__);
2914+
__func__);
29152915
return ret;
29162916
}
29172917
if ((ret = uart_register_driver(&ioc4_uart_rs422)) < 0) {
29182918
printk(KERN_WARNING
29192919
"%s: Couldn't register rs422 IOC4 serial driver\n",
2920-
__FUNCTION__);
2920+
__func__);
29212921
return ret;
29222922
}
29232923

0 commit comments

Comments
 (0)