Re: drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer()

2017-10-24 Thread Daniele Nicolodi
On 10/24/17 9:01 AM, SF Markus Elfring wrote: >>> Do you prefer to delegate the proposed software refactoring >>> only to a corresponding optimiser? >> >> yes. > > Will any applications around the semantic patch language > (Coccinelle software) fit also in the preferred tool category? What do you

Re: [PATCH] misc: bh1770glc: Use common error handling code in bh1770_power_state_store()

2017-10-27 Thread Daniele Nicolodi
On 10/27/17 10:20 AM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Fri, 27 Oct 2017 18:00:31 +0200 > > Adjust jump targets so that a bit of exception handling can be better > reused in an if branch of this function. What is the benefit brought by this change? Anyhow, are you seriousl

Re: [media] bt8xx: One function call less in bttv_input_init() after error detection

2016-12-12 Thread Daniele Nicolodi
On 12/12/16 10:15 AM, SF Markus Elfring wrote: >>> I suggest to check return values immediately after each function call. >>> An error situation can be detected earlier then and only the required >>> clean-up functionality will be executed at the end. >> >> Which improvement does this bring? > > *

Re: Clarification for acceptance statistics?

2016-12-12 Thread Daniele Nicolodi
On 12/12/16 11:03 AM, SF Markus Elfring wrote: >> Have you proposed a similar patch that was accepted? > > Yes. - It happened a few times. The question was: have you ever had a patch changing code in the form { a = kmalloc(...); b = kmalloc(...); if (!a || !b)

Re: Clarification for acceptance statistics?

2016-12-12 Thread Daniele Nicolodi
On 12/12/16 3:11 PM, SF Markus Elfring wrote: >>> It is really needed to clarify the corresponding software development >>> history any further? >> >> It is relevant because you are submitting a patch and your changelog >> implies that it makes the code follow some code structure rule that >> needs

Re: [PATCH 1/4] [media] bt8xx: One function call less in bttv_input_init() after error detection

2016-12-10 Thread Daniele Nicolodi
On 10/12/16 13:48, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 10 Dec 2016 09:29:24 +0100 > > The kfree() function was called in one case by the > bttv_input_init() function during error handling > even if the passed variable contained a null pointer. kfree() is safe to call on

Re: [media] bt8xx: One function call less in bttv_input_init() after error detection

2016-12-11 Thread Daniele Nicolodi
On 10/12/16 15:10, SF Markus Elfring wrote: >> Despite that, you have found several instances of similar constructs: > > Yes. - Special source code search pattern can point such places out > for further considerations. This is one of the things that makes reviewing the patches you submit quire an

Re: [media] bt8xx: One function call less in bttv_input_init() after error detection

2016-12-11 Thread Daniele Nicolodi
On 12/12/16 00:33, SF Markus Elfring wrote: >>> I would prefer a safer coding style for the corresponding >>> exception handling. >> >> Can you please point out what is wrong in the current code > > Is it useful to reconsider the software situation that another memory > allocation is attempted whe

Re: [PATCH v2 1/2] staging: speakup: Added blank line after function/struct/union/enum declarations

2017-03-13 Thread Daniele Nicolodi
Hello, On 3/13/17 2:40 PM, Arushi Singhal wrote: > This patch fixes the warnings reported by checkpatch.pl > for please use a blank line after function/struct/union/enum > declarations. I haven't seen this pointed out by others before: starting a commit message with "This patch..." is redundant (

Re: [media] spca500: Use common error handling code in spca500_synch310()

2017-09-22 Thread Daniele Nicolodi
On 9/22/17 11:46 AM, SF Markus Elfring wrote: They are both equally uninformative. >>> >>> Which identifier would you find appropriate there? >> >> error was fine. > > How do the different views fit together? You want to change something. Changing something requires to spend energy. You ne