Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp3925953rwp; Sat, 15 Jul 2023 12:16:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlH4hccCgCTVMkvHSABuo1FrblGq/Hy/HNXJ+oFjOhreEJe/wSWcLX/LQhEQZ2tN0nu8s49Q X-Received: by 2002:a5d:43d1:0:b0:315:a32d:311a with SMTP id v17-20020a5d43d1000000b00315a32d311amr2212400wrr.2.1689448559937; Sat, 15 Jul 2023 12:15:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689448559; cv=none; d=google.com; s=arc-20160816; b=wGR78QywUgW1XSJFeB2gHjcp8wk8wngTtiusnODEyVcEhzhbe4JhQmK+08wJjOG5Z7 vOv8mtkhwVA4ef2ShV1jrgCK9GhcFL5vTIvP/iiRwDoyU0LojtvxfjJgugY1mmC6Ooi8 uNVb0o00zKVSGB0aHApK9LR7rRNu4Hmn7OLRbnf0AAk3twqCvjbTT719C3VEIjhGVO+F f4LpKly5m9oAeHFw66YYZPmO57KMZmTxn1B0VCJ1faaE8JYH6EJduGJwZ3swTGlGmPtu YM5S5KZzOmmY0/bNL1cM0p/cOZKS7nBdhyTYweCDr9HQ9oFz8FhAmBltAzIX4iVFnoqK vQ4A== 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=2J9osIBjziSBvYjqJRuY3hx6gZ+n0EagAzqtJtaDujc=; fh=DlSDabtIaQPl3MMv03YwZgJ95XfOLejimNWqoqa7qy8=; b=fPoFBthmGes9pj/aw7yLh6D2PXDaLujZJzWI8xb74mZjSekwvcC5I4Qrrlsiq/Ysa5 nzfzxI+yeEk2E8IBHPgFbmAbevPJn8vysCkPu/uzN81ynse/5Ahvvg8RUKHg7MX0hbWn ZLM8zEjJISWNVt3yDUWYQhDfXkJruLgJOHp+TSaobs6T5Z1ItZr4SItwMmUJWIsXTN3N CkvYs3B679umaDzW3at39JDiguDvDMZrzs0zfTyUfz9gALRgzy0hsy3KEBILHhU4GP7M HWZnV2VHFF5yMztjUADeUSudofkMKdQD0mWArOOOvsp2ZgnTkFG5MVlnSxh0zXcI+I9w 00kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=d+psqWeU; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=leD8INTe; 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 w6-20020a50fa86000000b0051def1478e6si10507516edr.586.2023.07.15.12.15.36; Sat, 15 Jul 2023 12:15:59 -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=d+psqWeU; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=leD8INTe; 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 S231172AbjGOSyF (ORCPT + 99 others); Sat, 15 Jul 2023 14:54:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229906AbjGOSx5 (ORCPT ); Sat, 15 Jul 2023 14:53:57 -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 62C8E2735; Sat, 15 Jul 2023 11:53:48 -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 CD5EB21AB1; Sat, 15 Jul 2023 18:53:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1689447226; 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=2J9osIBjziSBvYjqJRuY3hx6gZ+n0EagAzqtJtaDujc=; b=d+psqWeUUCVfcE4r23QFl9LBE5068B3nH1TzUrWvC1qZJQrVGRwGU2+t2PGHsbW9VpkmIw EEDX7msXSAntfZimcuIm9Cib95YW0sBqtfUfGDYc5FmCEZjIDLvsZuoSwfP8Sh+HzSr5OF FMUH3B8f+7FV8Lb2C1TwujpcfC5P+mc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1689447226; 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=2J9osIBjziSBvYjqJRuY3hx6gZ+n0EagAzqtJtaDujc=; b=leD8INTeZe/fX0rwE+ZVIF1awTohtjmBICEQJyIxyhgzeXXG/rOQTQGxax57m1L2RqPbd2 VAMrZzy2R6VS3ABw== 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 616EA133F7; Sat, 15 Jul 2023 18:53:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id SH/HFjrrsmQCBwAAMHmgww (envelope-from ); Sat, 15 Jul 2023 18:53:46 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, geert@linux-m68k.org, dan.carpenter@linaro.org Cc: linux-sh@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, linux-input@vger.kernel.org, linux-media@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-geode@lists.infradead.org, linux-hyperv@vger.kernel.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, Thomas Zimmermann , Sam Ravnborg , Russell King Subject: [PATCH v4 03/18] fbdev: Remove FBINFO_DEFAULT from kzalloc()'ed structs Date: Sat, 15 Jul 2023 20:51:45 +0200 Message-ID: <20230715185343.7193-4-tzimmermann@suse.de> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230715185343.7193-1-tzimmermann@suse.de> References: <20230715185343.7193-1-tzimmermann@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by kzalloc(). So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v4: * clarify commit message (Geert, Dan) v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Helge Deller Cc: Russell King --- drivers/video/fbdev/controlfb.c | 2 +- drivers/video/fbdev/cyber2000fb.c | 2 +- drivers/video/fbdev/valkyriefb.c | 1 - drivers/video/fbdev/vermilion/vermilion.c | 2 +- drivers/video/fbdev/vt8500lcdfb.c | 3 +-- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/controlfb.c b/drivers/video/fbdev/controlfb.c index 82eeb139c4eb..717134c141ff 100644 --- a/drivers/video/fbdev/controlfb.c +++ b/drivers/video/fbdev/controlfb.c @@ -775,7 +775,7 @@ static void __init control_init_info(struct fb_info *info, struct fb_info_contro info->par = &p->par; info->fbops = &controlfb_ops; info->pseudo_palette = p->pseudo_palette; - info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; + info->flags = FBINFO_HWACCEL_YPAN; info->screen_base = p->frame_buffer + CTRLFB_OFF; fb_alloc_cmap(&info->cmap, 256, 0); diff --git a/drivers/video/fbdev/cyber2000fb.c b/drivers/video/fbdev/cyber2000fb.c index 38c0a6866d76..98ea56a9abf1 100644 --- a/drivers/video/fbdev/cyber2000fb.c +++ b/drivers/video/fbdev/cyber2000fb.c @@ -1459,7 +1459,7 @@ static struct cfb_info *cyberpro_alloc_fb_info(unsigned int id, char *name) cfb->fb.var.accel_flags = FB_ACCELF_TEXT; cfb->fb.fbops = &cyber2000fb_ops; - cfb->fb.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; + cfb->fb.flags = FBINFO_HWACCEL_YPAN; cfb->fb.pseudo_palette = cfb->pseudo_palette; spin_lock_init(&cfb->reg_b0_lock); diff --git a/drivers/video/fbdev/valkyriefb.c b/drivers/video/fbdev/valkyriefb.c index b166b7cfe0e5..fd4488777032 100644 --- a/drivers/video/fbdev/valkyriefb.c +++ b/drivers/video/fbdev/valkyriefb.c @@ -535,7 +535,6 @@ static int __init valkyrie_init_info(struct fb_info *info, { info->fbops = &valkyriefb_ops; info->screen_base = p->frame_buffer + 0x1000; - info->flags = FBINFO_DEFAULT; info->pseudo_palette = p->pseudo_palette; info->par = &p->par; return fb_alloc_cmap(&info->cmap, 256, 0); diff --git a/drivers/video/fbdev/vermilion/vermilion.c b/drivers/video/fbdev/vermilion/vermilion.c index 32e74e02a02f..71584c775efd 100644 --- a/drivers/video/fbdev/vermilion/vermilion.c +++ b/drivers/video/fbdev/vermilion/vermilion.c @@ -477,7 +477,7 @@ static int vml_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) } info = &vinfo->info; - info->flags = FBINFO_DEFAULT | FBINFO_PARTIAL_PAN_OK; + info->flags = FBINFO_PARTIAL_PAN_OK; err = vmlfb_enable_mmio(par); if (err) diff --git a/drivers/video/fbdev/vt8500lcdfb.c b/drivers/video/fbdev/vt8500lcdfb.c index 31d4e85b220c..42d39a9d5130 100644 --- a/drivers/video/fbdev/vt8500lcdfb.c +++ b/drivers/video/fbdev/vt8500lcdfb.c @@ -300,8 +300,7 @@ static int vt8500lcd_probe(struct platform_device *pdev) fbi->fb.var.vmode = FB_VMODE_NONINTERLACED; fbi->fb.fbops = &vt8500lcd_ops; - fbi->fb.flags = FBINFO_DEFAULT - | FBINFO_HWACCEL_COPYAREA + fbi->fb.flags = FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_YPAN | FBINFO_VIRTFB -- 2.41.0