From patchwork Fri Jul 7 11:08:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jose Abreu X-Patchwork-Id: 42335 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dTR8c-0001WY-Gk; Fri, 07 Jul 2017 11:09:30 +0000 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.89/mailfrontend-6) with esmtp id 1dTR8a-0002Ch-5W; Fri, 07 Jul 2017 13:09:30 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752582AbdGGLI7 (ORCPT + 1 other); Fri, 7 Jul 2017 07:08:59 -0400 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9]:52531 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752566AbdGGLI5 (ORCPT ); Fri, 7 Jul 2017 07:08:57 -0400 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 3326824E0E74; Fri, 7 Jul 2017 04:08:42 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 1BE8FB05; Fri, 7 Jul 2017 04:08:42 -0700 (PDT) Received: from joabreu-VirtualBox.internal.synopsys.com (joabreu-e7440.internal.synopsys.com [10.107.19.95]) by mailhost.synopsys.com (Postfix) with ESMTP id AE927AD8; Fri, 7 Jul 2017 04:08:40 -0700 (PDT) From: Jose Abreu To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jose Abreu , Carlos Palminha , Hans Verkuil Subject: [PATCH v7 2/6] [media] cec-notifier.h: Prevent build warnings using forward declaration Date: Fri, 7 Jul 2017 12:08:05 +0100 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2017.7.7.110016 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1000_1099 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, CT_TEXT_PLAIN_UTF8_CAPS 0, IN_REP_TO 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, MULTIPLE_REAL_RCPTS 0, NO_URI_HTTPS 0, REFERENCES 0, __ANY_URI 0, __CC_NAME 0, __CC_NAME_DIFF_FROM_ACC 0, __CC_REAL_NAMES 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FROM_DOMAIN_IN_ANY_CC2 0, __FROM_DOMAIN_IN_RCPT 0, __HAS_CC_HDR 0, __HAS_FROM 0, __HAS_LIST_ID 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __NO_HTML_TAG_RAW 0, __REFERENCES 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' When CONFIC_CEC_NOTIFIER is not set and we only include cec-notifier.h we can get build warnings like these ones: "warning: ‘struct cec_notifier’ declared inside parameter list will not be visible outside of this definition or declaration" Prevent these warnings by using forward declaration of notifier structure. Signed-off-by: Jose Abreu Cc: Carlos Palminha Cc: Hans Verkuil --- include/media/cec-notifier.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/media/cec-notifier.h b/include/media/cec-notifier.h index 298f996..84f9376 100644 --- a/include/media/cec-notifier.h +++ b/include/media/cec-notifier.h @@ -21,14 +21,14 @@ #ifndef LINUX_CEC_NOTIFIER_H #define LINUX_CEC_NOTIFIER_H -#include -#include - struct device; struct edid; struct cec_adapter; struct cec_notifier; +#include +#include + #if IS_REACHABLE(CONFIG_CEC_CORE) && IS_ENABLED(CONFIG_CEC_NOTIFIER) /**