Merge tag 'tiny/no-advice-fixup-3.18' of git://git.kernel.org/pub/scm/linux/kernel...
[deliverable/linux.git] / drivers / net / wireless / ath / ath10k / debug.c
index c5d01058c2a3efcbadae155461a62da725dd9c1a..3756feba32231cffcddd112575163d1a7cf6cc67 100644 (file)
@@ -589,15 +589,11 @@ static ssize_t ath10k_read_simulate_fw_crash(struct file *file,
                                             char __user *user_buf,
                                             size_t count, loff_t *ppos)
 {
-       const char buf[] = "To simulate firmware crash write one of the"
-                          " keywords to this file:\n `soft` - this will send"
-                          " WMI_FORCE_FW_HANG_ASSERT to firmware if FW"
-                          " supports that command.\n `hard` - this will send"
-                          " to firmware command with illegal parameters"
-                          " causing firmware crash.\n"
-                          "`assert` - this will send special illegal parameter"
-                          " to firmware to cause assert failure"
-                          " and crash.\n";
+       const char buf[] =
+               "To simulate firmware crash write one of the keywords to this file:\n"
+               "`soft` - this will send WMI_FORCE_FW_HANG_ASSERT to firmware if FW supports that command.\n"
+               "`hard` - this will send to firmware command with illegal parameters causing firmware crash.\n"
+               "`assert` - this will send special illegal parameter to firmware to cause assert failure and crash.\n";
 
        return simple_read_from_buffer(user_buf, count, ppos, buf, strlen(buf));
 }
@@ -645,7 +641,8 @@ static ssize_t ath10k_write_simulate_fw_crash(struct file *file,
                 * firmware variants in order to force a firmware crash.
                 */
                ret = ath10k_wmi_vdev_set_param(ar, 0x7fff,
-                                       ar->wmi.vdev_param->rts_threshold, 0);
+                                               ar->wmi.vdev_param->rts_threshold,
+                                               0);
        } else if (!strcmp(buf, "assert")) {
                ath10k_info(ar, "simulating firmware assert crash\n");
                ret = ath10k_debug_fw_assert(ar);
@@ -867,8 +864,8 @@ static void ath10k_debug_htt_stats_dwork(struct work_struct *work)
 }
 
 static ssize_t ath10k_read_htt_stats_mask(struct file *file,
-                                           char __user *user_buf,
-                                           size_t count, loff_t *ppos)
+                                         char __user *user_buf,
+                                         size_t count, loff_t *ppos)
 {
        struct ath10k *ar = file->private_data;
        char buf[32];
@@ -880,8 +877,8 @@ static ssize_t ath10k_read_htt_stats_mask(struct file *file,
 }
 
 static ssize_t ath10k_write_htt_stats_mask(struct file *file,
-                                            const char __user *user_buf,
-                                            size_t count, loff_t *ppos)
+                                          const char __user *user_buf,
+                                          size_t count, loff_t *ppos)
 {
        struct ath10k *ar = file->private_data;
        unsigned long mask;
@@ -986,8 +983,8 @@ static const struct file_operations fops_htt_max_amsdu_ampdu = {
 };
 
 static ssize_t ath10k_read_fw_dbglog(struct file *file,
-                                           char __user *user_buf,
-                                           size_t count, loff_t *ppos)
+                                    char __user *user_buf,
+                                    size_t count, loff_t *ppos)
 {
        struct ath10k *ar = file->private_data;
        unsigned int len;
@@ -1176,8 +1173,12 @@ int ath10k_debug_register(struct ath10k *ar)
 {
        ar->debug.debugfs_phy = debugfs_create_dir("ath10k",
                                                   ar->hw->wiphy->debugfsdir);
-       if (!ar->debug.debugfs_phy)
+       if (IS_ERR_OR_NULL(ar->debug.debugfs_phy)) {
+               if (IS_ERR(ar->debug.debugfs_phy))
+                       return PTR_ERR(ar->debug.debugfs_phy);
+
                return -ENOMEM;
+       }
 
        INIT_DELAYED_WORK(&ar->debug.htt_stats_dwork,
                          ath10k_debug_htt_stats_dwork);
This page took 0.026147 seconds and 5 git commands to generate.