Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp814070ybx; Tue, 5 Nov 2019 06:03:04 -0800 (PST) X-Google-Smtp-Source: APXvYqyTb6XwJPwGehsAS1o8xx47u0m0JmwJj9n6I8A2Mdd7a3v2maP8dVDoNHxmZVGUKLIzVTfQ X-Received: by 2002:a50:e841:: with SMTP id k1mr36143356edn.280.1572962584362; Tue, 05 Nov 2019 06:03:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572962584; cv=none; d=google.com; s=arc-20160816; b=yTp3cjs1QT3p9z52QGPKnTD9oV8gZ+vOGLNM2PA2t+r00Rn12tiVAOykgUXNuHZ4vN 4wX7Fuqz8ku9VD4wyYRO89eivQecOAeyFC/9zV8QazGecHIS5OBv7cCCeam/IGt0qKgh 0UOGfah1YJm6JQFbdbcZeucwW2w2OCknSf79grDWaEBL34U3rCXNBy3BeflZnibEZV7m xwtmLeXfyzUhoJh5gmGMyLM+khbaaFXK93Yf+ahiji+7lIKOcuq3WHbiXR6ThKiuPP8n lIgS0gtzx4mvET3PD5Ef+31hdQNGSPwqUfytmuy4eXXqgS7bdxL02m6YvEp98p5Ew7Gm 16TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:subject:cc:to:from:date; bh=VwvtHRHJL03/W61wsR9bVAYOFjqhNJBb863Co7kR76A=; b=oGpWgkgmGW4+FiySA/JVP35e6cuA/JNdNWmMRmkjtkmgVz7lb2KHf6PJS2augVXJgk vnfmBLUw4dbgxm6aAz00joXYh6rDdHeVGlU7WMNBRf73VwM7UHmWk/0AXomXEJqxFzQN YYwK/9u7vQkLtk7IgYdi5JX4zmzfDtumTOWGt/EgXG/nrd0s4/GxdF+97GpxMYqGk7nJ YIhTb1K0sL/QwBnCwfgO6+e2e/FWNXTK6WOxNNi5s/9XET1KzPO9WEWAorz7m3MN65OK TcgN9s9uKIaAd481irsjuknaUJTywqQL3zFLk48CfZ8/QGF9+RC3a3kGk7Pummtbo2uS XqGA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qh13si3911394ejb.407.2019.11.05.06.02.39; Tue, 05 Nov 2019 06:03:04 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389350AbfKEN7g (ORCPT + 99 others); Tue, 5 Nov 2019 08:59:36 -0500 Received: from einhorn-mail.in-berlin.de ([217.197.80.20]:36711 "EHLO einhorn-mail.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388209AbfKEN7f (ORCPT ); Tue, 5 Nov 2019 08:59:35 -0500 X-Greylist: delayed 581 seconds by postgrey-1.27 at vger.kernel.org; Tue, 05 Nov 2019 08:59:35 EST X-Envelope-From: stefanr@s5r6.in-berlin.de Received: from authenticated.user (localhost [127.0.0.1]) by einhorn.in-berlin.de with ESMTPSA id xA5DneLi023521 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 5 Nov 2019 14:49:40 +0100 Date: Tue, 5 Nov 2019 14:49:39 +0100 From: Stefan Richter To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org Subject: [PATCH] firewire: core: code cleanup after vm_map_pages_zero introduction Message-ID: <20191105144939.3b38ce48@kant> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 22660db89262 turned fw_iso_buffer_map_vma into a one-liner. There is no need to keep this in the core-iso.c collection of buffer management functions; put it inline into the sole user, the character device file driver. Signed-off-by: Stefan Richter --- drivers/firewire/core-cdev.c | 3 ++- drivers/firewire/core-iso.c | 7 ------- drivers/firewire/core.h | 2 -- 3 files changed, 2 insertions(+), 10 deletions(-) --- a/drivers/firewire/core-cdev.c +++ b/drivers/firewire/core-cdev.c @@ -1694,7 +1694,8 @@ static int fw_device_op_mmap(struct file if (ret < 0) goto fail; - ret = fw_iso_buffer_map_vma(&client->buffer, vma); + ret = vm_map_pages_zero(vma, client->buffer.pages, + client->buffer.page_count); if (ret < 0) goto fail; --- a/drivers/firewire/core-iso.c +++ b/drivers/firewire/core-iso.c @@ -91,13 +91,6 @@ int fw_iso_buffer_init(struct fw_iso_buf } EXPORT_SYMBOL(fw_iso_buffer_init); -int fw_iso_buffer_map_vma(struct fw_iso_buffer *buffer, - struct vm_area_struct *vma) -{ - return vm_map_pages_zero(vma, buffer->pages, - buffer->page_count); -} - void fw_iso_buffer_destroy(struct fw_iso_buffer *buffer, struct fw_card *card) { --- a/drivers/firewire/core.h +++ b/drivers/firewire/core.h @@ -158,8 +158,6 @@ void fw_node_event(struct fw_card *card, int fw_iso_buffer_alloc(struct fw_iso_buffer *buffer, int page_count); int fw_iso_buffer_map_dma(struct fw_iso_buffer *buffer, struct fw_card *card, enum dma_data_direction direction); -int fw_iso_buffer_map_vma(struct fw_iso_buffer *buffer, - struct vm_area_struct *vma); /* -topology */ -- Stefan Richter -======---== =-== --=-= http://arcgraph.de/sr/