kselftest.h API usage - question about return

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I'm looking at the existing kselftest API in kselftest.h.

The existing (pre-TAP conversion) API basically consists of
some inline functions for handling and reporting different counters,
and some inline functions for exiting with different return codes.

My question is about the use of the exit functions with 
return throughout the kselftest code.

exit() does not return, but I see lots of instances of code like this:
return ksft_exit_pass();

Shouldn't this just be a call to ksft_exit_pass()?  ksft_exit_pass
(and other other ksft_exit_ routines) will never return, so this
is calling convention is a bit misleading.

I'm happy to submit a patch to change these call sites, if one
is desired.

Just by way of info, there are 119 calls to ksft_exit_*, and 57 of
them use the calls in conjunction with 'return'.

Let me know what you think, or if I'm missing some planned extension
that would involve these functions returning a return code.
 -- Tim



--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux