Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2984811ima; Mon, 22 Oct 2018 21:04:36 -0700 (PDT) X-Google-Smtp-Source: ACcGV63G9ke4OwRtPmw2VfXIrIYSET/6agTtN6fQpRP2ar1IbR3Pc6ohS59G6Gnt57eqG19QueY6 X-Received: by 2002:a62:5c03:: with SMTP id q3-v6mr49192770pfb.182.1540267476841; Mon, 22 Oct 2018 21:04:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540267476; cv=none; d=google.com; s=arc-20160816; b=YQ4eoqs/KLG8B+MFXz6MUiv8M8QEzs2L4QlEIyyrEva2Mdw59WXSx6KhL7EgwuMfXg OY1Lm5b/WebwpoZiMi1LXXUK4/6mjIkmIFGLibnJSojxZs92IvYh2+0ueYGaZuIOuprb 9J2vO+4LatzPETpeprr01ZDOqjWsCAqFKGVuz1VOQdmyvWbdJ41krpeLc+5XQ/kTr5Kl AsStl8wn4hof1nYDAH9m0Oqt9BgnyDrHNFbasgB1YSKPVb+vkgnBCaUQVZdTRNn47nnL ZcqgIx2QE1NHbfsPUox6qFv9gJ61ZWaJoaCZTl2zP4EzrsEBQ7N4MRtElzquf0ArWD5a xUJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=RlfDScFrQxukYdJ0Wug8LGJXaEEKMrLGQcd4wayr7Fc=; b=FoXKMQNtINsZ5A0iejfmcyIXffWVMzxldQK2/FXaWf85MXBVuR1xZp68y65HWMyJS0 t4G2/6YID8sOcuAjFXQL9Kb1xynxBvruKDExItk9C4jlZuZ5/CLYtyoBKn+Y/YDg/S5X v3ud2Ajc/0T01FOOAwJP3Ezx3imzk1a1ACA+YgdUq7wLM08q++4i9zKGUXzGIxjbDKbQ YHqXh7RDgVOPSvCBfi4w5m+WJYg6LgtIH+6GnHQC+OpNiOKYWJDy7NLo6qk57UbhcWQv 7BbRNPDfhTdHyZdGnRkn6Vze6rRtlORlBhgYHMZUknA44XizM8WOq7Xq2vKwWWaE0IH7 kF0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b628VAjL; 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 h18-v6si3101pgk.351.2018.10.22.21.04.21; Mon, 22 Oct 2018 21:04:36 -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=b628VAjL; 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 S1727203AbeJWMZK (ORCPT + 99 others); Tue, 23 Oct 2018 08:25:10 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:38211 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726885AbeJWMZK (ORCPT ); Tue, 23 Oct 2018 08:25:10 -0400 Received: by mail-lj1-f194.google.com with SMTP id k11-v6so7025784lja.5 for ; Mon, 22 Oct 2018 21:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RlfDScFrQxukYdJ0Wug8LGJXaEEKMrLGQcd4wayr7Fc=; b=b628VAjL6T5PD5veh/zV0gIV3TI//51hIzPrZjevit9v+CvJLyqP98xOfn/d5YXxFa dWCi1PEs0yq19nlgB27CZoTX2qsI4DKzRmB+zsSnyYqfDYafI9eMl+yMIo8kikxKs0uW l+fJkJ+scoV4MPw+SIMRyRVnHx7CV0OiSlNmFaR2C57MDln9S43x8paHklFVzvnmSNUl RYGe8bCkA1E9sypKL0s/eRL0BUYEijNcKwhya3C/c6P3RKKGhYtGIMjXnrzpU5XEmxqt fh13t3WTn1+n+bHL96cCXDfh+pugXTBrS4Eo5J90WFhHBn/inWM/hShza9e0ANBkwo4x sJpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RlfDScFrQxukYdJ0Wug8LGJXaEEKMrLGQcd4wayr7Fc=; b=I0GNR/QJmajj3ZpCob77lymO7+bAtJ+B/lMaDD1rBf20fuOvpOd/gn09MYeD223B29 rL+8xtJbegJAuksD8gClakV2jdKkpbqCFntPBHkWTODS1MkhsaRXwJXMX3LlH0P2kvAA Mzlw6FcB6TT00H2rkrwKOwn+cLl1BnoMjp7cdJqjTOaE66yKPmQhhSldEPm7WR1tzOVc Ax9FprjrxGpnp/Q6xwuUtdPaPY4lJ0bqkfZ9RPuGRsazm8RAdqSBla8d7PZWTyhLWBuZ o2W8H2iiwn1pwkVDnukil74TZW/wz/RUgxINQ5Tjots5v/J7s44TLGIopI1iVSjpUpBK pTsw== X-Gm-Message-State: ABuFfogoYmw5paPHVFncneC1OBQJuRKHhpZR5WAQDzRQSLzV0KpU0gpG xp7GfwPaLzk53WQ/l6cqEhv5b8ZInfWDvSpkCKs= X-Received: by 2002:a2e:b04b:: with SMTP id d11-v6mr30485010ljl.93.1540267417602; Mon, 22 Oct 2018 21:03:37 -0700 (PDT) MIME-Version: 1.0 References: <5bc9ff7e.1c69fb81.105c2.1fef@mx.google.com> In-Reply-To: <5bc9ff7e.1c69fb81.105c2.1fef@mx.google.com> From: Souptick Joarder Date: Tue, 23 Oct 2018 09:36:55 +0530 Message-ID: Subject: Re: [PATCH] gpu/drm/virtio/virtgpu_vq.c: Use kmem_cache_zalloc To: Sabyasachi Gupta Cc: airlied@linux.ie, Gerd Hoffmann , dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Brajeswar Ghosh Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 19, 2018 at 9:30 PM Sabyasachi Gupta wrote: > > Replaced kmem_cache_alloc + memset with kmem_cache_zalloc Put a new line gap in between these two lines and send v2. > 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 >