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)
Mar 31 2024, 2:13 PM
Unknown Object (File)
Mar 22 2024, 10:05 AM
Unknown Object (File)
Mar 10 2024, 11:37 PM
Unknown Object (File)
Dec 28 2023, 2:53 AM
Unknown Object (File)
Dec 23 2023, 12:14 AM
Unknown Object (File)
Nov 26 2023, 9:20 AM
Unknown Object (File)
Nov 26 2023, 7:01 AM
Unknown Object (File)
Nov 25 2023, 2:54 PM

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 Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #80606)

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

48 ↗(On Diff #80606)

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.