From patchwork Sun Nov 16 10:21:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 5314091 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C52A49F2F1 for ; Sun, 16 Nov 2014 13:58:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1DE0520155 for ; Sun, 16 Nov 2014 13:58:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id DF9D520148 for ; Sun, 16 Nov 2014 13:58:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AF01A6E865; Sun, 16 Nov 2014 05:57:54 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailrelay012.isp.belgacom.be (mailrelay012.isp.belgacom.be [195.238.6.179]) by gabe.freedesktop.org (Postfix) with ESMTP id 9DDBF6E435 for ; Sun, 16 Nov 2014 02:21:36 -0800 (PST) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtcNAG55aFRbsk2U/2dsb2JhbABbgw6BLrhMBQF1mhWBChcBAQEBAX2EMC8jgRo3iEUBwG6PQCyGPopkHYQ1BZ5MlnqBRwGCNTwwgksBAQE Received: from 148.77-178-91.adsl-dyn.isp.belgacom.be (HELO localhost.localdomain) ([91.178.77.148]) by relay.skynet.be with ESMTP; 16 Nov 2014 11:21:33 +0100 From: Fabian Frederick To: linux-kernel@vger.kernel.org Subject: [PATCH 1/1 linux-next] drm: remove unnecessary sizeof(u8) Date: Sun, 16 Nov 2014 11:21:25 +0100 Message-Id: <1416133285-16026-1-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 1.9.3 X-Mailman-Approved-At: Sun, 16 Nov 2014 05:57:21 -0800 Cc: Fabian Frederick , 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP sizeof(u8) is always 1. Signed-off-by: Fabian Frederick --- drivers/gpu/drm/r128/r128_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/r128/r128_state.c b/drivers/gpu/drm/r128/r128_state.c index 575e986..8fd2d9f 100644 --- a/drivers/gpu/drm/r128/r128_state.c +++ b/drivers/gpu/drm/r128/r128_state.c @@ -905,7 +905,7 @@ static int r128_cce_dispatch_write_span(struct drm_device *dev, if (IS_ERR(buffer)) return PTR_ERR(buffer); - mask_size = depth->n * sizeof(u8); + mask_size = depth->n; if (depth->mask) { mask = memdup_user(depth->mask, mask_size); if (IS_ERR(mask)) { @@ -1010,7 +1010,7 @@ static int r128_cce_dispatch_write_pixels(struct drm_device *dev, } if (depth->mask) { - mask_size = depth->n * sizeof(u8); + mask_size = depth->n; mask = memdup_user(depth->mask, mask_size); if (IS_ERR(mask)) { kfree(x);