Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1072402ybj; Tue, 5 May 2020 12:31:28 -0700 (PDT) X-Google-Smtp-Source: APiQypJSTADMGjmqc+xtfu4jXCWtzV7h1FmaYCAPlVpPQEx8s+WBawjiw673snUxREEN9ZtZYd7z X-Received: by 2002:a05:6402:1651:: with SMTP id s17mr4197995edx.173.1588707087971; Tue, 05 May 2020 12:31:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588707087; cv=none; d=google.com; s=arc-20160816; b=CzoMbHa9SjeuG0IMjYKiiemr/G2qXOgtzABWrMvGIXIMo+KrlawkuPKG7pkux9XsdR /RbVQ0XPO/KUWsENLNfz+cYWJgmY32RtfW2V4q4OvvZ9OwNBuOv9C7F/ZRXthV1hLck+ qWt6tm9mo0FOSWTF95vLelEDF0Ns5wGbiiWsA0M+yxHAqHuX5peBxpo0mL1AlYvsgNPa FIJoQ2kG4kBl3mMqr1f2+XtW15qUm6+8hGyZM0eUCLqaS/m73cRpp6hodWgmEOGdLoWV NKrnK5aXvoPSuK7TqWATVulhbLbiFb07IWFmVnfC1HITypWVEYrjJr5j3GhtCUfWXo9Q p2EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=8WScZuVwtjMvRP3fnDli4Eqe4D49uHkMeOHGx5k0XkM=; b=gw9MuHSekjQqqWfuaGjWjm+6csds0M99ui4i57pw95KppUNT1D1rpe10vL27FG1wmR Fj30Dddqd7y5+RySFOLN/VENbieMgRHBVzBov2TmFaGsU1EKFlB33tJqUFEtWvU9va6r SHEraQNoMj6N/onQWBWQRdTGQ6IYMyziR5ukcnDEVYSh5wLRIWzvRkKmKwoei8jzNQcE KVMyTJM9uAPelM3dwJC2WsJ2oz9egLgETKr5SV/gdg85odoyf47XjlQBd/Kp8lygTNHU k0VxMjodpY+NTGiyqNFeZEt0xs759FJTALTT5zEOSBrbJ93vOD0mm66p33ZMG7dk+a6a OXRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z2si1851710edp.280.2020.05.05.12.31.05; Tue, 05 May 2020 12:31:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728756AbgEET1M (ORCPT + 99 others); Tue, 5 May 2020 15:27:12 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:56385 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726350AbgEET1L (ORCPT ); Tue, 5 May 2020 15:27:11 -0400 X-IronPort-AV: E=Sophos;i="5.73,356,1583190000"; d="scan'208";a="347819655" Received: from palace.rsr.lip6.fr (HELO palace.lip6.fr) ([132.227.105.202]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES256-SHA256; 05 May 2020 21:27:09 +0200 From: Julia Lawall To: Jean-Philippe Brucker Cc: kernel-janitors@vger.kernel.org, Joerg Roedel , virtualization@lists.linux-foundation.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, eugene.volanschi@inria.fr Subject: [PATCH] iommu/virtio: reverse arguments to list_add Date: Tue, 5 May 2020 20:47:47 +0200 Message-Id: <1588704467-13431-1-git-send-email-Julia.Lawall@inria.fr> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Elsewhere in the file, there is a list_for_each_entry with &vdev->resv_regions as the second argument, suggesting that &vdev->resv_regions is the list head. So exchange the arguments on the list_add call to put the list head in the second argument. Fixes: 2a5a31487445 ("iommu/virtio: Add probe request") Signed-off-by: Julia Lawall --- drivers/iommu/virtio-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c index d5cac4f46ca5..4e1d11af23c8 100644 --- a/drivers/iommu/virtio-iommu.c +++ b/drivers/iommu/virtio-iommu.c @@ -453,7 +453,7 @@ static int viommu_add_resv_mem(struct viommu_endpoint *vdev, if (!region) return -ENOMEM; - list_add(&vdev->resv_regions, ®ion->list); + list_add(®ion->list, &vdev->resv_regions); return 0; }