From patchwork Mon Jan 3 20:33:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sedat Dilek X-Patchwork-Id: 449051 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p03KXijJ027484 for ; Mon, 3 Jan 2011 20:34:06 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3327A9ED5F for ; Mon, 3 Jan 2011 12:33:44 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qy0-f177.google.com (mail-qy0-f177.google.com [209.85.216.177]) by gabe.freedesktop.org (Postfix) with ESMTP id D56209E70A; Mon, 3 Jan 2011 12:33:16 -0800 (PST) Received: by qyk27 with SMTP id 27so16004935qyk.15 for ; Mon, 03 Jan 2011 12:33:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:reply-to :in-reply-to:references:date:message-id:subject:from:to:cc :content-type; bh=dwpj45WMp7nsbeas1fCsot4MRyMgTd8spFwG7+H9LXU=; b=hITZQg7GY3qi72ksDS3CCF0RFq48EuDwCRD5f1tj1pOhxP6HC6fhdALIomHdMWRwie IFM3NjcSDXBiYaiJlByoVEtFWCHeBK/AJe9CEWURklE5mHoxoWmkaVP16bZ/3HQ16qyu 2uVan42w4by4ntOm6P+gCAuFbnEjeJzUY0EmQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=KO13GKSRJ3G1EqhT1SRq/Y3mskJ3FGKTPcX2cUIXbFLiYpi+aIQ0pGf42eYW2/3U1Q e9xWRf2kYK5oIleFDYHTVYm6dhajnwWV8EYpLHNE0uA1sytZo6i+nExmaXrUVhaDCpMK oLD/kTx6Xpx8fHDUrzvV8nfbhLr+Dq2H5ar+4= MIME-Version: 1.0 Received: by 10.229.128.94 with SMTP id j30mr18026032qcs.297.1294086796042; Mon, 03 Jan 2011 12:33:16 -0800 (PST) Received: by 10.229.213.136 with HTTP; Mon, 3 Jan 2011 12:33:15 -0800 (PST) In-Reply-To: <20110103200459.64b7b4db@daedalus.pq.iki.fi> References: <20110103200459.64b7b4db@daedalus.pq.iki.fi> Date: Mon, 3 Jan 2011 21:33:15 +0100 Message-ID: Subject: Re: [PATCH] drm: Remove DRIVER_DATE and CORE_DATE From: Sedat Dilek To: Pekka Paalanen Cc: "nouveau@lists.freedesktop.org" , =?UTF-8?Q?Michel_D=C3=A4nzer?= , LKML , DRI , linux-next@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: sedat.dilek@gmail.com List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 03 Jan 2011 20:34:06 +0000 (UTC) From c105fc3384ed411d92bb70f0cc54b38880d4d06d Mon Sep 17 00:00:00 2001 From: Sedat Dilek Date: Sat, 1 Jan 2011 21:17:30 +0100 Subject: [PATCH] libdrm: Remove driver date from drm version calls Signed-off-by: Sedat Dilek --- include/drm/drm.h | 2 -- tests/dristat.c | 1 - tests/drmstat.c | 1 - tests/getversion.c | 1 - xf86drm.c | 9 --------- xf86drm.h | 2 -- 6 files changed, 0 insertions(+), 16 deletions(-) diff --git a/include/drm/drm.h b/include/drm/drm.h index 2ba7136..dac510a 100644 --- a/include/drm/drm.h +++ b/include/drm/drm.h @@ -131,8 +131,6 @@ struct drm_version { int version_patchlevel; /**< Patch level */ size_t name_len; /**< Length of name buffer */ char *name; /**< Name of driver */ - size_t date_len; /**< Length of date buffer */ - char *date; /**< User-space buffer to hold date */ size_t desc_len; /**< Length of desc buffer */ char *desc; /**< User-space buffer to hold desc */ }; diff --git a/tests/dristat.c b/tests/dristat.c index 900a3e6..e493c83 100644 --- a/tests/dristat.c +++ b/tests/dristat.c @@ -53,7 +53,6 @@ static void getversion(int fd) version->version_major, version->version_minor, version->version_patchlevel); - printf(" Date: %s\n", version->date ? version->date : "?"); printf(" Desc: %s\n", version->desc ? version->desc : "?"); drmFreeVersion(version); } else { diff --git a/tests/drmstat.c b/tests/drmstat.c index 345b8d2..3250d2c 100644 --- a/tests/drmstat.c +++ b/tests/drmstat.c @@ -72,7 +72,6 @@ static void getversion(int fd) version->version_major, version->version_minor, version->version_patchlevel ); - printf( " Date: %s\n", version->date ? version->date : "?" ); printf( " Desc: %s\n", version->desc ? version->desc : "?" ); drmFreeVersion(version); } else { diff --git a/tests/getversion.c b/tests/getversion.c index 711d376..82084b7 100644 --- a/tests/getversion.c +++ b/tests/getversion.c @@ -38,7 +38,6 @@ int main(int argc, char **argv) fd = drm_open_any(); v = drmGetVersion(fd); assert(strlen(v->name) != 0); - assert(strlen(v->date) != 0); assert(strlen(v->desc) != 0); if (strcmp(v->name, "i915") == 0) assert(v->version_major >= 1); diff --git a/xf86drm.c b/xf86drm.c index 799fcdd..81a8a39 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -669,7 +669,6 @@ void drmFreeVersion(drmVersionPtr v) if (!v) return; drmFree(v->name); - drmFree(v->date); drmFree(v->desc); drmFree(v); } @@ -689,7 +688,6 @@ static void drmFreeKernelVersion(drm_version_t *v) if (!v) return; drmFree(v->name); - drmFree(v->date); drmFree(v->desc); drmFree(v); } @@ -712,8 +710,6 @@ static void drmCopyVersion(drmVersionPtr d, const drm_version_t *s) d->version_patchlevel = s->version_patchlevel; d->name_len = s->name_len; d->name = strdup(s->name); - d->date_len = s->date_len; - d->date = strdup(s->date); d->desc_len = s->desc_len; d->desc = strdup(s->desc); } @@ -741,8 +737,6 @@ drmVersionPtr drmGetVersion(int fd) version->name_len = 0; version->name = NULL; - version->date_len = 0; - version->date = NULL; version->desc_len = 0; version->desc = NULL; @@ -753,8 +747,6 @@ drmVersionPtr drmGetVersion(int fd) if (version->name_len) version->name = drmMalloc(version->name_len + 1); - if (version->date_len) - version->date = drmMalloc(version->date_len + 1); if (version->desc_len) version->desc = drmMalloc(version->desc_len + 1); @@ -766,7 +758,6 @@ drmVersionPtr drmGetVersion(int fd) /* The results might not be null-terminated strings, so terminate them. */ if (version->name_len) version->name[version->name_len] = '\0'; - if (version->date_len) version->date[version->date_len] = '\0'; if (version->desc_len) version->desc[version->desc_len] = '\0'; retval = drmMalloc(sizeof(*retval)); diff --git a/xf86drm.h b/xf86drm.h index 9b89f56..afbd819 100644 --- a/xf86drm.h +++ b/xf86drm.h @@ -115,8 +115,6 @@ typedef struct _drmVersion { int version_patchlevel; /**< Patch level */ int name_len; /**< Length of name buffer */ char *name; /**< Name of driver */ - int date_len; /**< Length of date buffer */ - char *date; /**< User-space buffer to hold date */ int desc_len; /**< Length of desc buffer */ char *desc; /**< User-space buffer to hold desc */ } drmVersion, *drmVersionPtr; -- 1.7.4.rc0