Page MenuHomeFreeBSD

linuxkpi: Add kstrtou16
ClosedPublic

Authored by manu on May 25 2020, 9:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Aug 14, 11:35 AM
Unknown Object (File)
Wed, Aug 5, 8:06 AM
Unknown Object (File)
Wed, Aug 5, 2:54 AM
Unknown Object (File)
Thu, Jul 30, 1:55 PM
Unknown Object (File)
Jul 22 2026, 10:31 AM
Unknown Object (File)
Jul 20 2026, 7:28 AM
Unknown Object (File)
Jul 5 2026, 1:33 PM
Unknown Object (File)
Jun 30 2026, 11:42 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.