Re: [PATCH] drm: Fix undefined reference to drm_agp_clear() on non-AGP platforms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On Wed, Aug 7, 2013 at 2:39 PM, Laurent Pinchart
<laurent.pinchart@xxxxxxxxxxxxxxxx> wrote:
> Hi Daniel,
>
> On Wednesday 07 August 2013 14:19:34 Daniel Vetter wrote:
>> On Wed, Aug 7, 2013 at 2:17 PM, Laurent Pinchart wrote:
>> > The drm_agp_clear() function is only defined on platforms with AGP
>> > support. Move the drm_core_has_AGP() check from drm_agp_clear() to the
>> > caller to let the compiler optimize the drm_agp_clear() call away.
>> >
>> > Signed-off-by: Laurent Pinchart
>> > <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx>
>>
>> Can't we use the usual approach of an empty static inline helper for
>> the !CONFIG_AGP case here?
>
> Sure, that's possible as well. I find my solution slightly more explicit as it
> shows that drm_agp_clear() will only be called for platforms that have AGP,
> but I would be fine with a static inline as well.

But the compile fails with -O0.. we don't depend on optimizations to
avoid compiler errors. Besides, "static inline" is standard kernel
coding-style so I think we should stick to it.

I've attached a patch, feel free to pick it up. Otherwise, I will give
it some test-compiles once I get home and send it to dri-devel.

Thanks
David

Attachment: drm_agp_fix.patch
Description: Binary data

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux