From nobody Wed Oct 8 21:34:41 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F63E2EA48B; Tue, 24 Jun 2025 20:31:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750797064; cv=none; b=s9ykBHaszgfzx31iWhklbCVYvRVcRwyxvnFhJdNSI14HfD0xpOJTrz7ddX307nk4X6EvUc0VIs1eX3L5bhgv2F4Ujxe8Tto50YNo5RF7wEWY1EmpS0g6qmAar4hxBAv92omugAHY/xxI0wqgf5vOBfB0fHgb9Fxa3HDmKWCEwB4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750797064; c=relaxed/simple; bh=glRBi2ARDp3d+Stsv79iYRajcXAB16Ljdcta010d3iw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=i5/xQgRAy+j25tOrJSUNrvKmVrSnML1LYMqKMoI3BUjbVuMz0pr67hqqW7dVnkVzid5d9HOLluxD5x56w7cCWgC0EoUDZu+zR/epiYh3BXi4uURBYZa5Py6K1JZQPeu1G1gcJ1aXFLsh0MWMfCenmefgqQ5qZq3dkYjxGHW42d4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=luHxbjY8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="luHxbjY8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8336DC4CEF0; Tue, 24 Jun 2025 20:31:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750797063; bh=glRBi2ARDp3d+Stsv79iYRajcXAB16Ljdcta010d3iw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=luHxbjY8QkJ0Yg2QXmhfaKo9Bqs9u5neonEgfPJNBoHYZIanCGdbiyxm4ianZFl6/ VR5mQjb0tkMQrB5tD5M5evHAFgu9dHeDmuV+21qp2tHIakCsiL+o5dKD8wh85h8Por pz3a+fxzlIQtl9KrwdEUL/cZy8d8W7+S/bhWJwxqgF3F+h5kEZEd0FGmCFnoqXd1sE T43uS0SrYZP05oQn9xOkZgR46P5M3t1OXIRNFBNlLB5oqVBIUjtwXw2GwSCfqdxY6J 32TFBKNqAdIGp/Oktup2ZQzNpJLhFSo/Oy+rYifg6mbb5I4CeGUWnuKbCVPeLHXiAL Ke928R8h+5NBQ== From: Mario Limonciello To: Bjorn Helgaas Cc: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Airlie , Simona Vetter , Lukas Wunner , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Woodhouse , Lu Baolu , Joerg Roedel , Will Deacon , Robin Murphy , Alex Williamson , Jaroslav Kysela , Takashi Iwai , dri-devel@lists.freedesktop.org (open list:DRM DRIVERS), linux-kernel@vger.kernel.org (open list), iommu@lists.linux.dev (open list:INTEL IOMMU (VT-d)), linux-pci@vger.kernel.org (open list:PCI SUBSYSTEM), kvm@vger.kernel.org (open list:VFIO DRIVER), linux-sound@vger.kernel.org (open list:SOUND), Daniel Dadap , Mario Limonciello , kernel test robot Subject: [PATCH v5 6/9] Fix access to video_is_primary_device() when compiled without CONFIG_VIDEO Date: Tue, 24 Jun 2025 15:30:39 -0500 Message-ID: <20250624203042.1102346-7-superm1@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250624203042.1102346-1-superm1@kernel.org> References: <20250624203042.1102346-1-superm1@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Mario Limonciello When compiled without CONFIG_VIDEO the architecture specific implementations of video_is_primary_device() include prototypes and assume that video-common.c will be linked. Guard against this so that the fallback inline implementation that returns false will be used when compiled without CONFIG_VIDEO. Acked-by: Thomas Zimmermann Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202506221312.49Fy1aNA-lkp@int= el.com/ Signed-off-by: Mario Limonciello --- v5: * add tag v4: * new patch --- arch/parisc/include/asm/video.h | 2 +- arch/sparc/include/asm/video.h | 2 ++ arch/x86/include/asm/video.h | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/parisc/include/asm/video.h b/arch/parisc/include/asm/vide= o.h index c5dff3223194a..a9d50ebd6e769 100644 --- a/arch/parisc/include/asm/video.h +++ b/arch/parisc/include/asm/video.h @@ -6,7 +6,7 @@ =20 struct device; =20 -#if defined(CONFIG_STI_CORE) +#if defined(CONFIG_STI_CORE) && defined(CONFIG_VIDEO) bool video_is_primary_device(struct device *dev); #define video_is_primary_device video_is_primary_device #endif diff --git a/arch/sparc/include/asm/video.h b/arch/sparc/include/asm/video.h index a6f48f52db584..773717b6d4914 100644 --- a/arch/sparc/include/asm/video.h +++ b/arch/sparc/include/asm/video.h @@ -19,8 +19,10 @@ static inline pgprot_t pgprot_framebuffer(pgprot_t prot, #define pgprot_framebuffer pgprot_framebuffer #endif =20 +#ifdef CONFIG_VIDEO bool video_is_primary_device(struct device *dev); #define video_is_primary_device video_is_primary_device +#endif =20 static inline void fb_memcpy_fromio(void *to, const volatile void __iomem = *from, size_t n) { diff --git a/arch/x86/include/asm/video.h b/arch/x86/include/asm/video.h index 0950c9535fae9..08ec328203ef8 100644 --- a/arch/x86/include/asm/video.h +++ b/arch/x86/include/asm/video.h @@ -13,8 +13,10 @@ pgprot_t pgprot_framebuffer(pgprot_t prot, unsigned long offset); #define pgprot_framebuffer pgprot_framebuffer =20 +#ifdef CONFIG_VIDEO bool video_is_primary_device(struct device *dev); #define video_is_primary_device video_is_primary_device +#endif =20 #include =20 --=20 2.43.0