Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3938298rwe; Mon, 17 Apr 2023 05:59:21 -0700 (PDT) X-Google-Smtp-Source: AKy350Z9P+x2UWzFAeky+edN3Bs/05bwkstTSLT7YKwa901lU6qpqz7HExmVqnVY6KfVrlgGtajo X-Received: by 2002:a17:903:78e:b0:1a1:c3eb:afd with SMTP id kn14-20020a170903078e00b001a1c3eb0afdmr11221743plb.65.1681736361105; Mon, 17 Apr 2023 05:59:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681736361; cv=none; d=google.com; s=arc-20160816; b=NX+mlgyvmsmgbsCnrDS7ydbk2MZkeJ3WyTuRV89lIxZ9zMnCb0RcxAtf6crFSK2ViY wp7+OMXV1Zl6+Zi3uF/58jxwZhAHcclyU+SqUtHSv9L8nEldQutTvuCxDSPNT5btNNeP kQCN8HhuXhqK+Y2zjfQ32YLH/C+6PsXQ5gEdMubppTiQpGFTyA9u26Z+8HLrK5e6Oo0a MfJJOA9MGk3Kf5/Tv2+eJZRUmeZegGlhCI9SidX8flkPTDtmmkQDNYItcMX7vwlgAOg6 LDUvqLohi2mstWbEINq9UML8NWIyx51lyMRmPEYUFIja5m9WnGOitoYoUdIPnvbiht3j O8fw== 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=iG0FY3Kl3gPj6CmaqKKFtjB0wM01q0+Cw6A2hhNMH4g=; b=h8WDkoWNDwchaA+wpACfvTBldffitYI8jFuKz6LogN3lsqlBY1uzXZuuuFPHh/drmE TlGx4tPo3X1ml1dZlY1nuLcDN3JqUR/Hkit/Hh9SORaRoM95e6q1gBXVAFq/rUp4Gs02 dyQm/q67swBggp7oyRM9Uh+casvclpa46PQCIol+GsMJrISCXhdX9Pgu7fF9hB+qaJgc n4mb7cCy3LkYeN9HsgZIxdZugyQBHIdOggUGcqe1GIDg3ZTu7SWexUSPTSnSUoFEgssN XzzxRLAayBVKh0evNvHUnQjV49MQh2Gpt7qO9PKj3xEyGffHg+wJloPbf6cVlSV8rcrW rakQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=BBEQa6NU; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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 y19-20020a1709029b9300b001a67ffb3546si5048456plp.231.2023.04.17.05.59.09; Mon, 17 Apr 2023 05:59:21 -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=BBEQa6NU; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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 S229643AbjDQM6C (ORCPT + 99 others); Mon, 17 Apr 2023 08:58:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231346AbjDQM5V (ORCPT ); Mon, 17 Apr 2023 08:57:21 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE20F9754; Mon, 17 Apr 2023 05:57: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-out1.suse.de (Postfix) with ESMTPS id 7444321A79; Mon, 17 Apr 2023 12:57:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1681736221; 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=iG0FY3Kl3gPj6CmaqKKFtjB0wM01q0+Cw6A2hhNMH4g=; b=BBEQa6NUG7vLr3ul5YZVF3dQYc/iGt5Ytsx51/ik0XKZftZeHvpY8Xr1Ky2r2Riezga1CI 4s9UWzwmeoLYidXEPd3PiEv4ng0HDcDsUM/mSSlTqF7QPe9EOOeF4+rEa8ixR44VROWWAk HkIWt3+A9rO3XJbubEMNB0mFv6D7TB8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1681736221; 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=iG0FY3Kl3gPj6CmaqKKFtjB0wM01q0+Cw6A2hhNMH4g=; b=Sf+t+o+Fk/BHIdeJH+iKB4J3syr51ygn2goItN4HoVYlXk2EHVBX4YTaCqbs4dmMjWg0em Hszq33oX/i6vfMAw== 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 D9AAC1391A; Mon, 17 Apr 2023 12:57:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4A9ZNBxCPWToWwAAMHmgww (envelope-from ); Mon, 17 Apr 2023 12:57:00 +0000 From: Thomas Zimmermann To: arnd@arndb.de, daniel.vetter@ffwll.ch, deller@gmx.de, javierm@redhat.com, gregkh@linuxfoundation.org Cc: linux-arch@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org, Thomas Zimmermann , Geert Uytterhoeven Subject: [PATCH v3 07/19] arch/m68k: Merge variants of fb_pgprotect() into single function Date: Mon, 17 Apr 2023 14:56:39 +0200 Message-Id: <20230417125651.25126-8-tzimmermann@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230417125651.25126-1-tzimmermann@suse.de> References: <20230417125651.25126-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=unavailable 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 Merge all variants of fb_pgprotect() into a single function body. There are two different cases for MMU systems. For non-MMU systems, the function body will be empty. No functional changes, but this will help with the switch to . Signed-off-by: Thomas Zimmermann Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven --- arch/m68k/include/asm/fb.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/arch/m68k/include/asm/fb.h b/arch/m68k/include/asm/fb.h index b86c6e2e26dd..4f96989922af 100644 --- a/arch/m68k/include/asm/fb.h +++ b/arch/m68k/include/asm/fb.h @@ -7,17 +7,13 @@ #include #include -#ifdef CONFIG_MMU -#ifdef CONFIG_SUN3 static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, unsigned long off) { +#ifdef CONFIG_MMU +#ifdef CONFIG_SUN3 pgprot_val(vma->vm_page_prot) |= SUN3_PAGE_NOCACHE; -} #else -static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, - unsigned long off) -{ if (CPU_IS_020_OR_030) pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE030; if (CPU_IS_040_OR_060) { @@ -25,11 +21,9 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, /* Use no-cache mode, serialized */ pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE_S; } -} #endif /* CONFIG_SUN3 */ -#else -#define fb_pgprotect(...) do {} while (0) #endif /* CONFIG_MMU */ +} static inline int fb_is_primary_device(struct fb_info *info) { -- 2.40.0