Page MenuHomeFreeBSD

linuxkpi: Add `mem_is_zero()`
ClosedPublic

Authored by dumbbell on Thu, Apr 16, 9:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 11, 4:12 PM
Unknown Object (File)
Mon, May 11, 4:12 PM
Unknown Object (File)
Sat, May 9, 4:30 PM
Unknown Object (File)
Sat, May 9, 4:23 PM
Unknown Object (File)
Sat, May 9, 4:03 PM
Unknown Object (File)
Sat, May 9, 4:00 PM
Unknown Object (File)
Thu, May 7, 1:57 AM
Unknown Object (File)
Wed, May 6, 8:32 PM
Subscribers

Details

Reviewers
bz
Group Reviewers
linuxkpi
Commits
rGab77c26d3643: linuxkpi: Add `mem_is_zero()`
Summary

The DRM generic code and the i915 DRM driver started to replace the use of memchr_inv() by a mem_is_zero() in Linux 6.12. We reuse the previous use of memchr_inv() to implement mem_is_zero().

This is part of the update of DRM drivers to Linux 6.12.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested changes to this revision.Mon, Apr 20, 10:17 PM
bz added a subscriber: bz.
bz added inline comments.
sys/compat/linuxkpi/common/include/linux/string.h
206

This could be written as
return (!memchr_inv(start, 0, length));
but as per style probably should be
return (memchr_inv(start, 0, length) == NULL);

This revision now requires changes to proceed.Mon, Apr 20, 10:17 PM

Address comment from @bz

Sorry, that’s me who dislike putting calls or complex statements directly in the return :-) I should have followed the adopted style.

This revision is now accepted and ready to land.Wed, Apr 22, 1:39 PM
This revision was automatically updated to reflect the committed changes.