Re: [Cocci] console: Complete exception handling in newport_probe()

2020-04-28 Thread Dejin Zheng
On Thu, Apr 23, 2020 at 05:23:29PM +0200, Markus Elfring wrote:
> >> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/scripts/coccinelle/free/iounmap.cocci
> >>
> >> How do you think about to extend presented software analysis approaches?
> >>
> > Sorry, I am not familiar with it, I don't know.
> 
> Do you find the comments helpful at the beginning of this SmPL script?
>
Sorry, I do not know how to use the SmPL script. 

> Would you like to let any more source code analysis tools help you
> to find remaining update candidates?
>
yes, but I think the source code analysis tools only can found the simple
repetitive issue. and need spend some time learning to use it. at different
stages, it should have different methods for me. now, I think the best for
me may be that read and check the source code. Thanks!

BR,
Dejin

> Regards,
> Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] [PATCH v1] console: fix an issue about ioremap leak.

2020-04-28 Thread Dejin Zheng
On Thu, Apr 23, 2020 at 01:10:14PM +0200, Markus Elfring wrote:
> > if do_take_over_console() return an error in the newport_probe(),
> > due to the io virtual address is not released, it will cause a leak.
> 
> How do you think about a wording variant like the following?
> 
>Subject:
>[PATCH v2] console: Complete exception handling in newport_probe()
> 
>Change description:
>A call of the function “do_take_over_console” can fail here.
>The corresponding system resources were not released then.
>Thus add a call of the function “iounmap” together with the check
>of a failure predicate.
>
Thanks!

> 
> I would like to point out that there is a script for the semantic
> patch language which would detect other questionable source code.
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/scripts/coccinelle/free/iounmap.cocci
> 
> How do you think about to extend presented software analysis approaches?
>
Sorry, I am not familiar with it, I don't know.

BR,
Dejin

> Regards,
> Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] [PATCH net-next v1] can: ti_hecc: convert to devm_platform_ioremap_resource_byname()

2020-04-20 Thread Dejin Zheng
On Sun, Apr 19, 2020 at 06:19:12PM +0200, Markus Elfring wrote:
> > use devm_platform_ioremap_resource_byname() to simplify code,
> > it contains platform_get_resource_byname() and
> > devm_ioremap_resource(), and also remove some duplicate error
> > message.
> 
> How do you think about a wording variant like the following?
> 
>Use the function “devm_platform_ioremap_resource_byname” to simplify
>source code which calls the functions “platform_get_resource_byname”
>and “devm_ioremap_resource”.
>Remove also a few error messages which became unnecessary with this
>software refactoring.
>
Markus, Thank you very much!yes, your comments is better. I will send
the patch v2. Thanks again!

> 
> Will any more contributors get into the development mood to achieve
> similar collateral evolution by the means of the semantic patch language?
> Would you like to increase applications of the Coccinelle software?
>
I want, but currently I don't have much free time, sorry!

BR,
Dejin
> Regards,
> Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci