Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/nouveau remove superfluous st...



details:   https://anonhg.NetBSD.org/src/rev/615419e65c06
branches:  trunk
changeset: 744780:615419e65c06
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Wed Feb 12 20:31:46 2020 +0000

description:
remove superfluous static variable used only to zero attach args

diffstat:

 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c |  11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diffs (40 lines):

diff -r ba7b6406e6ce -r 615419e65c06 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c    Wed Feb 12 20:25:48 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c    Wed Feb 12 20:31:46 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_fbcon.c,v 1.7 2020/02/12 20:25:48 jdolecek Exp $       */
+/*     $NetBSD: nouveau_fbcon.c,v 1.8 2020/02/12 20:31:46 jdolecek Exp $       */
 
 /*
  * Copyright © 2007 David Airlie
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_fbcon.c,v 1.7 2020/02/12 20:25:48 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_fbcon.c,v 1.8 2020/02/12 20:31:46 jdolecek Exp $");
 
 #include <linux/module.h>
 #include <linux/kernel.h>
@@ -434,10 +434,9 @@
 
        nouveau_fbcon_zfill(dev, fbcon);
 
-    {
-       static const struct nouveaufb_attach_args zero_nfa;
-       struct nouveaufb_attach_args nfa = zero_nfa;
+       struct nouveaufb_attach_args nfa;
 
+       memset(&nfa, 0, sizeof(nfa));
        nfa.nfa_fb_helper = helper;
        nfa.nfa_fb_sizes = *sizes;
        nfa.nfa_fb_ptr = nvbo_kmap_obj_iovirtual(nvbo);
@@ -448,7 +447,7 @@
        if (helper->fbdev == NULL) {
                goto out_unlock;
        }
-    }
+
        helper->fb = fb;
 
        return 0;



Home | Main Index | Thread Index | Old Index