From patchwork Thu Aug 31 17:39:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 9932649 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4061260362 for ; Thu, 31 Aug 2017 17:51:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31BAF289BC for ; Thu, 31 Aug 2017 17:51:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2699828A41; Thu, 31 Aug 2017 17:51:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8E0B4289BC for ; Thu, 31 Aug 2017 17:51:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5A8CD6E219; Thu, 31 Aug 2017 17:51:00 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from rere.qmqm.pl (78-11-180-123.static.ip.netia.com.pl [78.11.180.123]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8CBBF6E21D for ; Thu, 31 Aug 2017 17:39:26 +0000 (UTC) Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 3xjqPS5Vl0z1M; Thu, 31 Aug 2017 19:39:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1504201164; bh=qRO7+A6wuJAKFtlO7kodyAVW4S6ISfmhEBvDf5JxkLI=; h=Date:From:Subject:To:Cc:Cc:From; b=grxKlt1JbHBGQi8OQa4XTUlFTa2o0ub0qzRneE3HmTzIGTQykT9yMaNMkRvJHzFi8 PQKnxWsR2FSWGSwAmWUrjdNIX8s/mMX/0F58f17FYKYMKc2+gO87LZyOrYstX+2EK7 fSbzqMHM652ordlRnVWAfbCfrexJHRWJ9z9NaWPb7shjWcJPd1vYnU0azdMXctTXMc 03DCYre1+hV8gXwXIjgGC1V/2DSOKx2KxVDsLi5EBJo3hN1ukiKG7o3a5ORgKICqZc wyV4lpSFotq1Kn6RUNvaAxA0eaQlpkYIvTLHE5HzkXOzY+HSu3/o7MfamfRflZwM8p RmwxQ4lxKV06Q== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.99.2 at rere Date: Thu, 31 Aug 2017 19:39:24 +0200 Message-Id: From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Subject: [PATCH] drm: nouveau: replace magic constant for TASK_COMM_LEN MIME-Version: 1.0 To: Ben Skeggs , David Airlie X-Mailman-Approved-At: Thu, 31 Aug 2017 17:50:56 +0000 Cc: nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Client's name is task_comm + pid: use constant for clarity and prepare for changed TASK_COMM_LEN. Signed-off-by: Michał Mirosław --- drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 15a13d09d431..28396d0b0864 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -830,7 +830,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv) { struct nouveau_drm *drm = nouveau_drm(dev); struct nouveau_cli *cli; - char name[32], tmpname[TASK_COMM_LEN]; + char name[TASK_COMM_LEN + 16], tmpname[TASK_COMM_LEN]; int ret; /* need to bring up power immediately if opening device */