Skip to contentSkip to conversation

memblock: remove stale #else and the code it protects

PATCH In review Mike Rapoport 3 participants 4 messages Sep 27, 2018 – Oct 22, 2018

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

PATCH 1/1 memblock: remove stale #else and the code it protects

During removal of HAVE_MEMBLOCK definition, the #else clause of the

	#ifdef CONFIG_HAVE_MEMBLOCK
		...
	#else
		...
	#endif

conditional was not removed.

Remove it now.

---
 include/linux/memblock.h | 5 -----
 1 file changed, 5 deletions(-)
include/linux/memblock.h +0 -5
index d3bc270..d4d0e01 100644
@@ -597,11 +597,6 @@ static inline void early_memtest(phys_addr_t start, phys_addr_t end)
 {
 }
 #endif
-#else
-static inline phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align)
-{
-	return 0;
-}
 
 #endif /* __KERNEL__ */
 
Signature · 1 line
2.7.4
#1 lore raw

Which tree it applies?

Quoted 37 lines · Mike Rapoport

During removal of HAVE_MEMBLOCK definition, the #else clause of the

	#ifdef CONFIG_HAVE_MEMBLOCK
		...
	#else
		...
	#endif

conditional was not removed.

Remove it now.

---
include/linux/memblock.h | 5 -----

1 file changed, 5 deletions(-)
include/linux/memblock.h +0 -5
index d3bc270..d4d0e01 100644
@@ -597,11 +597,6 @@ static inline void early_memtest(phys_addr_t start, phys_addr_t end)
 {
 }
 #endif
-#else
-static inline phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align)
-{
-	return 0;
-}
 
 #endif /* __KERNEL__ */
 
Signature · 1 line
2.7.4
Signature · 2 lines
Wei Yang
Help you, Help me
#2 lore raw
Quoted 1 line · Wei Yang

Which tree it applies?

To mmotm of the end of September.

Quoted 40 lines · Mike Rapoport

include/linux/memblock.h static inline void early_memtest(phys_addr_t

Quoted 24 lines

During removal of HAVE_MEMBLOCK definition, the #else clause of the

	#ifdef CONFIG_HAVE_MEMBLOCK
		...
	#else
		...
	#endif

conditional was not removed.

Remove it now.

---
include/linux/memblock.h | 5 -----

1 file changed, 5 deletions(-)
include/linux/memblock.h +0 -0
index d3bc270..d4d0e01 100644
@@ -597,11 +597,6 @@ static inline void early_memtest(phys_addr_t

start, phys_addr_t end)

include/linux/memblock.h static inline void early_memtest(phys_addr_t start, phys_addr_t end)

Quoted 5 lines
include/linux/memblock.h +0 -2
 {
 }
 #endif
-#else
-static inline phys_addr_t memblock_alloc(phys_addr_t size,

phys_addr_t align)

Quoted 8 lines
include/linux/memblock.h +0 -3
-{
-	return 0;
-}
 
 #endif /* __KERNEL__ */
 
Signature · 1 line
2.7.4
Signature · 1 line
Sent from my Android device with K-9 Mail. Please excuse my brevity.
#3 lore raw
Quoted 7 lines · Mike Rapoport
Quoted 1 line · Wei Yang

Which tree it applies?

To mmotm of the end of September.

I may lost some background of this change.

The file I am looking at is
https://git.kernel.org/pub/scm/linux/kernel/git/mhocko/mm.git/tree/include/linux/memblock.h
which has CONFIG_HAVE_MEMBLOCK in line 5.

Quoted 32 lines
Quoted 32 lines · Mike Rapoport

include/linux/memblock.h static inline void early_memtest(phys_addr_t

Quoted 24 lines

During removal of HAVE_MEMBLOCK definition, the #else clause of the

	#ifdef CONFIG_HAVE_MEMBLOCK
		...
	#else
		...
	#endif

conditional was not removed.

Remove it now.

---
include/linux/memblock.h | 5 -----

1 file changed, 5 deletions(-)
include/linux/memblock.h +0 -0
index d3bc270..d4d0e01 100644
@@ -597,11 +597,6 @@ static inline void early_memtest(phys_addr_t

start, phys_addr_t end)

include/linux/memblock.h static inline void early_memtest(phys_addr_t start, phys_addr_t end)

Quoted 5 lines
include/linux/memblock.h +0 -2
 {
 }
 #endif
-#else
-static inline phys_addr_t memblock_alloc(phys_addr_t size,

phys_addr_t align)

Quoted 4 lines
Quoted 4 lines

include/linux/memblock.h static inline void early_memtest(phys_addr_t start, phys_addr_t end) · line 600

Quoted 4 lines
include/linux/memblock.h +0 -3
-{
-	return 0;
-}
 

And in that file, here is memblock_reserved_memory_within.

I guess this is not the version you are trying to fix.

BTW, if you could put the commit SHA which removes the CONFIG_HAVE_MEMBLOCK, it would be easier for others to catch up.

Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
include/linux/memblock.h +0 -0
 #endif /* __KERNEL__ */
 
Signature · 1 line
2.7.4
Signature · 1 line
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Signature · 2 lines
Wei Yang
Help you, Help me