diff mbox

drivers/isdn: break out of the loop after call isdn_tty_send_msg

Message ID 512EC79C.3010700@asianux.com
State Rejected, archived
Delegated to: David Miller
Headers show

Commit Message

Chen Gang Feb. 28, 2013, 2:57 a.m. UTC
need break out of the loop after call isdn_tty_send_msg.
    isdn_tty_send_msg is intended to eat the rest of the string.
    so need not scan again the string which appended "+M...".

Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 drivers/isdn/i4l/isdn_tty.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Comments

Jiri Slaby Feb. 28, 2013, 9:54 a.m. UTC | #1
On 02/28/2013 03:57 AM, Chen Gang wrote:
> 
>   need break out of the loop after call isdn_tty_send_msg.
>     isdn_tty_send_msg is intended to eat the rest of the string.
>     so need not scan again the string which appended "+M...".

Yes, looks good.

> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---
>  drivers/isdn/i4l/isdn_tty.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
> index d8a7d83..8ac7b33 100644
> --- a/drivers/isdn/i4l/isdn_tty.c
> +++ b/drivers/isdn/i4l/isdn_tty.c
> @@ -3587,7 +3587,7 @@ isdn_tty_parse_at(modem_info *info)
>  			case 'M':	/* MESSAGE */
>  				p++;
>  				isdn_tty_send_msg(info, m, p);
> -				break;
> +				goto tail;
>  			default:
>  				PARSE_ERROR;
>  			}
> @@ -3601,6 +3601,8 @@ isdn_tty_parse_at(modem_info *info)
>  			PARSE_ERROR;
>  		}
>  	}
> +
> +tail:
>  #ifdef CONFIG_ISDN_AUDIO
>  	if (!info->vonline)
>  #endif
>
Chen Gang March 15, 2013, 2:02 a.m. UTC | #2
Hello Maintainers:

  is it qualified to be applied ?

  thanks.


于 2013年02月28日 17:54, Jiri Slaby 写道:
> On 02/28/2013 03:57 AM, Chen Gang wrote:
>>
>>   need break out of the loop after call isdn_tty_send_msg.
>>     isdn_tty_send_msg is intended to eat the rest of the string.
>>     so need not scan again the string which appended "+M...".
> 
> Yes, looks good.
> 
>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
>> ---
>>  drivers/isdn/i4l/isdn_tty.c |    4 +++-
>>  1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
>> index d8a7d83..8ac7b33 100644
>> --- a/drivers/isdn/i4l/isdn_tty.c
>> +++ b/drivers/isdn/i4l/isdn_tty.c
>> @@ -3587,7 +3587,7 @@ isdn_tty_parse_at(modem_info *info)
>>  			case 'M':	/* MESSAGE */
>>  				p++;
>>  				isdn_tty_send_msg(info, m, p);
>> -				break;
>> +				goto tail;
>>  			default:
>>  				PARSE_ERROR;
>>  			}
>> @@ -3601,6 +3601,8 @@ isdn_tty_parse_at(modem_info *info)
>>  			PARSE_ERROR;
>>  		}
>>  	}
>> +
>> +tail:
>>  #ifdef CONFIG_ISDN_AUDIO
>>  	if (!info->vonline)
>>  #endif
>>
> 
>
Chen Gang March 20, 2013, 5:03 a.m. UTC | #3
Hello Maintainers:

  did I send incorrect mail address ?
    ./scripts/get_maintainers.pl leads to cc netdev, but exclude David Miller.
    is it a bug of ./scripts/get_maintainers.pl ?
      (this time, I include him in this mail address).

  welcome any members to providing suggestions or completions.

  thanks.

gchen.

On 2013年03月15日 10:02, Chen Gang wrote:
> Hello Maintainers:
> 
>   is it qualified to be applied ?
> 
>   thanks.
> 
> 
> 于 2013年02月28日 17:54, Jiri Slaby 写道:
>> On 02/28/2013 03:57 AM, Chen Gang wrote:
>>>
>>>   need break out of the loop after call isdn_tty_send_msg.
>>>     isdn_tty_send_msg is intended to eat the rest of the string.
>>>     so need not scan again the string which appended "+M...".
>>
>> Yes, looks good.
>>
>>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
>>> ---
>>>  drivers/isdn/i4l/isdn_tty.c |    4 +++-
>>>  1 files changed, 3 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
>>> index d8a7d83..8ac7b33 100644
>>> --- a/drivers/isdn/i4l/isdn_tty.c
>>> +++ b/drivers/isdn/i4l/isdn_tty.c
>>> @@ -3587,7 +3587,7 @@ isdn_tty_parse_at(modem_info *info)
>>>  			case 'M':	/* MESSAGE */
>>>  				p++;
>>>  				isdn_tty_send_msg(info, m, p);
>>> -				break;
>>> +				goto tail;
>>>  			default:
>>>  				PARSE_ERROR;
>>>  			}
>>> @@ -3601,6 +3601,8 @@ isdn_tty_parse_at(modem_info *info)
>>>  			PARSE_ERROR;
>>>  		}
>>>  	}
>>> +
>>> +tail:
>>>  #ifdef CONFIG_ISDN_AUDIO
>>>  	if (!info->vonline)
>>>  #endif
>>>
>>
>>
> 
>
Chen Gang March 25, 2013, 3:27 a.m. UTC | #4
Hello Jiri Kosina:

  could you help to check this patch whether is OK ?

  thanks.

  :-)

gchen.


On 2013年03月20日 13:03, Chen Gang wrote:
> Hello Maintainers:
> 
>   did I send incorrect mail address ?
>     ./scripts/get_maintainers.pl leads to cc netdev, but exclude David Miller.
>     is it a bug of ./scripts/get_maintainers.pl ?
>       (this time, I include him in this mail address).
> 
>   welcome any members to providing suggestions or completions.
> 
>   thanks.
> 
> gchen.
> 
> On 2013年03月15日 10:02, Chen Gang wrote:
>> Hello Maintainers:
>>
>>   is it qualified to be applied ?
>>
>>   thanks.
>>
>>
>> 于 2013年02月28日 17:54, Jiri Slaby 写道:
>>> On 02/28/2013 03:57 AM, Chen Gang wrote:
>>>>
>>>>   need break out of the loop after call isdn_tty_send_msg.
>>>>     isdn_tty_send_msg is intended to eat the rest of the string.
>>>>     so need not scan again the string which appended "+M...".
>>>
>>> Yes, looks good.
>>>
>>>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
>>>> ---
>>>>  drivers/isdn/i4l/isdn_tty.c |    4 +++-
>>>>  1 files changed, 3 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
>>>> index d8a7d83..8ac7b33 100644
>>>> --- a/drivers/isdn/i4l/isdn_tty.c
>>>> +++ b/drivers/isdn/i4l/isdn_tty.c
>>>> @@ -3587,7 +3587,7 @@ isdn_tty_parse_at(modem_info *info)
>>>>  			case 'M':	/* MESSAGE */
>>>>  				p++;
>>>>  				isdn_tty_send_msg(info, m, p);
>>>> -				break;
>>>> +				goto tail;
>>>>  			default:
>>>>  				PARSE_ERROR;
>>>>  			}
>>>> @@ -3601,6 +3601,8 @@ isdn_tty_parse_at(modem_info *info)
>>>>  			PARSE_ERROR;
>>>>  		}
>>>>  	}
>>>> +
>>>> +tail:
>>>>  #ifdef CONFIG_ISDN_AUDIO
>>>>  	if (!info->vonline)
>>>>  #endif
>>>>
>>>
>>>
>>
>>
> 
>
Chen Gang March 29, 2013, 1:56 a.m. UTC | #5
Hello David Miller:

  could you help to check this patch whether is OK ?

  originally, it is my fault:
    not think of the mail addresses, after get them from ./scripts/get_maintainers.pl
    (I should fully use the tools, but should not depend on the tools)

  thanks.


On 2013年03月25日 11:27, Chen Gang wrote:
> Hello Jiri Kosina:
> 
>   could you help to check this patch whether is OK ?
> 
>   thanks.
> 
>   :-)
> 
> gchen.
> 
> 
> On 2013年03月20日 13:03, Chen Gang wrote:
>> Hello Maintainers:
>>
>>   did I send incorrect mail address ?
>>     ./scripts/get_maintainers.pl leads to cc netdev, but exclude David Miller.
>>     is it a bug of ./scripts/get_maintainers.pl ?
>>       (this time, I include him in this mail address).
>>
>>   welcome any members to providing suggestions or completions.
>>
>>   thanks.
>>
>> gchen.
>>
>> On 2013年03月15日 10:02, Chen Gang wrote:
>>> Hello Maintainers:
>>>
>>>   is it qualified to be applied ?
>>>
>>>   thanks.
>>>
>>>
>>> 于 2013年02月28日 17:54, Jiri Slaby 写道:
>>>> On 02/28/2013 03:57 AM, Chen Gang wrote:
>>>>>
>>>>>   need break out of the loop after call isdn_tty_send_msg.
>>>>>     isdn_tty_send_msg is intended to eat the rest of the string.
>>>>>     so need not scan again the string which appended "+M...".
>>>>
>>>> Yes, looks good.
>>>>
>>>>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
>>>>> ---
>>>>>  drivers/isdn/i4l/isdn_tty.c |    4 +++-
>>>>>  1 files changed, 3 insertions(+), 1 deletions(-)
>>>>>
>>>>> diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
>>>>> index d8a7d83..8ac7b33 100644
>>>>> --- a/drivers/isdn/i4l/isdn_tty.c
>>>>> +++ b/drivers/isdn/i4l/isdn_tty.c
>>>>> @@ -3587,7 +3587,7 @@ isdn_tty_parse_at(modem_info *info)
>>>>>  			case 'M':	/* MESSAGE */
>>>>>  				p++;
>>>>>  				isdn_tty_send_msg(info, m, p);
>>>>> -				break;
>>>>> +				goto tail;
>>>>>  			default:
>>>>>  				PARSE_ERROR;
>>>>>  			}
>>>>> @@ -3601,6 +3601,8 @@ isdn_tty_parse_at(modem_info *info)
>>>>>  			PARSE_ERROR;
>>>>>  		}
>>>>>  	}
>>>>> +
>>>>> +tail:
>>>>>  #ifdef CONFIG_ISDN_AUDIO
>>>>>  	if (!info->vonline)
>>>>>  #endif
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
> 
>
diff mbox

Patch

diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
index d8a7d83..8ac7b33 100644
--- a/drivers/isdn/i4l/isdn_tty.c
+++ b/drivers/isdn/i4l/isdn_tty.c
@@ -3587,7 +3587,7 @@  isdn_tty_parse_at(modem_info *info)
 			case 'M':	/* MESSAGE */
 				p++;
 				isdn_tty_send_msg(info, m, p);
-				break;
+				goto tail;
 			default:
 				PARSE_ERROR;
 			}
@@ -3601,6 +3601,8 @@  isdn_tty_parse_at(modem_info *info)
 			PARSE_ERROR;
 		}
 	}
+
+tail:
 #ifdef CONFIG_ISDN_AUDIO
 	if (!info->vonline)
 #endif