PCMCIA/i82092: delete enter/leave macro

Remove the enter/leave macros and the corresponding calls.
These are obsolete since ftrace is available.

Co-developed-by: Lukas Panzer <lukas.panzer@fau.de>
Signed-off-by: Lukas Panzer <lukas.panzer@fau.de>
Signed-off-by: Simon Geis <simon.geis@fau.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
Simon Geis 2019-12-13 14:53:13 +01:00 committed by Dominik Brodowski
parent ac5af87725
commit 52739f063f
2 changed files with 6 additions and 60 deletions

View File

@ -76,8 +76,6 @@ static int i82092aa_pci_probe(struct pci_dev *dev,
unsigned char configbyte; unsigned char configbyte;
int i, ret; int i, ret;
enter("i82092aa_pci_probe");
ret = pci_enable_device(dev); ret = pci_enable_device(dev);
if (ret) if (ret)
return ret; return ret;
@ -158,7 +156,6 @@ static int i82092aa_pci_probe(struct pci_dev *dev,
goto err_out_free_sockets; goto err_out_free_sockets;
} }
leave("i82092aa_pci_probe");
return 0; return 0;
err_out_free_sockets: err_out_free_sockets:
@ -178,14 +175,10 @@ static void i82092aa_pci_remove(struct pci_dev *dev)
{ {
int i; int i;
enter("i82092aa_pci_remove");
free_irq(dev->irq, i82092aa_interrupt); free_irq(dev->irq, i82092aa_interrupt);
for (i = 0; i < socket_count; i++) for (i = 0; i < socket_count; i++)
pcmcia_unregister_socket(&sockets[i].socket); pcmcia_unregister_socket(&sockets[i].socket);
leave("i82092aa_pci_remove");
} }
static DEFINE_SPINLOCK(port_lock); static DEFINE_SPINLOCK(port_lock);
@ -322,8 +315,6 @@ static irqreturn_t i82092aa_interrupt(int irq, void *dev)
unsigned int events, active = 0; unsigned int events, active = 0;
/* enter("i82092aa_interrupt");*/
while (1) { while (1) {
loopcount++; loopcount++;
if (loopcount > 20) { if (loopcount > 20) {
@ -377,7 +368,6 @@ static irqreturn_t i82092aa_interrupt(int irq, void *dev)
break; break;
} }
return IRQ_RETVAL(handled); return IRQ_RETVAL(handled);
/* leave("i82092aa_interrupt");*/
} }
@ -388,8 +378,6 @@ static int card_present(int socketno)
{ {
unsigned int val; unsigned int val;
enter("card_present");
if ((socketno < 0) || (socketno >= MAX_SOCKETS)) if ((socketno < 0) || (socketno >= MAX_SOCKETS))
return 0; return 0;
if (sockets[socketno].io_base == 0) if (sockets[socketno].io_base == 0)
@ -397,23 +385,18 @@ static int card_present(int socketno)
val = indirect_read(socketno, 1); /* Interface status register */ val = indirect_read(socketno, 1); /* Interface status register */
if ((val&12) == 12) { if ((val&12) == 12)
leave("card_present 1");
return 1; return 1;
}
leave("card_present 0");
return 0; return 0;
} }
static void set_bridge_state(int sock) static void set_bridge_state(int sock)
{ {
enter("set_bridge_state");
indirect_write(sock, I365_GBLCTL, 0x00); indirect_write(sock, I365_GBLCTL, 0x00);
indirect_write(sock, I365_GENCTL, 0x00); indirect_write(sock, I365_GENCTL, 0x00);
indirect_setbit(sock, I365_INTCTL, 0x08); indirect_setbit(sock, I365_INTCTL, 0x08);
leave("set_bridge_state");
} }
@ -424,8 +407,6 @@ static int i82092aa_init(struct pcmcia_socket *sock)
pccard_io_map io = { 0, 0, 0, 0, 1 }; pccard_io_map io = { 0, 0, 0, 0, 1 };
pccard_mem_map mem = { .res = &res, }; pccard_mem_map mem = { .res = &res, };
enter("i82092aa_init");
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
io.map = i; io.map = i;
i82092aa_set_io_map(sock, &io); i82092aa_set_io_map(sock, &io);
@ -434,8 +415,7 @@ static int i82092aa_init(struct pcmcia_socket *sock)
mem.map = i; mem.map = i;
i82092aa_set_mem_map(sock, &mem); i82092aa_set_mem_map(sock, &mem);
} }
leave("i82092aa_init");
return 0; return 0;
} }
@ -444,8 +424,6 @@ static int i82092aa_get_status(struct pcmcia_socket *socket, u_int *value)
unsigned int sock = container_of(socket, unsigned int sock = container_of(socket,
struct socket_info, socket)->number; struct socket_info, socket)->number;
unsigned int status; unsigned int status;
enter("i82092aa_get_status");
/* Interface Status Register */ /* Interface Status Register */
status = indirect_read(sock, I365_STATUS); status = indirect_read(sock, I365_STATUS);
@ -477,7 +455,6 @@ static int i82092aa_get_status(struct pcmcia_socket *socket, u_int *value)
if (status & I365_CS_POWERON) if (status & I365_CS_POWERON)
(*value) |= SS_POWERON; /* power is applied to the card */ (*value) |= SS_POWERON; /* power is applied to the card */
leave("i82092aa_get_status");
return 0; return 0;
} }
@ -490,8 +467,6 @@ static int i82092aa_set_socket(struct pcmcia_socket *socket,
unsigned int sock = sock_info->number; unsigned int sock = sock_info->number;
unsigned char reg; unsigned char reg;
enter("i82092aa_set_socket");
/* First, set the global controller options */ /* First, set the global controller options */
set_bridge_state(sock); set_bridge_state(sock);
@ -535,7 +510,6 @@ static int i82092aa_set_socket(struct pcmcia_socket *socket,
dev_err(&sock_info->dev->dev, dev_err(&sock_info->dev->dev,
"%s called with invalid VCC power value: %i", "%s called with invalid VCC power value: %i",
__func__, state->Vcc); __func__, state->Vcc);
leave("i82092aa_set_socket");
return -EINVAL; return -EINVAL;
} }
@ -557,7 +531,6 @@ static int i82092aa_set_socket(struct pcmcia_socket *socket,
dev_err(&sock_info->dev->dev, dev_err(&sock_info->dev->dev,
"%s called with invalid VPP power value: %i", "%s called with invalid VPP power value: %i",
__func__, state->Vcc); __func__, state->Vcc);
leave("i82092aa_set_socket");
return -EINVAL; return -EINVAL;
} }
@ -589,7 +562,6 @@ static int i82092aa_set_socket(struct pcmcia_socket *socket,
indirect_write(sock, I365_CSCINT, reg); indirect_write(sock, I365_CSCINT, reg);
(void)indirect_read(sock, I365_CSC); (void)indirect_read(sock, I365_CSC);
leave("i82092aa_set_socket");
return 0; return 0;
} }
@ -601,20 +573,15 @@ static int i82092aa_set_io_map(struct pcmcia_socket *socket,
unsigned int sock = sock_info->number; unsigned int sock = sock_info->number;
unsigned char map, ioctl; unsigned char map, ioctl;
enter("i82092aa_set_io_map");
map = io->map; map = io->map;
/* Check error conditions */ /* Check error conditions */
if (map > 1) { if (map > 1)
leave("i82092aa_set_io_map with invalid map");
return -EINVAL; return -EINVAL;
}
if ((io->start > 0xffff) || (io->stop > 0xffff) if ((io->start > 0xffff) || (io->stop > 0xffff)
|| (io->stop < io->start)) { || (io->stop < io->start))
leave("i82092aa_set_io_map with invalid io");
return -EINVAL; return -EINVAL;
}
/* Turn off the window before changing anything */ /* Turn off the window before changing anything */
if (indirect_read(sock, I365_ADDRWIN) & I365_ENA_IO(map)) if (indirect_read(sock, I365_ADDRWIN) & I365_ENA_IO(map))
@ -635,7 +602,6 @@ static int i82092aa_set_io_map(struct pcmcia_socket *socket,
if (io->flags & MAP_ACTIVE) if (io->flags & MAP_ACTIVE)
indirect_setbit(sock, I365_ADDRWIN, I365_ENA_IO(map)); indirect_setbit(sock, I365_ADDRWIN, I365_ENA_IO(map));
leave("i82092aa_set_io_map");
return 0; return 0;
} }
@ -649,20 +615,14 @@ static int i82092aa_set_mem_map(struct pcmcia_socket *socket,
unsigned short base, i; unsigned short base, i;
unsigned char map; unsigned char map;
enter("i82092aa_set_mem_map");
pcibios_resource_to_bus(sock_info->dev->bus, &region, mem->res); pcibios_resource_to_bus(sock_info->dev->bus, &region, mem->res);
map = mem->map; map = mem->map;
if (map > 4) { if (map > 4)
leave("i82092aa_set_mem_map: invalid map");
return -EINVAL; return -EINVAL;
}
if ((mem->card_start > 0x3ffffff) || (region.start > region.end) || if ((mem->card_start > 0x3ffffff) || (region.start > region.end) ||
(mem->speed > 1000)) { (mem->speed > 1000)) {
leave("i82092aa_set_mem_map: invalid address / speed");
dev_err(&sock_info->dev->dev, dev_err(&sock_info->dev->dev,
"invalid mem map for socket %i: %llx to %llx with a start of %x\n", "invalid mem map for socket %i: %llx to %llx with a start of %x\n",
sock, sock,
@ -717,7 +677,6 @@ static int i82092aa_set_mem_map(struct pcmcia_socket *socket,
if (mem->flags & MAP_ACTIVE) if (mem->flags & MAP_ACTIVE)
indirect_setbit(sock, I365_ADDRWIN, I365_ENA_MEM(map)); indirect_setbit(sock, I365_ADDRWIN, I365_ENA_MEM(map));
leave("i82092aa_set_mem_map");
return 0; return 0;
} }
@ -728,11 +687,9 @@ static int i82092aa_module_init(void)
static void i82092aa_module_exit(void) static void i82092aa_module_exit(void)
{ {
enter("i82092aa_module_exit");
pci_unregister_driver(&i82092aa_pci_driver); pci_unregister_driver(&i82092aa_pci_driver);
if (sockets[0].io_base > 0) if (sockets[0].io_base > 0)
release_region(sockets[0].io_base, 2); release_region(sockets[0].io_base, 2);
leave("i82092aa_module_exit");
} }
module_init(i82092aa_module_init); module_init(i82092aa_module_init);

View File

@ -4,17 +4,6 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
/* Debuging defines */
#ifdef NOTRACE
#define enter(x) printk("Enter: %s, %s line %i\n",x,__FILE__,__LINE__)
#define leave(x) printk("Leave: %s, %s line %i\n",x,__FILE__,__LINE__)
#else
#define enter(x) do {} while (0)
#define leave(x) do {} while (0)
#endif
/* prototypes */ /* prototypes */
static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *id); static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *id);