Page MenuHomeFreeBSD

linuxkpi: Add kstrtou16
ClosedPublic

Authored by manu on May 25 2020, 9:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 28, 2:37 AM
Unknown Object (File)
Thu, Sep 18, 2:32 PM
Unknown Object (File)
Sep 8 2025, 1:29 PM
Unknown Object (File)
Aug 3 2025, 10:01 AM
Unknown Object (File)
Jul 27 2025, 2:39 AM
Unknown Object (File)
Jul 17 2025, 8:14 AM
Unknown Object (File)
Jul 5 2025, 1:59 PM
Unknown Object (File)
Jul 2 2025, 10:32 AM
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 Skipped
Unit
Tests Skipped

Event Timeline

manu requested review of this revision.May 25 2020, 9:07 AM
sys/compat/linuxkpi/common/include/linux/kernel.h
380

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

sys/compat/linuxkpi/common/include/linux/kernel.h
382

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.