From: Ilija Hadzic Subject: Re: [PATCH 1/3] drm: Fix DRM_MINOR limits for control and render nodes Date: Fri, 28 Sep 2012 13:16:28 -0500 (CDT) Message-ID: References: <1348850159-3956-1-git-send-email-krh@bitplanet.net> <1348850159-3956-2-git-send-email-krh@bitplanet.net> Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-33463914-1348856188=:16925" Return-path: Received: from ihemail3.lucent.com (ihemail3.lucent.com [135.245.0.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 8A2F89E97B for ; Fri, 28 Sep 2012 11:16:34 -0700 (PDT) In-Reply-To: <1348850159-3956-2-git-send-email-krh@bitplanet.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Cc: daniel.vetter@ffwll.ch, martin.peres@labri.fr, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---559023410-33463914-1348856188=:16925 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Fri, 28 Sep 2012, Kristian H=C3=B8gsberg wrote: =09if (type =3D=3D DRM_MINOR_CONTROL) { base +=3D 64; - limit =3D base + 127; + limit =3D base + 64; } else if (type =3D=3D DRM_MINOR_RENDER) { base +=3D 128; - limit =3D base + 255; + limit =3D base + 64; If my first grade arithmetics serves me well, shouldn't limit in the first= =20 clause be base + 63 and in the second clause, base + 127. The render=20 node starts at 128 and spans to 255, so there are total of 128 render=20 nodes, 64 card (legacy) nodes and 64 control nodes allowed. Actually, this construction of limit relative to the base does not achieve= =20 anything. The code would be much more readable if it were something like=20 this: =09if (type =3D=3D DRM_MINOR_CONTROL) { base =3D 64; limit =3D 127; } else if (type =3D=3D DRM_MINOR_RENDER) { base =3D 128; limit =3D 255; } -- Ilija ---559023410-33463914-1348856188=:16925 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel ---559023410-33463914-1348856188=:16925--