Skip to content

Support of the flash for SiWx917 #168

Support of the flash for SiWx917

Support of the flash for SiWx917 #168

Triggered via pull request November 14, 2024 15:36
Status Failure
Total duration 1m 43s
Artifacts 1

compliance.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors, 13 warnings, and 7 notices
TRAILING_WHITESPACE: drivers/flash/soc_flash_silabs_siwx917.c#L1
drivers/flash/soc_flash_silabs_siwx917.c:1 trailing whitespace
CODE_INDENT: drivers/flash/soc_flash_silabs_siwx917.c#L61
drivers/flash/soc_flash_silabs_siwx917.c:61 code indent should use tabs where possible
CODE_INDENT: drivers/flash/soc_flash_silabs_siwx917.c#L156
drivers/flash/soc_flash_silabs_siwx917.c:156 code indent should use tabs where possible
CODE_INDENT: drivers/flash/soc_flash_silabs_siwx917.c#L158
drivers/flash/soc_flash_silabs_siwx917.c:158 code indent should use tabs where possible
C99_COMMENTS: soc/silabs/silabs_siwx917/siwg917/nwp_init.c#L48
soc/silabs/silabs_siwx917/siwg917/nwp_init.c:48 do not use C99 // comments
compliance
Process completed with exit code 4.
compliance: Checkpatch.txt#L1
See https://docs.zephyrproject.org/latest/contribute/guidelines.html#coding-style for more details. LEADING_SPACE: please, no spaces at the start of a line File:drivers/flash/Kconfig.siwx917 Line:7 LEADING_SPACE: please, no spaces at the start of a line File:drivers/flash/Kconfig.siwx917 Line:8 LEADING_SPACE: please, no spaces at the start of a line File:drivers/flash/Kconfig.siwx917 Line:14 TYPO_SPELLING: 'controler' may be misspelled - perhaps 'controller'? File:drivers/flash/Kconfig.siwx917 Line:15 TRAILING_WHITESPACE: trailing whitespace File:drivers/flash/soc_flash_silabs_siwx917.c Line:1 TYPO_SPELLING: 'overwritting' may be misspelled - perhaps 'overwriting'? File:drivers/flash/soc_flash_silabs_siwx917.c Line:35 CODE_INDENT: code indent should use tabs where possible File:drivers/flash/soc_flash_silabs_siwx917.c Line:61 LEADING_SPACE: please, no spaces at the start of a line File:drivers/flash/soc_flash_silabs_siwx917.c Line:61 LONG_LINE: line length of 108 exceeds 100 columns File:drivers/flash/soc_flash_silabs_siwx917.c Line:80 LONG_LINE: line length of 126 exceeds 100 columns File:drivers/flash/soc_flash_silabs_siwx917.c Line:108 LEADING_SPACE: please, no spaces at the start of a line File:drivers/flash/soc_flash_silabs_siwx917.c Line:118 LEADING_SPACE: please, no spaces at the start of a line File:drivers/flash/soc_flash_silabs_siwx917.c Line:119 LEADING_SPACE: please, no spaces at the start of a line File:drivers/flash/soc_flash_silabs_siwx917.c Line:120 LEADING_SPACE: please, no spaces at the start of a line File:drivers/flash/soc_flash_silabs_siwx917.c Line:121 LEADING_SPACE: please, no spaces at the start of a line File:drivers/flash/soc_flash_silabs_siwx917.c Line:123 CODE_INDENT: code indent should use tabs where possible File:drivers/flash/soc_flash_silabs_siwx917.c Line:156 LEADING_SPACE: please, no spaces at the start of a line File:drivers/flash/soc_flash_silabs_siwx917.c Line:156 CODE_INDENT: code indent should use tabs where possible File:drivers/flash/soc_flash_silabs_siwx917.c Line:158 LEADING_SPACE: please, no spaces at the start of a line File:drivers/flash/soc_flash_silabs_siwx917.c Line:158 C99_COMMENTS: do not use C99 // comments File:soc/silabs/silabs_siwx917/siwg917/nwp_init.c Line:48
compliance: GitDiffCheck.txt#L1
Git conflict markers and whitespace errors are not allowed in added changes 2a445fe0e4df12071a78ad6ccd439ad0feb5a104: tests/drivers/flash/common/boards/siwx917_rb4338a.overlay:24: new blank line at EOF. d46bcbc448f437001575509fe8b3302f3c0c8b0f: drivers/flash/soc_flash_silabs_siwx917.c:1: trailing whitespace.
compliance: Nits.txt#L1
See https://docs.zephyrproject.org/latest/contribute/guidelines.html#coding-style for more details. Missing newline at end of 'boards/silabs/radio_boards/siwx917_rb4338a/siwx917_rb4338a_defconfig'. Check your text editor settings. Please remove blank lines at end of 'tests/drivers/flash/common/boards/siwx917_rb4338a.overlay'
compliance
Process completed with exit code 1.
compliance
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/upload-artifact@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
LEADING_SPACE: drivers/flash/Kconfig.siwx917#L7
drivers/flash/Kconfig.siwx917:7 please, no spaces at the start of a line
LEADING_SPACE: drivers/flash/Kconfig.siwx917#L8
drivers/flash/Kconfig.siwx917:8 please, no spaces at the start of a line
LEADING_SPACE: drivers/flash/Kconfig.siwx917#L14
drivers/flash/Kconfig.siwx917:14 please, no spaces at the start of a line
TYPO_SPELLING: drivers/flash/Kconfig.siwx917#L15
drivers/flash/Kconfig.siwx917:15 'controler' may be misspelled - perhaps 'controller'?
TYPO_SPELLING: drivers/flash/soc_flash_silabs_siwx917.c#L35
drivers/flash/soc_flash_silabs_siwx917.c:35 'overwritting' may be misspelled - perhaps 'overwriting'?
LEADING_SPACE: drivers/flash/soc_flash_silabs_siwx917.c#L61
drivers/flash/soc_flash_silabs_siwx917.c:61 please, no spaces at the start of a line
LONG_LINE: drivers/flash/soc_flash_silabs_siwx917.c#L80
drivers/flash/soc_flash_silabs_siwx917.c:80 line length of 108 exceeds 100 columns
LONG_LINE: drivers/flash/soc_flash_silabs_siwx917.c#L108
drivers/flash/soc_flash_silabs_siwx917.c:108 line length of 126 exceeds 100 columns
LEADING_SPACE: drivers/flash/soc_flash_silabs_siwx917.c#L118
drivers/flash/soc_flash_silabs_siwx917.c:118 please, no spaces at the start of a line
LEADING_SPACE: drivers/flash/soc_flash_silabs_siwx917.c#L119
drivers/flash/soc_flash_silabs_siwx917.c:119 please, no spaces at the start of a line
compliance: ClangFormat.txt#L1
See https://docs.zephyrproject.org/latest/contribute/guidelines.html#clang-format for more details. You may want to run clang-format on this change: -/* +/* File:drivers/flash/soc_flash_silabs_siwx917.c Line:2 You may want to run clang-format on this change: - if ((cfg->base_address + offset) < cfg->base_address) + if ((cfg->base_address + offset) < cfg->base_address) { return false; - if ((cfg->base_address + offset + len) > (cfg->base_address + cfg->size)) + } + if ((cfg->base_address + offset + len) > (cfg->base_address + cfg->size)) { return false; + } File:drivers/flash/soc_flash_silabs_siwx917.c Line:42 You may want to run clang-format on this change: - if (!flash_siwx917_range_is_in_bounds(dev, offset, len)) + if (!flash_siwx917_range_is_in_bounds(dev, offset, len)) { return -EINVAL; + } k_sem_take(&data->lock, K_FOREVER); - memcpy(buf, location, len); + memcpy(buf, location, len); k_sem_give(&data->lock); return 0; - File:drivers/flash/soc_flash_silabs_siwx917.c Line:65 You may want to run clang-format on this change: - if (!flash_siwx917_range_is_in_bounds(dev, offset, len)) + if (!flash_siwx917_range_is_in_bounds(dev, offset, len)) { return -EINVAL; - if (offset % cfg->write_block_size) + } + if (offset % cfg->write_block_size) { return -EINVAL; - if (len % cfg->write_block_size) + } + if (len % cfg->write_block_size) { return -EINVAL; + } k_sem_take(&data->lock, K_FOREVER); - ret = sl_si91x_command_to_write_common_flash((cfg->base_address + offset), (void *)buf, len, false); + ret = sl_si91x_command_to_write_common_flash((cfg->base_address + offset), (void *)buf, len, + false); k_sem_give(&data->lock); - if (ret) + if (ret) { return -EIO; + } File:drivers/flash/soc_flash_silabs_siwx917.c Line:84 You may want to run clang-format on this change: - if (!flash_siwx917_range_is_in_bounds(dev, offset, len)) + if (!flash_siwx917_range_is_in_bounds(dev, offset, len)) { return -EINVAL; - if (offset % cfg->erase_block_size) + } + if (offset % cfg->erase_block_size) { return -EINVAL; - if (len % cfg->erase_block_size) + } + if (len % cfg->erase_block_size) { return -EINVAL; + } k_sem_take(&data->lock, K_FOREVER); ret = sl_si91x_command_to_write_common_flash((cfg->base_address + offset), NULL, len, true); k_sem_give(&data->lock); - if (ret) + if (ret) { return -EIO; + } return 0; } #ifdef CONFIG_FLASH_PAGE_LAYOUT -static void flash_siwx917_page_layout(const struct device *dev, const struct flash_pages_layout **layout, size_t *layout_size) +static void flash_siwx917_page_layout(const struct device *dev, + const struct flash_pages_layout **layout, size_t *layout_size) File:drivers/flash/soc_flash_silabs_siwx917.c Line:109 You may want to run clang-format on this change: - .read = flash_siwx917_read, - .write = flash_siwx917_write, - .erase = flash_siwx917_erase, - .get_parameters = flash_siwx917_get_parameters, + .read = flash_siwx917_read, + .write = flash_siwx917_write, + .erase = flash_siwx917_erase, + .get_parameters = flash_siwx917_get_parameters, #ifdef CONFIG_FLASH_PAGE_LAYOUT - .page_layout = flash_siwx917_page_layout, + .page_layout = flash_siwx917_page_layout, File:drivers/flash/soc_flash_silabs_siwx917.c Line:124 You may want to run clang-format on this change: -#define SIWX917_PAGE_LAYOUT_FLASH_INIT(n) \ - .flash_pages_layout.pages_count = DT_REG_SIZE(n) / DT_PROP(n, erase_block_size), \ +#define SIWX917_PAGE_LAYOUT_FLASH_INIT(n) \ + .flash_pages_layout.pages_count = DT_REG_SIZE(n) / DT_PROP(n, erase_block_size), \ .flash_pages_layout.pages_size = DT_PROP(n, erase_block_size), #else #define SIWX917_PAGE_LAYOUT_FLASH_INIT(n) #endif -#define SIWX917_FLASH_INIT_P(n, p) \ - static const struct siwx917_config flash_siwx917_config_##p = { \ - .base_address = DT_REG_ADDR(n),
Deprecation notice: v1, v2, and v3 of the artifact actions
The following artifacts were uploaded using a version of actions/upload-artifact that is scheduled for deprecation: "compliance.xml". Please update your workflow to use v4 of the artifact actions. Learn more: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/
You may want to run clang-format on this change: drivers/flash/soc_flash_silabs_siwx917.c#L2
drivers/flash/soc_flash_silabs_siwx917.c:2 -/* +/*
You may want to run clang-format on this change: drivers/flash/soc_flash_silabs_siwx917.c#L42
drivers/flash/soc_flash_silabs_siwx917.c:42 - if ((cfg->base_address + offset) < cfg->base_address) + if ((cfg->base_address + offset) < cfg->base_address) { return false; - if ((cfg->base_address + offset + len) > (cfg->base_address + cfg->size)) + } + if ((cfg->base_address + offset + len) > (cfg->base_address + cfg->size)) { return false; + }
You may want to run clang-format on this change: drivers/flash/soc_flash_silabs_siwx917.c#L65
drivers/flash/soc_flash_silabs_siwx917.c:65 - if (!flash_siwx917_range_is_in_bounds(dev, offset, len)) + if (!flash_siwx917_range_is_in_bounds(dev, offset, len)) { return -EINVAL; + } k_sem_take(&data->lock, K_FOREVER); - memcpy(buf, location, len); + memcpy(buf, location, len); k_sem_give(&data->lock); return 0; -
You may want to run clang-format on this change: drivers/flash/soc_flash_silabs_siwx917.c#L84
drivers/flash/soc_flash_silabs_siwx917.c:84 - if (!flash_siwx917_range_is_in_bounds(dev, offset, len)) + if (!flash_siwx917_range_is_in_bounds(dev, offset, len)) { return -EINVAL; - if (offset % cfg->write_block_size) + } + if (offset % cfg->write_block_size) { return -EINVAL; - if (len % cfg->write_block_size) + } + if (len % cfg->write_block_size) { return -EINVAL; + } k_sem_take(&data->lock, K_FOREVER); - ret = sl_si91x_command_to_write_common_flash((cfg->base_address + offset), (void *)buf, len, false); + ret = sl_si91x_command_to_write_common_flash((cfg->base_address + offset), (void *)buf, len, + false); k_sem_give(&data->lock); - if (ret) + if (ret) { return -EIO; + }
You may want to run clang-format on this change: drivers/flash/soc_flash_silabs_siwx917.c#L109
drivers/flash/soc_flash_silabs_siwx917.c:109 - if (!flash_siwx917_range_is_in_bounds(dev, offset, len)) + if (!flash_siwx917_range_is_in_bounds(dev, offset, len)) { return -EINVAL; - if (offset % cfg->erase_block_size) + } + if (offset % cfg->erase_block_size) { return -EINVAL; - if (len % cfg->erase_block_size) + } + if (len % cfg->erase_block_size) { return -EINVAL; + } k_sem_take(&data->lock, K_FOREVER); ret = sl_si91x_command_to_write_common_flash((cfg->base_address + offset), NULL, len, true); k_sem_give(&data->lock); - if (ret) + if (ret) { return -EIO; + } return 0; } #ifdef CONFIG_FLASH_PAGE_LAYOUT -static void flash_siwx917_page_layout(const struct device *dev, const struct flash_pages_layout **layout, size_t *layout_size) +static void flash_siwx917_page_layout(const struct device *dev, + const struct flash_pages_layout **layout, size_t *layout_size)
You may want to run clang-format on this change: drivers/flash/soc_flash_silabs_siwx917.c#L124
drivers/flash/soc_flash_silabs_siwx917.c:124 - .read = flash_siwx917_read, - .write = flash_siwx917_write, - .erase = flash_siwx917_erase, - .get_parameters = flash_siwx917_get_parameters, + .read = flash_siwx917_read, + .write = flash_siwx917_write, + .erase = flash_siwx917_erase, + .get_parameters = flash_siwx917_get_parameters, #ifdef CONFIG_FLASH_PAGE_LAYOUT - .page_layout = flash_siwx917_page_layout, + .page_layout = flash_siwx917_page_layout,
You may want to run clang-format on this change: drivers/flash/soc_flash_silabs_siwx917.c#L162
drivers/flash/soc_flash_silabs_siwx917.c:162 -#define SIWX917_PAGE_LAYOUT_FLASH_INIT(n) \ - .flash_pages_layout.pages_count = DT_REG_SIZE(n) / DT_PROP(n, erase_block_size), \ +#define SIWX917_PAGE_LAYOUT_FLASH_INIT(n) \ + .flash_pages_layout.pages_count = DT_REG_SIZE(n) / DT_PROP(n, erase_block_size), \ .flash_pages_layout.pages_size = DT_PROP(n, erase_block_size), #else #define SIWX917_PAGE_LAYOUT_FLASH_INIT(n) #endif -#define SIWX917_FLASH_INIT_P(n, p) \ - static const struct siwx917_config flash_siwx917_config_##p = { \ - .base_address = DT_REG_ADDR(n), \ - .size = DT_REG_SIZE(n), \ - .write_block_size = DT_PROP(n, write_block_size), \ - .erase_block_size = DT_PROP(n, erase_block_size), \ - .flash_parameters.write_block_size = DT_PROP(n, write_block_size), \ - .flash_parameters.erase_value = 0xff, \ - SIWX917_PAGE_LAYOUT_FLASH_INIT(n) \ - }; \ - static struct siwx917_data flash_siwx917_data_##p = { \ - .lock = Z_SEM_INITIALIZER(flash_siwx917_data_##p.lock, 1, 1), \ - }; \ - DEVICE_DT_INST_DEFINE(p, flash_siwx917_init, NULL, \ - &flash_siwx917_data_##p, &flash_siwx917_config_##p, \ - POST_KERNEL, CONFIG_FLASH_INIT_PRIORITY, &siwx917_api); +#define SIWX917_FLASH_INIT_P(n, p) \ + static const struct siwx917_config flash_siwx917_config_##p = { \ + .base_address = DT_REG_ADDR(n), \ + .size = DT_REG_SIZE(n), \ + .write_block_size = DT_PROP(n, write_block_size), \ + .erase_block_size = DT_PROP(n, erase_block_size), \ + .flash_parameters.write_block_size = DT_PROP(n, write_block_size), \ + .flash_parameters.erase_value = 0xff, \ + SIWX917_PAGE_LAYOUT_FLASH_INIT(n)}; \ + static struct siwx917_data flash_siwx917_data_##p = { \ + .lock = Z_SEM_INITIALIZER(flash_siwx917_data_##p.lock, 1, 1), \ + }; \ + DEVICE_DT_INST_DEFINE(p, flash_siwx917_init, NULL, &flash_siwx917_data_##p, \ + &flash_siwx917_config_##p, POST_KERNEL, CONFIG_FLASH_INIT_PRIORITY, \ + &siwx917_api); -#define SIWX917_FLASH_INIT(p) \ - BUILD_ASSERT(DT_INST_CHILD_NUM_STATUS_OKAY(p) == 1); \ +#define SIWX917_FLASH_INIT(p) \ + BUILD_ASSERT(DT_INST_CHILD_NUM_STATUS_OKAY(p) == 1); \

Artifacts

Produced during runtime
Name Size
compliance.xml
20.2 KB