[oi-dev] gfx-drm build issue

Alexander Pyhalov alp at rsu.ru
Tue Dec 27 12:21:20 UTC 2016

Hi. Do you see this?

  /opt/onbld/bin/bldenv myenv.sh 'cd usr/src;  make'
../../intel/io/agpgart/agpgart.c: In function 'agp_devmap_unmap':
../../intel/io/agpgart/agpgart.c:152: error: 'mementry' may be used 
uninitialized in this function [-Wuninitialized]

And compiler is correct. The following seems to fix this warning:

diff --git a/usr/src/uts/intel/io/agpgart/agpgart.c 
index 34f5ca5..b1d6263 100644
--- a/usr/src/uts/intel/io/agpgart/agpgart.c
+++ b/usr/src/uts/intel/io/agpgart/agpgart.c
@@ -149,7 +149,7 @@ agp_devmap_unmap(devmap_cookie_t handle, void 
      void **new_devprivate2)

-       struct keytable_ent *mementry;
+       struct keytable_ent *mementry = NULL;
         agpgart_softstate_t *softstate;
         agpgart_ctx_t *ctxp, *newctxp1, *newctxp2;

@@ -187,6 +187,7 @@ agp_devmap_unmap(devmap_cookie_t handle, void 
+       ASSERT(mementry != NULL);
         ASSERT(mementry->kte_refcnt >= 0);
         kmem_free(ctxp, sizeof (struct agpgart_ctx));

С уважением,
Александр Пыхалов,
программист отдела телекоммуникационной инфраструктуры
управления информационно-коммуникационной инфраструктуры ЮФУ

More information about the oi-dev mailing list