[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dc578554-570d-9496-6661-4c9bcd3e2496@redhat.com>
Date: Wed, 11 Jan 2023 17:43:46 +0100
From: Javier Martinez Canillas <javierm@...hat.com>
To: Thomas Zimmermann <tzimmermann@...e.de>,
Daniel Vetter <daniel.vetter@...ll.ch>,
DRI Development <dri-devel@...ts.freedesktop.org>
Cc: Aaron Plattner <aplattner@...dia.com>,
Intel Graphics Development <intel-gfx@...ts.freedesktop.org>,
LKML <linux-kernel@...r.kernel.org>, stable@...r.kernel.org,
Alex Deucher <alexander.deucher@....com>,
Daniel Vetter <daniel.vetter@...el.com>,
Sam Ravnborg <sam@...nborg.org>, Helge Deller <deller@....de>
Subject: Re: [PATCH 11/11] video/aperture: Only remove sysfb on the default
vga pci device
On 1/11/23 17:20, Thomas Zimmermann wrote:
[...]
>>
>> diff --git a/drivers/video/aperture.c b/drivers/video/aperture.c
>> index ba565515480d..a1821d369bb1 100644
>> --- a/drivers/video/aperture.c
>> +++ b/drivers/video/aperture.c
>> @@ -321,15 +321,16 @@ int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *na
>>
>> primary = pdev == vga_default_device();
>>
>> + if (primary)
>> + sysfb_disable();
>> +
>
> There's another sysfb_disable() in aperture_remove_conflicting_devices()
> without the branch but with a long comment. I find this slightly confusing.
>
> I'd rather add a branched sysfb_disable() plus the comment to
> aperture_detach_devices(). And then add a 'primary' parameter to
> aperture_detach_devices(). In aperture_remove_conflicting_devices() the
> parameter would be unconditionally true.
>
Or just remove that long comment since there's already kernel-doc for the
sysfb_disable() function definition.
This feels to me that any approach to parameterize this will lead to code
that is harder to read.
Since is just a single function call, I would just duplicate like $subject
does to be honest.
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
Powered by blists - more mailing lists