Skip to content

Commit

Permalink
everywhere: replace double words
Browse files Browse the repository at this point in the history
import os
import re

common_words = set([
    'about', 'after', 'all', 'also', 'an', 'and',
     'any', 'are', 'as', 'at',
    'be', 'because', 'but', 'by', 'can', 'come',
    'could', 'day', 'do', 'even',
    'first', 'for', 'get', 'give', 'go', 'has',
    'have', 'he', 'her',
    'him', 'his', 'how', 'I', 'in', 'into', 'it',
    'its', 'just',
    'know', 'like', 'look', 'make', 'man', 'many',
    'me', 'more', 'my', 'new',
    'no', 'not', 'now', 'of', 'one', 'only', 'or',
    'other', 'our', 'out',
    'over', 'people', 'say', 'see', 'she', 'so',
    'some', 'take', 'tell', 'than',
    'their', 'them', 'then', 'there', 'these',
    'they', 'think',
    'this', 'time', 'two', 'up', 'use', 'very',
    'want', 'was', 'way',
    'we', 'well', 'what', 'when', 'which', 'who',
    'will', 'with', 'would',
    'year', 'you', 'your'
])

valid_extensions = set([
    'c', 'h', 'yaml', 'cmake', 'conf', 'txt', 'overlay',
    'rst', 'dtsi',
    'Kconfig', 'dts', 'defconfig', 'yml', 'ld', 'sh', 'py',
    'soc', 'cfg'
])

def filter_repeated_words(text):
    # Split the text into lines
    lines = text.split('\n')

    # Combine lines into a single string with unique separator
    combined_text = '/*sep*/'.join(lines)

    # Replace repeated words within a line
    def replace_within_line(match):
        return match.group(1)

    # Regex for matching repeated words within a line
    within_line_pattern =
	re.compile(r'\b(' +
		'|'.join(map(re.escape, common_words)) +
		r')\b\s+\b\1\b')
    combined_text = within_line_pattern.
		sub(replace_within_line, combined_text)

    # Replace repeated words across line boundaries
    def replace_across_lines(match):
        return match.group(1) + match.group(2)

    # Regex for matching repeated words across line boundaries
    across_lines_pattern = re.
		compile(r'\b(' + '|'.join(
			map(re.escape, common_words)) +
			r')\b(\s*[*\/\n\s]*)\b\1\b')
    combined_text = across_lines_pattern.
		sub(replace_across_lines, combined_text)

    # Split the text back into lines
    filtered_text = combined_text.split('/*sep*/')

    return '\n'.join(filtered_text)

def process_file(file_path):
    with open(file_path, 'r', encoding='utf-8') as file:
        text = file.read()

    new_text = filter_repeated_words(text)

    with open(file_path, 'w', encoding='utf-8') as file:
        file.write(new_text)

def process_directory(directory_path):
    for root, dirs, files in os.walk(directory_path):
        dirs[:] = [d for d in dirs if not d.startswith('.')]
        for file in files:
            # Filter out hidden files
            if file.startswith('.'):
                continue
            file_extension = file.split('.')[-1]
            if
	file_extension in valid_extensions:  # 只处理指定后缀的文件
                file_path = os.path.join(root, file)
                print(f"Processed file: {file_path}")
                process_file(file_path)

directory_to_process = "/home/mi/works/github/zephyrproject/zephyr"
process_directory(directory_to_process)

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
  • Loading branch information
LingaoM authored and nashif committed Jun 25, 2024
1 parent f3beebb commit 302422a
Show file tree
Hide file tree
Showing 59 changed files with 68 additions and 68 deletions.
2 changes: 1 addition & 1 deletion arch/arc/core/mpu/arc_mpu_v2_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static inline bool _is_enabled_region(uint32_t r_index)
}

/**
* This internal function check if the given buffer in in the region
* This internal function check if the given buffer is in the region
*/
static inline bool _is_in_region(uint32_t r_index, uint32_t start, uint32_t size)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/arc/core/mpu/arc_mpu_v6_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ static inline bool _is_enabled_region(uint32_t r_index)
}

/**
* This internal function check if the given buffer in in the region
* This internal function check if the given buffer is in the region
*/
static inline bool _is_in_region(uint32_t r_index, uint32_t start, uint32_t size)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/core/README_MMU.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ of access variability. But it also means that the TLB entries end up
being stored twice in the same CPU, wasting transistors that could
presumably store other useful data.

But it it also important to note that the L1 data cache on Xtensa is
But it is also important to note that the L1 data cache on Xtensa is
incoherent! The cache being used for refill reflects the last access
on the current CPU only, and not of the underlying memory being
mapped. Page table changes in the data cache of one CPU will be
Expand Down
2 changes: 1 addition & 1 deletion boards/native/native_posix/native_rtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ extern "C" {
uint64_t native_rtc_gettime_us(int clock_type);

/**
* @brief Get the value of a clock split in in nsec and seconds
* @brief Get the value of a clock split in nsec and seconds
*
* @param clock_type Which clock to measure from
* @param nsec Pointer to store the nanoseconds
Expand Down
2 changes: 1 addition & 1 deletion doc/connectivity/networking/api/http_server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ macro:
HTTP_SERVICE_DEFINE(my_service, "0.0.0.0", &http_service_port, 1, 10, NULL);
Alternatively, an HTTPS service can be defined with with
Alternatively, an HTTPS service can be defined with
:c:macro:`HTTPS_SERVICE_DEFINE`:

.. code-block:: c
Expand Down
2 changes: 1 addition & 1 deletion doc/connectivity/networking/api/lwm2m.rst
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ where it cannot recover.
- Try to recover network connection. Then restart the client by calling :c:func:`lwm2m_rd_client_start`.
This might also indicate configuration issue.

Sending of data in the table above refers to calling :c:func:`lwm2m_send_cb` or by writing into of of the observed resources where observation would trigger a notify message.
Sending of data in the table above refers to calling :c:func:`lwm2m_send_cb` or by writing into one of the observed resources where observation would trigger a notify message.
Receiving of data refers to receiving read, write or execute operations from the server. Application can register callbacks for these operations.

Configuring lifetime and activity period
Expand Down
2 changes: 1 addition & 1 deletion doc/connectivity/networking/net_config_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ TCP Options
:kconfig:option:`CONFIG_NET_TCP_RETRY_COUNT`
Maximum number of TCP segment retransmissions.
The following formula can be used to determine the time (in ms)
that a segment will be be buffered awaiting retransmission:
that a segment will be buffered awaiting retransmission:

.. math::
Expand Down
4 changes: 2 additions & 2 deletions doc/develop/flash_debug/probes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ The probe may be updated to use CMSIS-DAP firmware with the following steps:
be done by installing :ref:`linkserver-debug-host-tools`.

#. Put the LPC-Link2 microcontroller into DFU boot mode by attaching the DFU
jumper, then then connecting to the USB debug port on the board. This
jumper, then connecting to the USB debug port on the board. This
jumper is connected to ``P2_6`` on the LPC4322 SOC.

#. Run the ``program_CMSIS`` script, found in the installed LPCScrypt ``scripts``
Expand Down Expand Up @@ -241,7 +241,7 @@ The probe may be updated to use the J-Link firmware with the following steps:
be done by installing :ref:`linkserver-debug-host-tools`.

#. Put the LPC-Link2 microcontroller into DFU boot mode by attaching the DFU
jumper, then then connecting to the USB debug port on the board. This
jumper, then connecting to the USB debug port on the board. This
jumper is connected to ``P2_6`` on the LPC4322 SOC.

#. Run the ``program_JLINK`` script, found in the installed LPCScrypt ``scripts``
Expand Down
2 changes: 1 addition & 1 deletion doc/releases/release-notes-1.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2067,7 +2067,7 @@ release:
* :github:`10345` - The OpenAMP remote build is for wrong board
* :github:`10344` - SPI Chip Select usage is not unambiguous
* :github:`10329` - SystemView overflow event
* :github:`10320` - arm: mpu: mpu_config and and mpu_regions to be declared/defined as const
* :github:`10320` - arm: mpu: mpu_config and mpu_regions to be declared/defined as const
* :github:`10318` - It is not documented what YAML bindings do
* :github:`10316` - net: sockets: Close doesn't unblock recv
* :github:`10313` - net: sockets: Packets are leaked on TCP abort connection
Expand Down
2 changes: 1 addition & 1 deletion doc/releases/release-notes-3.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ Drivers and Sensors
series. Interrupt driven mode. Supports 1 and 8 lines in Single or Dual
Transfer Modes.
* STM32L5: Added support for Single Bank.
* STM32 QSPI driver was extended with with QER (SFDP, DTS), custom quad write opcode
* STM32 QSPI driver was extended with QER (SFDP, DTS), custom quad write opcode
and 1-1-4 read mode.
* Added support for STM32U5 series.

Expand Down
4 changes: 2 additions & 2 deletions doc/releases/release-notes-3.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ Deprecated in this release

* MCUmgr subsystem, specifically the SMP transport API, is dropping `zephyr_`
prefix, deprecating prefixed functions and callback type definitions with the
prefix and replacing them with with prefix-less variants.
prefix and replacing them with prefix-less variants.
The :c:struct:`zephyr_smp_transport` type, representing transport object,
is now replaced with :c:struct:`smp_transport`, and the later one is used,
instead of the former one, by all prefix-less functions.
Expand Down Expand Up @@ -3486,7 +3486,7 @@ Addressed issues
* :github:`50732` - net: tests/net/ieee802154/l2/net.ieee802154.l2 failed on reel_board due to build failure
* :github:`50709` - tests: arch: arm: arm_thread_swap fails on stm32g0 or stm32l0
* :github:`50684` - After enabling CONFIG_SPI_STM32_DMA in project config file for STM32MP157-dk2 Zephyr throwing error
* :github:`50665` - MEC15xx/MEC1501: UART and and special purpose pins missing pinctrl configuration
* :github:`50665` - MEC15xx/MEC1501: UART and special purpose pins missing pinctrl configuration
* :github:`50658` - Bluetooth: BLE stack notifications blocks host side for too long (``drivers/bluetooth/hci/spi.c`` and ``hci_spi``)
* :github:`50656` - Wrong definition of bank size for intel memory management driver.
* :github:`50655` - STM32WB55 Bus Fault when connecting then disconnecting then connecting then disconnecting then connecting
Expand Down
2 changes: 1 addition & 1 deletion doc/services/mem_mgmt/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ to define and create a set of memory heaps from which the user can allocate
memory from with certain attributes / capabilities.

When the :kconfig:option:`CONFIG_MEM_ATTR_HEAP` is set, every region marked
with one of the memory attributes listed in in
with one of the memory attributes listed in
:zephyr_file:`include/zephyr/dt-bindings/memory-attr/memory-attr-sw.h` is added
to a pool of memory heaps used for dynamic allocation of memory buffers with
certain attributes.
Expand Down
4 changes: 2 additions & 2 deletions drivers/adc/adc_ads1x1x.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ static const struct adc_driver_api ads1x1x_api = {
/* The ADS111X provides 16 bits of data in binary two's complement format
* A positive full-scale (+FS) input produces an output code of 7FFFh and a
* negative full-scale (–FS) input produces an output code of 8000h. Single
* ended signal measurements only only use the positive code range from
* ended signal measurements only use the positive code range from
* 0000h to 7FFFh
*/
#define ADS111X_RESOLUTION 16
Expand Down Expand Up @@ -659,7 +659,7 @@ DT_INST_FOREACH_STATUS_OKAY(ADS1113_INIT)
/* The ADS101X provides 12 bits of data in binary two's complement format
* A positive full-scale (+FS) input produces an output code of 7FFh and a
* negative full-scale (–FS) input produces an output code of 800h. Single
* ended signal measurements only only use the positive code range from
* ended signal measurements only use the positive code range from
* 000h to 7FFh
*/
#define ADS101X_RESOLUTION 12
Expand Down
2 changes: 1 addition & 1 deletion drivers/audio/dmic_nrfx_pdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static bool check_pdm_frequencies(const struct dmic_nrfx_pdm_drv_cfg *drv_cfg,
better_found = true;
}

/* Since frequencies are are in ascending order, stop
/* Since frequencies are in ascending order, stop
* checking next ones for the current ratio after
* resulting PCM rate goes above the one requested.
*/
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ config BT_SPI_INIT_PRIORITY
default 75

config BT_BLUENRG_ACI
bool "ACI message with with BlueNRG-based devices"
bool "ACI message with BlueNRG-based devices"
select BT_HCI_SET_PUBLIC_ADDR
help
Enable support for devices compatible with the BlueNRG Bluetooth
Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_control_mchp_xec.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ static int periph_clk_src_using_pin(enum periph_clk32k_src src)
/* MEC15xx uses the same 32KHz source for both PLL and Peripheral 32K clock domains.
* We ignore the peripheral clock source.
* If XTAL is selected (parallel) or single-ended the external 32KHz MUST stay on
* even when when VTR goes off.
* even when VTR goes off.
* If PIN(32KHZ_IN pin) as the external source, hardware can auto-switch to internal
* silicon OSC if the signal on the 32KHZ_PIN goes away.
* We ignore th
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_xmc4xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ static int dma_xmc4xxx_get_status(const struct device *dev, uint32_t channel,

stat->pending_length = dma_channel->block_ts - XMC_DMA_CH_GetTransferredData(dma, channel);
stat->pending_length *= dma_channel->source_data_size;
/* stat->dir and other remaining fields are not set. They are are not */
/* stat->dir and other remaining fields are not set. They are not */
/* useful for xmc4xxx peripheral drivers. */

return 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/ethernet/eth_smsc91x.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ static int smsc_send_pkt(struct smsc_data *sc, uint8_t *buf, uint16_t len)
smsc_write_2(sc, DATA0, len + PKT_CTRL_DATA_LEN);
smsc_write_multi_2(sc, DATA0, (uint16_t *)buf, len / 2);

/* Push out the control byte and and the odd byte if needed. */
/* Push out the control byte and the odd byte if needed. */
if (len & 1) {
smsc_write_2(sc, DATA0, (CTRL_ODD << 8) | buf[len - 1]);
} else {
Expand Down
2 changes: 1 addition & 1 deletion drivers/sdhc/rcar_mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,7 @@ static int rcar_mmc_init_controller_regs(const struct device *dev)
reg |= RCAR_MMC_DMA_MODE_ADDR_INC | RCAR_MMC_DMA_MODE_WIDTH;
rcar_mmc_write_reg32(dev, RCAR_MMC_DMA_MODE, reg);

/* store version of of introductory IP */
/* store version of introductory IP */
data->ver = rcar_mmc_read_reg32(dev, RCAR_MMC_VERSION);
data->ver &= RCAR_MMC_VERSION_IP;

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/bosch/bme280/bme280.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static int bme280_wait_until_ready(const struct device *dev)
uint8_t status = 0;
int ret;

/* Wait for NVM to copy and and measurement to be completed */
/* Wait for NVM to copy and measurement to be completed */
do {
k_sleep(K_MSEC(3));
ret = bme280_reg_read(dev, BME280_REG_STATUS, &status, 1);
Expand Down
2 changes: 1 addition & 1 deletion drivers/serial/leuart_gecko.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static void leuart_gecko_poll_out(const struct device *dev, unsigned char c)
LEUART_TypeDef *base = DEV_BASE(dev);

/* LEUART_Tx function already waits for the transmit buffer being empty
* and and waits for the bus to be free to transmit.
* and waits for the bus to be free to transmit.
*/
LEUART_Tx(base, c);
}
Expand Down
2 changes: 1 addition & 1 deletion dts/bindings/input/futaba,sbus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |
the rx-invert feature of your serial driver or use an external signal inverter.
The driver binds this to the Zephyr input system using INPUT_EV_CODES.
The following examples defines a a binding of 2 joysticks and a button using 5 channels.
The following examples defines a binding of 2 joysticks and a button using 5 channels.
&lpuart6 {
status = "okay";
Expand Down
2 changes: 1 addition & 1 deletion dts/bindings/led_strip/ws2812.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ description: |
0 bit: 300 ns high and 900 ns low.
1 bit: 900 ns high and 300 ns low.
There is a a +/- 80 ns tolerance for each timing.
There is a +/- 80 ns tolerance for each timing.
The latch/reset delay is 250 us and it must be set using the reset-delay
property. The pixel order depends on the model and it can be configured
Expand Down
2 changes: 1 addition & 1 deletion dts/bindings/pinctrl/ti,cc13xx-cc26xx-pinctrl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ child-binding:
configured as an output.
2: min 2 mA (SoC default)
4: min 4 mA
8: min 8 mA for for double drive strength IOs, min 4 mA for normal IOs
8: min 8 mA for double drive strength IOs, min 4 mA for normal IOs
ti,input-edge-detect:
type: int
Expand Down
4 changes: 2 additions & 2 deletions include/zephyr/bluetooth/audio/media_proxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ int media_proxy_ctrl_get_track_position(struct media_player *player);
* @brief Set Track Position
*
* Set the playing position of the media player in the current
* track. The position is given in in hundredths of a second,
* track. The position is given in hundredths of a second,
* from the beginning of the track of the track for positive
* values, and (backwards) from the end of the track for
* negative values.
Expand Down Expand Up @@ -1178,7 +1178,7 @@ struct media_proxy_pl_calls {
* @brief Set Track Position
*
* Set the playing position of the media player in the current
* track. The position is given in in hundredths of a second,
* track. The position is given in hundredths of a second,
* from the beginning of the track of the track for positive
* values, and (backwards) from the end of the track for
* negative values.
Expand Down
2 changes: 1 addition & 1 deletion include/zephyr/drivers/i2c/rtio.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct i2c_rtio {
};

/**
* @brief Copy an an array of i2c_msgs to rtio submissions and a transaction
* @brief Copy an array of i2c_msgs to rtio submissions and a transaction
*
* @retval sqe Last sqe setup in the copy
* @retval NULL Not enough memory to copy the transaction
Expand Down
2 changes: 1 addition & 1 deletion include/zephyr/kernel/mm/demand_paging.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ void k_mem_paging_eviction_remove(struct k_mem_page_frame *pf);
*
* The architecture-specific memory fault handler will invoke this to tell the
* eviction algorithm the provided physical address belongs to a page frame
* being accessed and such page frame should become unlikely to be be
* being accessed and such page frame should become unlikely to be
* considered as the next eviction candidate.
*
* This function is invoked with interrupts locked.
Expand Down
2 changes: 1 addition & 1 deletion include/zephyr/mgmt/mcumgr/mgmt/callbacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ enum smp_group_events {
/** Callback when a command is received, data is mgmt_evt_op_cmd_arg(). */
MGMT_EVT_OP_CMD_RECV = MGMT_DEF_EVT_OP_ID(MGMT_EVT_GRP_SMP, 0),

/** Callback when a a status is updated, data is mgmt_evt_op_cmd_arg(). */
/** Callback when a status is updated, data is mgmt_evt_op_cmd_arg(). */
MGMT_EVT_OP_CMD_STATUS = MGMT_DEF_EVT_OP_ID(MGMT_EVT_GRP_SMP, 1),

/** Callback when a command has been processed, data is mgmt_evt_op_cmd_arg(). */
Expand Down
2 changes: 1 addition & 1 deletion include/zephyr/net/net_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -2985,7 +2985,7 @@ static inline void net_if_unset_promisc(struct net_if *iface)
* @param iface Pointer to network interface
*
* @return True if interface is in promisc mode,
* False if interface is not in in promiscuous mode.
* False if interface is not in promiscuous mode.
*/
#if defined(CONFIG_NET_PROMISCUOUS_MODE)
bool net_if_is_promisc(struct net_if *iface);
Expand Down
4 changes: 2 additions & 2 deletions include/zephyr/sys/onoff.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ static inline bool onoff_has_error(const struct onoff_manager *mgr)
*
* @retval non-negative the observed state of the machine at the time
* the request was processed, if successful.
* @retval -EIO if service has recorded an an error.
* @retval -EIO if service has recorded an error.
* @retval -EINVAL if the parameters are invalid.
* @retval -EAGAIN if the reference count would overflow.
*/
Expand All @@ -361,7 +361,7 @@ int onoff_request(struct onoff_manager *mgr,
*
* @retval non-negative the observed state (ONOFF_STATE_ON) of the
* machine at the time of the release, if the release succeeds.
* @retval -EIO if service has recorded an an error.
* @retval -EIO if service has recorded an error.
* @retval -ENOTSUP if the machine is not in a state that permits
* release.
*/
Expand Down
2 changes: 1 addition & 1 deletion include/zephyr/sys/sys_heap.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ extern "C" {
* are constant time (though there is a search of the smallest bucket
* that has a compile-time-configurable upper bound, setting this to
* extreme values results in an effectively linear search of the
* list), objectively fast (~hundred instructions) and and amenable to
* list), objectively fast (~hundred instructions) and amenable to
* locked operation.
*/

Expand Down
2 changes: 1 addition & 1 deletion kernel/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ choice SCHED_ALGORITHM
prompt "Scheduler priority queue algorithm"
default SCHED_DUMB
help
The kernel can be built with with several choices for the
The kernel can be built with several choices for the
ready queue implementation, offering different choices between
code size, constant factor runtime overhead and performance
scaling when many threads are added.
Expand Down
2 changes: 1 addition & 1 deletion kernel/userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static void clear_perms_cb(struct k_object *ko, void *ctx_ptr);
const char *otype_to_str(enum k_objects otype)
{
const char *ret;
/* -fdata-sections doesn't work right except in very very recent
/* -fdata-sections doesn't work right except in very recent
* GCC and these literal strings would appear in the binary even if
* otype_to_str was omitted by the linker
*/
Expand Down
2 changes: 1 addition & 1 deletion samples/subsys/usb/webusb/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static struct msosv2_descriptor_t {
.wLength = sizeof(struct msosv2_function_subset_header),
.wDescriptorType = MS_OS_20_SUBSET_HEADER_FUNCTION,
/* The WebUSB interface number becomes the first when CDC_ACM is enabled by
* configuration. Beware that if this sample is used as as inspiration for
* configuration. Beware that if this sample is used as an inspiration for
* applications, where the WebUSB interface is no longer the first,
* remember to adjust bFirstInterface.
*/
Expand Down
2 changes: 1 addition & 1 deletion samples/tfm_integration/psa_crypto/src/psa_attestation.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ psa_status_t att_get_iat(uint8_t *ch_buffer, uint32_t ch_sz,
size_t token_buf_size = ATT_MAX_TOKEN_SIZE;


/* Call with with bigger challenge object than allowed */
/* Call with bigger challenge object than allowed */

/*
* First determine how large the token is on this system.
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/subfolder_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def parse_args():
help='File to write containing a list of all \
directories found')
parser.add_argument('-t', '--trigger-file', required=False,
help='Trigger file to be be touched to re-run CMake')
help='Trigger file to be touched to re-run CMake')

args = parser.parse_args()

Expand Down
2 changes: 1 addition & 1 deletion scripts/dts/python-devicetree/src/devicetree/dtlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -2035,7 +2035,7 @@ def to_nums(data: bytes, length: int = 4, signed: bool = False) -> List[int]:

if len(data) % length:
_err(f"{data!r} is {len(data)} bytes long, "
f"expected a length that's a a multiple of {length}")
f"expected a length that's a multiple of {length}")

return [int.from_bytes(data[i:i + length], "big", signed=signed)
for i in range(0, len(data), length)]
Expand Down
2 changes: 1 addition & 1 deletion scripts/dts/python-devicetree/tests/test_dtlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1903,7 +1903,7 @@ def verify_raw_to_num_error(fn, data, length, msg):
verify_raw_to_num_error(dtlib.to_num, b"foo", 2, "b'foo' is 3 bytes long, expected 2")
verify_raw_to_num_error(dtlib.to_nums, 0, 0, "'0' has type 'int', expected 'bytes'")
verify_raw_to_num_error(dtlib.to_nums, b"", 0, "'length' must be greater than zero, was 0")
verify_raw_to_num_error(dtlib.to_nums, b"foooo", 2, "b'foooo' is 5 bytes long, expected a length that's a a multiple of 2")
verify_raw_to_num_error(dtlib.to_nums, b"foooo", 2, "b'foooo' is 5 bytes long, expected a length that's a multiple of 2")

def test_duplicate_labels():
'''
Expand Down
2 changes: 1 addition & 1 deletion scripts/kconfig/kconfiglib.py
Original file line number Diff line number Diff line change
Expand Up @@ -3729,7 +3729,7 @@ def _add_props_to_sym(self, node):

if node.is_configdefault:
# Store any defaults for later application after the complete tree
# is known. The current length of of the default array is stored so
# is known. The current length of the default array is stored so
# the configdefaults can be inserted in the order they originally
# appeared.
sym.configdefaults.append((len(sym.defaults), node.defaults))
Expand Down
Loading

0 comments on commit 302422a

Please sign in to comment.