mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 1/1] x86/bugs: Remove dead code which might prevent from building
@ 2025-10-24 12:59 Andy Shevchenko
  2025-10-24 22:27 ` Pawan Gupta
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2025-10-24 12:59 UTC (permalink / raw)
  To: Borislav Petkov (AMD), David Kaplan, linux-kernel, llvm
  Cc: Thomas Gleixner, Peter Zijlstra, Josh Poimboeuf, Pawan Gupta,
	Ingo Molnar, Dave Hansen, x86, H. Peter Anvin, Nathan Chancellor,
	Nick Desaulniers, Bill Wendling, Justin Stitt, Andy Shevchenko

Clang, in particular, is not happy about dead code:

arch/x86/kernel/cpu/bugs.c:1830:20: error: unused function 'match_option' [-Werror,-Wunused-function]
 1830 | static inline bool match_option(const char *arg, int arglen, const char *opt)
      |                    ^~~~~~~~~~~~
1 error generated.

Remove a leftover from the previous cleanup.

Fixes: 02ac6cc8c5a1 ("x86/bugs: Simplify SSB cmdline parsing")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 arch/x86/kernel/cpu/bugs.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index e08de5b0d20b..d7fa03bf51b4 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -1827,13 +1827,6 @@ void unpriv_ebpf_notify(int new_state)
 }
 #endif
 
-static inline bool match_option(const char *arg, int arglen, const char *opt)
-{
-	int len = strlen(opt);
-
-	return len == arglen && !strncmp(arg, opt, len);
-}
-
 /* The kernel command line selection for spectre v2 */
 enum spectre_v2_mitigation_cmd {
 	SPECTRE_V2_CMD_NONE,
-- 
2.50.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 1/1] x86/bugs: Remove dead code which might prevent from building
  2025-10-24 12:59 [PATCH v1 1/1] x86/bugs: Remove dead code which might prevent from building Andy Shevchenko
@ 2025-10-24 22:27 ` Pawan Gupta
  0 siblings, 0 replies; 2+ messages in thread
From: Pawan Gupta @ 2025-10-24 22:27 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Borislav Petkov (AMD),
	David Kaplan, linux-kernel, llvm, Thomas Gleixner,
	Peter Zijlstra, Josh Poimboeuf, Ingo Molnar, Dave Hansen, x86,
	H. Peter Anvin, Nathan Chancellor, Nick Desaulniers,
	Bill Wendling, Justin Stitt

On Fri, Oct 24, 2025 at 02:59:59PM +0200, Andy Shevchenko wrote:
> Clang, in particular, is not happy about dead code:
> 
> arch/x86/kernel/cpu/bugs.c:1830:20: error: unused function 'match_option' [-Werror,-Wunused-function]
>  1830 | static inline bool match_option(const char *arg, int arglen, const char *opt)
>       |                    ^~~~~~~~~~~~
> 1 error generated.
> 
> Remove a leftover from the previous cleanup.
> 
> Fixes: 02ac6cc8c5a1 ("x86/bugs: Simplify SSB cmdline parsing")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  arch/x86/kernel/cpu/bugs.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
> index e08de5b0d20b..d7fa03bf51b4 100644
> --- a/arch/x86/kernel/cpu/bugs.c
> +++ b/arch/x86/kernel/cpu/bugs.c
> @@ -1827,13 +1827,6 @@ void unpriv_ebpf_notify(int new_state)
>  }
>  #endif
>  
> -static inline bool match_option(const char *arg, int arglen, const char *opt)
> -{
> -	int len = strlen(opt);
> -
> -	return len == arglen && !strncmp(arg, opt, len);
> -}

Reviewed-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-24 22:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-24 12:59 [PATCH v1 1/1] x86/bugs: Remove dead code which might prevent from building Andy Shevchenko
2025-10-24 22:27 ` Pawan Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®