Skip to content

Commit 56fb22f

Browse files
jerome-pouillerdanieldegrasse
authored andcommitted
drivers: wifi: siwx91x: Group ARG_UNUSED() after declarations
We want to avoid declarations after statements. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
1 parent db24722 commit 56fb22f

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

drivers/wifi/siwx91x/siwx91x_wifi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,11 @@ static void siwx91x_ethernet_init(struct net_if *iface)
294294
#if defined(CONFIG_NET_STATISTICS_WIFI)
295295
static int siwx91x_stats(const struct device *dev, struct net_stats_wifi *stats)
296296
{
297-
ARG_UNUSED(dev);
298297
sl_wifi_interface_t interface = sl_wifi_get_default_interface();
299298
sl_wifi_statistics_t statistics = { };
300299
int ret;
301300

301+
ARG_UNUSED(dev);
302302
__ASSERT(stats, "stats cannot be NULL");
303303

304304
ret = sl_wifi_get_statistics(FIELD_GET(SIWX91X_INTERFACE_MASK, interface), &statistics);

drivers/wifi/siwx91x/siwx91x_wifi_ap.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,11 @@ int siwx91x_ap_enable(const struct device *dev, struct wifi_connect_req_params *
248248

249249
int siwx91x_ap_sta_disconnect(const struct device *dev, const uint8_t *mac_addr)
250250
{
251-
ARG_UNUSED(dev);
252251
sl_wifi_interface_t interface = sl_wifi_get_default_interface();
253252
sl_mac_address_t mac = { };
254253
int ret;
255254

255+
ARG_UNUSED(dev);
256256
__ASSERT(mac_addr, "mac_addr cannot be NULL");
257257

258258
if (FIELD_GET(SIWX91X_INTERFACE_MASK, interface) != SL_WIFI_AP_INTERFACE) {
@@ -275,11 +275,11 @@ int siwx91x_ap_sta_disconnect(const struct device *dev, const uint8_t *mac_addr)
275275
sl_status_t siwx91x_on_ap_sta_connect(sl_wifi_event_t event, void *data,
276276
uint32_t data_length, void *arg)
277277
{
278-
ARG_UNUSED(event);
279-
ARG_UNUSED(data_length);
280278
struct siwx91x_dev *sidev = arg;
281279
struct wifi_ap_sta_info sta_info = { };
282280

281+
ARG_UNUSED(data_length);
282+
ARG_UNUSED(event);
283283
__ASSERT(data, "data cannot be NULL");
284284
__ASSERT(arg, "arg cannot be NULL");
285285

@@ -295,11 +295,11 @@ sl_status_t siwx91x_on_ap_sta_connect(sl_wifi_event_t event, void *data,
295295
sl_status_t siwx91x_on_ap_sta_disconnect(sl_wifi_event_t event, void *data,
296296
uint32_t data_length, void *arg)
297297
{
298-
ARG_UNUSED(event);
299-
ARG_UNUSED(data_length);
300298
struct siwx91x_dev *sidev = arg;
301299
struct wifi_ap_sta_info sta_info = { };
302300

301+
ARG_UNUSED(data_length);
302+
ARG_UNUSED(event);
303303
__ASSERT(data, "data cannot be NULL");
304304
__ASSERT(arg, "arg cannot be NULL");
305305

drivers/wifi/siwx91x/siwx91x_wifi_sta.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,14 @@ static const char *siwx91x_get_reason_string(uint8_t reason_code)
7575
sl_status_t siwx91x_wifi_module_stats_event_handler(sl_wifi_event_t event, void *response,
7676
uint32_t result_length, void *arg)
7777
{
78-
ARG_UNUSED(event);
79-
ARG_UNUSED(result_length);
8078
sl_si91x_module_state_stats_response_t *notif = response;
8179
uint8_t module_state = notif->state_code & 0xF0;
8280
struct siwx91x_dev *sidev = arg;
8381
const char *reason_str;
8482

83+
ARG_UNUSED(event);
84+
ARG_UNUSED(result_length);
85+
8586
reason_str = siwx91x_get_reason_string(notif->reason_code);
8687

8788
switch (module_state) {

0 commit comments

Comments
 (0)