Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20653869rwd; Thu, 29 Jun 2023 05:27:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6iPv642w0BPqwFvemRaTX3DRiQN+87Qfhqd/C2QD+ZNil+FaGcvy9aq7Y1W0MTP+kMvA9y X-Received: by 2002:a17:90a:bd06:b0:263:8c2:6290 with SMTP id y6-20020a17090abd0600b0026308c26290mr7323060pjr.43.1688041676188; Thu, 29 Jun 2023 05:27:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688041676; cv=none; d=google.com; s=arc-20160816; b=RmQrlxPIelawiSabknijahd4t53KHvd8GU8uoPkbOsiQjfZhiRBNMJXZyKtmWEG2/e a1Ph/Ct76bejlt1qIVFLLfyhJYnx14l/s7FRenSlU5ghzOWrJNhTZ93MrdaMFBDcGfXm mN6+pZ5gO5yXZ6PiOlhtuf/KPZzakK8vIbKEyIEPiGyHo9KOlA74TEmR2Rj7qYxpOMb/ vs1wbevB1irrKj3jiD8+Alilwy9bnDrq8hw3GIm1nrZwk9YAu//ryiz84Hhctz1NlD0J Y4lhwj3C27fE6/7u4xhA8kjrDsA1fEo6ddRUfRn6B/o8bHD67bf4E5mFx3KeyPCV1lTm 6j4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=8M3t+sIilpS+dvhDHVydT9EOWn+SooUMabnf/LFMHbo=; fh=x1lsLZAszt1kRDYpHDLFbIJ24RSShv9Hbd//zL0jhAA=; b=PFoK2MZO7g/k7FcVZucZt25mnwWko9I0pse2nVF1xTlx9dzXuiNK2pqnEJriSIHeo1 83XyhdlSZzMCHJ2mV0vJkkL4TlU5B4QdK3ZoS9GmZuRBL9YrMY+PnJDnAYoRavbVCa1U hBHUHOCImMk9o34cp7ouCftTdigkGcpzh4pqAtUPxfO12goAMRPVEoYUj29WbzlzZ8te Rmccl34TDBp2E7JV+ak0tEO48tXQFI0Uf4Q0Sp5eghoLFbjmbqwVR+qVILZNtNxWth1e 2OuG43HrmLeGelX0EVT7+5pGimSNsc1RRE8s9AHH1UI/4MTAbY0OOTDixcP+x1ybixhw kjqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ZbROsLIJ; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id em22-20020a17090b015600b0026359a2e980si1092899pjb.21.2023.06.29.05.27.43; Thu, 29 Jun 2023 05:27:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ZbROsLIJ; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232518AbjF2MVC (ORCPT + 99 others); Thu, 29 Jun 2023 08:21:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232138AbjF2MUG (ORCPT ); Thu, 29 Jun 2023 08:20:06 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1E04359A; Thu, 29 Jun 2023 05:20:03 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 524A81FD69; Thu, 29 Jun 2023 12:20:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1688041202; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8M3t+sIilpS+dvhDHVydT9EOWn+SooUMabnf/LFMHbo=; b=ZbROsLIJAkfIR/+jRVLDcd83SvH5cZmugk8kZwgL9JSMI/gKbyQR3HtKCm4o42ShuZpYkk PpOlJkUDBbcOuQ/YbZW1LarrlsmuvA7IRfwyIlPCdp7XjLFZCUf5QkBgkeK4CAQiyu6q+p rHluDhQg1B0za6ZvhP208NqkrxcQvWg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1688041202; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8M3t+sIilpS+dvhDHVydT9EOWn+SooUMabnf/LFMHbo=; b=3Hj6UbEAQMoFiqqs75ilDIpvJONgA2he7Vj193adp37UYAYmUsCXwiE0RCS1+n5Jev4Itq c8ZFL5Xhnj0s4yAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D74B113905; Thu, 29 Jun 2023 12:20:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8BuiM/F2nWRlVAAAMHmgww (envelope-from ); Thu, 29 Jun 2023 12:20:01 +0000 From: Thomas Zimmermann To: arnd@arndb.de, deller@gmx.de, daniel@ffwll.ch, airlied@gmail.com Cc: linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-hyperv@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-arch@vger.kernel.org, Thomas Zimmermann , Randy Dunlap Subject: [PATCH 11/12] fbdev/core: Protect edid_info with CONFIG_ARCH_HAS_EDID_INFO Date: Thu, 29 Jun 2023 13:45:50 +0200 Message-ID: <20230629121952.10559-12-tzimmermann@suse.de> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230629121952.10559-1-tzimmermann@suse.de> References: <20230629121952.10559-1-tzimmermann@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Guard usage of edid_info with CONFIG_ARCH_HAS_EDID_INFO instead of CONFIG_X86. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Daniel Vetter Cc: Helge Deller Cc: Randy Dunlap --- drivers/video/fbdev/core/fbmon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c index 35be4431f649a..9ae063021e431 100644 --- a/drivers/video/fbdev/core/fbmon.c +++ b/drivers/video/fbdev/core/fbmon.c @@ -1480,17 +1480,19 @@ int fb_validate_mode(const struct fb_var_screeninfo *var, struct fb_info *info) -EINVAL : 0; } -#if defined(CONFIG_FIRMWARE_EDID) && defined(CONFIG_X86) +#if defined(CONFIG_FIRMWARE_EDID) const unsigned char *fb_firmware_edid(struct fb_info *info) { unsigned char *edid = NULL; +#if defined(CONFIG_ARCH_HAS_EDID_INFO) /* * We need to ensure that the EDID block is only * returned for the primary graphics adapter. */ if (fb_is_primary_device(info)) edid = edid_info.dummy; +#endif return edid; } -- 2.41.0