From mboxrd@z Thu Jan 1 00:00:00 1970 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 0B39F2046B3; Fri, 27 Jun 2025 04:31:31 +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=1750998691; cv=none; b=R02ykp9IJwnpRqZW3COa4ZtJNIwtLkirwgXoOkjMSnKL7GCKV7EFd6f6VLZaqRK8P1mNuDJAT8l1z0iX8BM1gK6HuZ1EPU0pi9qZiFgKoQcuvA4s3WVMLCUSTHnRg7EJ0D3zFdcwWQQEAnAIVuNQo4QcjiA9D45k1LTik4ImpTM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750998691; c=relaxed/simple; bh=glRBi2ARDp3d+Stsv79iYRajcXAB16Ljdcta010d3iw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ViH3w3LSE0XUtIE94FAcp4Q87wU++x7MlvNRYLJtEFVKhnPTLOVFyhkV9r1HWiGdxq5336C/RqFSl/mO9IrU2Uzqlrg43ELF1a6Lji11PEmV7y6sok3vWPN84itomIWbqjCvClsz+KMnOztRbV1HdWV45VffhEi1w3ied66TiiI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QtHC7psT; 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="QtHC7psT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4F82C4CEEB; Fri, 27 Jun 2025 04:31:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750998690; bh=glRBi2ARDp3d+Stsv79iYRajcXAB16Ljdcta010d3iw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QtHC7psTvXuAm8GUu62g1Z6MfEChLwahfYsYeZ6dSSJYOtwK3DlpPOB7kJObVbICA 4A0P9crea3Ggp2CYwQPZb1hCBaJcvMiSvbMF8KPo21C0nY4yMNG4sf5rDm5F2PtFff Mg5mDNRrWQ2o+vtsUUldBtYX/mYYXRA+I2COlEW7qL7COUTDAnbBeKETUk09ObCRIm OVYNuf86cf4FFQc4PjFE8CMeHjuLhY3oJJ5es5T3n0+jSLagsdqaEptykCKtaaa4zT s5vXiY2oolEJH23+9RlT/Xg5Agsyt4aRgw+SNNDznxv3IoENJhbCzk/C2ddhUvW8ax aat4kIp9hIuNg== 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 v6 6/9] Fix access to video_is_primary_device() when compiled without CONFIG_VIDEO Date: Thu, 26 Jun 2025 23:31:05 -0500 Message-ID: <20250627043108.3141206-7-superm1@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250627043108.3141206-1-superm1@kernel.org> References: <20250627043108.3141206-1-superm1@kernel.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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@intel.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/video.h index c5dff3223194a..a9d50ebd6e769 100644 --- a/arch/parisc/include/asm/video.h +++ b/arch/parisc/include/asm/video.h @@ -6,7 +6,7 @@ struct device; -#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 +#ifdef CONFIG_VIDEO bool video_is_primary_device(struct device *dev); #define video_is_primary_device video_is_primary_device +#endif 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 +#ifdef CONFIG_VIDEO bool video_is_primary_device(struct device *dev); #define video_is_primary_device video_is_primary_device +#endif #include -- 2.43.0