Commit c9d62443 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Len Brown

ACPI: pci_link: remove unnecessary casts and initializations

Remove unnecessary casts and initializations.
Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 1c9ca3a7
...@@ -109,7 +109,7 @@ static acpi_status acpi_pci_link_check_possible(struct acpi_resource *resource, ...@@ -109,7 +109,7 @@ static acpi_status acpi_pci_link_check_possible(struct acpi_resource *resource,
void *context) void *context)
{ {
struct acpi_pci_link *link = context; struct acpi_pci_link *link = context;
u32 i = 0; u32 i;
switch (resource->type) { switch (resource->type) {
case ACPI_RESOURCE_TYPE_START_DEPENDENT: case ACPI_RESOURCE_TYPE_START_DEPENDENT:
...@@ -199,7 +199,7 @@ static int acpi_pci_link_get_possible(struct acpi_pci_link *link) ...@@ -199,7 +199,7 @@ static int acpi_pci_link_get_possible(struct acpi_pci_link *link)
static acpi_status acpi_pci_link_check_current(struct acpi_resource *resource, static acpi_status acpi_pci_link_check_current(struct acpi_resource *resource,
void *context) void *context)
{ {
int *irq = (int *)context; int *irq = context;
switch (resource->type) { switch (resource->type) {
case ACPI_RESOURCE_TYPE_START_DEPENDENT: case ACPI_RESOURCE_TYPE_START_DEPENDENT:
...@@ -256,7 +256,7 @@ static acpi_status acpi_pci_link_check_current(struct acpi_resource *resource, ...@@ -256,7 +256,7 @@ static acpi_status acpi_pci_link_check_current(struct acpi_resource *resource,
static int acpi_pci_link_get_current(struct acpi_pci_link *link) static int acpi_pci_link_get_current(struct acpi_pci_link *link)
{ {
int result = 0; int result = 0;
acpi_status status = AE_OK; acpi_status status;
int irq = 0; int irq = 0;
if (!link) if (!link)
...@@ -306,8 +306,8 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link) ...@@ -306,8 +306,8 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
{ {
int result = 0; int result;
acpi_status status = AE_OK; acpi_status status;
struct { struct {
struct acpi_resource res; struct acpi_resource res;
struct acpi_resource end; struct acpi_resource end;
...@@ -485,9 +485,9 @@ static int acpi_irq_penalty[ACPI_MAX_IRQS] = { ...@@ -485,9 +485,9 @@ static int acpi_irq_penalty[ACPI_MAX_IRQS] = {
int __init acpi_irq_penalty_init(void) int __init acpi_irq_penalty_init(void)
{ {
struct list_head *node = NULL; struct list_head *node;
struct acpi_pci_link *link = NULL; struct acpi_pci_link *link;
int i = 0; int i;
/* /*
* Update penalties to facilitate IRQ balancing. * Update penalties to facilitate IRQ balancing.
...@@ -602,9 +602,9 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link) ...@@ -602,9 +602,9 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering, int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering,
int *polarity, char **name) int *polarity, char **name)
{ {
int result = 0; int result;
struct acpi_device *device = NULL; struct acpi_device *device;
struct acpi_pci_link *link = NULL; struct acpi_pci_link *link;
result = acpi_bus_get_device(handle, &device); result = acpi_bus_get_device(handle, &device);
if (result) { if (result) {
...@@ -656,8 +656,8 @@ int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering, ...@@ -656,8 +656,8 @@ int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering,
*/ */
int acpi_pci_link_free_irq(acpi_handle handle) int acpi_pci_link_free_irq(acpi_handle handle)
{ {
struct acpi_device *device = NULL; struct acpi_device *device;
struct acpi_pci_link *link = NULL; struct acpi_pci_link *link;
acpi_status result; acpi_status result;
result = acpi_bus_get_device(handle, &device); result = acpi_bus_get_device(handle, &device);
...@@ -707,9 +707,9 @@ int acpi_pci_link_free_irq(acpi_handle handle) ...@@ -707,9 +707,9 @@ int acpi_pci_link_free_irq(acpi_handle handle)
static int acpi_pci_link_add(struct acpi_device *device) static int acpi_pci_link_add(struct acpi_device *device)
{ {
int result = 0; int result;
struct acpi_pci_link *link = NULL; struct acpi_pci_link *link;
int i = 0; int i;
int found = 0; int found = 0;
if (!device) if (!device)
...@@ -777,8 +777,8 @@ static int acpi_pci_link_resume(struct acpi_pci_link *link) ...@@ -777,8 +777,8 @@ static int acpi_pci_link_resume(struct acpi_pci_link *link)
static int irqrouter_resume(struct sys_device *dev) static int irqrouter_resume(struct sys_device *dev)
{ {
struct list_head *node = NULL; struct list_head *node;
struct acpi_pci_link *link = NULL; struct acpi_pci_link *link;
list_for_each(node, &acpi_link.entries) { list_for_each(node, &acpi_link.entries) {
link = list_entry(node, struct acpi_pci_link, node); link = list_entry(node, struct acpi_pci_link, node);
...@@ -793,7 +793,7 @@ static int irqrouter_resume(struct sys_device *dev) ...@@ -793,7 +793,7 @@ static int irqrouter_resume(struct sys_device *dev)
static int acpi_pci_link_remove(struct acpi_device *device, int type) static int acpi_pci_link_remove(struct acpi_device *device, int type)
{ {
struct acpi_pci_link *link = NULL; struct acpi_pci_link *link;
if (!device || !acpi_driver_data(device)) if (!device || !acpi_driver_data(device))
return -EINVAL; return -EINVAL;
......
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