From patchwork Tue Nov 7 10:47:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 10046503 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 02B736031B for ; Tue, 7 Nov 2017 11:26:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3D7829BDE for ; Tue, 7 Nov 2017 11:26:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8C8129BE7; Tue, 7 Nov 2017 11:26:07 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 18A7729C30 for ; Tue, 7 Nov 2017 11:26:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=yVgLMrLjrh5luQBeDT1Zgc0SDqEReD11vMISGrTxxyk=; b=HbMGtX9kD2rRtKMIr0GS1Gncfz 3jhOdAiE7aUNfVkS5VXlRJ8HxpYUCRE4aRJ39GJ0lt/Teq0iyYEQz4c/e9hyfnfGNkMgbi2ajrcB2 dJ0M94b+fgcc4WQepfVjJM7IOstwaFtrEX/xiNjGiEUP4fQnlkTd+KHJrD3f2GuiYrBj4Q1FeBr2o U/lgDOK8B8I453DxzYzAHXHgQMZu0JJbshorgAV6OZnj0UFlSyrFLZj0cMLpe2jXucKeT4oTrQrrS gB9mQ35IlJraU6fttQhLNahG0B7TRzDs+ADaQzuueAfp1uN2lB/wzuvhfjBBEUH/9+zmirfr+nTpW VUAWMZmQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eC20w-0005dU-Jj; Tue, 07 Nov 2017 11:25:54 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eC1zw-0002G6-EC for linux-arm-kernel@bombadil.infradead.org; Tue, 07 Nov 2017 11:24:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Qmpf1ClRABVyU/O/DFYToBcSCilY6WSM9FEdil2yKKo=; b=rj0OQginmQV0d1ZdF8+LOW0cU YfsDbZjVqCuJAFOfZoJjFx42NpJSUUtbdxxRpVQfhRv2shfwUErOYSEAw7mhSoP5FShKHTGcezQeo JoB5IqmLv1Q2/DYM+AThdoygRFEQS/5i7o1XEsn7UbIgYIYjxAiIOxjUVj3k6EPdZURtxB1XZbtY1 zG6qT5IGHzmI7vbHxDzl3nmCatktgEkD9giDScxfJ4wmABJAT7I6JyUmgNm0e3f/x//QDj7rOyhCD OJIaOtUKnWTXIGRdx3teeCVWj9lamQumlzt55lr9cg3rWc9V/yNx6WSgUG5GoA4VyTjRf2/7wA/S6 igaAwpJhQ==; Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eC1RF-00058x-JN for linux-arm-kernel@lists.infradead.org; Tue, 07 Nov 2017 10:49:04 +0000 Received: by mail-wm0-x243.google.com with SMTP id p75so2739019wmg.3 for ; Tue, 07 Nov 2017 02:48:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Qmpf1ClRABVyU/O/DFYToBcSCilY6WSM9FEdil2yKKo=; b=h0ynFz7EZWJj+N91zC5UvggrgcE7TWBL1qfKfgs5Tas2j5TAMvKwmGHAkgYZYSkfDG vcnzzNgMGh6VGg0drowdbqpElQQs+ymaDi41EWfPn9gADGyLagVMWZAHHe9FaHnJoSIO YhotSyERUct5mwmFaE84lAhBsrbPKt2e60V18= 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:in-reply-to :references; bh=Qmpf1ClRABVyU/O/DFYToBcSCilY6WSM9FEdil2yKKo=; b=IskVhqWYq//V2h84DlSc2RQsW2ptHsdnGwo+aO+/1oDnU0J26T6qSxjWLPS1lynANt UeB0LZfS7am91fcmvr5/4nZZlkucZka/SnsTy5yIt3i58CsHr6+Umf4Ibldrdz5UVP6o TxZvOL1uwTOaeljVWZWKqF4WbuNhlEnCX9p4kw51GvlCc04nUS/1Q1eBZoCRtB7gwXV9 L1TcB86seqY7KwsM9C/Ls4mjqTovYioIfzzSYHN1pajcG3A5CwLGhx22kwn2T4MFa4Gd +fhw1VfDAdZQQsIfHu0UKedVML1ekpqrkXt9LJfgseVK+wHTAKrThINhfLu1CJszBCZX Npbw== X-Gm-Message-State: AMCzsaVNtaiEGlgQlrcfRNeMEQlJp0nega/nFeKBecBRSS0OCyO4lxVM FlUJhsR3c7d6sKWQ8Og/YgxiPQ== X-Google-Smtp-Source: ABhQp+TBO1Zz5tYh6xgCSYtawvjWzcHKEJzPwQDfpjep9u7MVMOtu8hTwwKnjZnAXWD5XgH3DvZVfQ== X-Received: by 10.80.167.37 with SMTP id h34mr24011798edc.223.1510051719580; Tue, 07 Nov 2017 02:48:39 -0800 (PST) Received: from localhost.localdomain (xd93dd96b.cust.hiper.dk. [217.61.217.107]) by smtp.gmail.com with ESMTPSA id q12sm1044958edj.29.2017.11.07.02.48.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Nov 2017 02:48:38 -0800 (PST) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 20/26] KVM: arm/arm64: vgic-its: Remove kvm_its_unmap_device Date: Tue, 7 Nov 2017 11:47:53 +0100 Message-Id: <20171107104800.30021-21-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171107104800.30021-1-christoffer.dall@linaro.org> References: <20171107104800.30021-1-christoffer.dall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171107_104901_669145_86C40174 X-CRM114-Status: GOOD ( 11.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, Marc Zyngier , Eric Auger , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, Christoffer Dall MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eric Auger Let's remove kvm_its_unmap_device and use kvm_its_free_device as both functions are identical. Signed-off-by: Eric Auger Acked-by: Marc Zyngier Acked-by: Christoffer Dall Signed-off-by: Christoffer Dall --- virt/kvm/arm/vgic/vgic-its.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c index 9f5e34767628..75c18183eee3 100644 --- a/virt/kvm/arm/vgic/vgic-its.c +++ b/virt/kvm/arm/vgic/vgic-its.c @@ -897,7 +897,7 @@ static int vgic_its_cmd_handle_mapi(struct kvm *kvm, struct vgic_its *its, } /* Requires the its_lock to be held. */ -static void vgic_its_unmap_device(struct kvm *kvm, struct its_device *device) +static void vgic_its_free_device(struct kvm *kvm, struct its_device *device) { struct its_ite *ite, *temp; @@ -960,7 +960,7 @@ static int vgic_its_cmd_handle_mapd(struct kvm *kvm, struct vgic_its *its, * by removing the mapping and re-establishing it. */ if (device) - vgic_its_unmap_device(kvm, device); + vgic_its_free_device(kvm, device); /* * The spec does not say whether unmapping a not-mapped device @@ -1615,16 +1615,6 @@ static int vgic_its_create(struct kvm_device *dev, u32 type) return vgic_its_set_abi(its, NR_ITS_ABIS - 1); } -static void vgic_its_free_device(struct kvm *kvm, struct its_device *dev) -{ - struct its_ite *ite, *tmp; - - list_for_each_entry_safe(ite, tmp, &dev->itt_head, ite_list) - its_free_ite(kvm, ite); - list_del(&dev->dev_list); - kfree(dev); -} - static void vgic_its_destroy(struct kvm_device *kvm_dev) { struct kvm *kvm = kvm_dev->kvm;