RTEMS | GRLIB: Fix Coverity issues (!256)
Sebastian Huber (@sebhub)
gitlab at rtems.org
Fri Oct 18 10:06:39 UTC 2024
Sebastian Huber started a new discussion on bsps/shared/grlib/ascs/grascs.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/256#note_113267
> return -GRASCS_ERROR_TRANSACTIVE;
> }
>
> - cfg->regs->cmd = ((cfg->regs->cmd &= ~GRASCS_CMD_SLAVESEL) |
> - (slave << GRASCS_CMD_SLAVESEL_BITS));
> + cfg->regs->cmd &= ~GRASCS_CMD_SLAVESEL
> + cfg->regs->cmd |= (slave << GRASCS_CMD_SLAVESEL_BITS);
I am not sure if this is the right change. I guess the `&=` should be just `&`. There is probably no need to have two read modify write operations.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/256#note_113267
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20241018/ad483c5a/attachment.htm>
More information about the bugs
mailing list