From patchwork Mon Nov 7 16:05:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aashish Sharma X-Patchwork-Id: 16525 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2144367wru; Mon, 7 Nov 2022 08:09:23 -0800 (PST) X-Google-Smtp-Source: AMsMyM4TwLVwUJLFBeubTLdr2HyTa/0yMgdGlBCeET0w9G/oHLLplWnJrUz5YMlc2GADTuxotZ5+ X-Received: by 2002:a17:906:8a57:b0:7ad:69fb:3a with SMTP id gx23-20020a1709068a5700b007ad69fb003amr47460232ejc.179.1667837363082; Mon, 07 Nov 2022 08:09:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667837363; cv=none; d=google.com; s=arc-20160816; b=NrBxM9VoF3j1eouHhO6QgUrmySiGdy30rFJ91O7j2rijN0KrNZA4ELY997Tlfel0Av 0MuAvZYl9mz4j/irbEbG5WwCBwk2WievcMyT2/idWoFU9FtnFfdgWk3jhH3Gt6ZzISLn cb8MrQWmdcl/07OY67+zqJkcv+FTnHlLy15S5RbbqNlqJP+zZIxgMOsOmMCeLdh0fOlB 1eIdaloSWd59u4VJUMO1cV0Q7gp+H9PLwCaFhMtc30liyZJjVZcEBx/YR/+MbNpg3gTc /khkinmxMl0z30j9OI1OIqvdWyHQGxgnMwtzbFIhGMUMOLSXMSMwI++HcAqphyYKqt0M 2L5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :dkim-signature; bh=uzyJmD4Az7oDjnhe50YqEbIJmUOevvk6mu3w0w9rs0M=; b=EIWuH3fI/BzcC82s7aIPcG6AHZNRgzf1+D1uJxxQWBDrRyRZrxXKsrgyh7yh5O6GQ+ stNAfQbfxORLvp4N7QqbJ6KkWT/Z9tr7ZPszzx7/kOrUuGLLjti/zJ9O+78+HGWolUJx IAn7syB4VvlqabX+6KVYwvcpn9Hb2WBBxdZPzalGwbJ9LwqFLVdYeVePTCeiLvmZNnXe LH3RIl7pWvzkosDf6ofvfQtP+pEdEF7vnvXcVnk6IbVcRsv6AMi8OXJ2UBb5eWtUQ7+X 2Wl/r+jHyphV+GWT0MZt54aPileggf77PuzWflbrhjrkDgYpY5miaghc59PB6uZhRcvu CqHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=oKFlD2B2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e22-20020a17090658d600b007836ec6999dsi4541261ejs.904.2022.11.07.08.08.56; Mon, 07 Nov 2022 08:09:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=oKFlD2B2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232399AbiKGQGr (ORCPT + 99 others); Mon, 7 Nov 2022 11:06:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232974AbiKGQGK (ORCPT ); Mon, 7 Nov 2022 11:06:10 -0500 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95A0D201B9 for ; Mon, 7 Nov 2022 08:06:05 -0800 (PST) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-36f8318e4d0so113009157b3.20 for ; Mon, 07 Nov 2022 08:06:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=uzyJmD4Az7oDjnhe50YqEbIJmUOevvk6mu3w0w9rs0M=; b=oKFlD2B2yYnR5QAxTSpg1boCCe5kMcd2OGkAr2b7uP5Vhhu69jDguYhGLf+4jMd/6q CJJko9hpe4UAMAZIDiMTcMbjrXPiMBvaL1v7Ou4D0byHWg+oBqWEoA/wLSP5Zvnqoo7p h57M0HIiEa6UE9hh6k2hLAp8P0qj3WQfJKRMH5htBfloGT4xYYUhnYOnpb0Dgr51y6dh rKlEHkFZhShVV2ygmS4zuDgOnZKw77pRLxLoipkVJ1CMzQqTprBo+FcNedyZ6wexR4Wo 11wlWC4hZO39Emgr0lFivsQ9L2QdMiFSV/qP0oSAKShveUgnam80LQRHuYtI6cYadp3K 26+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=uzyJmD4Az7oDjnhe50YqEbIJmUOevvk6mu3w0w9rs0M=; b=JqwtAQpZ8/5EV5v9mipeGjrcFv4z+tn8BT2C5I4GkDreOxgfW+j9XORPZa/9ZTu+rd XAwMY/e3N9uasJ95B5oynNaCWo4XWyZXN8jgKs4BlgqOqlQR+Da/0HHHSQhshZO2xe1c 0dkLIij1IL0Ir/sdV86BacU3h4/Wc3i3LNfhaKYVxmG3juTHNVRaQGzq5cl9T7u4WGL6 Z/hMc0sskNZOmZ6Xe1LF2og/KuqB1XhyTYYzRowrwBJAI5NvQ/nxyQ7vwL4csmer1cW9 +c5qszetQ3q/WpXgtyADcOGHYvY8PwCtSCcL2TWwbMcG0QIVOjowxLz29A2KUEWLmNpv v88A== X-Gm-Message-State: ACrzQf1SfB2cD+GiR9OnnEQdye+1kryH5iS9elhVnASTGSu6gHeXIo4n wHYSYLVUHIYpPzb55fFx8UbevuphIYM9 X-Received: from ezekiel.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:108e]) (user=shraash job=sendgmr) by 2002:a25:2d48:0:b0:6d1:16bf:1e07 with SMTP id s8-20020a252d48000000b006d116bf1e07mr547301ybe.423.1667837164848; Mon, 07 Nov 2022 08:06:04 -0800 (PST) Date: Mon, 7 Nov 2022 21:35:56 +0530 Mime-Version: 1.0 X-Mailer: git-send-email 2.38.1.431.g37b22c650d-goog Message-ID: <20221107160556.2139463-1-shraash@google.com> Subject: [PATCH] tracing: Fix warning on variable 'struct trace_array' From: Aashish Sharma To: Steven Rostedt , Masami Hiramatsu , "Martin K. Petersen" Cc: Arun Easi , linux-kernel@vger.kernel.org, Aashish Sharma X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748854230925201592?= X-GMAIL-MSGID: =?utf-8?q?1748854230925201592?= Move the declaration of 'struct trace_array' out of #ifdef CONFIG_TRACING block, to fix the following warning when CONFIG_TRACING is not set: >> include/linux/trace.h:63:45: warning: 'struct trace_array' declared inside parameter list will not be visible outside of this definition or declaration Fixes: 1a77dd1c2bb5 ("scsi: tracing: Fix compile error in trace_array calls when TRACING is disabled") Cc: Arun Easi Signed-off-by: Aashish Sharma Reviewed-by: Guenter Roeck Acked-by: Masami Hiramatsu (Google) --- include/linux/trace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/trace.h b/include/linux/trace.h index b5e16e438448..80ffda871749 100644 --- a/include/linux/trace.h +++ b/include/linux/trace.h @@ -26,13 +26,13 @@ struct trace_export { int flags; }; +struct trace_array; + #ifdef CONFIG_TRACING int register_ftrace_export(struct trace_export *export); int unregister_ftrace_export(struct trace_export *export); -struct trace_array; - void trace_printk_init_buffers(void); __printf(3, 4) int trace_array_printk(struct trace_array *tr, unsigned long ip,