]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ath10k: initialise struct ath10k_bus params to zero
authorKalle Valo <kvalo@codeaurora.org>
Fri, 19 Apr 2019 07:28:52 +0000 (10:28 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 23 Apr 2019 13:23:54 +0000 (16:23 +0300)
This way we don't need to set every variable and give them to default, which is
zero. This is also safer in case we forgot to initalise a new field in some of
the bus modules.

Compile tested only.

Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/ahb.c
drivers/net/wireless/ath/ath10k/pci.c
drivers/net/wireless/ath/ath10k/sdio.c
drivers/net/wireless/ath/ath10k/snoc.c
drivers/net/wireless/ath/ath10k/usb.c

index 0bf726c557368b39bbadfa40bf29f7803530aa44..f80854180e2158b6e03dc1fcd79552be8c237415 100644 (file)
@@ -740,7 +740,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
        enum ath10k_hw_rev hw_rev;
        size_t size;
        int ret;
-       struct ath10k_bus_params bus_params;
+       struct ath10k_bus_params bus_params = {};
 
        of_id = of_match_device(ath10k_ahb_of_match, &pdev->dev);
        if (!of_id) {
index 271f92c24d4461045a8d84bd46aadcb22a7757e9..13c24cd977d2378ec5f3af2dd794426ec3698448 100644 (file)
@@ -3478,7 +3478,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
        struct ath10k *ar;
        struct ath10k_pci *ar_pci;
        enum ath10k_hw_rev hw_rev;
-       struct ath10k_bus_params bus_params;
+       struct ath10k_bus_params bus_params = {};
        bool pci_ps;
        int (*pci_soft_reset)(struct ath10k *ar);
        int (*pci_hard_reset)(struct ath10k *ar);
index d573d24624c0ecc8ab66cc233069eb2cfbbd9fb1..bbfdc4d7cf5fa32f2da9de826184a7fa64c06a08 100644 (file)
@@ -1954,7 +1954,7 @@ static int ath10k_sdio_probe(struct sdio_func *func,
        struct ath10k *ar;
        enum ath10k_hw_rev hw_rev;
        u32 dev_id_base;
-       struct ath10k_bus_params bus_params;
+       struct ath10k_bus_params bus_params = {};
        int ret, i;
 
        /* Assumption: All SDIO based chipsets (so far) are QCA6174 based.
index 873cb4ce419b91604286abb6be326d4a72c3cb5d..845914f2eaf852791f9890643511fb7414417c2c 100644 (file)
@@ -1249,7 +1249,7 @@ static int ath10k_snoc_resource_init(struct ath10k *ar)
 int ath10k_snoc_fw_indication(struct ath10k *ar, u64 type)
 {
        struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar);
-       struct ath10k_bus_params bus_params;
+       struct ath10k_bus_params bus_params = {};
        int ret;
 
        if (test_bit(ATH10K_SNOC_FLAG_UNREGISTERING, &ar_snoc->flags))
index 970cf69ac35f6c48b849fb634c31ce3ed68a9a38..2fb0fb40e86d67670f7b0dcd3e703eed297f96cf 100644 (file)
@@ -973,7 +973,7 @@ static int ath10k_usb_probe(struct usb_interface *interface,
        struct usb_device *dev = interface_to_usbdev(interface);
        int ret, vendor_id, product_id;
        enum ath10k_hw_rev hw_rev;
-       struct ath10k_bus_params bus_params;
+       struct ath10k_bus_params bus_params = {};
 
        /* Assumption: All USB based chipsets (so far) are QCA9377 based.
         * If there will be newer chipsets that does not use the hw reg