<p dir="ltr">Even if you use checkpath you _should_ understand what you are changing. The output of checkpatch merely there to help.</p>
<p dir="ltr">In this case you can see that this is a macro just a few lines up in the code.</p>
<div class="gmail_quote">On 11 Oct 2014 11:46, "Sudip Mukherjee" <<a href="mailto:sudipm.mukherjee@gmail.com">sudipm.mukherjee@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I agree. But in my opinion checkpatch is here to help us fix style<br>
problems , but we should not blindly act on checkpatch warnings.<br>
<br>
thanks<br>
sudip<br>
<br>
On Sat, Oct 11, 2014 at 1:57 PM, Peter Senna Tschudin<br>
<<a href="mailto:peter.senna@gmail.com">peter.senna@gmail.com</a>> wrote:<br>
> I think that, in this case, <a href="http://checkpatch.pl" target="_blank">checkpatch.pl</a> contributed:<br>
><br>
> $ ./scripts/<a href="http://checkpatch.pl" target="_blank">checkpatch.pl</a> -f drivers/staging/octeon-usb/octeon-hcd.c<br>
> WARNING: space prohibited between function name and open parenthesis '('<br>
> #415: FILE: drivers/staging/octeon-usb/octeon-hcd.c:415:<br>
> + if (c.s.field op (value)) { \<br>
><br>
><br>
> On Sat, Oct 11, 2014 at 8:11 AM, Dave Tian <<a href="mailto:dave.jing.tian@gmail.com">dave.jing.tian@gmail.com</a>> wrote:<br>
>> Agreed - that is why I mentioned the patch is neither right nor useful:)<br>
>><br>
>> -daveti<br>
>><br>
>><br>
>> On Oct 11, 2014, at 2:08 PM, Sudip Mukherjee <<a href="mailto:sudipm.mukherjee@gmail.com">sudipm.mukherjee@gmail.com</a>> wrote:<br>
>><br>
>>> Hi Dave,<br>
>>> It will work. But my point of saying that was c.s.field ==(value) is<br>
>>> again not according to the style.<br>
>>><br>
>>> thanks<br>
>>> sudip<br>
>>><br>
>>> On Sat, Oct 11, 2014 at 10:53 AM, Dave Tian <<a href="mailto:dave.jing.tian@gmail.com">dave.jing.tian@gmail.com</a>> wrote:<br>
>>>> It also works as value is surrounded by (), though I do not think the patch itself is right or useful.<br>
>>>><br>
>>>> Dave Tian<br>
>>>> <a href="mailto:dave.jing.tian@gmail.com">dave.jing.tian@gmail.com</a><br>
>>>><br>
>>>><br>
>>>><br>
>>>> On Oct 11, 2014, at 12:58 PM, Sudip Mukherjee <<a href="mailto:sudipm.mukherjee@gmail.com">sudipm.mukherjee@gmail.com</a>> wrote:<br>
>>>><br>
>>>>> On Fri, Oct 10, 2014 at 09:55:48PM -0400, Nicholas Krause wrote:<br>
>>>>>> Fixes checkpatch coding style warning about unneeded space<br>
>>>>>> between function name an parentheses.<br>
>>>>>><br>
>>>>>> Signed-off-by: Nicholas Krause <<a href="mailto:xerofoify@gmail.com">xerofoify@gmail.com</a>><br>
>>>>>> ---<br>
>>>>>> Untested<br>
>>>>>> drivers/staging/octeon-usb/octeon-hcd.c | 2 +-<br>
>>>>>> 1 file changed, 1 insertion(+), 1 deletion(-)<br>
>>>>>><br>
>>>>>> diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c<br>
>>>>>> index 5f9db4c..bbeb0cc 100644<br>
>>>>>> --- a/drivers/staging/octeon-usb/octeon-hcd.c<br>
>>>>>> +++ b/drivers/staging/octeon-usb/octeon-hcd.c<br>
>>>>>> @@ -412,7 +412,7 @@ struct octeon_hcd {<br>
>>>>>> type c; \<br>
>>>>>> while (1) { \<br>
>>>>>> c.u32 = __cvmx_usb_read_csr32(usb, address); \<br>
>>>>>> - if (c.s.field op (value)) { \<br>
>>>>>> + if (c.s.field op(value)) { \<br>
>>>>><br>
>>>>> have you read the code before modifying it?<br>
>>>>> this is not a function.<br>
>>>>> have you seen how CVMX_WAIT_FOR_FIELD32 is being called?<br>
>>>>> on every call of CVMX_WAIT_FOR_FIELD32 op is the operator "=="<br>
>>>>> so when called the macro will be c.s.field == (value).<br>
>>>>> if your patch is applied then it will become c.s.field ==(value) .. will that be correct ?<br>
>>>>><br>
>>>>> thanks<br>
>>>>> sudip<br>
>>>>><br>
>>>>>> result = 0; \<br>
>>>>>> break; \<br>
>>>>>> } else if (cvmx_get_cycle() > done) { \<br>
>>>>>> --<br>
>>>>>> 1.9.1<br>
>>>>>><br>
>>>>>><br>
>>>>>> _______________________________________________<br>
>>>>>> Kernelnewbies mailing list<br>
>>>>>> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
>>>>>> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
>>>>><br>
>>>>> _______________________________________________<br>
>>>>> Kernelnewbies mailing list<br>
>>>>> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
>>>>> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
>>>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> Kernelnewbies mailing list<br>
>> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
>> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
><br>
><br>
><br>
> --<br>
> Peter<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</blockquote></div>