mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
ACPI: pci_link: remove unnecessary casts and initializations
Remove unnecessary casts and initializations. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
1c9ca3a7d4
commit
c9d6244329
1 changed files with 19 additions and 19 deletions
|
@ -109,7 +109,7 @@ static acpi_status acpi_pci_link_check_possible(struct acpi_resource *resource,
|
|||
void *context)
|
||||
{
|
||||
struct acpi_pci_link *link = context;
|
||||
u32 i = 0;
|
||||
u32 i;
|
||||
|
||||
switch (resource->type) {
|
||||
case ACPI_RESOURCE_TYPE_START_DEPENDENT:
|
||||
|
@ -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,
|
||||
void *context)
|
||||
{
|
||||
int *irq = (int *)context;
|
||||
int *irq = context;
|
||||
|
||||
switch (resource->type) {
|
||||
case ACPI_RESOURCE_TYPE_START_DEPENDENT:
|
||||
|
@ -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)
|
||||
{
|
||||
int result = 0;
|
||||
acpi_status status = AE_OK;
|
||||
acpi_status status;
|
||||
int irq = 0;
|
||||
|
||||
if (!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)
|
||||
{
|
||||
int result = 0;
|
||||
acpi_status status = AE_OK;
|
||||
int result;
|
||||
acpi_status status;
|
||||
struct {
|
||||
struct acpi_resource res;
|
||||
struct acpi_resource end;
|
||||
|
@ -485,9 +485,9 @@ static int acpi_irq_penalty[ACPI_MAX_IRQS] = {
|
|||
|
||||
int __init acpi_irq_penalty_init(void)
|
||||
{
|
||||
struct list_head *node = NULL;
|
||||
struct acpi_pci_link *link = NULL;
|
||||
int i = 0;
|
||||
struct list_head *node;
|
||||
struct acpi_pci_link *link;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Update penalties to facilitate IRQ balancing.
|
||||
|
@ -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 *polarity, char **name)
|
||||
{
|
||||
int result = 0;
|
||||
struct acpi_device *device = NULL;
|
||||
struct acpi_pci_link *link = NULL;
|
||||
int result;
|
||||
struct acpi_device *device;
|
||||
struct acpi_pci_link *link;
|
||||
|
||||
result = acpi_bus_get_device(handle, &device);
|
||||
if (result) {
|
||||
|
@ -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)
|
||||
{
|
||||
struct acpi_device *device = NULL;
|
||||
struct acpi_pci_link *link = NULL;
|
||||
struct acpi_device *device;
|
||||
struct acpi_pci_link *link;
|
||||
acpi_status result;
|
||||
|
||||
result = acpi_bus_get_device(handle, &device);
|
||||
|
@ -707,9 +707,9 @@ int acpi_pci_link_free_irq(acpi_handle handle)
|
|||
|
||||
static int acpi_pci_link_add(struct acpi_device *device)
|
||||
{
|
||||
int result = 0;
|
||||
struct acpi_pci_link *link = NULL;
|
||||
int i = 0;
|
||||
int result;
|
||||
struct acpi_pci_link *link;
|
||||
int i;
|
||||
int found = 0;
|
||||
|
||||
if (!device)
|
||||
|
@ -777,8 +777,8 @@ static int acpi_pci_link_resume(struct acpi_pci_link *link)
|
|||
|
||||
static int irqrouter_resume(struct sys_device *dev)
|
||||
{
|
||||
struct list_head *node = NULL;
|
||||
struct acpi_pci_link *link = NULL;
|
||||
struct list_head *node;
|
||||
struct acpi_pci_link *link;
|
||||
|
||||
list_for_each(node, &acpi_link.entries) {
|
||||
link = list_entry(node, struct acpi_pci_link, node);
|
||||
|
@ -793,7 +793,7 @@ static int irqrouter_resume(struct sys_device *dev)
|
|||
|
||||
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))
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Reference in a new issue