rpc_xprt_debugfs_register() - atomic_inc_return() usage
From: Shuah Khan
Date: Wed Jan 20 2021 - 22:21:36 EST
Hi Anna and Trond,
I came across the following while reviewing atomic_inc_return() usages
that cast return value to unsigned
rpc_xprt_debugfs_register()'s atomic_inc_return() usage looks a bit odd.
- cur_id isn't initialized
- id = (unsigned int)atomic_inc_return(&cur_id);
Please note that id is int. Is it expected that cur_id could overflow?
Is there a maximum limit for this value?
thanks,
-- Shuah