From patchwork Fri Apr 12 09:10:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Kuoppala X-Patchwork-Id: 2434611 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 44BDD3FD1A for ; Fri, 12 Apr 2013 09:10:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A735E5DB7 for ; Fri, 12 Apr 2013 02:10:46 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id DC608E5C33 for ; Fri, 12 Apr 2013 02:10:36 -0700 (PDT) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 12 Apr 2013 02:10:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,462,1363158000"; d="scan'208";a="285218831" Received: from gaia.fi.intel.com (HELO gaia) ([10.237.72.66]) by azsmga001.ch.intel.com with ESMTP; 12 Apr 2013 02:10:35 -0700 Received: by gaia (Postfix, from userid 1000) id 03BAE411B9; Fri, 12 Apr 2013 12:10:07 +0300 (EEST) From: Mika Kuoppala To: intel-gfx@lists.freedesktop.org Date: Fri, 12 Apr 2013 12:10:05 +0300 Message-Id: <1365757805-1097-1-git-send-email-mika.kuoppala@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1365686532-6682-1-git-send-email-mika.kuoppala@intel.com> References: <1365686532-6682-1-git-send-email-mika.kuoppala@intel.com> Cc: Kees Cook Subject: [Intel-gfx] [PATCH] drm/i915: shorten debugfs output simple attributes X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org commit 647416f9eefe7699754b01b9fc82758fde83248c Author: Kees Cook Date: Sun Mar 10 14:10:06 2013 -0700 drm/i915: use simple attribute in debugfs routines made i915_next_seqno debugfs entry to crop it's output if returned value was large enough. Using simple_attr will limit the output to 24 bytes. Fix is to strip out preamples on all simple attributes that have one. v2: Fix all simple attributes (Daniel Vetter) Cc: Kees Cook Signed-off-by: Mika Kuoppala Acked-by: Kees Cook --- drivers/gpu/drm/i915/i915_debugfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index be88532..7e60bb5 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -901,7 +901,7 @@ i915_next_seqno_set(void *data, u64 val) DEFINE_SIMPLE_ATTRIBUTE(i915_next_seqno_fops, i915_next_seqno_get, i915_next_seqno_set, - "next_seqno : 0x%llx\n"); + "0x%llx\n"); static int i915_rstdby_delays(struct seq_file *m, void *unused) { @@ -1687,7 +1687,7 @@ i915_wedged_set(void *data, u64 val) DEFINE_SIMPLE_ATTRIBUTE(i915_wedged_fops, i915_wedged_get, i915_wedged_set, - "wedged : %llu\n"); + "%llu\n"); static int i915_ring_stop_get(void *data, u64 *val) @@ -1841,7 +1841,7 @@ i915_max_freq_set(void *data, u64 val) DEFINE_SIMPLE_ATTRIBUTE(i915_max_freq_fops, i915_max_freq_get, i915_max_freq_set, - "max freq: %llu\n"); + "%llu\n"); static int i915_min_freq_get(void *data, u64 *val) @@ -1892,7 +1892,7 @@ i915_min_freq_set(void *data, u64 val) DEFINE_SIMPLE_ATTRIBUTE(i915_min_freq_fops, i915_min_freq_get, i915_min_freq_set, - "min freq: %llu\n"); + "%llu\n"); static int i915_cache_sharing_get(void *data, u64 *val)