Skip to contentSkip to conversation

ACPI / osl: remove unused code

PATCH In review Andy Shevchenko 1 participant 2 messages Aug 14, 2015 – Aug 17, 2015 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI / osl: remove unused code

The readq() and writeq() helpers are available in the asm-generic/io-64-nonatomic-hi-lo.h and asm-generic/io-64-nonatomic-lo-hi.h headers. Someone may use them when it's needed.

---
 drivers/acpi/osl.c | 28 ----------------------------
 1 file changed, 28 deletions(-)
drivers/acpi/osl.c +0 -28
index 21c1e71..11c32ff 100644
@@ -944,21 +944,6 @@ acpi_status acpi_os_write_port(acpi_io_address port, u32 value, u32 width)
 
 EXPORT_SYMBOL(acpi_os_write_port);
 
-#ifdef readq
-static inline u64 read64(const volatile void __iomem *addr)
-{
-	return readq(addr);
-}
-#else
-static inline u64 read64(const volatile void __iomem *addr)
-{
-	u64 l, h;
-	l = readl(addr);
-	h = readl(addr+4);
-	return l | (h << 32);
-}
-#endif
-
 acpi_status
 acpi_os_read_memory(acpi_physical_address phys_addr, u64 *value, u32 width)
 {
@@ -1005,19 +990,6 @@ acpi_os_read_memory(acpi_physical_address phys_addr, u64 *value, u32 width)
 	return AE_OK;
 }
 
-#ifdef writeq
-static inline void write64(u64 val, volatile void __iomem *addr)
-{
-	writeq(val, addr);
-}
-#else
-static inline void write64(u64 val, volatile void __iomem *addr)
-{
-	writel(val, addr);
-	writel(val>>32, addr+4);
-}
-#endif
-
 acpi_status
 acpi_os_write_memory(acpi_physical_address phys_addr, u64 value, u32 width)
 {
Signature · 1 line
2.5.0
#1 lore raw
Quoted 4 lines · Andy Shevchenko

The readq() and writeq() helpers are available in the asm-generic/io-64-nonatomic-hi-lo.h and asm-generic/io-64-nonatomic -lo-hi.h
headers. Someone may use them when it's needed.

Please discard this, it has been tested with CONFIG_ACPI=n only. I will resend this when test both cases.

Quoted 56 lines
---
 drivers/acpi/osl.c | 28 ----------------------------
 1 file changed, 28 deletions(-)
drivers/acpi/osl.c +0 -15
index 21c1e71..11c32ff 100644
@@ -944,21 +944,6 @@ acpi_status acpi_os_write_port(acpi_io_address 
 port, u32 value, u32 width)
 
 EXPORT_SYMBOL(acpi_os_write_port);
 
-#ifdef readq
-static inline u64 read64(const volatile void __iomem *addr)
-{
-	return readq(addr);
-}
-#else
-static inline u64 read64(const volatile void __iomem *addr)
-{
-	u64 l, h;
-	l = readl(addr);
-	h = readl(addr+4);
-	return l | (h << 32);
-}
-#endif
-
 acpi_status
 acpi_os_read_memory(acpi_physical_address phys_addr, u64 *value, u32 

width)
{

drivers/acpi/osl.c +0 -13
@@ -1005,19 +990,6 @@ acpi_os_read_memory(acpi_physical_address 
 phys_addr, u64 *value, u32 width)
 	return AE_OK;
 }
 
-#ifdef writeq
-static inline void write64(u64 val, volatile void __iomem *addr)
-{
-	writeq(val, addr);
-}
-#else
-static inline void write64(u64 val, volatile void __iomem *addr)
-{
-	writel(val, addr);
-	writel(val>>32, addr+4);
-}
-#endif
-
 acpi_status
 acpi_os_write_memory(acpi_physical_address phys_addr, u64 value, u32 

width)
{

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy