From patchwork Thu Jun 27 17:33:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuqian Huang X-Patchwork-Id: 11020127 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 45B881580 for ; Thu, 27 Jun 2019 17:33:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 36DEB28451 for ; Thu, 27 Jun 2019 17:33:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2ADFA28698; Thu, 27 Jun 2019 17:33:46 +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 C853A28699 for ; Thu, 27 Jun 2019 17:33:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726572AbfF0Rdp (ORCPT ); Thu, 27 Jun 2019 13:33:45 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:41589 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726498AbfF0Rdp (ORCPT ); Thu, 27 Jun 2019 13:33:45 -0400 Received: by mail-pg1-f196.google.com with SMTP id c70so1205099pga.8; Thu, 27 Jun 2019 10:33:44 -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=VWXSJOL/XQJ6XCDQCsBk0dmxzaahEp9pmrVM0g18Mq/CJv0Y5yF1uV4yfAU/1lIYuO wUKxsrJ1vQkeHo3Ssin9WpV9patwudTbZ6Lh9DG0VMs2rq85i5CEbQ+x6lId/JxrKgBC p+0/6Age1KNMbk+zf4bmqUnoJmGopWLBto8Vt58eSNRyv5Nyviq2YUN7i/x0l0UfOlOA 6gzLZ+dzWQ+yM2JHrXtdlzOm2sLps0+uq3d0mj/ecS1BZuzBQP6wFxuIJOGb+cBiDItB +J6Px8IYhc5bIkkkn+uqzGs56NFI4mniSJe3vlVN63PCJy2wrPD3crJ2cTJSkCE3sK+E vm/g== 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=Cn6aD+l9vMxjCwMcoqSQVwIfg3m3gbzNcpY173qD3eOjlKmMPVQjtCefE26EHcFEwP u+wl6ltUY2uTir4ONo/8pUppja+FqWtMV0gRTvv8B3nq78wGJJDwdtbt23OA4ELOBbbI Q/3QXX4oEp5mMLIcrbtQTOA7NpEDztjUoCWWyEAmACfa8e6VPCda/KXDpR7fleOy3qcU PlLJmjs/BgRaYmEupAZPN3gjy8MlBrLrVXbAwrNddl64WDoWKYSwcG0Tkbprjz6An3Qm Kbs/2/RklZuUl320usSZAfMx6hjeRn0O/TeML3rEqup6RZEfCgXKQc7C52qgI0aHhysk Xq0A== X-Gm-Message-State: APjAAAVGVLvPnYb2IhCkRj4wOfUV+A77FVlkPe+UWPzgRGJzLCFWwAVI /jy6+XkjLfUgXd865ONZ2Lg= X-Google-Smtp-Source: APXvYqzwq6aLPmIprFHDeK9/db3iLLruH7les8HE0ELbvixRrz6wmetv4rmeRN3+GdGENzYpA5hXjg== X-Received: by 2002:a17:90a:2244:: with SMTP id c62mr7583309pje.29.1561656824516; Thu, 27 Jun 2019 10:33:44 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id u65sm10301043pjb.1.2019.06.27.10.33.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 10:33:43 -0700 (PDT) From: Fuqian Huang Cc: Fuqian Huang , Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/87] sh: mm: Remove call to memset after dma_alloc_coherent Date: Fri, 28 Jun 2019 01:33:31 +0800 Message-Id: <20190627173332.1879-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;