Re: [PATCH v2 4/5] drm/udl: Untangle .get_modes() and .detect_ctx()

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

 



On Fri, 10 May 2024, Thomas Zimmermann <tzimmermann@xxxxxxx> wrote:
> Am 10.05.24 um 14:17 schrieb Jani Nikula:
>>> +	/*
>>> +	 * The adapter sends all-zeros if no monitor has been
>>> +	 * connected. We consider anything else a connection.
>>> +	 */
>>> +	return memcmp(no_edid, hdr, 8) != 0;
>> Nitpick, this works, but you can drop the no_edid buf by using:
>>
>> 	return memchr_inv(hdr, 0, sizeof(hdr));
>
> Makes sense to me. Thanks for reviewing.

Btw I wrote [1] because !memchr_inv() is a bit obscure.

BR,
Jani.


[1] https://lore.kernel.org/r/20240527094320.2653177-1-jani.nikula@xxxxxxxxx


-- 
Jani Nikula, Intel



[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