linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Michael Ellerman <mpe@ellerman.id.au>,linux-kernel@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org, kernel test robot <lkp@intel.com>,
	Anton Blanchard <anton@samba.org>
Subject: Re: [PATCH] powerpc: iommu: fix build when neither PCI or IBMVIO is set
Date: Sat, 06 Mar 2021 11:44:33 -0800	[thread overview]
Message-ID: <3954705C-2B4C-436A-8902-494240662491@infradead.org> (raw)
In-Reply-To: <87lfb5sthg.fsf@mpe.ellerman.id.au>

On March 2, 2021 3:08:43 AM PST, Michael Ellerman <mpe@ellerman.id.au> wrote:
>Randy Dunlap <rdunlap@infradead.org> writes:
>> When neither CONFIG_PCI nor CONFIG_IBMVIO is enabled:
>>
>> ../arch/powerpc/kernel/iommu.c:178:30: error:
>'fail_iommu_bus_notifier' defined but not used
>[-Werror=unused-variable]
>>   178 | static struct notifier_block fail_iommu_bus_notifier = {
>>
>> If only that struct is bounded by 2 #if defined() phrases (PCI &&
>IBMVIO):
>>
>> ../arch/powerpc/kernel/iommu.c:162:12: error: 'fail_iommu_bus_notify'
>defined but not used [-Werror=unused-function]
>>   162 | static int fail_iommu_bus_notify(struct notifier_block *nb,
>>
>> If that function is also guarded by 2 #if defined() phrases:
>>
>> In file included from ../include/linux/dma-mapping.h:7,
>>                  from ../arch/powerpc/kernel/iommu.c:19:
>> ../include/linux/device.h:131:26: error: 'dev_attr_fail_iommu'
>defined but not used [-Werror=unused-variable]
>>   131 |  struct device_attribute dev_attr_##_name = __ATTR_RW(_name)
>> ../arch/powerpc/kernel/iommu.c:160:8: note: in expansion of macro
>'DEVICE_ATTR_RW'
>>   160 | static DEVICE_ATTR_RW(fail_iommu);
>>
>> and the snowball continues to grow.
>> Next I got this one:
>>
>> ../arch/powerpc/kernel/iommu.c: In function 'iommu_range_alloc':
>> ../arch/powerpc/kernel/iommu.c:234:6: error: implicit declaration of
>function 'should_fail_iommu'; did you mean 'should_failslab'?
>[-Werror=implicit-function-declaration]
>>   234 |  if (should_fail_iommu(dev))
>>
>> and
>>
>> ../arch/powerpc/kernel/iommu.c: In function 'should_fail_iommu':
>> ../arch/powerpc/kernel/iommu.c:122:50: error: 'fail_iommu' undeclared
>(first use in this function)
>>   122 |  return dev->archdata.fail_iommu && should_fail(&fail_iommu,
>1);
>>
>> So combine CONFIG_FAIL_IOMMU && (CONFIG_PCI || CONFIG_IBMVIO)
>> to decide on building some of this code/data.
>
>Couldn't we just make FAIL_IOMMU depend on PCI || IBMVIO?
>
>cheers

Yes, I thought of that about 5 seconds after hitting Send. But I can't do it just now -- am away from computer.


-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

      reply	other threads:[~2021-03-06 20:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02  8:28 [PATCH] powerpc: iommu: fix build when neither PCI or IBMVIO is set Randy Dunlap
2021-03-02 11:08 ` Michael Ellerman
2021-03-06 19:44   ` Randy Dunlap [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3954705C-2B4C-436A-8902-494240662491@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=anton@samba.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lkp@intel.com \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).