>> 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
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
…
> +++ 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);
>
…
> '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
> 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
> 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
>>> 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
> 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
> 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.
> 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
> 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
>> 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
> 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
> 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
14 matches
Mail list logo