staging: wfx: fix structs alignments
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Thu, 13 Jan 2022 08:55:15 +0000 (09:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Jan 2022 15:19:42 +0000 (16:19 +0100)
Some structs members were not properly aligned.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20220113085524.1110708-23-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/bus_sdio.c
drivers/staging/wfx/bus_spi.c
drivers/staging/wfx/debug.c
drivers/staging/wfx/fwio.c
drivers/staging/wfx/main.c
drivers/staging/wfx/queue.h
drivers/staging/wfx/wfx.h

index a3da661..4b77df2 100644 (file)
@@ -157,13 +157,13 @@ static size_t wfx_sdio_align_size(void *priv, size_t size)
 }
 
 static const struct wfx_hwbus_ops wfx_sdio_hwbus_ops = {
-       .copy_from_io = wfx_sdio_copy_from_io,
-       .copy_to_io = wfx_sdio_copy_to_io,
-       .irq_subscribe = wfx_sdio_irq_subscribe,
+       .copy_from_io    = wfx_sdio_copy_from_io,
+       .copy_to_io      = wfx_sdio_copy_to_io,
+       .irq_subscribe   = wfx_sdio_irq_subscribe,
        .irq_unsubscribe = wfx_sdio_irq_unsubscribe,
-       .lock                   = wfx_sdio_lock,
-       .unlock                 = wfx_sdio_unlock,
-       .align_size             = wfx_sdio_align_size,
+       .lock            = wfx_sdio_lock,
+       .unlock          = wfx_sdio_unlock,
+       .align_size      = wfx_sdio_align_size,
 };
 
 static const struct of_device_id wfx_sdio_of_match[] = {
index fe39b4c..417bb74 100644 (file)
@@ -164,13 +164,13 @@ static size_t wfx_spi_align_size(void *priv, size_t size)
 }
 
 static const struct wfx_hwbus_ops wfx_spi_hwbus_ops = {
-       .copy_from_io = wfx_spi_copy_from_io,
-       .copy_to_io = wfx_spi_copy_to_io,
-       .irq_subscribe = wfx_spi_irq_subscribe,
+       .copy_from_io    = wfx_spi_copy_from_io,
+       .copy_to_io      = wfx_spi_copy_to_io,
+       .irq_subscribe   = wfx_spi_irq_subscribe,
        .irq_unsubscribe = wfx_spi_irq_unsubscribe,
-       .lock                   = wfx_spi_lock,
-       .unlock                 = wfx_spi_unlock,
-       .align_size             = wfx_spi_align_size,
+       .lock            = wfx_spi_lock,
+       .unlock          = wfx_spi_unlock,
+       .align_size      = wfx_spi_align_size,
 };
 
 static int wfx_spi_probe(struct spi_device *func)
index c62cb5f..ae7895e 100644 (file)
@@ -75,7 +75,7 @@ static int wfx_counters_show(struct seq_file *seq, void *v)
        seq_printf(seq, "%-24s %12s %12s %12s\n", "", "global", "iface 0", "iface 1");
 
 #define PUT_COUNTER(name) \
-       seq_printf(seq, "%-24s %12d %12d %12d\n", #name, \
+       seq_printf(seq, "%-24s %12d %12d %12d\n", #name,  \
                   le32_to_cpu(counters[2].count_##name), \
                   le32_to_cpu(counters[0].count_##name), \
                   le32_to_cpu(counters[1].count_##name))
index 24c314b..9005a6f 100644 (file)
@@ -64,9 +64,9 @@
 static const char * const fwio_errors[] = {
        [ERR_INVALID_SEC_TYPE] = "Invalid section type or wrong encryption",
        [ERR_SIG_VERIF_FAILED] = "Signature verification failed",
-       [ERR_AES_CTRL_KEY] = "AES control key not initialized",
-       [ERR_ECC_PUB_KEY] = "ECC public key not initialized",
-       [ERR_MAC_KEY] = "MAC key not initialized",
+       [ERR_AES_CTRL_KEY]     = "AES control key not initialized",
+       [ERR_ECC_PUB_KEY]      = "ECC public key not initialized",
+       [ERR_MAC_KEY]          = "MAC key not initialized",
 };
 
 /* request_firmware() allocate data using vmalloc(). It is not compatible with underlying hardware
index 028d7e5..217c0c5 100644 (file)
@@ -121,34 +121,34 @@ static const struct ieee80211_iface_combination wfx_iface_combinations[] = {
 };
 
 static const struct ieee80211_ops wfx_ops = {
-       .start                  = wfx_start,
-       .stop                   = wfx_stop,
-       .add_interface          = wfx_add_interface,
-       .remove_interface       = wfx_remove_interface,
-       .config                 = wfx_config,
-       .tx                     = wfx_tx,
-       .join_ibss              = wfx_join_ibss,
-       .leave_ibss             = wfx_leave_ibss,
-       .conf_tx                = wfx_conf_tx,
-       .hw_scan                = wfx_hw_scan,
-       .cancel_hw_scan         = wfx_cancel_hw_scan,
-       .start_ap               = wfx_start_ap,
-       .stop_ap                = wfx_stop_ap,
-       .sta_add                = wfx_sta_add,
-       .sta_remove             = wfx_sta_remove,
-       .set_tim                = wfx_set_tim,
-       .set_key                = wfx_set_key,
-       .set_rts_threshold      = wfx_set_rts_threshold,
+       .start                   = wfx_start,
+       .stop                    = wfx_stop,
+       .add_interface           = wfx_add_interface,
+       .remove_interface        = wfx_remove_interface,
+       .config                  = wfx_config,
+       .tx                      = wfx_tx,
+       .join_ibss               = wfx_join_ibss,
+       .leave_ibss              = wfx_leave_ibss,
+       .conf_tx                 = wfx_conf_tx,
+       .hw_scan                 = wfx_hw_scan,
+       .cancel_hw_scan          = wfx_cancel_hw_scan,
+       .start_ap                = wfx_start_ap,
+       .stop_ap                 = wfx_stop_ap,
+       .sta_add                 = wfx_sta_add,
+       .sta_remove              = wfx_sta_remove,
+       .set_tim                 = wfx_set_tim,
+       .set_key                 = wfx_set_key,
+       .set_rts_threshold       = wfx_set_rts_threshold,
        .set_default_unicast_key = wfx_set_default_unicast_key,
-       .bss_info_changed       = wfx_bss_info_changed,
-       .configure_filter       = wfx_configure_filter,
-       .ampdu_action           = wfx_ampdu_action,
-       .flush                  = wfx_flush,
-       .add_chanctx            = wfx_add_chanctx,
-       .remove_chanctx         = wfx_remove_chanctx,
-       .change_chanctx         = wfx_change_chanctx,
-       .assign_vif_chanctx     = wfx_assign_vif_chanctx,
-       .unassign_vif_chanctx   = wfx_unassign_vif_chanctx,
+       .bss_info_changed        = wfx_bss_info_changed,
+       .configure_filter        = wfx_configure_filter,
+       .ampdu_action            = wfx_ampdu_action,
+       .flush                   = wfx_flush,
+       .add_chanctx             = wfx_add_chanctx,
+       .remove_chanctx          = wfx_remove_chanctx,
+       .change_chanctx          = wfx_change_chanctx,
+       .assign_vif_chanctx      = wfx_assign_vif_chanctx,
+       .unassign_vif_chanctx    = wfx_unassign_vif_chanctx,
 };
 
 bool wfx_api_older_than(struct wfx_dev *wdev, int major, int minor)
index 2860c56..4731deb 100644 (file)
@@ -15,10 +15,10 @@ struct wfx_dev;
 struct wfx_vif;
 
 struct wfx_queue {
-       struct sk_buff_head     normal;
-       struct sk_buff_head     cab; /* Content After (DTIM) Beacon */
-       atomic_t                pending_frames;
-       int                     priority;
+       struct sk_buff_head normal;
+       struct sk_buff_head cab; /* Content After (DTIM) Beacon */
+       atomic_t            pending_frames;
+       int                 priority;
 };
 
 void wfx_tx_lock(struct wfx_dev *wdev);
index 5658748..0fc8366 100644 (file)
 struct wfx_hwbus_ops;
 
 struct wfx_dev {
-       struct wfx_platform_data pdata;
-       struct device           *dev;
-       struct ieee80211_hw     *hw;
-       struct ieee80211_vif    *vif[2];
-       struct mac_address      addresses[2];
+       struct wfx_platform_data   pdata;
+       struct device              *dev;
+       struct ieee80211_hw        *hw;
+       struct ieee80211_vif       *vif[2];
+       struct mac_address         addresses[2];
        const struct wfx_hwbus_ops *hwbus_ops;
-       void                    *hwbus_priv;
+       void                       *hwbus_priv;
 
-       u8                      keyset;
-       struct completion       firmware_ready;
+       u8                         keyset;
+       struct completion          firmware_ready;
        struct wfx_hif_ind_startup hw_caps;
-       struct wfx_hif          hif;
-       struct delayed_work     cooling_timeout_work;
-       bool                    poll_irq;
-       bool                    chip_frozen;
-       struct mutex            conf_mutex;
-
-       struct wfx_hif_cmd      hif_cmd;
-       struct sk_buff_head     tx_pending;
-       wait_queue_head_t       tx_dequeue;
-       atomic_t                tx_lock;
-
-       atomic_t                packet_id;
-       u32                     key_map;
-
-       struct wfx_hif_rx_stats rx_stats;
-       struct mutex            rx_stats_lock;
+       struct wfx_hif             hif;
+       struct delayed_work        cooling_timeout_work;
+       bool                       poll_irq;
+       bool                       chip_frozen;
+       struct mutex               conf_mutex;
+
+       struct wfx_hif_cmd         hif_cmd;
+       struct sk_buff_head        tx_pending;
+       wait_queue_head_t          tx_dequeue;
+       atomic_t                   tx_lock;
+
+       atomic_t                   packet_id;
+       u32                        key_map;
+
+       struct wfx_hif_rx_stats    rx_stats;
+       struct mutex               rx_stats_lock;
        struct wfx_hif_tx_power_loop_info tx_power_loop_info;
-       struct mutex            tx_power_loop_info_lock;
+       struct mutex               tx_power_loop_info_lock;
        int                     force_ps_timeout;
 };
 
 struct wfx_vif {
-       struct wfx_dev          *wdev;
-       struct ieee80211_vif    *vif;
-       struct ieee80211_channel *channel;
-       int                     id;
+       struct wfx_dev             *wdev;
+       struct ieee80211_vif       *vif;
+       struct ieee80211_channel   *channel;
+       int                        id;
 
-       u32                     link_id_map;
+       u32                        link_id_map;
 
-       bool                    after_dtim_tx_allowed;
-       bool                    join_in_progress;
+       bool                       after_dtim_tx_allowed;
+       bool                       join_in_progress;
 
-       struct delayed_work     beacon_loss_work;
+       struct delayed_work        beacon_loss_work;
 
-       struct wfx_queue        tx_queue[4];
+       struct wfx_queue           tx_queue[4];
        struct wfx_tx_policy_cache tx_policy_cache;
-       struct work_struct      tx_policy_upload_work;
+       struct work_struct         tx_policy_upload_work;
 
-       struct work_struct      update_tim_work;
+       struct work_struct         update_tim_work;
 
-       unsigned long           uapsd_mask;
+       unsigned long              uapsd_mask;
 
        /* avoid some operations in parallel with scan */
-       struct mutex            scan_lock;
-       struct work_struct      scan_work;
-       struct completion       scan_complete;
-       int                     scan_nb_chan_done;
-       bool                    scan_abort;
+       struct mutex               scan_lock;
+       struct work_struct         scan_work;
+       struct completion          scan_complete;
+       int                        scan_nb_chan_done;
+       bool                       scan_abort;
        struct ieee80211_scan_request *scan_req;
 
-       struct completion       set_pm_mode_complete;
+       struct completion          set_pm_mode_complete;
 };
 
 static inline struct wfx_vif *wdev_to_wvif(struct wfx_dev *wdev, int vif_id)