[PATCH xserver 3/3] kdrive: Remove dead slots from KdCardFuncs

Eric Anholt eric at anholt.net
Mon Mar 27 19:25:33 UTC 2017


Adam Jackson <ajax at nwnk.net> writes:

> On Mon, 2017-03-27 at 12:35 -0400, Adam Jackson wrote:
>> On Fri, 2017-03-24 at 13:44 -0700, Eric Anholt wrote:
>> 
>> > This is the only functional change I spotted: SaveScreen is now
>> > going to
>> > return FALSE instead of TRUE.  Given that we haven't actually
>> > blanked
>> > the screen, this seems like an appropriate return value.
>> 
>> I don't think this is a functional change:
>> 
>> > > @@ -645,34 +614,7 @@ KdCloseScreen(ScreenPtr pScreen)
>> > >  static Bool
>> > >  KdSaveScreen(ScreenPtr pScreen, int on)
>> > >  {
>> > > -    KdScreenPriv(pScreen);
>> > > -    int dpmsState;
>> > > -
>> > > -    if (!pScreenPriv->card->cfuncs->dpms)
>> > > -        return FALSE;
>> > > -
>> 
>> ->dpms was always null so we were always returning false anyway.
>
> I am a filthy dirty liar. It was set to a stub that returned TRUE.
>
> TRUE appears to be what the rest of the DPMS stubs do, so how about I
> change KdSaveScreen to match?

Sounds good to me.  No behavior change in refactor code is the best.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20170327/0a94aa63/attachment-0001.sig>


More information about the xorg-devel mailing list