[PATCH v1 1/2] x86/cpuid: Remove obsolete CPUID(0x2) iteration macro

"Ahmed S. Darwish" <[email protected]>
Newsgroups dev.linux.lists.x86-cpuid,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
The CPUID(0x2) cache descriptors iterator at <cpuid/leaf_0x2_api.h>:

    for_each_leaf_0x2_desc()

has no more call sites.  Remove it.

Fixes: 4772304ee651 ("x86/cpu: Use consolidated CPUID leaf 0x2 descriptor table")
Signed-off-by: Ahmed S. Darwish <[email protected]>
---
 arch/x86/include/asm/cpuid/leaf_0x2_api.h | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/arch/x86/include/asm/cpuid/leaf_0x2_api.h b/arch/x86/include/asm/cpuid/leaf_0x2_api.h
index 46ecb15e92d9..09fa3070b271 100644
--- a/arch/x86/include/asm/cpuid/leaf_0x2_api.h
+++ b/arch/x86/include/asm/cpuid/leaf_0x2_api.h
@@ -40,29 +40,6 @@ static inline void cpuid_get_leaf_0x2_regs(union leaf_0x2_regs *regs)
 	}
 }
 
-/**
- * for_each_leaf_0x2_desc() - Iterator for CPUID leaf 0x2 descriptors
- * @regs:	Leaf 0x2 output, as returned by cpuid_get_leaf_0x2_regs()
- * @desc:	Pointer to the returned descriptor for each iteration
- *
- * Loop over the 1-byte descriptors in the passed leaf 0x2 output registers
- * @regs.  Provide each descriptor through @desc.
- *
- * Note that the first byte is skipped as it is not a descriptor.
- *
- * Sample usage::
- *
- *	union leaf_0x2_regs regs;
- *	u8 *desc;
- *
- *	cpuid_get_leaf_0x2_regs(&regs);
- *	for_each_leaf_0x2_desc(regs, desc) {
- *		// Handle *desc value
- *	}
- */
-#define for_each_leaf_0x2_desc(regs, desc)				\
-	for (desc = &(regs).desc[1]; desc < &(regs).desc[16]; desc++)
-
 /**
  * for_each_leaf_0x2_entry() - Iterator for parsed leaf 0x2 descriptors
  * @regs:   Leaf 0x2 register output, returned by cpuid_get_leaf_0x2_regs()
-- 
2.49.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.