Description / Steps to reproduce the issue
One example is the following part of the interface:
/****************************************************************************
* Name: I2S_SETMCLKFREQUENCY
*
* Description:
* Set the master clock frequency. Usually, the MCLK is a multiple of the
* sample rate. Most of the audio codecs require setting specific MCLK
* frequency according to the sample rate. NOTE: this parameter may not
* be implemented on I2S driver. If not implemented, the I2S may set
* internally any value to the master clock (or even does not support it).
*
* Input Parameters:
* dev - Device-specific state data
* frequency - The I2S master clock's frequency
*
* Returned Value:
* Returns the resulting master clock or a negated errno value on failure.
*
****************************************************************************/
#define I2S_SETMCLKFREQUENCY(d,f) \
((d)->ops->i2s_setmclkfrequency ? \
(d)->ops->i2s_setmclkfrequency(d,f) : -ENOTTY)
The function i2s_setmclkfrequency should be capable of returning a negated error code. However, the function signature is as follows:
/* Master Clock methods */
CODE uint32_t (*i2s_getmclkfrequency)(FAR struct i2s_dev_s *dev);
CODE uint32_t (*i2s_setmclkfrequency)(FAR struct i2s_dev_s *dev,
uint32_t frequency);
A uint32_t is never capable of returning a negated error code.
On which OS does this issue occur?
[OS: Linux]
What is the version of your OS?
Arch Linux
NuttX Version
master
Issue Architecture
[Arch: all]
Issue Area
[Area: Drivers]
Host information
No response
Verification
Description / Steps to reproduce the issue
One example is the following part of the interface:
The function
i2s_setmclkfrequencyshould be capable of returning a negated error code. However, the function signature is as follows:A
uint32_tis never capable of returning a negated error code.On which OS does this issue occur?
[OS: Linux]
What is the version of your OS?
Arch Linux
NuttX Version
master
Issue Architecture
[Arch: all]
Issue Area
[Area: Drivers]
Host information
No response
Verification