Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp1984842imd; Sun, 28 Oct 2018 00:00:20 -0700 (PDT) X-Google-Smtp-Source: AJdET5f4okNic6ImMSpLaOKtlbyobtYBa+KJ3oWjP7ovCaBJTACeMAwMBXvNa8zFhfWOMk/EfNdA X-Received: by 2002:a63:e00d:: with SMTP id e13-v6mr9208111pgh.114.1540710020746; Sun, 28 Oct 2018 00:00:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540710020; cv=none; d=google.com; s=arc-20160816; b=BU7qCrcAHsJfu2v5j9CJL6PBV7qqOhya+TnW+qat2l1W3Y9O3D8q2Sols86+gDo3A0 itEMneU0zxNQbki8bLx3GaW1q9ulXnhXxZCNbuzZ+Uoq3+q8TX+zB0+3y0MHYP/opvEU tFfR2+UQ01dPwCZQpcwgWoGOM4u9C7sd0acgqcCewLrRSUgSXy3Dfa0ly5zy850pgihD 4+3oI3naZhhrz0hSypomuj6orkptqinvCgeM6+z97Pqi/OudwoY5sSoV27fKYTzA+KTL LVtA926pAL9hgjcohPJMKSb1Yd8ESF8iOSMRmGzLe8H+6sAAwwuDhzMhtp3x4i2SXmSr J9eg== 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=3UmAG1INPLsZvGsCkv7tZzyCXG8GP3ES//qe0OzkhQI=; b=Soi1WZgAk2E2vdOdpWU/moypVsMzv7fzxI5ocWE+bj6pia4TQUOId9Hbu37g7Oj3F0 5Hd7/N3AJR93cNr67sZ8nMBygAhVjQHei/HILr748eCLRipCayQt4eOyQ6qB3hMxiBzI oeG6BKZ3wBT0ZNgqYr9/c7jOSrvwunZc+R7lVe0bmS4IjuZ0RgYiTJ2T7IgxO2K2JN4a Z5Dflz8NwD49dOnpkaeGxc6ENo4MiLvl9jAoYr3RrB+clqzUz+kjDR473mLmN6GAbsnQ U80G+NPDF6PTiHQVF2eU6UEoTObGZmliy08Zd/G3pxPYn509l076ATIfoRfCJmT7mn+A LxTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vGVNEWUD; 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 d19-v6si15427211plr.127.2018.10.27.23.59.51; Sun, 28 Oct 2018 00:00:20 -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=vGVNEWUD; 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 S1727644AbeJ1Pmp (ORCPT + 99 others); Sun, 28 Oct 2018 11:42:45 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:36519 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725827AbeJ1Pmp (ORCPT ); Sun, 28 Oct 2018 11:42:45 -0400 Received: by mail-pg1-f193.google.com with SMTP id z17-v6so2395655pgv.3; Sat, 27 Oct 2018 23:59:02 -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=3UmAG1INPLsZvGsCkv7tZzyCXG8GP3ES//qe0OzkhQI=; b=vGVNEWUDeojAVaAyi5opIBuEwQNIoHcY0SqqZbuvavyzJRfOtCk9vYibwHV+53/LrE s3QNzzlXHKQ5gm1ATkVRyvew+W0ZcNtxTTRnjXXKU4ttJuKrMxtfxt09zDOZ+hra/RrW Vnpqemb6hB4jP6WAjbrV1e+TGY/i8FMSAqS33Q4d3jGz5MKnIPL7XxMnk5b8xX2Bgh1J QkfIRzHVXH/5EaP8nd6NBqkeVR9Kvzhy56iAxd/6zDqyEvMkTdw419iXryokX/m9yVFB 7GTjevv1SsiECfynDu8+IlWZK0XoJe/XR0y9YgX4AQvOxXdtR2U1AOSbe+HpTSTywFqn NtHw== 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=3UmAG1INPLsZvGsCkv7tZzyCXG8GP3ES//qe0OzkhQI=; b=ga097WDnlZMU4Gt/AXS8XYteGblIQQK8DaqAZ3Jo7SoDRo6uH6D4JbERbEF86osY3Q EXi0ZXnSY6ZDPtLJ8A7sTKV8jTFPJDcESOp9sbK8kf8AMrDcgHg6+VcnjtW7IJ98g3Z9 hLDFQHbU+JYdwpMqD24XeqG1v7WFfKCsjILsJHHqq007PmEmHGanMmNJkQsXHKdOaDb2 VKRnF85aFxcmPAqQ6x21nfG6TkA7BzkgMY+9VBOsoV/fxIr//hTPGL3kj+5EtU0cGMAJ FN39KSrk/P8MLszF0bIbyN5pOUDPbC/WC+5g8GNddfeGAnaazyOkBxkD7rxVyr6+pmAH luVQ== X-Gm-Message-State: AGRZ1gK0POUny3923ENNCIn6D28XLZBYyOiiw/PCDn+GWV90z853IxNQ VH4H6YQ9qySnXwblvi/jO7Q= X-Received: by 2002:a62:3641:: with SMTP id d62-v6mr10203457pfa.97.1540709941765; Sat, 27 Oct 2018 23:59:01 -0700 (PDT) Received: from sabyasachi ([45.116.191.194]) by smtp.gmail.com with ESMTPSA id l16-v6sm25196412pfj.179.2018.10.27.23.59.00 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 27 Oct 2018 23:59:00 -0700 (PDT) Message-ID: <5bd55e34.1c69fb81.b2503.b6f5@mx.google.com> X-Google-Original-Message-ID: <20181028065856.GA4783@sabyasachi.linux@gmail.com> Date: Sun, 28 Oct 2018 12:28:56 +0530 From: Sabyasachi Gupta To: ysato@users.sourceforge.jp, dalias@libc.org, thomas.petazzoni@free-electrons.com, robin.murphy@arm.com, jacopo+renesas@jmondi.org Cc: jrdr.linux@gmail.com, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, brajeswar.linux@gmail.com Subject: [PATCH] arch/sh/mm/consistent.c: Use dma_zalloc_coherent 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 dma_alloc_coherent + memset with dma_zalloc_coherant Signed-off-by: Sabyasachi Gupta --- arch/sh/mm/consistent.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c index 792f361..fc8d235 100644 --- a/arch/sh/mm/consistent.c +++ b/arch/sh/mm/consistent.c @@ -52,13 +52,12 @@ int __init platform_resource_setup_memory(struct platform_device *pdev, if (!memsize) return 0; - buf = dma_alloc_coherent(&pdev->dev, memsize, &dma_handle, GFP_KERNEL); + buf = dma_zalloc_coherent(&pdev->dev, memsize, &dma_handle, GFP_KERNEL); if (!buf) { pr_warning("%s: unable to allocate memory\n", name); return -ENOMEM; } - memset(buf, 0, memsize); r->flags = IORESOURCE_MEM; r->start = dma_handle; -- 2.7.4