Re: [Spice-devel] [PATCH v2 06/13] Rephrase section on short functions for readability

2018-02-14 Thread Christophe Fergeau
On Thu, Feb 08, 2018 at 03:50:37AM -0500, Frediano Ziglio wrote:
> > 
> > From: Christophe de Dinechin 
> > 
> > Signed-off-by: Christophe de Dinechin 
> > ---
> >  docs/spice_style.txt | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/docs/spice_style.txt b/docs/spice_style.txt
> > index 3e463d2f..74f4e29d 100644
> > --- a/docs/spice_style.txt
> > +++ b/docs/spice_style.txt
> > @@ -113,7 +113,7 @@ If multiple related constants are to be defined, 
> > consider
> > the use of enumeration
> >  Short functions
> >  ---
> >  
> > -Try to split code to short functions, each having simple functionality, in
> > order to improve code readability and re-usability. Prefix with inline short
> > functions or functions that were splitted for readability reason.
> > +Try to split code to short functions, each having simple functionality, in
> > order to improve code readability and re-usability. Prefix with `inline`
> > functions that were splitted for readability reason or that are very short.
> >  
> >  Return on if
> >  
> 
> I really don't understanding the aiming of both version.
> Is mixing the inline concept (optimization suggestion) with readability
> and I don't understand the reason.

I'd just drop any mention of 'inline'. If it's short, better to let the
compiler decide for you, unless you have measured that the function
really has to be inlined.

Christophe


signature.asc
Description: PGP signature
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH v2 06/13] Rephrase section on short functions for readability

2018-02-08 Thread Christophe de Dinechin


> On 8 Feb 2018, at 09:50, Frediano Ziglio  wrote:
> 
>> 
>> From: Christophe de Dinechin 
>> 
>> Signed-off-by: Christophe de Dinechin 
>> ---
>> docs/spice_style.txt | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/docs/spice_style.txt b/docs/spice_style.txt
>> index 3e463d2f..74f4e29d 100644
>> --- a/docs/spice_style.txt
>> +++ b/docs/spice_style.txt
>> @@ -113,7 +113,7 @@ If multiple related constants are to be defined, consider
>> the use of enumeration
>> Short functions
>> ---
>> 
>> -Try to split code to short functions, each having simple functionality, in
>> order to improve code readability and re-usability. Prefix with inline short
>> functions or functions that were splitted for readability reason.
>> +Try to split code to short functions, each having simple functionality, in
>> order to improve code readability and re-usability. Prefix with `inline`
>> functions that were splitted for readability reason or that are very short.
>> 
>> Return on if
>> 
> 
> I really don't understanding the aiming of both version.
> Is mixing the inline concept (optimization suggestion) with readability
> and I don't understand the reason.

OK. Needs rephrasing then. I agree I did not improve much. Will do one more 
pass.

> 
> Frediano
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH v2 06/13] Rephrase section on short functions for readability

2018-02-08 Thread Frediano Ziglio
> 
> From: Christophe de Dinechin 
> 
> Signed-off-by: Christophe de Dinechin 
> ---
>  docs/spice_style.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/docs/spice_style.txt b/docs/spice_style.txt
> index 3e463d2f..74f4e29d 100644
> --- a/docs/spice_style.txt
> +++ b/docs/spice_style.txt
> @@ -113,7 +113,7 @@ If multiple related constants are to be defined, consider
> the use of enumeration
>  Short functions
>  ---
>  
> -Try to split code to short functions, each having simple functionality, in
> order to improve code readability and re-usability. Prefix with inline short
> functions or functions that were splitted for readability reason.
> +Try to split code to short functions, each having simple functionality, in
> order to improve code readability and re-usability. Prefix with `inline`
> functions that were splitted for readability reason or that are very short.
>  
>  Return on if
>  

I really don't understanding the aiming of both version.
Is mixing the inline concept (optimization suggestion) with readability
and I don't understand the reason.

Frediano
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH v2 06/13] Rephrase section on short functions for readability

2018-02-07 Thread Christophe de Dinechin
From: Christophe de Dinechin 

Signed-off-by: Christophe de Dinechin 
---
 docs/spice_style.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/spice_style.txt b/docs/spice_style.txt
index 3e463d2f..74f4e29d 100644
--- a/docs/spice_style.txt
+++ b/docs/spice_style.txt
@@ -113,7 +113,7 @@ If multiple related constants are to be defined, consider 
the use of enumeration
 Short functions
 ---
 
-Try to split code to short functions, each having simple functionality, in 
order to improve code readability and re-usability. Prefix with inline short 
functions or functions that were splitted for readability reason.
+Try to split code to short functions, each having simple functionality, in 
order to improve code readability and re-usability. Prefix with `inline` 
functions that were splitted for readability reason or that are very short.
 
 Return on if
 
-- 
2.13.5 (Apple Git-94)

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel