From: Sun Jian <sun.jian.kdev@gmail.com>
To: luca.ceresoli@bootlin.com
Cc: linux-staging@lists.linux.dev, thierry.reding@gmail.com,
jonathanh@nvidia.com, skomatineni@nvidia.com, mchehab@kernel.org,
linux-tegra@vger.kernel.org, linux-media@vger.kernel.org,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
Sun Jian <sun.jian.kdev@gmail.com>
Subject: [PATCH v2 1/2] staging: media: tegra-video: move tegra210_csi_soc declaration to csi.h
Date: Wed, 31 Dec 2025 20:39:54 +0800 [thread overview]
Message-ID: <20251231123955.277384-2-sun.jian.kdev@gmail.com> (raw)
In-Reply-To: <20251231123955.277384-1-sun.jian.kdev@gmail.com>
Sparse warns that tegra210_csi_soc is not declared in tegra210.c.
The symbol is referenced from csi.c, so it must remain global. Move the
declaration to csi.h so users see it via the header and avoid extern
declarations in .c files.
SPARSE: drivers/staging/media/tegra-video/tegra210.c:1214:28: warning: symbol 'tegra210_csi_soc' was not declared. Should it be static?
No functional change intended.
Link: https://lore.kernel.org/linux-staging/DFCAOR6T9DPE.2MOL0K9O3HP1N@bootlin.com/T/
Suggested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com>
---
drivers/staging/media/tegra-video/csi.c | 4 ----
drivers/staging/media/tegra-video/csi.h | 4 ++++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/media/tegra-video/csi.c b/drivers/staging/media/tegra-video/csi.c
index 604185c00a1a..3c3f6e3fd1ec 100644
--- a/drivers/staging/media/tegra-video/csi.c
+++ b/drivers/staging/media/tegra-video/csi.c
@@ -835,10 +835,6 @@ static void tegra_csi_remove(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
}
-#if defined(CONFIG_ARCH_TEGRA_210_SOC)
-extern const struct tegra_csi_soc tegra210_csi_soc;
-#endif
-
static const struct of_device_id tegra_csi_of_id_table[] = {
#if defined(CONFIG_ARCH_TEGRA_210_SOC)
{ .compatible = "nvidia,tegra210-csi", .data = &tegra210_csi_soc },
diff --git a/drivers/staging/media/tegra-video/csi.h b/drivers/staging/media/tegra-video/csi.h
index 3e6e5ee1bb1e..609c5952e050 100644
--- a/drivers/staging/media/tegra-video/csi.h
+++ b/drivers/staging/media/tegra-video/csi.h
@@ -130,6 +130,10 @@ struct tegra_csi_soc {
unsigned int tpg_frmrate_table_size;
};
+#if defined(CONFIG_ARCH_TEGRA_210_SOC)
+extern const struct tegra_csi_soc tegra210_csi_soc;
+#endif
+
/**
* struct tegra_csi - NVIDIA Tegra CSI device structure
*
--
2.43.0
next prev parent reply other threads:[~2025-12-31 12:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-29 7:01 [PATCH] staging: media: tegra-video: move tegra210_csi_soc declaration to csi.h Sun Jian
2025-12-31 9:29 ` Luca Ceresoli
2025-12-31 12:39 ` [PATCH v2 0/2] staging: media: tegra-video: clean up shared SoC declarations Sun Jian
2025-12-31 12:39 ` Sun Jian [this message]
2025-12-31 14:01 ` [PATCH v2 1/2] staging: media: tegra-video: move tegra210_csi_soc declaration to csi.h Luca Ceresoli
2025-12-31 12:39 ` [PATCH v2 2/2] staging: media: tegra-video: move tegra20_vip_soc declaration to vip.h Sun Jian
2025-12-31 14:01 ` Luca Ceresoli
2026-01-02 11:44 ` [PATCH v3 0/2] staging: media: tegra-video: move shared SoC declarations to headers Sun Jian
2026-01-02 11:45 ` [PATCH v3 1/2] staging: media: tegra-video: move tegra210_csi_soc declaration to csi.h Sun Jian
2026-01-02 11:45 ` [PATCH v3 2/2] staging: media: tegra-video: move tegra20_vip_soc declaration to vip.h Sun Jian
2026-01-02 15:53 ` [PATCH v3 0/2] staging: media: tegra-video: move shared SoC declarations to headers Luca Ceresoli
2026-01-05 15:43 ` sun jian
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=20251231123955.277384-2-sun.jian.kdev@gmail.com \
--to=sun.jian.kdev@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linux-tegra@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=mchehab@kernel.org \
--cc=skomatineni@nvidia.com \
--cc=thierry.reding@gmail.com \
/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 NNTP newsgroup(s).