Re: Drivers: hv: vmbus: One function call less in create_gpadl_header() after error detection

2024-01-10 Thread Dan Carpenter
On Wed, Jan 10, 2024 at 10:17:17PM +, Michael Kelley wrote: > From: Dan Carpenter Sent: Wednesday, January 10, > 2024 10:38 AM > > > > The second half of the if statement is basically duplicated. It doesn't > > need to be treated as a special case. We could do something like below. > > I d

Re: [PATCH 3/4 net-next] net: mana: add a function to spread IRQs per CPUs

2024-01-10 Thread Souradeep Chakrabarti
On Wed, Jan 10, 2024 at 12:27:54AM +, Michael Kelley wrote: > From: Yury Norov Sent: Tuesday, January 9, 2024 3:29 PM > > > > Hi Michael, > > > > So, I'm just a guy who helped to formulate the heuristics in an > > itemized form, and implement them using the existing kernel API. > > I have no

RE: Drivers: hv: vmbus: One function call less in create_gpadl_header() after error detection

2024-01-10 Thread Michael Kelley
From: Dan Carpenter Sent: Wednesday, January 10, 2024 10:38 AM > > The second half of the if statement is basically duplicated. It doesn't > need to be treated as a special case. We could do something like below. > I deliberately didn't delete the tabs. Also I haven't tested it. Indeed! I l

Re: Drivers: hv: vmbus: One function call less in create_gpadl_header() after error detection

2024-01-10 Thread Dan Carpenter
The second half of the if statement is basically duplicated. It doesn't need to be treated as a special case. We could do something like below. I deliberately didn't delete the tabs. Also I haven't tested it. regards, dan carpenter diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index

RE: Drivers: hv: vmbus: One function call less in create_gpadl_header() after error detection

2024-01-10 Thread Michael Kelley
From: Markus Elfring Sent: Wednesday, January 10, 2024 9:08 AM > > > It occurred to me overnight that the existing error handling > > in create_gpadl_header() is unnecessarily complicated. Here's > > an approach that I think would fix what you have flagged, and > > would reduce complexity inste

Re: Drivers: hv: vmbus: One function call less in create_gpadl_header() after error detection

2024-01-10 Thread Markus Elfring
> It occurred to me overnight that the existing error handling > in create_gpadl_header() is unnecessarily complicated. Here's > an approach that I think would fix what you have flagged, and > would reduce complexity instead of increasing it. Thoughts? I find this development view interesting.

RE: Drivers: hv: vmbus: One function call less in create_gpadl_header() after error detection

2024-01-10 Thread Michael Kelley
From: Markus Elfring Sent: Wednesday, January 10, 2024 2:58 AM > > >> The kfree() function was called in two cases by > >> the create_gpadl_header() function during error handling > >> even if the passed variable contained a null pointer. > >> This issue was detected by using the Coccinelle soft

Re: [PATCH] Drivers: hv: vmbus: One function call less in create_gpadl_header() after error detection

2024-01-10 Thread Dan Carpenter
On Wed, Jan 10, 2024 at 05:41:00AM +, Michael Kelley wrote: > From: Markus Elfring Sent: Tuesday, December 26, 2023 > 11:09 AM > > > > The kfree() function was called in two cases by > > the create_gpadl_header() function during error handling > > even if the passed variable contained a null

Re: Drivers: hv: vmbus: One function call less in create_gpadl_header() after error detection

2024-01-10 Thread Markus Elfring
>> The kfree() function was called in two cases by >> the create_gpadl_header() function during error handling >> even if the passed variable contained a null pointer. >> This issue was detected by using the Coccinelle software. >> >> Thus use another label. > > Interestingly, there's a third case

Re: [PATCH 3/4 net-next] net: mana: add a function to spread IRQs per CPUs

2024-01-10 Thread Souradeep Chakrabarti
On Tue, Jan 09, 2024 at 03:28:59PM -0800, Yury Norov wrote: > Hi Michael, > > So, I'm just a guy who helped to formulate the heuristics in an > itemized form, and implement them using the existing kernel API. > I have no access to MANA machines and I ran no performance tests > myself. > > On Tue,

Re: [PATCH 3/4 net-next] net: mana: add a function to spread IRQs per CPUs

2024-01-10 Thread Souradeep Chakrabarti
On Tue, Jan 09, 2024 at 08:20:31PM +, Haiyang Zhang wrote: > > > > -Original Message- > > From: Michael Kelley > > Sent: Tuesday, January 9, 2024 2:23 PM > > To: Souradeep Chakrabarti ; KY Srinivasan > > ; Haiyang Zhang ; > > wei@kernel.org; Dexuan Cui ; > > da...@davemloft.net;