Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2740849pxb; Mon, 31 Jan 2022 03:21:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJynB+ZJdF+7186Sp03CWlHJkVpJntY+/KTG9apdKJY7tgIaKXYF4CEPgJvAoSDTH4nQO9qd X-Received: by 2002:a17:907:d0f:: with SMTP id gn15mr16658789ejc.43.1643628065263; Mon, 31 Jan 2022 03:21:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643628065; cv=none; d=google.com; s=arc-20160816; b=Pf5y1hLlEiW8r1iBCUju1xoGXi4h5bwB+2rmYX/mRaUuiLmm6MqYrDew+1QWNl/oRM HUlneVcmCNB5RDI4eYVIUIyUSnn6p9RmKsMwA2qgdbM7mDprxbNYh60FeTkMz7erYLAz rgPTObPiVvS7DXpXhmx4GkazsQI0EjcM7bAwphJkY0D8xXXWsBpoqrVv+ualWfJosuOm 6090BGds7n52FTDG+oIZB3Dvi84KF7uukVRz92fV3eRPRwLME/ety7XIZTrcOiQ+bseF qcT7hoph0NL6pelE7bDlkMYHAFqH6niuDsJL4FC9aLbNoI3D9pErjP4et2orPph4BD0k jz+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=IWO7rKSepSlzVAXnpL23ZhwNtEKyRgVrPy7eF/IWzac=; b=PI/HkneInAspI+4zVk6jjDxqskpkBnHRorMklRn3RMOBhaFwtCnJNg2UXehYE1Elyl wuTVrphtvaEsIB1/JlTod+Vi1PnPTQL3Jk9S04J7GX7jh8mfSHa+I62RbR9uPj69DrA+ rYZo1ZrgUWGslGSJp0CiqWW7lLNkxBXkfCYIxi1rE/I455sZlj0lq+kumODaSbFwz3QE kOMP/4SDu1Io1Hrfog2ErMn2mQcuBhpZQ47nME+QYcWRHAVfLVRLFK8xNx8pOSoqlX54 ARKAUMGitI9MKPxHAShGcYRRpd98oXdhgEP1FhpxN4rii3mpsZYZoe1X8Qg3Lxcr3hkE ydzQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q25si7403160edw.316.2022.01.31.03.20.39; Mon, 31 Jan 2022 03:21:05 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350188AbiA1Qgz (ORCPT + 99 others); Fri, 28 Jan 2022 11:36:55 -0500 Received: from foss.arm.com ([217.140.110.172]:53162 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350187AbiA1Qgx (ORCPT ); Fri, 28 Jan 2022 11:36:53 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9DC75113E; Fri, 28 Jan 2022 08:36:52 -0800 (PST) Received: from [10.57.68.47] (unknown [10.57.68.47]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C06223F793; Fri, 28 Jan 2022 08:36:51 -0800 (PST) Message-ID: Date: Fri, 28 Jan 2022 16:36:46 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH] iommu: Fix some W=1 warnings Content-Language: en-GB To: John Garry , joro@8bytes.org, will@kernel.org Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org References: <1643366673-26803-1-git-send-email-john.garry@huawei.com> From: Robin Murphy In-Reply-To: <1643366673-26803-1-git-send-email-john.garry@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-01-28 10:44, John Garry wrote: > The code is mostly free of W=1 warning, so fix the following: > > drivers/iommu/iommu.c:996: warning: expecting prototype for iommu_group_for_each_dev(). Prototype was for __iommu_group_for_each_dev() instead > drivers/iommu/iommu.c:3048: warning: Function parameter or member 'drvdata' not described in 'iommu_sva_bind_device' > drivers/iommu/ioasid.c:354: warning: Function parameter or member 'ioasid' not described in 'ioasid_get' > drivers/iommu/omap-iommu.c:1098: warning: expecting prototype for omap_iommu_suspend_prepare(). Prototype was for omap_iommu_prepare() instead Certainly no harm in keeping the documentation up to date! Reviewed-by: Robin Murphy > Signed-off-by: John Garry > > diff --git a/drivers/iommu/ioasid.c b/drivers/iommu/ioasid.c > index 50ee27bbd04e..06fee7416816 100644 > --- a/drivers/iommu/ioasid.c > +++ b/drivers/iommu/ioasid.c > @@ -349,6 +349,7 @@ EXPORT_SYMBOL_GPL(ioasid_alloc); > > /** > * ioasid_get - obtain a reference to the IOASID > + * @ioasid: the ID to get > */ > void ioasid_get(ioasid_t ioasid) > { > diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c > index 8b86406b7162..75741ce748d5 100644 > --- a/drivers/iommu/iommu.c > +++ b/drivers/iommu/iommu.c > @@ -980,17 +980,6 @@ static int iommu_group_device_count(struct iommu_group *group) > return ret; > } > > -/** > - * iommu_group_for_each_dev - iterate over each device in the group > - * @group: the group > - * @data: caller opaque data to be passed to callback function > - * @fn: caller supplied callback function > - * > - * This function is called by group users to iterate over group devices. > - * Callers should hold a reference count to the group during callback. > - * The group->mutex is held across callbacks, which will block calls to > - * iommu_group_add/remove_device. > - */ > static int __iommu_group_for_each_dev(struct iommu_group *group, void *data, > int (*fn)(struct device *, void *)) > { > @@ -1005,7 +994,17 @@ static int __iommu_group_for_each_dev(struct iommu_group *group, void *data, > return ret; > } > > - > +/** > + * iommu_group_for_each_dev - iterate over each device in the group > + * @group: the group > + * @data: caller opaque data to be passed to callback function > + * @fn: caller supplied callback function > + * > + * This function is called by group users to iterate over group devices. > + * Callers should hold a reference count to the group during callback. > + * The group->mutex is held across callbacks, which will block calls to > + * iommu_group_add/remove_device. > + */ > int iommu_group_for_each_dev(struct iommu_group *group, void *data, > int (*fn)(struct device *, void *)) > { > @@ -3032,6 +3031,7 @@ EXPORT_SYMBOL_GPL(iommu_aux_get_pasid); > * iommu_sva_bind_device() - Bind a process address space to a device > * @dev: the device > * @mm: the mm to bind, caller must hold a reference to it > + * @drvdata: opaque data pointer to pass to bind callback > * > * Create a bond between device and address space, allowing the device to access > * the mm using the returned PASID. If a bond already exists between @device and > diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c > index 91749654fd49..980e4af3f06b 100644 > --- a/drivers/iommu/omap-iommu.c > +++ b/drivers/iommu/omap-iommu.c > @@ -1085,7 +1085,7 @@ static __maybe_unused int omap_iommu_runtime_resume(struct device *dev) > } > > /** > - * omap_iommu_suspend_prepare - prepare() dev_pm_ops implementation > + * omap_iommu_prepare - prepare() dev_pm_ops implementation > * @dev: iommu device > * > * This function performs the necessary checks to determine if the IOMMU