Page MenuHomeFreeBSD

Cleanups to *ERR* compat shims.
ClosedPublic

Authored by jhb on Dec 11 2020, 9:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 17, 6:04 PM
Unknown Object (File)
Mon, Nov 11, 5:37 PM
Unknown Object (File)
Sun, Nov 10, 1:10 AM
Unknown Object (File)
Sep 1 2024, 8:21 PM
Unknown Object (File)
Sep 1 2024, 8:37 AM
Unknown Object (File)
Sep 1 2024, 8:37 AM
Unknown Object (File)
Sep 1 2024, 8:37 AM
Unknown Object (File)
Sep 1 2024, 8:37 AM

Details

Summary
  • Use [u]intptr_t casts to convert pointers to integers.
  • Change IS_ERR* to return bool instead of long.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 35487
Build 32393: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Dec 11 2020, 9:25 PM
jhb retitled this revision from Use [u]intptr_t instead of [unsigned] long. to Use [u]intptr_t instead of [unsigned] long for pointers..
jhb added inline comments.
sys/compat/linuxkpi/common/include/linux/err.h
43

This could also probably stay as a long though the cast below might need adjusting for architectures where long != intptr_t.

48

Since this doesn't return valid pointers, just errors, I think I should leave this as long. It also breaks some printf strings that want to use %ld to print these values.

  • Revert some of the earlier changes to keep error values as longs.
jhb retitled this revision from Use [u]intptr_t instead of [unsigned] long for pointers. to Cleanups to *ERR* compat shims..Dec 17 2020, 6:38 PM
jhb edited the summary of this revision. (Show Details)

This passes make tinderbox.

Haven't tested but looks good to me.

This revision is now accepted and ready to land.Dec 17 2020, 7:40 PM
This revision was automatically updated to reflect the committed changes.