Re: tty: serial: jsm: Remove unnecessary NULL checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/21/2017 05:32 PM, SF Markus Elfring wrote:
>>>> We have some unnecessary checks for NULL pointer
>>>
>>> How do you think about to mention other function calls which made
>>> the software situation questionable at these places?
>>
>> Didn't understand your statement. Can you exemplify?
> 
> 1. I came along this place because of a specific source code analysis
>    (which evolved then in an other direction).
> 
>    jsm_tty: Fix a possible null pointer dereference in two functions
>    https://lkml.org/lkml/2017/11/29/705
>    https://patchwork.kernel.org/patch/10082775/
> 
> 
> 2. How would you like to explain in the commit description
>    that two null pointer checks are not needed any more?

OK, it makes sense! I will rephrase the commit message and cite the
origin of the patch.

> 
> 
>>>> We also added one possibly necessary NULL check.
>>>>
>>>> No functional change is intended.
>>>
>>> * This information does not fit to the commit subject.
>>>
>>> * The check addition should be offered in a separate patch.
>>>
>>
>> Well, I kind of agree with you - this information is counter-intuitive
>> when reading the subject.
> 
> Thanks that we have got a similar understanding about it.
> 
> 
>> But I'd rather change the subject than send another patch,
> 
> Please separate the topics in a safe way.
> 
> 
>> it's just so small
> 
> Does the deletion of sanity checks look too trivial?

Yes, it's trivial. We can live without the change, in my understanding
it's basically code clean-up, in order to get more readable and concise
code.
Oh, one can say about performance (1 less "if" per function), but I
didn't measure that and I think it doesn't matter much.

Anyway, it's a welcome change! I'm not trying to diminish it.


> 
> 
>> and the content of this patch itself fits together in my opinion...
> 
> Patch squashing might occasionally look too attractive.
> 
> 
>> no need to decouple.
> 
> I disagree to your conclusion in this case.
> 
> 
>> Do you have a suggestion to a better subject?
> 
> Would you like to take another look at information from the section
> “3) Separate your changes” in the document “submitting-patches.rst”
> for the discussed source code transformation?

OK, since make things separated seems so important to you in this case,
we can do it! No big deal =)

I'll resend today.

Thanks,



Guilherme

> 
> Regards,
> Markus
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux