bus: mhi: core: Minor style and comment fixes
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Thu, 16 Dec 2021 08:12:21 +0000 (13:42 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Dec 2021 16:17:14 +0000 (17:17 +0100)
This patch fixes the below checkpatch warnings in MHI bus:

WARNING: Possible repeated word: 'events'
+ /* Process ctrl events events */

WARNING: Missing a blank line after declarations
+ struct mhi_buf_info info = { };
+ buf = kmalloc(len, GFP_KERNEL);

WARNING: Move const after static - use 'static const struct mhi_pm_transitions'
+static struct mhi_pm_transitions const dev_state_transitions[] = {

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20211216081227.237749-5-manivannan.sadhasivam@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bus/mhi/core/main.c
drivers/bus/mhi/core/pm.c

index b15c5bc37dd4f1daacae2c58fe10efd220845a30..930aba666b67cb9d2288be71b6a90773c3bcdeb4 100644 (file)
@@ -1065,7 +1065,7 @@ void mhi_ctrl_ev_task(unsigned long data)
                return;
        }
 
-       /* Process ctrl events events */
+       /* Process ctrl events */
        ret = mhi_event->process_event(mhi_cntrl, mhi_event, U32_MAX);
 
        /*
@@ -1464,6 +1464,7 @@ int mhi_prepare_channel(struct mhi_controller *mhi_cntrl,
                while (nr_el--) {
                        void *buf;
                        struct mhi_buf_info info = { };
+
                        buf = kmalloc(len, GFP_KERNEL);
                        if (!buf) {
                                ret = -ENOMEM;
index 606a77a64fd04f95ef952c33997c049362c409f5..e70a3e3a0b46ebef28121285836742b78490f0c0 100644 (file)
@@ -42,7 +42,7 @@
  * L3: LD_ERR_FATAL_DETECT <--> LD_ERR_FATAL_DETECT
  *     LD_ERR_FATAL_DETECT -> DISABLE
  */
-static struct mhi_pm_transitions const dev_state_transitions[] = {
+static const struct mhi_pm_transitions dev_state_transitions[] = {
        /* L0 States */
        {
                MHI_PM_DISABLE,