Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4081065imm; Tue, 11 Sep 2018 06:43:50 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZGM4eEov/fMf2gcbac3qEtiwBZVZGnAlT+lKYu6NsQ5Jw0NK9yl3AmCMYS/JqzJGo++R1j X-Received: by 2002:a63:1823:: with SMTP id y35-v6mr28533222pgl.438.1536673430804; Tue, 11 Sep 2018 06:43:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536673430; cv=none; d=google.com; s=arc-20160816; b=JKObKQ+HAqDn0p0oNFE+HCof0YBfY1voSCi6WMbYyYivm1ldauyHli3k/JyiuOVMG9 LMnDkAbcxNzRoU1rJVvyhPGl6j4q/ellcs4N986WlbZV54BpBKnSlsqDB7P0g3AGJa3u G3effAtzk39lF/zXmBwNuwrP2mj0qpDPQTk2EB2bekmeUEYtvBYxIXc07Ckw2fzsm4lB sZIOwt6ygZyTq1BPcm5cYEHPX+4SZSQGaqzTt/E9WTvpEs1C7uBbISsOC2EWa4PxA9eY IKeC9HFm64D8eqCi4xsaSlk6YPIq76PrIrjl92mjsorQrt1VkHc8wbz8MyTzxF76EzR6 xdQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=0k4xfG5VoSvO5gC85bR6zR1EiJIQaKq1MJWQgZKCDaw=; b=fdvnROe7QsFCRPRr/O5bYItj91I1ps7NRsJTZI2NDJihOgkPwURvEFFkhKsqgrQf7+ 1GgkSNsCfAQwWJWbTO3ITZUl7kr7x2U/hvkak3sfqGCQ5cRbVANA+FJrh88qeJgwQUuD zOE1Aq9k1cGgZoJLW9Kg4OL7lO5z+kSzALdWCDOGyDXIXP7FR8xCcCCgfbngYScGuiNR 09DkYOGT9qZZQbftZeJp9EaFQllLMEkBy4IrfkFR7OJweDuNK0icVk57ZAV4fmU+079y iebI8H2ynEvN8HC/cCWNVJ59Tqo60aGuomyrv65o4szFqFILQutgxUG8sFADsIowTIa8 6BXg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o126-v6si20688272pfb.20.2018.09.11.06.43.03; Tue, 11 Sep 2018 06:43:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728051AbeIKSl7 (ORCPT + 99 others); Tue, 11 Sep 2018 14:41:59 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57496 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727796AbeIKSln (ORCPT ); Tue, 11 Sep 2018 14:41:43 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 543989BB7D; Tue, 11 Sep 2018 13:42:20 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-66.ams2.redhat.com [10.36.116.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id D9DB32026988; Tue, 11 Sep 2018 13:42:19 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 704299A97; Tue, 11 Sep 2018 15:42:17 +0200 (CEST) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org Cc: laurent.pinchart@ideasonboard.com, daniel@ffwll.ch, Gerd Hoffmann , Sumit Semwal , linux-media@vger.kernel.org (open list:DMA BUFFER SHARING FRAMEWORK), linaro-mm-sig@lists.linaro.org (moderated list:DMA BUFFER SHARING FRAMEWORK), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 12/13] udmabuf: use sizeof(variable) instead of sizeof(type) Date: Tue, 11 Sep 2018 15:42:15 +0200 Message-Id: <20180911134216.9760-13-kraxel@redhat.com> In-Reply-To: <20180911134216.9760-1-kraxel@redhat.com> References: <20180911134216.9760-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 11 Sep 2018 13:42:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 11 Sep 2018 13:42:20 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reported-by: Laurent Pinchart Signed-off-by: Gerd Hoffmann --- drivers/dma-buf/udmabuf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index 7a4fd2194d..92af9b5300 100644 --- a/drivers/dma-buf/udmabuf.c +++ b/drivers/dma-buf/udmabuf.c @@ -128,7 +128,7 @@ static long udmabuf_create(const struct udmabuf_create_list *head, int seals, ret = -EINVAL; u32 i, flags; - ubuf = kzalloc(sizeof(struct udmabuf), GFP_KERNEL); + ubuf = kzalloc(sizeof(*ubuf), GFP_KERNEL); if (!ubuf) return -ENOMEM; @@ -142,7 +142,7 @@ static long udmabuf_create(const struct udmabuf_create_list *head, if (ubuf->pagecount > pglimit) goto err; } - ubuf->pages = kmalloc_array(ubuf->pagecount, sizeof(struct page *), + ubuf->pages = kmalloc_array(ubuf->pagecount, sizeof(*ubuf->pages), GFP_KERNEL); if (!ubuf->pages) { ret = -ENOMEM; @@ -211,7 +211,7 @@ static long udmabuf_ioctl_create(struct file *filp, unsigned long arg) struct udmabuf_create_item list; if (copy_from_user(&create, (void __user *)arg, - sizeof(struct udmabuf_create))) + sizeof(create))) return -EFAULT; head.flags = create.flags; -- 2.9.3