* [PATCH -next 3/8] iommufd/selftest: Make dirty_ops static
@ 2024-08-19 12:00 Jinjie Ruan
2024-08-19 12:28 ` Jason Gunthorpe
2024-08-19 12:29 ` Yi Liu
0 siblings, 2 replies; 3+ messages in thread
From: Jinjie Ruan @ 2024-08-19 12:00 UTC (permalink / raw)
To: jgg, kevin.tian, joro, will, robin.murphy, iommu, linux-kernel; +Cc: ruanjinjie
The sparse tool complains as follows:
drivers/iommu/iommufd/selftest.c:277:30: warning:
symbol 'dirty_ops' was not declared. Should it be static?
This symbol is not used outside of selftest.c, so marks it static.
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
drivers/iommu/iommufd/selftest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/iommufd/selftest.c b/drivers/iommu/iommufd/selftest.c
index 04293b20e20c..7464c24764cd 100644
--- a/drivers/iommu/iommufd/selftest.c
+++ b/drivers/iommu/iommufd/selftest.c
@@ -274,7 +274,7 @@ static int mock_domain_read_and_clear_dirty(struct iommu_domain *domain,
return 0;
}
-const struct iommu_dirty_ops dirty_ops = {
+static const struct iommu_dirty_ops dirty_ops = {
.set_dirty_tracking = mock_domain_set_dirty_tracking,
.read_and_clear_dirty = mock_domain_read_and_clear_dirty,
};
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next 3/8] iommufd/selftest: Make dirty_ops static
2024-08-19 12:00 [PATCH -next 3/8] iommufd/selftest: Make dirty_ops static Jinjie Ruan
@ 2024-08-19 12:28 ` Jason Gunthorpe
2024-08-19 12:29 ` Yi Liu
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2024-08-19 12:28 UTC (permalink / raw)
To: Jinjie Ruan; +Cc: kevin.tian, joro, will, robin.murphy, iommu, linux-kernel
On Mon, Aug 19, 2024 at 08:00:07PM +0800, Jinjie Ruan wrote:
> The sparse tool complains as follows:
>
> drivers/iommu/iommufd/selftest.c:277:30: warning:
> symbol 'dirty_ops' was not declared. Should it be static?
>
> This symbol is not used outside of selftest.c, so marks it static.
>
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> ---
> drivers/iommu/iommufd/selftest.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
I picked this up for iommufd
Thanks,
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next 3/8] iommufd/selftest: Make dirty_ops static
2024-08-19 12:00 [PATCH -next 3/8] iommufd/selftest: Make dirty_ops static Jinjie Ruan
2024-08-19 12:28 ` Jason Gunthorpe
@ 2024-08-19 12:29 ` Yi Liu
1 sibling, 0 replies; 3+ messages in thread
From: Yi Liu @ 2024-08-19 12:29 UTC (permalink / raw)
To: Jinjie Ruan, jgg, kevin.tian, joro, will, robin.murphy, iommu,
linux-kernel
On 2024/8/19 20:00, Jinjie Ruan wrote:
> The sparse tool complains as follows:
>
> drivers/iommu/iommufd/selftest.c:277:30: warning:
> symbol 'dirty_ops' was not declared. Should it be static?
>
> This symbol is not used outside of selftest.c, so marks it static.
>
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> ---
> drivers/iommu/iommufd/selftest.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
> diff --git a/drivers/iommu/iommufd/selftest.c b/drivers/iommu/iommufd/selftest.c
> index 04293b20e20c..7464c24764cd 100644
> --- a/drivers/iommu/iommufd/selftest.c
> +++ b/drivers/iommu/iommufd/selftest.c
> @@ -274,7 +274,7 @@ static int mock_domain_read_and_clear_dirty(struct iommu_domain *domain,
> return 0;
> }
>
> -const struct iommu_dirty_ops dirty_ops = {
> +static const struct iommu_dirty_ops dirty_ops = {
> .set_dirty_tracking = mock_domain_set_dirty_tracking,
> .read_and_clear_dirty = mock_domain_read_and_clear_dirty,
> };
--
Regards,
Yi Liu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-19 12:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-19 12:00 [PATCH -next 3/8] iommufd/selftest: Make dirty_ops static Jinjie Ruan
2024-08-19 12:28 ` Jason Gunthorpe
2024-08-19 12:29 ` Yi Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®