From patchwork Thu Aug 8 22:18:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 170875 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp9166658ile; Thu, 8 Aug 2019 15:23:53 -0700 (PDT) X-Received: by 2002:adf:dc51:: with SMTP id m17mr20596965wrj.256.1565302792529; Thu, 08 Aug 2019 15:19:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfIZR4mzV8az8ASk/WJrJSeil2hkLNpbjI4Wkmlkbm67doVSZvfUIW64e8WQ4m7ad7QIB3 X-Received: by 2002:adf:dc51:: with SMTP id m17mr20596916wrj.256.1565302791693; Thu, 08 Aug 2019 15:19:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565302791; cv=none; d=google.com; s=arc-20160816; b=LnHwxpaSIrUN0hDH5GeXv8/dLQmYS5WRUTDyFgPZ7qIan9LBv/ahhvcmxKov6fvMvc oFNejbVpxhHQN6vX/cYgI1T5zJCQL7UkAZ4jSPm//kZRDOJZip/446CRundBsMdULeyW XBMxYNzKsl2litMocrODkJ8jW24OOI38J57BFjN6ltfOGQueTKLPlsEHpTWsf1v+Oosn JyAco6x12/6zi6RSzhHTngHOuwPnkaS7YquUiZMLiJgMvvzkgl0Itaqvo7+qjHwitrwY TA4c5PF5HnI9S+ivZFgQzFBktCJJFvw7kRBq86q5TqHpxkHbjEHcNrhEajT7/BTN+L61 fVgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:message-id:date:to:from:dkim-signature:dkim-filter :delivered-to:dkim-signature:dkim-filter; bh=lYugqsGpLZlGxhrPUvOr45MZKyj3OMb8SlSlj15Pko4=; b=ueKr2ERyGdJU/usZPCSQmb1ObjaDa8ZlE9O2YFeGHTFJUbW46sIgSaqU/ijglmYSK8 I/EXQ68SInzrWiivfRuGCSVER3/XkoQmmnsQ+Mu9ACtLn4vnAdgGscEOohbOeaNfblc4 xb/r3rnKYqmnlE9xlQnHtrxwunP6YNIcNIYOdOceVrCIeijporXHiRUvecvzystv/Amd ab0aQw/mvNnSlpQVzl2/0blX5kByWlsv3SShhsk+nZI3HY4ZHNOGY03mWaVd/655AUIT 589KpmhyE9fSIETJxOHGK2btYrGfOaRA58jpG4pMoWV2s1l/GFojO2JVK/BkVo+mDN1d vcdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alsa-project.org header.s=default header.b=JHwREDpl; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=hQt8lUc8; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTPS id x1si5101046wrl.353.2019.08.08.15.19.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Aug 2019 15:19:51 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=pass header.i=@alsa-project.org header.s=default header.b=JHwREDpl; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=hQt8lUc8; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0209D84C; Fri, 9 Aug 2019 00:19:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0209D84C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1565302790; bh=pN/xCAaI6BVdnjPs6reyKn3pZAhaJirv8pUndU+oI2c=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=JHwREDpl89PSnqgU4ZrwF28A2L0fZyi/Mdprl9HhM+Uo8N1rNnV4k2OExWF8Ai/wc ixBB6yA8n2DEa/Q1SkSsXQzU7+XuGhrzpkgol44/QQVB4B+CLwVMNCVIeSvHnX6DGw ZSFV5bLhNghzYt7eBj+VWfaJ0RHzpTX9TAYVVqPg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8F3B4F803F3; Fri, 9 Aug 2019 00:18:59 +0200 (CEST) X-Original-To: alsa-devel@Alsa-project.org Delivered-To: alsa-devel@Alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0D908F80534; Fri, 9 Aug 2019 00:18:58 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE, SPF_PASS autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [IPv6:2a01:7e01::f03c:91ff:fed4:a3b6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D3456F803F3 for ; Fri, 9 Aug 2019 00:18:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D3456F803F3 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=sirena.org.uk header.i=@sirena.org.uk header.b="hQt8lUc8" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0fHyooWX4YfWNSEA+xxXc9BQYNHmBsni7NuDnl1CB1Q=; b=hQt8lUc8f1BHN0qNkcjgPVTWx QTPJro3oXhsQLoALaKT4WOmMChkHpc/p9QlLTqc2ubfnzUifzs1TdsDNPEjEN9D6FHowj+YNOUs93 NqL3W3DFTJR9cOp3B/fVx3FO7XUkmZJTNUeqr3aFRhAuU0qpzAfA1fx0LIiANpzzUJl64=; Received: from ypsilon.sirena.org.uk ([2001:470:1f1d:6b5::7]) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hvqkI-0004DK-4X; Thu, 08 Aug 2019 22:18:54 +0000 Received: by ypsilon.sirena.org.uk (Postfix, from userid 1000) id 4ECEF2742BDD; Thu, 8 Aug 2019 23:18:53 +0100 (BST) From: Mark Brown To: Liam Girdwood , Pierre-Louis Bossart Date: Thu, 8 Aug 2019 23:18:50 +0100 Message-Id: <20190808221850.25963-1-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: alsa-devel@Alsa-project.org, Mark Brown Subject: [alsa-devel] [PATCH] ASoC: sof: Fix warning when IPC flood test is not enabled X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" dentry is only used when the flood test is done so move the declaration of the variable inside the ifdef for the flood test. Signed-off-by: Mark Brown --- sound/soc/sof/debug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.20.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel Reviewed-by: Ranjani Sridharan diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c index 40940b2fe9d5..54cd431faab7 100644 --- a/sound/soc/sof/debug.c +++ b/sound/soc/sof/debug.c @@ -221,7 +221,6 @@ static ssize_t sof_dfsentry_read(struct file *file, char __user *buffer, { struct snd_sof_dfsentry *dfse = file->private_data; struct snd_sof_dev *sdev = dfse->sdev; - struct dentry *dentry; loff_t pos = *ppos; size_t size_ret; int skip = 0; @@ -229,6 +228,8 @@ static ssize_t sof_dfsentry_read(struct file *file, char __user *buffer, u8 *buf; #if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST) + struct dentry *dentry; + dentry = file->f_path.dentry; if ((!strcmp(dentry->d_name.name, "ipc_flood_count") || !strcmp(dentry->d_name.name, "ipc_flood_duration_ms")) &&