mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] objtool: remove unneeded variable from add_prefix_symbols()
       [not found] <20230614063248.27844-1-luojianhong@cdjrlc.com>
@ 2023-06-14  6:36 ` baomingtong001
  0 siblings, 0 replies; only message in thread
From: baomingtong001 @ 2023-06-14  6:36 UTC (permalink / raw)
  To: jpoimboe, peterz; +Cc: linux-kernel

fix the following coccicheck warning:

tools/objtool/check.c:4135:5-13: Unneeded variable: "warnings". Return 
"0".

Signed-off-by: Mingtong Bao <baomingtong001@208suo.com>
---
  tools/objtool/check.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index a13c257f80dd..d12de0e2cf00 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -4132,7 +4132,6 @@ static int add_prefix_symbols(struct objtool_file 
*file)
  {
      struct section *sec;
      struct symbol *func;
-    int warnings = 0;

      for_each_sec(file, sec) {
          if (!(sec->sh.sh_flags & SHF_EXECINSTR))
@@ -4146,7 +4145,7 @@ static int add_prefix_symbols(struct objtool_file 
*file)
          }
      }

-    return warnings;
+    return 0;
  }

  static int validate_symbol(struct objtool_file *file, struct section 
*sec,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-14  6:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230614063248.27844-1-luojianhong@cdjrlc.com>
2023-06-14  6:36 ` [PATCH] objtool: remove unneeded variable from add_prefix_symbols() baomingtong001

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®