From patchwork Fri Jun 28 02:45:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11021185 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F2031924 for ; Fri, 28 Jun 2019 02:46:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2D63286FB for ; Fri, 28 Jun 2019 02:46:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D3E252874E; Fri, 28 Jun 2019 02:46:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 735BD286FB for ; Fri, 28 Jun 2019 02:46:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726482AbfF1CqF (ORCPT ); Thu, 27 Jun 2019 22:46:05 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:34191 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726476AbfF1CqF (ORCPT ); Thu, 27 Jun 2019 22:46:05 -0400 Received: by mail-pf1-f195.google.com with SMTP id c85so2200749pfc.1; Thu, 27 Jun 2019 19:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=19iGsB+gEzyIr57/DpIGaBLmn8xqXumBOeEKleUog6g=; b=KAkI39n49Ass7U/Nf8g3gWdeUapZ73JL/FuCVDyj7KPGdjml4DHirbXTnyxaPFe7z7 4zq1nlaPwHu5SwtPupDsa5wzMMmNeLJrGA34P/C/4/cCjmKOBEfHLTA4UEm+feRLDFEy GIjytQrUJFQkl0ba3/+cmmCQ6yq17yxF2lbu/skEbXaH2cVRzf+Q7L4+CNHBSzX9Zok6 I4RGvKePGxKKI/UwRROlHsuToWj5bC7Kj8PehNUpVCnqw2aqyl/bFwPYyFLuhZn1tGkE t0Xc4qREepFTc0rdO8SjDFqAKuOYK2m6C2gb2WBjM6RJvHXrC4IW+NZ3IP/hMsLugJVn Waow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=19iGsB+gEzyIr57/DpIGaBLmn8xqXumBOeEKleUog6g=; b=mpxZ0xGktCP+F0RkoSAhBs74PQlp9c3uIvTvf6od/WUIUnVaff+dlplHNmHTxvw4O8 EfbFIZhnFsxlLIXUnWZoR8M2Q4FuZ60Ormh5LWVk8FWUE83f3GxvApgCtI4RGCeshbcq c6SHhOWZWIxRpVUrGqsZzF1uNCmdKwVyaor1eaUtrSzidtWuISnClXiidBP92wRk7mzf 5rqX/EU8afT8j8b/IPEKPPq489NA0djSkl9BDMSdOdOBR3znq1alQZCLuuqAIR5eP5o2 H+C7fQbUgkLp3F1fz0fUmPVL667EQ5Ilz9si00ktHyG5q7gwj0UuICUt2gT0KUBhW3q3 3pVg== X-Gm-Message-State: APjAAAVW1u2hhDaS92F4B7aqBs0cX5bGVww90KgAsyo2ucZ/VBS/ZNZD Jnn+8BGOPU+oUM9tQsXLRSw= X-Google-Smtp-Source: APXvYqzNRJWtbX7Zwkkxcl6M+n/9qnAlFuGw48cAbce0wvCkRN1fAwrY2avACJO0KHR2ij69oepZOQ== X-Received: by 2002:a65:534b:: with SMTP id w11mr7104029pgr.210.1561689964266; Thu, 27 Jun 2019 19:46:04 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id q5sm394597pgj.49.2019.06.27.19.46.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 19:46:03 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 01/27] sh: mm: Remove call to memset after dma_alloc_coherent Date: Fri, 28 Jun 2019 10:45:48 +0800 Message-Id: <20190628024549.14823-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- arch/sh/mm/consistent.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c index 792f36129062..b09510adfae9 100644 --- a/arch/sh/mm/consistent.c +++ b/arch/sh/mm/consistent.c @@ -58,8 +58,6 @@ int __init platform_resource_setup_memory(struct platform_device *pdev, return -ENOMEM; } - memset(buf, 0, memsize); - r->flags = IORESOURCE_MEM; r->start = dma_handle; r->end = r->start + memsize - 1;