public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: eric@anholt.net (Eric Anholt)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] drm/pl111: add ARM_AMBA dependency
Date: Mon, 22 May 2017 15:08:52 -0700	[thread overview]
Message-ID: <87pof07de3.fsf@eliezer.anholt.net> (raw)
In-Reply-To: <CAK8P3a3UjWM0OGVO1nNyEtrRUyFKDuBOboYVSnVLcg4MTKfFMQ@mail.gmail.com>

Arnd Bergmann <arnd@arndb.de> writes:

> On Mon, May 22, 2017 at 6:23 PM, Eric Anholt <eric@anholt.net> wrote:
>> Arnd Bergmann <arnd@arndb.de> writes:
>>
>>> The driver is written in a way to enable compile-testing without CONFIG_ARM_AMBA,
>>> but it just causes needless warnings:
>>>
>>> drivers/gpu/drm/pl111/pl111_drv.c:149:26: error: 'pl111_drm_driver' defined but not used [-Werror=unused-variable]
>>> drivers/gpu/drm/pl111/pl111_drv.c:81:12: error: 'pl111_modeset_init' defined but not used [-Werror=unused-function]
>>>
>>> This removes the #ifdef instead, and adds a dependency on ARM_AMBA to
>>> only let us build the driver when the base support is enabled.
>>>
>>> Unfortunately, this requires removing one redundant 'select ARM_AMBA'
>>> line from mach-s3c64xx to avoid a circular dependency.
>>>
>>> It might be good to allow manually enabling ARM_AMBA when COMPILE_TEST
>>> is turned on, but that should be a separate patch and may cause other
>>> build regressions.
>>
>> If I understand the Kconfig, you're effectively disabling the build on
>> COMPILE_TEST && !ARM.  I'd rather that we just fix up the warnings, so
>> that people can keep build-testing DRM drivers:
>>
>> https://patchwork.kernel.org/patch/9737857/
>
> That works too. When I tried the same, I thought it was a little too silly to
> have a file that effectively compiles into nothing.
>
> My initial approach did two things differently though:
>
> - use __maybe_unused instead of __used, since
>
> - annotate pl111_amba_driver instead of
>   pl111_drm_driver/pl111_modeset_init, and keep only
>   module_amba_driver() in the #ifdef.

Oh, yeah, we've eliminated the amba_request_regions() that used to be
why the probe had to be under the #ifdef, so your solution would get us
better coverage and simpler code.  If you could send that patch to
dri-devel today, I'll get it applied.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170522/130d7423/attachment-0001.sig>

  reply	other threads:[~2017-05-22 22:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-22 15:20 [PATCH] drm/pl111: add ARM_AMBA dependency Arnd Bergmann
2017-05-22 16:23 ` Eric Anholt
2017-05-22 21:43   ` Arnd Bergmann
2017-05-22 22:08     ` Eric Anholt [this message]
2017-05-24 15:52       ` Arnd Bergmann
2017-05-22 16:32 ` Krzysztof Kozlowski
2017-05-22 21:37   ` Arnd Bergmann
2017-05-23 11:17     ` Krzysztof Kozlowski
2017-05-23 11:22       ` Arnd Bergmann
2017-05-23 11:24         ` Krzysztof Kozlowski

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=87pof07de3.fsf@eliezer.anholt.net \
    --to=eric@anholt.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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