[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6cb6f2eb-700a-fbc9-2b3f-cca95c8db64d@linux.intel.com>
Date: Fri, 8 Oct 2021 19:59:12 +0800
From: Lu Baolu <baolu.lu@...ux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: baolu.lu@...ux.intel.com, Joerg Roedel <jroedel@...e.de>,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
David Woodhouse <dwmw2@...radead.org>,
Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>
Subject: Re: [PATCH v1 1/2] iommu/vt-d: Move intel_iommu_ops to header file
Hi Andy,
On 2021/10/7 0:14, Andy Shevchenko wrote:
> On Fri, Jul 30, 2021 at 10:20:08AM +0800, Lu Baolu wrote:
>> Hi Andy,
>>
>> On 7/30/21 12:35 AM, Andy Shevchenko wrote:
>>> Compiler is not happy about hidden declaration of intel_iommu_ops.
>>>
>>> .../drivers/iommu/intel/iommu.c:414:24: warning: symbol 'intel_iommu_ops' was not declared. Should it be static?
>>>
>>> Move declaration to header file to make compiler happy.
>>
>> Thanks for the cleanup. Sharing data structures between different files
>> doesn't seem to be a good design. How about adding a helper so that the
>> intel_iommu_ops could be a static one?
>
> I don't see any change in the upstream. What's the plan?
> Can we take my patch as a quick fix?
>
This patch will cause below build error:
drivers/iommu/intel/dmar.c: In function ‘alloc_iommu’:
drivers/iommu/intel/dmar.c:1140:47: error: ‘intel_iommu_ops’ undeclared
(first use in this function); did you mean ‘intel_iommu_groups’?
1140 | err = iommu_device_register(&iommu->iommu, &intel_iommu_ops,
NULL);
| ^~~~~~~~~~~~~~~
| intel_iommu_groups
drivers/iommu/intel/dmar.c:1140:47: note: each undeclared identifier is
reported only once for each function it appears in
make[3]: *** [scripts/Makefile.build:277: drivers/iommu/intel/dmar.o] Error
if
# CONFIG_INTEL_IOMMU is not set
CONFIG_IRQ_REMAP=y
Best regards,
baolu
Powered by blists - more mailing lists