[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9b3e8eb1-0e24-322e-641e-a78a12c8c249@gmail.com>
Date: Tue, 4 Apr 2023 00:06:37 +0900
From: Chanwoo Choi <cwchoi00@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Bumwoo Lee <bw365.lee@...sung.com>,
linux-kernel@...r.kernel.org
Cc: MyungJoo Ham <myungjoo.ham@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>
Subject: Re: [PATCH v1 13/14] extcon: Drop unneeded assignments
On 23. 3. 22. 23:40, Andy Shevchenko wrote:
> In one case the assignment is duplicative, in the other,
> it's better to move it into the loop — the user of it.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
> drivers/extcon/extcon.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
> index b3f038639cd6..edfa0450e605 100644
> --- a/drivers/extcon/extcon.c
> +++ b/drivers/extcon/extcon.c
> @@ -246,7 +246,7 @@ static DEFINE_MUTEX(extcon_dev_list_lock);
>
> static int check_mutually_exclusive(struct extcon_dev *edev, u32 new_state)
> {
> - int i = 0;
> + int i;
>
> if (!edev->mutually_exclusive)
> return 0;
> @@ -1244,7 +1244,7 @@ static int extcon_alloc_groups(struct extcon_dev *edev)
> */
> int extcon_dev_register(struct extcon_dev *edev)
> {
> - int ret, index = 0;
> + int ret, index;
>
> ret = create_extcon_class();
> if (ret < 0)
> @@ -1253,7 +1253,7 @@ int extcon_dev_register(struct extcon_dev *edev)
> if (!edev || !edev->supported_cable)
> return -EINVAL;
>
> - for (; edev->supported_cable[index] != EXTCON_NONE; index++);
> + for (index = 0; edev->supported_cable[index] != EXTCON_NONE; index++);
>
> edev->max_supported = index;
> if (index > SUPPORTED_CABLE_MAX) {
It has the dependency with patch7. When I try to apply it, the conflict happen.
When you are sending v2 patches, I'll apply it if there are no conflict.
[1] [PATCH v1 07/14] extcon: Use unique number for the extcon device ID
Acked-by: Chanwoo Choi <cw00.choi@...sung.com>
--
Best Regards,
Samsung Electronics
Chanwoo Choi
Powered by blists - more mailing lists