Page MenuHomeFreeBSD

linuxkpi: Add kstrtou16
ClosedPublic

Authored by manu on May 25 2020, 9:07 AM.
Tags
None
Referenced Files
F113963376: D24996.id72221.diff
Sun, Apr 6, 6:22 AM
Unknown Object (File)
Wed, Mar 26, 5:37 PM
Unknown Object (File)
Fri, Mar 7, 4:46 PM
Unknown Object (File)
Feb 23 2025, 12:32 PM
Unknown Object (File)
Feb 15 2025, 7:04 PM
Unknown Object (File)
Feb 15 2025, 6:43 PM
Unknown Object (File)
Feb 15 2025, 10:02 AM
Unknown Object (File)
Feb 14 2025, 4:09 PM
Subscribers

Details

Summary

This function convert a char * to a u16.
Simply use strtoul and cast to compare for ERANGE

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

manu requested review of this revision.May 25 2020, 9:07 AM
sys/compat/linuxkpi/common/include/linux/kernel.h
380 ↗(On Diff #72221)

temp should be unsigned long. Else the point of comparing temp != (u16)temp goes away,.

sys/compat/linuxkpi/common/include/linux/kernel.h
382 ↗(On Diff #72221)

And also the (u16) cast should be removed.

manu edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.May 27 2020, 10:18 AM
This revision was automatically updated to reflect the committed changes.