Skip to content

Commit

Permalink
[sw] Fix Software Include Guards
Browse files Browse the repository at this point in the history
Recently a bug was found in CI where the code formatting hooks were not
firing correctly. This bug was fixed in
lowrisc/opentitan#ffa126f00f5cae43bd8ccd1e212550ab2d997491.

This change ensures that the include guards on existing code are
correct, so that going forwards we know the software tree is and remains
correct.

Signed-off-by: Sam Elliott <selliott@lowrisc.org>
  • Loading branch information
lenary authored and gkelly committed Apr 8, 2020
1 parent 7ea54b1 commit 6689d5e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions sw/device/lib/base/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

#ifndef OPENTITAN_SW_DEVICE_LIB_LOG_H_
#define OPENTITAN_SW_DEVICE_LIB_LOG_H_
#ifndef OPENTITAN_SW_DEVICE_LIB_BASE_LOG_H_
#define OPENTITAN_SW_DEVICE_LIB_BASE_LOG_H_

#include <stdbool.h>
#include <stdint.h>
Expand Down Expand Up @@ -130,4 +130,4 @@ void base_log_internal_dv(log_severity_t severity, const char *format, ...);
*/
#define LOG_ERROR(...) LOG(kLogSeverityError, __VA_ARGS__)

#endif // OPENTITAN_SW_DEVICE_LIB_LOG_H_
#endif // OPENTITAN_SW_DEVICE_LIB_BASE_LOG_H_
6 changes: 3 additions & 3 deletions sw/device/lib/dif/dif_gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

#ifndef SW_DEVICE_LIB_DIF_GPIO_H
#define SW_DEVICE_LIB_DIF_GPIO_H
#ifndef OPENTITAN_SW_DEVICE_LIB_DIF_DIF_GPIO_H_
#define OPENTITAN_SW_DEVICE_LIB_DIF_DIF_GPIO_H_

#include <stddef.h>
#include <stdint.h>
Expand Down Expand Up @@ -330,4 +330,4 @@ dif_gpio_result_t dif_gpio_irq_trigger_masked_config(const dif_gpio_t *gpio,
uint32_t mask,
dif_gpio_irq_t config);

#endif // SW_DEVICE_LIB_DIF_GPIO_H
#endif // OPENTITAN_SW_DEVICE_LIB_DIF_DIF_GPIO_H_
6 changes: 3 additions & 3 deletions sw/device/lib/dif/dif_uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

#ifndef _SW_DEVICE_LIB_DIF_UART_H_
#define _SW_DEVICE_LIB_DIF_UART_H_
#ifndef OPENTITAN_SW_DEVICE_LIB_DIF_DIF_UART_H_
#define OPENTITAN_SW_DEVICE_LIB_DIF_DIF_UART_H_

#include <stdbool.h>
#include <stdint.h>
Expand Down Expand Up @@ -300,4 +300,4 @@ bool dif_uart_rx_bytes_available(const dif_uart_t *uart, size_t *num_bytes);
*/
bool dif_uart_tx_bytes_available(const dif_uart_t *uart, size_t *num_bytes);

#endif
#endif // OPENTITAN_SW_DEVICE_LIB_DIF_DIF_UART_H_

0 comments on commit 6689d5e

Please sign in to comment.