[PATCH] Staging: speakup: buffers: Fixed a return value coding style issue.

rs at mage.me.uk rs at mage.me.uk
Thu Feb 27 18:12:48 UTC 2014


When checking buffers.c with checkpatch.pl it throws the following 
error: drivers/staging/speakup/buffers.c:58: ERROR: return is not a 
function, parentheses are not required

I watched one of your talks, it's very informative and concise: 
http://www.youtube.com/watch?v=LLBrBBImJt4&feature=youtu.be

Thanks,
Reza Snowdon

On 27/02/14 16:40, Greg KH wrote:
> On Thu, Feb 27, 2014 at 04:26:42PM +0000, Reza Snowdon wrote:
>> Fixed a coding style issue.
>>
>> Signed-off-by: Reza Snowdon <rs at mage.me.uk>
>> ---
>>   drivers/staging/speakup/buffers.c |    3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/speakup/buffers.c b/drivers/staging/speakup/buffers.c
>> index 382973e..8d7caa7 100644
>> --- a/drivers/staging/speakup/buffers.c
>> +++ b/drivers/staging/speakup/buffers.c
>> @@ -55,7 +55,8 @@ static int synth_buffer_free(void)
>>
>>   int synth_buffer_empty(void)
>>   {
>> -	return (buff_in == buff_out);
>> +	int buff_comparison = (buff_in == buff_out);
>> +	return buff_comparison;
>
> What's wrong with the original code here?  If anything, just drop the
> (), but really, it's fine, leave it alone, it's obvious what is
> happening is ok.
>
> thanks,
>
> greg k-h
>


-- 
Regards,
Reza Snowdon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Staging-speakup-buffers-Fixed-a-return-coding-style-.patch
Type: text/x-patch
Size: 980 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20140227/73989acc/attachment.bin>


More information about the devel mailing list