From patchwork Tue Jun 19 20:23:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10475399 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8A329601D7 for ; Tue, 19 Jun 2018 20:24:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BA86286B2 for ; Tue, 19 Jun 2018 20:24:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6FF8B28BE8; Tue, 19 Jun 2018 20:24:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 273F8286B2 for ; Tue, 19 Jun 2018 20:24:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030259AbeFSUYh (ORCPT ); Tue, 19 Jun 2018 16:24:37 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:31673 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757081AbeFSUX4 (ORCPT ); Tue, 19 Jun 2018 16:23:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1529439836; x=1560975836; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=LfnLuETl3j/NeWsOHVJ9DDxa9dgFHVDDLakvjcxXxWY=; b=OkS5P67HQddYQRd3folkDUoAEjLKukqxt23po1Gydq8oxfi+fMegod/F oUCccQW8EAV5i4uPyryFuxQqyNJcS8tO3aTDnx1mEJRUWRSpGIGRrOAwy BdiNswAfhbOj1SAF0+bv9WWR1i+57OV+2TlgKTz0oBdgTpEckDueVLsMq GNDI5l9RN1fXcLP8fTIxZUYbeb7IvmuohlUl81ptiSMy6pmNbW7py0kDM JwXoyy+gdqwmtBq16ojNGoVdDv2h6sVkbs13KzzJYkfuu5CP49pW9D8Vs DPaVH8siDeNxP+w96MbVEKZkoua6LAenzx+isMriQLksBHXDFd8t/5dow g==; X-IronPort-AV: E=Sophos;i="5.51,244,1526313600"; d="scan'208";a="81403672" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 20 Jun 2018 04:23:54 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 19 Jun 2018 13:13:46 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip02.wdc.com with ESMTP; 19 Jun 2018 13:23:55 -0700 From: Bart Van Assche To: Omar Sandoval Cc: linux-block@vger.kernel.org, Bart Van Assche Subject: [PATCH 1/9] common/rc: Fix _have_tracepoint() Date: Tue, 19 Jun 2018 13:23:45 -0700 Message-Id: <20180619202353.23631-2-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180619202353.23631-1-bart.vanassche@wdc.com> References: <20180619202353.23631-1-bart.vanassche@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make sure that _have_tracepoint() uses the argument passed to that function instead of using an undefined variable. Signed-off-by: Bart Van Assche Reviewed-by: Johannes Thumshirn --- common/rc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/rc b/common/rc index 7f1728025364..7592400dda82 100644 --- a/common/rc +++ b/common/rc @@ -112,6 +112,8 @@ _have_tracefs() { } _have_tracepoint() { + local event=$1 + if [[ ! -d /sys/kernel/debug/tracing/events/${event} ]]; then SKIP_REASON="tracepoint ${event} does not exist" return 1