From patchwork Mon Jul 10 11:04:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 107285 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp3259710qge; Mon, 10 Jul 2017 04:05:48 -0700 (PDT) X-Received: by 10.98.19.78 with SMTP id b75mr43952469pfj.212.1499684747903; Mon, 10 Jul 2017 04:05:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499684747; cv=none; d=google.com; s=arc-20160816; b=V+d2BaJEStPfXKctOCJUOWSpwfh6dZWM+thIR2HnXTJIt77vQd0MPkxfFoMPkBzAn4 prR20zivGs/NvG68hp6a0TPwFZZttkm9OXUFhAX536S5dfoycXogb1Zett7zsKGGpTAS RcIfBYIdAqo+wCHa+vQNY1DUNNpHWNVqLNYelxXnR6RLjPderNiQTk0ON2vFfv6kju/g 3Zf+Tj3umJPTmVZ5mUqOB7A0aEA5KAudMOgzKbw0RsG4Ik1CWhyBq0Hdb/K/EV4Gtn/f lhY2wNyaDgtR+yiSvVdR4yFGqoPny0de0SNWodVB3Ks73VITFJHgWUZhEXEo98DwzvJv 0iKw== 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 :arc-authentication-results; bh=ERfhIUjKroRfIcYLinMlmtmFWG4sZm8+1VO7JH3FWY4=; b=pxekzGu+W6Krr3U9qYICalT/OLS44X8kRRB7DSxuWyXQDwxJcjFI0U7tgUcNmB7j4I Ja5hjhdv5tV7AXqGqdpI9vrtacYtw0zkiQ8/w2xhcab/KyUv5bbL5kyPfl2rTWeeAvQ5 wNEuGevzl64+LQMdHeLs+dCWQsvbbDQv6fBMB4GUwr9K/ES0+uR9y3Crq4AXFL9B0sTI O434mDgp7X8waNpHbPev9xSLSTqOxS0sQlCDtZW78O5SkOxGqbIgIEdGRfAH4EAeBIun iEuH2l/FWbxhGvTGDgAwQ+qg6h4qdgNaS1ggitaLMD601qoOk4zwh7znf5ydUfE3F81a dwIQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i12si7893922pgp.477.2017.07.10.04.05.47; Mon, 10 Jul 2017 04:05:47 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753645AbdGJLFf (ORCPT + 25 others); Mon, 10 Jul 2017 07:05:35 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:62329 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753173AbdGJLFd (ORCPT ); Mon, 10 Jul 2017 07:05:33 -0400 Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0MYvSd-1d7e1A3z6Z-00VeZ7; Mon, 10 Jul 2017 13:05:24 +0200 From: Arnd Bergmann To: Steven Rostedt , Ingo Molnar Cc: Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH] ftrace: avoid unused-variable warning Date: Mon, 10 Jul 2017 13:04:56 +0200 Message-Id: <20170710110521.600806-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:yJERjpPNv4IQfUgTdl4L4/1GUcUUTt3KN2cIq7Z+KWe76eJWWSL LTFqG8RCPx+lK36aIGbk3m3fYEP0N1W9dHBGsFkxOdNlNGw1I/DGA1BotUBnsRdYx7I36Gv xg7O0Bjmxm44oGdEhm3ASu86TNGxHWuvJfCyHBylGqqwpEo8K0J3s4yGVKsZ6Z/MvT1zIw7 /IVcWhUcdysS2OsIANh4A== X-UI-Out-Filterresults: notjunk:1; V01:K0:zucGs2RvBdA=:L3Cv7Wib5WajeQ00zUwXRG BJl8lwcbevxDfzG4YPkHM6FS3aples+d9+IgQSwhtQWIuwTUWP5vdNHZb2Nb0u6FGAbjJ5KLl R71KaYkxYP21NQQqFxR/ZfHapQqUM644/FqpSgOAcQ1b4GPT10K8SkHr+sw3h3puKcZXd6Gxo qLoB/J/NzW2j5NhLcxyUAq8eIw+xKC5Gpzdz2EMD2HKkQIcxdHX10+6YtDUEeOZSDAdYNnxlv ucTpyBII4/VVQe7gnj+9oR51JKr/JFFBRp934fmIhVvdSQZJy6QkbZ8R8E+ySYLuckmGsTC3V +uIhrsyXi2xjNdBsmpfde2I3FFohazwsWKRBBejw5lSqCm8qaMpLO5f+Oey8rFT/c4f0i9INl yb0CUtZ0afzmdXn6DMKbsNuiOOZ3FraNcshlzET9liTrTxFC00G+ftebe1ufs/+WBivpMHhup x6D1LaMDHaaH7JFr5joTPn4UXqSM07p1f7OxsrcdUVEgRNhDW5ac/G8nuaV2p8uKVrvUdnt1O swTXmp1s9YDlMWGaSmITgiyoOoCMk9WDv3vDQY5pUW+XcuYN+8HYAZYaRWzXk1YbN5IWYa96w +xG5A8gTZ5Cc45WTJUjzggeqyv76GJkXDdL1xQve7o1VASLehBaDt1nvz+fIqccbItFfai6qn l1SmTqBifr/pG2fJWg5UpcBpRRVJWRZLU1BVMnYxPngSQWEfaPLJAk1x1Nb2bTbWLrnQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_DYNAMIC_FTRACE is disabled, we get a harmless compile-time warning: kernel/trace/trace_stack.c: In function 'stack_trace_filter_open': kernel/trace/trace_stack.c:412:21: error: unused variable 'ops' [-Werror=unused-variable] We could replace the macros in linux/ftrace.h with inline functions, which would solve this problem for all callers. However, as these are only called internally in the ftrace code, it seems simpler to change the caller instead. Fixes: 0f17976568b3 ("ftrace: Fix regression with module command in stack_trace_filter") Signed-off-by: Arnd Bergmann --- kernel/trace/trace_stack.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.9.0 diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c index b4a751e8f9d6..0ff29008383b 100644 --- a/kernel/trace/trace_stack.c +++ b/kernel/trace/trace_stack.c @@ -409,9 +409,7 @@ static const struct file_operations stack_trace_fops = { static int stack_trace_filter_open(struct inode *inode, struct file *file) { - struct ftrace_ops *ops = inode->i_private; - - return ftrace_regex_open(ops, FTRACE_ITER_FILTER, + return ftrace_regex_open(inode->i_private, FTRACE_ITER_FILTER, inode, file); }