Re: [Intel-wired-lan] ice: Use common error handling code in two functions

2024-09-20 Thread Markus Elfring
>> Add jump targets so that a bit of exception handling can be better reused >> at the end of two function implementations. > > Thank you for contribution, the change is fine, Thanks for this positive feedback. > but not as a bugfix. Would you lik

[Intel-wired-lan] [PATCH] ice: Use common error handling code in two functions

2024-09-19 Thread Markus Elfring
From: Markus Elfring Date: Thu, 19 Sep 2024 19:00:25 +0200 Add jump targets so that a bit of exception handling can be better reused at the end of two function implementations. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/ethernet

Re: [Intel-wired-lan] [PATCH v2] ice: Fix improper handling of refcount in ice_sriov_set_msix_vec_count()

2024-09-07 Thread Markus Elfring
… > +++ b/drivers/net/ethernet/intel/ice/ice_sriov.c > @@ -1096,8 +1096,10 @@ int ice_sriov_set_msix_vec_count(struct pci_dev > *vf_dev, int msix_vec_count) > return -ENOENT; > > vsi = ice_get_vf_vsi(vf); > - if (!vsi) > + if (!vsi) { > + ice_put_vf(vf); >

Re: [Intel-wired-lan] [PATCH net-next v2] ice: Adjust over allocation of memory in ice_sched_add_root_node() and ice_sched_add_node()

2024-07-06 Thread Markus Elfring
… > 'ice_sched_node' structure. But in this calls there are 'sizeof(*root)' But there are calls for? > So memory is allocated for structures instead pointers. This lead to … of?leads? Regards, Markus

Re: [Intel-wired-lan] [PATCH] igb: Add support for firmware update

2024-06-09 Thread Markus Elfring
> This patch adds support for firmware update to the in-tree igb driver and it > is actually a port from the out-of-tree igb driver. > In-band firmware update is one of the essential system maintenance tasks. To > simplify this task, the Intel online firmware update … Please improve such a chang

Re: [Intel-wired-lan] [PATCH] ixgbe: Add support for firmware update

2024-06-09 Thread Markus Elfring
> This patch adds support for firmware update to the in-tree ixgbe driver and > it is actually a port > from the out-of-tree ixgbe driver. In-band firmware update is one of the > essential system maintenance … Please improve such a change description also according to word wrapping because of mo

Re: [Intel-wired-lan] [v2] ice: Fix freeing uninitialized pointers

2024-03-24 Thread Markus Elfring
>>> Automatically cleaned up pointers need to be initialized before exiting >>> their scope. In this case, they need to be initialized to NULL before >>> any return statement. >> >> * May we expect that compilers should report that affected variables >> were only declared here instead of appropr

Re: [Intel-wired-lan] [PATCH v2 net] ice: Fix freeing uninitialized pointers

2024-03-23 Thread Markus Elfring
> Automatically cleaned up pointers need to be initialized before exiting > their scope. In this case, they need to be initialized to NULL before > any return statement. * May we expect that compilers should report that affected variables were only declared here instead of appropriately defined

Re: [Intel-wired-lan] [v2] ice: Fix freeing uninitialized pointers

2024-03-22 Thread Markus Elfring
> Markus please don't do this. Don't take a controversial opinion and > start trying to force it on everyone via review comments and an > automatic converstion script. I dare also to point additional change possibilities out. I hope that further collateral evolution will become better supported.

Re: [Intel-wired-lan] ice: Fix freeing uninitialized pointers

2024-03-22 Thread Markus Elfring
> Does one prefer an initialization of null at the top of the function Several developers got used to such a programming approach. > or an initialization to a meaningful value in the middle of the function ? Coding style preferences are evolving more with the growing support for the discussed s

Re: [Intel-wired-lan] [PATCH v2 net] ice: Fix freeing uninitialized pointers

2024-03-21 Thread Markus Elfring
> Automatically cleaned up pointers need to be initialized before exiting > their scope. In this case, they need to be initialized to NULL before > any return statement. Will any adjustments become relevant also for this change description if scope reductions would become more appealing for affec

Re: [Intel-wired-lan] [PATCH net] ice: Fix freeing uninitialized pointers

2024-03-21 Thread Markus Elfring
>> How do you think about to reduce the scope for the affected local variable >> instead >> with the help of a small script (like the following) for the semantic patch >> language? >> >> @movement@ >> attribute name __free; >> @@ >> -u8 *tx_frame __free(kfree); >> int i; >> ... when any >> if

Re: [Intel-wired-lan] [PATCH net] ice: Fix freeing uninitialized pointers

2024-03-21 Thread Markus Elfring
> Automatically cleaned up pointers need to be initialized before exiting > their scope. In this case, they need to be initialized to NULL before > any return statement. How will development interests evolve further for such design aspects? … > +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c

Re: [Intel-wired-lan] [PATCH net] ice: Fix freeing uninitialized pointers

2024-03-20 Thread Markus Elfring
> Automatically cleaned up pointers need to be initialized before exiting > their scope. In this case, they need to be initialized to NULL before > any return statement. I suggest to reconsider such information a bit more. … > +++ b/drivers/net/ethernet/intel/ice/ice_common.c > @@ -1002,8 +1002