Skip to contentSkip to conversation

x86 pci acpi: fix type mismatch

PATCH Applied Németh Márton 2 participants 2 messages May 14, 2011 – Jun 1, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86 pci acpi: fix type mismatch

From: Márton Németh <[email protected]>

The flags field of struct resource from linux/ioport.h is "unsigned long". Change the "type" parameter of coalesce_windows() function to match that field. This fixes the following warning messages when compiling with "make C=1 W=1 bzImage modules":

arch/x86/pci/acpi.c: In function ‘coalesce_windows’:
arch/x86/pci/acpi.c:198: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result arch/x86/pci/acpi.c:203: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result

---

arch/x86/pci/acpi.c renamed from arch/x86/pci/acpi.c.orig +1 -1
@@ -188,7 +188,7 @@ static bool resource_contains(struct res
 	return false;
 }
 
-static void coalesce_windows(struct pci_root_info *info, int type)
+static void coalesce_windows(struct pci_root_info *info, unsigned long type)
 {
 	int i, j;
 	struct resource *res1, *res2;
Applied
#1 lore raw
Quoted 15 lines · On Sat, 14 May 2011 19:27:33 +0200 Németh Márton <[email protected]> wrote:

From: Márton Németh <[email protected]>

The flags field of struct resource from linux/ioport.h is "unsigned long". Change the "type" parameter of coalesce_windows() function to match that field. This fixes the following warning messages when compiling with "make C=1 W=1 bzImage modules":

arch/x86/pci/acpi.c: In function ‘coalesce_windows’:
arch/x86/pci/acpi.c:198: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result arch/x86/pci/acpi.c:203: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result

---

arch/x86/pci/acpi.c static bool resource_contains(struct res · line 194

Quoted 8 lines
arch/x86/pci/acpi.c renamed from arch/x86/pci/acpi.c.orig +1 -1
@@ -188,7 +188,7 @@ static bool resource_contains(struct res
 	return false;
 }
 
-static void coalesce_windows(struct pci_root_info *info, int type)
+static void coalesce_windows(struct pci_root_info *info, unsigned long type)
 {
 	int i, j;
 	struct resource *res1, *res2;

Applied to my for-linus tree, thanks.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center