Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2231692rwl; Thu, 6 Apr 2023 07:33:17 -0700 (PDT) X-Google-Smtp-Source: AKy350bBDVMrufGff2TzisU1az7KPPYXnd2btfz3cD8F8i5QHNH6dwWYpYvYezSecaKHZ0luPYzK X-Received: by 2002:a17:906:3449:b0:8b1:e791:faef with SMTP id d9-20020a170906344900b008b1e791faefmr6385654ejb.67.1680791597157; Thu, 06 Apr 2023 07:33:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680791597; cv=none; d=google.com; s=arc-20160816; b=zE/kDPPhMmVxAqiyz3b2/VrpqanFjih0BTNqQy5VQruK1n5sAcmIUaNZgZ7jsYXZQI XHuVtRUQKYvYztd4Fp6tJoGypXADN+FNCtil/KfKsLZriup+MSGMW0Q0k2NrEbzFmIgp dCMb+7mBQ6AUd/lwmIB/pRZHI6Ok6IK7+vM9dhjiSP9HLj/lYFrHnFUk51QjtEz30OiH uFAEbvmmQFf4HxRMrCdQFyNcczYQieIzmngoGrpNYi50tYW1Z4jneTWv83uD8ZKazQta S/WzKQlEup0QfdSOjKBHvSYdATDc8fcNWcNvMpCr8geGN1yYNw16nxdoaQo7382xbCBl efjw== 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=+46qFTFMNcdHLr7CFpxgNQZLup0NYTKzSP4VBItIjug=; b=l6S8AxTfPxDIr210BNa5a6dwVpaVjr9DqG4DZ8njqS5igA1me2NA64OLSLkf2BAAmQ 0RImFKRtTbFZl+worihapWh8Lej7+KzA8Af/ABPp33V4+1g180O2t0fHmyQURGwZzGTb wx6oXrnEuPoGg2UjDr4SfnHH/vV6bjDN/5dG5NImv3N7fzicdBsswGtBIY3ywzJbKuA3 bW5C+LvreaJma+wixBLex+VadYd6PM8J01L0l8/jb0DhFxeFt51hx3bhlEetNsdTsa15 D2iKd8+MxSvLcADx0ANF2xoVAbn22LHmMmrC1zZbBU8lMg2ZMGE2oRqzK7QQ3g8Zf2kS rWiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=pyCgUmov; 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 a13-20020a17090682cd00b009396c25a12bsi1348007ejy.855.2023.04.06.07.32.51; Thu, 06 Apr 2023 07:33:17 -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=pyCgUmov; 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 S239280AbjDFOau (ORCPT + 99 others); Thu, 6 Apr 2023 10:30:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239109AbjDFOa0 (ORCPT ); Thu, 6 Apr 2023 10:30:26 -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 A0ECD9747; Thu, 6 Apr 2023 07:30:25 -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 452611FE30; Thu, 6 Apr 2023 14:30:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1680791424; 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=+46qFTFMNcdHLr7CFpxgNQZLup0NYTKzSP4VBItIjug=; b=pyCgUmovT6q4il8l+8jwHCjU+r2dumG5cOIbYgn6QwKo5mjPKoyXEkL6mn/JOa7jmitEUE 1nNmmdoYhFfSAYM/vq7EO8I3Z7C6xxUA1gdTXL41iMqFe5RQfPbKRYzzG0BjlT9PQX6QHB bSlHzmOx8rDRrDsEWcchZmco18KKYjE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1680791424; 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=+46qFTFMNcdHLr7CFpxgNQZLup0NYTKzSP4VBItIjug=; b=Y9HAV9prH3F81NWxZhDDga/ToiVk5bNBuJD+zfFrt4Kjiw8AjQuqnNHtPPk4xIOreovs3r AQ4ONMQQQGGVsGCQ== 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 DCEF713A1D; Thu, 6 Apr 2023 14:30:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id QEQeNX/XLmS4LgAAMHmgww (envelope-from ); Thu, 06 Apr 2023 14:30:23 +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 Subject: [PATCH v2 07/19] arch/m68k: Merge variants of fb_pgprotect() into single function Date: Thu, 6 Apr 2023 16:30:07 +0200 Message-Id: <20230406143019.6709-8-tzimmermann@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230406143019.6709-1-tzimmermann@suse.de> References: <20230406143019.6709-1-tzimmermann@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 --- 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