diff options
author | Riyan Dhiman <[email protected]> | 2024-09-01 23:52:44 +0530 |
---|---|---|
committer | Ulf Hansson <[email protected]> | 2024-09-03 14:31:32 +0200 |
commit | 6f25e5deca7739a27462ef26fb5c07cfb926c4e4 (patch) | |
tree | 68356a3716fa2c2bd46cdd78584fc62fd4b1426a /tools/testing/selftests/bpf/progs/test_autoload.c | |
parent | d2253bfa830e907eddad13d9de99d7b6df8585a1 (diff) |
mmc: core: Convert simple_stroul to kstroul
simple_strtoul() is obsolete and lacks proper error handling, making it
unsafe for converting strings to unsigned long values. Replace it with
kstrtoul(), which provides robust error checking and better safety.
This change improves the reliability of the string-to-integer conversion
and aligns with current kernel coding standards. Error handling is added
to catch conversion failures, returning -EINVAL when input is invalid.
Issue reported by checkpatch:
- WARNING: simple_strtoul is obsolete, use kstrtoul instead
Signed-off-by: Riyan Dhiman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ulf Hansson <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions