Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3339581imm; Fri, 19 Oct 2018 09:01:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV63crV8L/Oq/Mbnom4Hs3dl93yrAgO4PByLVrKguKlgcMEWpis3ZmykcXIDkfzQPDkdfVxOa X-Received: by 2002:a63:441f:: with SMTP id r31-v6mr33144945pga.60.1539964892749; Fri, 19 Oct 2018 09:01:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539964892; cv=none; d=google.com; s=arc-20160816; b=XFjfxYJ8ICq1eqfcyySBGHlzt2efv8khX5X6q/H9bakGzoqUZHhUEqsNlpTX4eqKaX SD6cU38h2VrnPgzEXOH9XKZCCPjq4+cfjFqNv/sKr1Zfh1Jx1RK0P30flqpD98qqdmse P2JfhONQek84D/fmVT6b+5demBr1iweWtho5AGsGZvn4dlHCnvSn/6ritubhqUpLq9pZ JM5GGtJa8S0XGOjOE4Iz+3EPh7jW9aN8hTEhaqArYhmA17Q/DweIHZV7NfPGXyOikWAh oct2w5rn/I8eiTmVYm4vNG/fMflrW7x8d+JEz1fD2leMZ2t2lj2JkHx7immLRvlbg49U 83PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:subject:cc:to:from:date:message-id:dkim-signature; bh=aRdDiHe4/sndMA8uYoTMNRqKpt8F2QZrlYWsAdyjnPw=; b=LXiGQ3utF5dZaVBwGNwVagU5iOdXiLkFqJAioJM1qwrGYaCWWUUp2Vrfvn/YsTCYRO awmacrMzDvFy4DVNuCef1HA8BIP5adkKnTwYdkQCvee5vY8jummy186zSOJ+cxM9GLb0 8XvVr/Qe07invh2pPWTLvQn4JAUXu6+3RqNdNDxHoOxEOF7DG7nAT7wl7s7uzEUEfrOa Y+hiRQlKi/BKz08PsRLMoOX42OpravXSoaU067RzCzm25t0QTaspx/41+TaR80TIZCM1 8gj25YztHuozpLjzY5Ej4Ov6P44myGMS4JkW0AWJ9i4yMLaJLAp6s64pt1x+FIbAyts4 ZBHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XNGt6uWC; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s22-v6si33041045pfs.13.2018.10.19.09.01.17; Fri, 19 Oct 2018 09:01:32 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XNGt6uWC; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727797AbeJTAGn (ORCPT + 99 others); Fri, 19 Oct 2018 20:06:43 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:36762 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727181AbeJTAGm (ORCPT ); Fri, 19 Oct 2018 20:06:42 -0400 Received: by mail-pf1-f195.google.com with SMTP id l81-v6so16676227pfg.3 for ; Fri, 19 Oct 2018 08:59:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:to:cc:subject:mime-version:content-disposition :user-agent; bh=aRdDiHe4/sndMA8uYoTMNRqKpt8F2QZrlYWsAdyjnPw=; b=XNGt6uWCAyOLUMvpYTkfloT/6xkuzKQyw/aDh7yjFl3ipDGvPpFeKO0THNa8Hdiru3 W+dII2EwgPTBKoSYShD48FHJISbAuJ7g5N2N1+/6vAHier+KBVCusRlcP1bAnmApMnYa 8r+JVqzW4HQ781ADtXHiAYx29MtJbcB05aS4SBSKpSaEwNyPg6P+q2AQKm5wfd4g3CjZ gj7Rb9TXdKBgcuJbLw9dy3l6VcYss/tN81ugMkRNRzD5RHEb16uE3+9cCBMUX1vnXMI4 V8JZHuYtVkwxM2gDdg9+WcgqiaCbroSpsDRlOmLHAeUampAeSL1dPIpDZDcqQJC0dGoK S04Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:to:cc:subject:mime-version :content-disposition:user-agent; bh=aRdDiHe4/sndMA8uYoTMNRqKpt8F2QZrlYWsAdyjnPw=; b=pgh3RB0L3X4VrowDpKoqHM5LVBZxQaRBOn08GCyk6R9d295tepinfDCzOdm3iBxwgj oH2ZwIRLDd49XOx3cUqDf71jnW2WwScr3UvLdqLfAL/y+mke3FL528RsQdcryt15S3cl scAOo0lzqaKKVJ+kkjYKYGhvtIOqOqx9xs5C5SJBGuooifz7fz5DuZYQiyqG7FHEHGzo PliPhtIqC5LynrPASZF/16XzMMVTVgmUN1x21DEyHlhJiEJrL4AhkHrCBxE9HLRDH/6M q7ZY9k0PFf8khYSUImpXxEiZmtzoSP9hGmrmezD1yEXXTLT1CUFVG84AkHz/pAudc6Ex 5UsQ== X-Gm-Message-State: ABuFfoiaSzmH3SreuHhLKx2ANul0HXzNwWRIWj3JL1kRlAOC1Y+J2f1s HDS6JnPbtFpZE5KFBLrhGwGWHITNy8M= X-Received: by 2002:a63:5d03:: with SMTP id r3-v6mr33616391pgb.445.1539964799648; Fri, 19 Oct 2018 08:59:59 -0700 (PDT) Received: from sabyasachi ([45.116.191.241]) by smtp.gmail.com with ESMTPSA id g35-v6sm861208pgl.45.2018.10.19.08.59.57 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Oct 2018 08:59:58 -0700 (PDT) Message-ID: <5bc9ff7e.1c69fb81.105c2.1fef@mx.google.com> X-Google-Original-Message-ID: <20181019155954.GA8124@sabyasachi.linux@gmail.com> Date: Fri, 19 Oct 2018 21:29:54 +0530 From: Sabyasachi Gupta To: airlied@linux.ie, kraxel@redhat.com Cc: jrdr.linux@gmail.com, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, brajeswar.linux@gmail.com Subject: [PATCH] gpu/drm/virtio/virtgpu_vq.c: Use kmem_cache_zalloc MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replaced kmem_cache_alloc + memset with kmem_cache_zalloc Signed-off-by: Sabyasachi Gupta --- drivers/gpu/drm/virtio/virtgpu_vq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index 020070d..e001b79 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vq.c +++ b/drivers/gpu/drm/virtio/virtgpu_vq.c @@ -98,10 +98,9 @@ virtio_gpu_get_vbuf(struct virtio_gpu_device *vgdev, { struct virtio_gpu_vbuffer *vbuf; - vbuf = kmem_cache_alloc(vgdev->vbufs, GFP_KERNEL); + vbuf = kmem_cache_zalloc(vgdev->vbufs, GFP_KERNEL); if (!vbuf) return ERR_PTR(-ENOMEM); - memset(vbuf, 0, VBUFFER_SIZE); BUG_ON(size > MAX_INLINE_CMD_SIZE); vbuf->buf = (void *)vbuf + sizeof(*vbuf); -- 2.7.4