More style fixes.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12805 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2019-05-18 11:05:25 +00:00
parent a4a4057dd9
commit 3ecd2ae222
6 changed files with 28 additions and 9 deletions

View File

@ -512,7 +512,7 @@ void spi_lld_start(SPIDriver *spip) {
STM32_SPI_SPI1_IRQ_PRIORITY,
(stm32_dmaisr_t)spi_lld_serve_dma_tx_interrupt,
(void *)spip);
osalDbgAssert(spip->tx.dma!= NULL, "unable to allocate stream");
osalDbgAssert(spip->tx.dma != NULL, "unable to allocate stream");
rccEnableSPI1(true);
dmaSetRequestSource(spip->rx.dma, STM32_DMAMUX1_SPI1_RX);
dmaSetRequestSource(spip->tx.dma, STM32_DMAMUX1_SPI1_TX);
@ -529,7 +529,7 @@ void spi_lld_start(SPIDriver *spip) {
STM32_SPI_SPI2_IRQ_PRIORITY,
(stm32_dmaisr_t)spi_lld_serve_dma_tx_interrupt,
(void *)spip);
osalDbgAssert(spip->tx.dma!= NULL, "unable to allocate stream");
osalDbgAssert(spip->tx.dma != NULL, "unable to allocate stream");
rccEnableSPI2(true);
dmaSetRequestSource(spip->rx.dma, STM32_DMAMUX1_SPI2_RX);
dmaSetRequestSource(spip->tx.dma, STM32_DMAMUX1_SPI2_TX);
@ -546,7 +546,7 @@ void spi_lld_start(SPIDriver *spip) {
STM32_SPI_SPI3_IRQ_PRIORITY,
(stm32_dmaisr_t)spi_lld_serve_dma_tx_interrupt,
(void *)spip);
osalDbgAssert(spip->tx.dma!= NULL, "unable to allocate stream");
osalDbgAssert(spip->tx.dma != NULL, "unable to allocate stream");
rccEnableSPI3(true);
dmaSetRequestSource(spip->rx.dma, STM32_DMAMUX1_SPI3_RX);
dmaSetRequestSource(spip->tx.dma, STM32_DMAMUX1_SPI3_TX);
@ -563,7 +563,7 @@ void spi_lld_start(SPIDriver *spip) {
STM32_SPI_SPI4_IRQ_PRIORITY,
(stm32_dmaisr_t)spi_lld_serve_dma_tx_interrupt,
(void *)spip);
osalDbgAssert(spip->tx.dma!= NULL, "unable to allocate stream");
osalDbgAssert(spip->tx.dma != NULL, "unable to allocate stream");
rccEnableSPI4(true);
dmaSetRequestSource(spip->rx.dma, STM32_DMAMUX1_SPI4_RX);
dmaSetRequestSource(spip->tx.dma, STM32_DMAMUX1_SPI4_TX);
@ -580,7 +580,7 @@ void spi_lld_start(SPIDriver *spip) {
STM32_SPI_SPI5_IRQ_PRIORITY,
(stm32_dmaisr_t)spi_lld_serve_dma_tx_interrupt,
(void *)spip);
osalDbgAssert(spip->tx.dma!= NULL, "unable to allocate stream");
osalDbgAssert(spip->tx.dma != NULL, "unable to allocate stream");
rccEnableSPI5(true);
dmaSetRequestSource(spip->rx.dma, STM32_DMAMUX1_SPI5_RX);
dmaSetRequestSource(spip->tx.dma, STM32_DMAMUX1_SPI5_TX);
@ -597,7 +597,7 @@ void spi_lld_start(SPIDriver *spip) {
STM32_SPI_SPI6_IRQ_PRIORITY,
(stm32_dmaisr_t)spi_lld_serve_bdma_tx_interrupt,
(void *)spip);
osalDbgAssert(spip->tx.dma!= NULL, "unable to allocate stream");
osalDbgAssert(spip->tx.dma != NULL, "unable to allocate stream");
rccEnableSPI6(true);
bdmaSetRequestSource(spip->rx.bdma, STM32_DMAMUX2_SPI6_RX);
bdmaSetRequestSource(spip->tx.bdma, STM32_DMAMUX2_SPI6_TX);

View File

@ -724,7 +724,7 @@ cryerror_t cryEncryptAES_GCM(CRYDriver *cryp,
osalDbgAssert(cryp->state == CRY_READY, "not ready");
#if CRY_LLD_SUPPORTS_AES_GCM== TRUE
#if CRY_LLD_SUPPORTS_AES_GCM == TRUE
return cry_lld_encrypt_AES_GCM(cryp, key_id, auth_size, auth_in,
text_size, text_in, text_out, iv,
tag_size, tag_out);
@ -797,7 +797,7 @@ cryerror_t cryDecryptAES_GCM(CRYDriver *cryp,
osalDbgAssert(cryp->state == CRY_READY, "not ready");
#if CRY_LLD_SUPPORTS_AES_GCM== TRUE
#if CRY_LLD_SUPPORTS_AES_GCM == TRUE
return cry_lld_decrypt_AES_GCM(cryp, key_id, auth_size, auth_in,
text_size, text_in, text_out, iv,
tag_size, tag_in);

View File

@ -142,7 +142,7 @@
#error "malformed chlicense.h"
#endif
#if CH_CUSTOMER_LIC_OSLIB== FALSE
#if CH_CUSTOMER_LIC_OSLIB == FALSE
#error "ChibiOS/LIB not licensed"
#endif

View File

@ -1,3 +1,5 @@
#!/bin/bash
find ../../os/nil -name "*.[ch]" -exec perl stylecheck.pl "{}" \;
find ../../os/oslib -name "*.[ch]" -exec perl stylecheck.pl "{}" \;
find ../../os/license -name "*.[ch]" -exec perl stylecheck.pl "{}" \;

View File

@ -1,3 +1,5 @@
#!/bin/bash
find ../../os/rt -name "*.[ch]" -exec perl stylecheck.pl "{}" \;
find ../../os/oslib -name "*.[ch]" -exec perl stylecheck.pl "{}" \;
find ../../os/license -name "*.[ch]" -exec perl stylecheck.pl "{}" \;

View File

@ -167,6 +167,21 @@ foreach my $line (@c_source) {
style "detected glued right brace";
}
#****************************************************************************
# Check on (some) operators.
if ($line =~ /\S!=/) {
style "detected glued != operator";
}
if ($line =~ /!=\S/) {
style "detected glued != operator";
}
if ($line =~ /\S==/) {
style "detected glued == operator";
}
if ($line =~ /!==S/) {
style "detected glued == operator";
}
#****************************************************************************
# Check function-call-like returns (not perfect so disabled).
if ($line =~ /return\s*\(/) {