bsps/powerpc/gen5200/i2c/i2c.c: Fix enum conversion warnings

The GCC warning -Wenum-conversion flagged the function
i2c_transfer_wait_sema() which was treated as returning a mix of
rtems_status_code and i2c_message_status. Changed to return an
rtems_status_code uniformly.
This commit is contained in:
Joel Sherrill
2025-12-08 20:10:02 +00:00
committed by Gedare Bloom
parent f7116eee20
commit f1a5c225fe
+2 -2
View File
@@ -58,7 +58,7 @@ i2c_transfer_poll_done_func(void *arg)
* RTEMS_SUCCESSFUL, if tranfer finished successfully,
* or RTEMS status code if semaphore operations has failed.
*/
static i2c_message_status
static rtems_status_code
i2c_transfer_wait_sema(i2c_bus_number bus, i2c_message *msg, int nmsg)
{
rtems_status_code sc;
@@ -72,7 +72,7 @@ i2c_transfer_wait_sema(i2c_bus_number bus, i2c_message *msg, int nmsg)
&sema
);
if (sc != RTEMS_SUCCESSFUL)
return I2C_RESOURCE_NOT_AVAILABLE;
return RTEMS_UNSATISFIED;
sc = i2c_transfer(bus, nmsg, msg,
i2c_transfer_sema_done_func, &sema);
if (sc != RTEMS_SUCCESSFUL)