Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3247951ima; Tue, 23 Oct 2018 02:51:55 -0700 (PDT) X-Google-Smtp-Source: ACcGV601+FQiNtYQDNXOtIKDneAAmla50hi15lTKKvYV2XQvZ8H7znHvV07eMShVpumugCc0lpaD X-Received: by 2002:a17:902:5c4:: with SMTP id f62-v6mr48330457plf.18.1540288315260; Tue, 23 Oct 2018 02:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540288315; cv=none; d=google.com; s=arc-20160816; b=QUebEjW6kLUno5mWhDIh/JVbIPfxBZ6niAd3yVt30Ccn1YtCfxZRg69Ejcpv2DMKLa RtBX5ka69Rsq2OF5JeHtJO/0nG3SnMqKGsEI41pM8RCel7EEro6B11huANa8OhzUE0I+ yf6x7B4U4/42VPHagUPeOP1slAq5+mWg6yFIT21k9PyKW3b9tUNbIG+Bh+mu8fZCwwIJ RaThQ1Bu/U5LzggXVSjl+9Uma9VxZaA5nwWEuHCKPpscFQBrMwq/q3iWMKKb/1Kx+5a1 cR2YPw25pmtrWUcmj9oOTvA00UuWpV8SPYKCNiJeaqVi9gGjDh8B8ZqAPm1N9RYhCvOU cpQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from; bh=qVQueFpgyGa4xv8F1g0xb0H3luUfH/0BxYR1e0oBUIc=; b=GSiaQvp/Dw+XZ8Cec1MsmN1aLWg0ftwz+vomplIerwc5E8ExyZDNerj0dZwyCPDP4m Z9cYH8VYULlweT9UmwxERL9yfCPW9xkZoJ6p4aFaovOZK3C6VclX0wBSttybcwu0gR+l Bu+ZcJ5aQbY3fT3S1tVE5XWrzS2AKTBF1ybF1r6Z00A5qnmjWbFAnkSOR+sAPmlZhl8c CwTGSGWsBVGheN8YOaGJpE/xUpXT5Zppy4TXCN/5Qo8N42/IQqtWmiuiLxKgjPPDu/Ds mu08H+kMgXK1OBRk6VZJz8s+HNPIncrWgN5qRtQgzm9c9OMoYtGEI2W/fxUW/OsA1PEZ xVnA== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e16-v6si755910pfn.124.2018.10.23.02.51.39; Tue, 23 Oct 2018 02:51:55 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728696AbeJWSNl (ORCPT + 99 others); Tue, 23 Oct 2018 14:13:41 -0400 Received: from mga01.intel.com ([192.55.52.88]:9652 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726277AbeJWSNk (ORCPT ); Tue, 23 Oct 2018 14:13:40 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2018 02:51:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,415,1534834800"; d="scan'208";a="101677964" Received: from jnikula-mobl3.fi.intel.com (HELO localhost) ([10.237.72.61]) by fmsmga001.fm.intel.com with ESMTP; 23 Oct 2018 02:50:58 -0700 From: Jani Nikula To: Souptick Joarder , Sabyasachi Gupta Cc: airlied@linux.ie, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, Gerd Hoffmann , Brajeswar Ghosh Subject: Re: [PATCH] gpu/drm/virtio/virtgpu_vq.c: Use kmem_cache_zalloc In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <5bc9ff7e.1c69fb81.105c2.1fef@mx.google.com> Date: Tue, 23 Oct 2018 12:50:36 +0300 Message-ID: <87sh0xc7pv.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 23 Oct 2018, Souptick Joarder wrote: > 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. Nah, the maintainers can trivially add the newline while applying. Review is much more valuable than nitpicking on the commit message. Reviewed-by: Jani Nikula > >> 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 >> > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Jani Nikula, Intel Open Source Graphics Center