drivers: dma: Remove double parentheses in if statements

This patch fixes following compilation error when compiling using clang

drivers/dma/dma_stm32.c:364:42: error: equality comparison with
extraneous parentheses [-Werror,-Wparentheses-equality]
        if ((config->head_block->source_address == 0)) {
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
drivers/dma/dma_stm32.c:364:42: note: remove extraneous parentheses
around the comparison to silence this warning
        if ((config->head_block->source_address == 0)) {
            ~                                   ^   ~

Signed-off-by: Patryk Duda <pdk@semihalf.com>
This commit is contained in:
Patryk Duda 2023-05-29 13:48:46 +02:00 committed by Anas Nashif
commit c0e1c5e09b

View file

@ -363,11 +363,11 @@ DMA_STM32_EXPORT_API int dma_stm32_configure(const struct device *dev,
stream->dst_size = config->dest_data_size;
/* Check dest or source memory address, warn if 0 */
if ((config->head_block->source_address == 0)) {
if (config->head_block->source_address == 0) {
LOG_WRN("source_buffer address is null.");
}
if ((config->head_block->dest_address == 0)) {
if (config->head_block->dest_address == 0) {
LOG_WRN("dest_buffer address is null.");
}