From patchwork Thu May 30 09:38:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 165408 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp726846ili; Thu, 30 May 2019 02:38:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxk+v8Sk92WwmqdUAm25qEd5YFJHQeMMBd7xKRyRalsjbKZCLkLl+PYrGn6BTei/CQWgoZg X-Received: by 2002:a62:5f42:: with SMTP id t63mr2854128pfb.83.1559209115346; Thu, 30 May 2019 02:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559209115; cv=none; d=google.com; s=arc-20160816; b=IrJ6Ej6/bv9BO3Vb852MllGjB9e3I541iqalbZu/O7VpXhWqgRNRocWB1SsWPFLwF8 2cKxXogq5JMpRJCWj3U1KDvya3jcy4zwSoG3aDgvSox9WYE6kBSdkDLRQ14+HgrLoKq9 1ae+V1gGwAY16YHm++I4brmPTtdhqyHSZ3FUFz9eQJAPkfNUdtKaLW+i8ylXyiuwto+1 S++budJdszNzZ6vH6HdrlraeqfIbQfPIlLTCgHU7NDDjd4G/8aJkutGStLV/ujhklYHa 03+2Hgk3z04rU/IZiFaZuBX5EX5qkNbENFloHXV8MrtC5XP4yfvooUaohpgmG0arflZq SoFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=z64OqaBKebP/IGWv/kYHRoni/+OEoO1da+k1V6PUKYs=; b=rUcSC5lRBO2XOZ0JLEgCVdLYFLDEzV4XiJ+CtT/uaKY7UcI2HjRW4LmUrIcrrzeMu4 /68s/IJv9iw2Pqvg6GTLjYtagnzRGUjpqbI0bAVflZiw1VgLFhjbWwhM5kLc8qsG+bHF szqYMVjA3IRl0cMr6s7w0YyPW2O/nwyLjKbzddUCdR9c/UhSSkCxpzoRafcUgcpBfqzU 8TXT5emTBCkiNMK6JIno4iR8jYpXyViPc4QjBiolp6+sbxIs5JodgVNw+FYYITTJPSeh 9O9/+wkfo2mgKezT7ChOst36x2vzZ8oHMX8h4Gja+0ZJZFCelnJv9vO5sG34lzQmJVL6 lirA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=taNAEZaz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5si2382076pjp.77.2019.05.30.02.38.34; Thu, 30 May 2019 02:38:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=taNAEZaz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727547AbfE3Jie (ORCPT + 30 others); Thu, 30 May 2019 05:38:34 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:37400 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726985AbfE3Jid (ORCPT ); Thu, 30 May 2019 05:38:33 -0400 Received: by mail-ot1-f67.google.com with SMTP id r10so4997820otd.4 for ; Thu, 30 May 2019 02:38:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=z64OqaBKebP/IGWv/kYHRoni/+OEoO1da+k1V6PUKYs=; b=taNAEZazM5IQxDbQ2mFszG0wR4L81GyL8Ap+4mK1C4thAbnUHxhoyKSjldtfqzLsV0 3z7MsKrcBT+S2M57pYMgvw0YQzde10soZ8rGblawSfQkUGbHZYqsrL6oR8feVKI4XiHR t4JaujT8q/ihoVuP9gn68k3ErB1wfeDBc2pS6RMXtuUstFv5nvZs0ZlYuKENfyZgNegI 33oCc15MK3LnRxkAl1qH2a7CpXF2wc76FxX8E8X4ZlZ3wDptQ7pRWUoBsKzCqtNGKm33 qa+fVH30kPtJgGwZ2UtaITKQa18pg3tj2qalI0ZojV8ARrBP4cHZx0CEk4lNphT1b/HI qSxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=z64OqaBKebP/IGWv/kYHRoni/+OEoO1da+k1V6PUKYs=; b=n1fey8qgKtF46jiO0Tazf91dgBBr33ghnWUFIvMitvAps6aIcQD0vYbAJVeyQ9g7Fw o0ftKPHpphdrPBc2/RmQgIwsX3lIXcgi0eqQ6Bl7jkCKvjAhy0no3tTaqafnVkvBcvdS GJggZ5RRn6+mxKOBbdKcgrdoAnJWFaIhhSZTMZtzfrEJtcUC3/j4Z5bAZum5h7Vs+T97 gI97UwXTNIe3cPB3ZsEkMtS3APV1HRaccsh2+RoF40KIrvlV8SE3b3EUnUFOv+LoC2Jd i4NK2M8tFUECZZmbj05Pa+HKnS01TIzNhGe42/P65DwTLdMKa6BtTS+WOiE6+cT6gYCJ KaKw== X-Gm-Message-State: APjAAAXnjnBoxwLq4kWWf6I6BNn2lAPgcrkCvVY0dPm+7LnnNTpfRbmm tl0khrDrgQxOK0Mb2d4g8swt3A== X-Received: by 2002:a9d:6195:: with SMTP id g21mr37277otk.179.1559209112907; Thu, 30 May 2019 02:38:32 -0700 (PDT) Received: from localhost.localdomain (li808-42.members.linode.com. [104.237.132.42]) by smtp.gmail.com with ESMTPSA id t21sm844082otj.46.2019.05.30.02.38.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 May 2019 02:38:31 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH] perf symbols: Remove unused variable 'err' Date: Thu, 30 May 2019 17:38:01 +0800 Message-Id: <20190530093801.20510-1-leo.yan@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Variable 'err' is defined but never used in function symsrc__init(), remove it and directly return -1 at the end of the function. Signed-off-by: Leo Yan --- tools/perf/util/symbol-elf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.17.1 diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index 4ad106a5f2c0..fdc5bd7dbb90 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -699,7 +699,6 @@ bool __weak elf__needs_adjust_symbols(GElf_Ehdr ehdr) int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name, enum dso_binary_type type) { - int err = -1; GElf_Ehdr ehdr; Elf *elf; int fd; @@ -793,7 +792,7 @@ int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name, elf_end(elf); out_close: close(fd); - return err; + return -1; } /**