Re: [drm/qxl 5/6] qxl: Don't notify userspace when monitors config is unchanged

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

 



Hi guys,

On 2 November 2016 at 16:31, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote:
> Hey,
>
> On Mon, Oct 31, 2016 at 08:00:09AM -0400, Frediano Ziglio wrote:
>> > diff --git a/drivers/gpu/drm/qxl/qxl_display.c
>> > b/drivers/gpu/drm/qxl/qxl_display.c
>> > index 156b7de..edb90f6 100644
>> > --- a/drivers/gpu/drm/qxl/qxl_display.c
>> > +++ b/drivers/gpu/drm/qxl/qxl_display.c
>> > @@ -57,11 +57,18 @@ static void qxl_alloc_client_monitors_config(struct
>> > qxl_device *qdev, unsigned c
>> >     qdev->client_monitors_config->count = count;
>> >  }
>> >
>> > +enum MonitorsConfigCopyStatus {
>> > +   MONITORS_CONFIG_COPIED,
>> > +   MONITORS_CONFIG_UNCHANGED,
>> > +   MONITORS_CONFIG_BAD_CRC,
>> > +};
>> > +
>>
>> I don't remember exactly kernel style, a
>>
>> typedef enum {
>>       MONITORS_CONFIG_COPIED,
>>       MONITORS_CONFIG_UNCHANGED,
>>       MONITORS_CONFIG_BAD_CRC,
>> } MonitorsConfigCopyStatus;
>>
>> could make following code shorter.
>
> A git grep enum in qxl/ returns a dozen results, none of these using
> typedef, I guess I just followed that style.
>
Kernel coding style advises against both typedefs and CamelCase. We do
have a few "offenders" but it's better to not add more.

Ftw when in doubt do search/grep through the document - I don't thinks
there's many people who've read the thing in one go :-)

Thanks
Emil
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]