chrome-platform.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Tzung-Bi Shih <tzungbi@kernel.org>
To: bleung@chromium.org, groeck@chromium.org
Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev
Subject: [PATCH] platform/chrome: cros_ec: fix compilation warning
Date: Tue,  3 Oct 2023 08:04:53 +0000	[thread overview]
Message-ID: <20231003080453.4011301-1-tzungbi@kernel.org> (raw)

When including cros_ec.h solely, the compiler emits the following
warning:
> 'struct cros_ec_device' declared inside parameter list
  will not be visible outside of this definition or declaration

Fix it by forward declaration.

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
---
 drivers/platform/chrome/cros_ec.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/platform/chrome/cros_ec.h b/drivers/platform/chrome/cros_ec.h
index bbca0096868a..2b2574236030 100644
--- a/drivers/platform/chrome/cros_ec.h
+++ b/drivers/platform/chrome/cros_ec.h
@@ -10,6 +10,8 @@
 
 #include <linux/interrupt.h>
 
+struct cros_ec_device;
+
 int cros_ec_register(struct cros_ec_device *ec_dev);
 void cros_ec_unregister(struct cros_ec_device *ec_dev);
 
-- 
2.42.0.582.g8ccd20d70d-goog


             reply	other threads:[~2023-10-03  8:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03  8:04 Tzung-Bi Shih [this message]
2023-10-05  2:13 ` [PATCH] platform/chrome: cros_ec: fix compilation warning Guenter Roeck
2023-10-05 10:20 ` patchwork-bot+chrome-platform
2023-10-11  2:20 ` patchwork-bot+chrome-platform

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231003080453.4011301-1-tzungbi@kernel.org \
    --to=tzungbi@kernel.org \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=groeck@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).