Message ID | 20230713130338.31086-19-tzimmermann@suse.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1819931vqm; Thu, 13 Jul 2023 06:20:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlH7JsX2zUVydMBgf+K8dwW2e0V2supZVchi++TQLv0GmLuYA1kq3/DijEBaHjtnTkbGpckR X-Received: by 2002:a2e:9f14:0:b0:2b6:e2c1:9816 with SMTP id u20-20020a2e9f14000000b002b6e2c19816mr1506376ljk.20.1689254435140; Thu, 13 Jul 2023 06:20:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689254435; cv=none; d=google.com; s=arc-20160816; b=ANKVmvvHA3OUwhqhys285pOQgOpyUvZ0ZxKnvgsRWt3zN5uO0igeUYBlyUDVVPSxo5 a56ggyBM3NSgORIGKDfZWlrz8YEIZ8jGq0lYxZ/bF3WJzc2FzSG43D80KOLiA+3aYZRD +BnMXWHMlmOghIaUhC1iz9MB/5xlMmU/UnRIh26JC/USk0NPQDb8aE7M84c/vNQWF3/m drJyPHGLs8XUmpnnAv+s2wS7VL+Cy7JlaEvZwfig+fbYWglCsqGHpAE/d5LtLricTla9 5+4e3lHech2lKcdJvopyEGCMtZLMQkVi9HNALYtF3/8RqQe37+7BQ9YpZv34lx32QB+S uozQ== 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=BhF3dZeu/sRgLYS001c8kRsipcWJq/VtROn6MCXX9YY=; fh=YJs0q611+99g9v9CtNUMd8VTZTbqZYHlrAcs4ODryW8=; b=fVJ3+SyJ8KnAHLTkKNEdQECwtZvJGOLZ5gccM8h35gniW75SYMDKY4GnUzk045aVuA srRz0+5va8EXFQSaJYWctlaKI+nkrI+i/5oDBNPB8NSH87uVeVLj4rxlyRF7L21cjoVt r5SDBQpqoifGBR7UPUC1P59gFw/oVTQE1KnDbyKOy/t4w0dLdy18sWN1+FpuyJpmvj8o DjSkAXgmsEr1QQvKmxjaOL0HBSpl+8Oqdg6mJRntfO1nLRaTr+XtX28JmMEJlT6JehQe xg6hjyU5rlVM/30JvsibiGf3NEnp3YKYSCSbxiYMqnjTKBMhdrWv0zHx/3A5IZj8vgRv uAjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="daj/vSUV"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h2-20020a170906854200b0099329b35b84si7017345ejy.425.2023.07.13.06.20.10; Thu, 13 Jul 2023 06:20:35 -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="daj/vSUV"; 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 S234940AbjGMNEu (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Thu, 13 Jul 2023 09:04:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234887AbjGMNDy (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 09:03:54 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C6E3173B; Thu, 13 Jul 2023 06:03:51 -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 AED3122195; Thu, 13 Jul 2023 13:03:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1689253429; 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=BhF3dZeu/sRgLYS001c8kRsipcWJq/VtROn6MCXX9YY=; b=daj/vSUVGOXQMsWsXdc+Ezaimt8K1JNrFAhTxGzWNIIlcyltS1JZ7L9HTmbYfpLfKmah39 ++SGiAxPCteVilbBx7ZxMORu+6/fY818F5BRt6I4Xec64Sdh80+NuEnIVW0hnVJcU/dZGr Zs1E7FQuffTtJHR//mnA7HbWjGqT5JY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1689253429; 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=BhF3dZeu/sRgLYS001c8kRsipcWJq/VtROn6MCXX9YY=; b=o0c2teiwOf7OFQ0r9afxe1lhotl2L0LZtSF0FaKNAs7JMdD6urEtIcw/0oan/UIGoPysnY EiveJuQ4bX1ndICA== 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 5A42913489; Thu, 13 Jul 2023 13:03:49 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6M7yFDX2r2TVPgAAMHmgww (envelope-from <tzimmermann@suse.de>); Thu, 13 Jul 2023 13:03:49 +0000 From: Thomas Zimmermann <tzimmermann@suse.de> To: deller@gmx.de, javierm@redhat.com 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-nvidia@lists.surfsouth.com, linux-hyperv@vger.kernel.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, Thomas Zimmermann <tzimmermann@suse.de>, Miguel Ojeda <ojeda@kernel.org> Subject: [PATCH v2 18/18] fbdev: Document that framebuffer_alloc() returns zero'ed data Date: Thu, 13 Jul 2023 14:58:38 +0200 Message-ID: <20230713130338.31086-19-tzimmermann@suse.de> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230713130338.31086-1-tzimmermann@suse.de> References: <20230713130338.31086-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 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771311658562098467 X-GMAIL-MSGID: 1771311658562098467 |
Series |
fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags
|
|
Commit Message
Thomas Zimmermann
July 13, 2023, 12:58 p.m. UTC
Most fbdev drivers depend on framebuffer_alloc() to initialize the
allocated memory to 0. Document this guarantee.
Suggested-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Helge Deller <deller@gmx.de>
---
drivers/video/fbdev/core/fb_info.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Thu, Jul 13, 2023 at 3:03 PM Thomas Zimmermann <tzimmermann@suse.de> wrote: > > Most fbdev drivers depend on framebuffer_alloc() to initialize the > allocated memory to 0. Document this guarantee. > > Suggested-by: Miguel Ojeda <ojeda@kernel.org> > Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> > Cc: Helge Deller <deller@gmx.de> Thanks for sending this! Maybe this would be best earlier in the series, so that later patches make more sense (since they use the guarantee), but it is not a big deal. > + * aligned to sizeof(long). Both, the instance of struct fb_info and > + * the driver private data, are cleared to zero. I think both commas may be best omitted (but I am not a native speaker). Reviewed-by: Miguel Ojeda <ojeda@kernel.org> Cheers, Miguel
On 7/13/23 06:21, Miguel Ojeda wrote: > On Thu, Jul 13, 2023 at 3:03 PM Thomas Zimmermann <tzimmermann@suse.de> wrote: >> >> Most fbdev drivers depend on framebuffer_alloc() to initialize the >> allocated memory to 0. Document this guarantee. >> >> Suggested-by: Miguel Ojeda <ojeda@kernel.org> >> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> >> Cc: Helge Deller <deller@gmx.de> > > Thanks for sending this! Maybe this would be best earlier in the > series, so that later patches make more sense (since they use the > guarantee), but it is not a big deal. > >> + * aligned to sizeof(long). Both, the instance of struct fb_info and >> + * the driver private data, are cleared to zero. > > I think both commas may be best omitted (but I am not a native speaker). Yes, it would be better to omit them. > Reviewed-by: Miguel Ojeda <ojeda@kernel.org> > > Cheers, > Miguel
diff --git a/drivers/video/fbdev/core/fb_info.c b/drivers/video/fbdev/core/fb_info.c index 8bdbefdd4b70..1b7615fc393d 100644 --- a/drivers/video/fbdev/core/fb_info.c +++ b/drivers/video/fbdev/core/fb_info.c @@ -13,7 +13,8 @@ * * Creates a new frame buffer info structure. Also reserves @size bytes * for driver private data (info->par). info->par (if any) will be - * aligned to sizeof(long). + * aligned to sizeof(long). Both, the instance of struct fb_info and + * the driver private data, are cleared to zero. * * Returns the new structure, or NULL if an error occurred. *