Similar functions in net/core/dev.c

2021-02-26 Thread Vinicius Tinti
Hi, All these functions in net/core/dev.c are very similar. __netdev_walk_all_upper_dev netdev_walk_all_upper_dev_rcu netdev_walk_all_lower_dev __netdev_walk_all_lower_dev netdev_walk_all_lower_dev_rcu Can they be merged in one function? Are they a hot path? Regards, Vinicius

Re: [PATCH v3] ext4: Enable code path when DX_DEBUG is set

2021-02-03 Thread Vinicius Tinti
On Wed, Feb 3, 2021 at 2:39 AM Theodore Ts'o wrote: > > On Tue, Feb 02, 2021 at 04:28:37PM +, Vinicius Tinti wrote: > > Clang with -Wunreachable-code-aggressive is being used to try to find > > unreachable code that could cause potential bugs. There is no plan to > &

[PATCH v3] ext4: Enable code path when DX_DEBUG is set

2021-02-02 Thread Vinicius Tinti
check when DX_DEBUG is set. This allows the function to be used in other parts of the code. Suggestions from: Andreas, Christoph, Nathan, Nick and Ted. Signed-off-by: Vinicius Tinti --- fs/ext4/namei.c | 38 -- 1 file changed, 24 insertions(+), 14 deletions(-)

Re: [PATCH v2] ext4: Enable code path when DX_DEBUG is set

2021-02-01 Thread Vinicius Tinti
On Mon, Feb 1, 2021 at 6:41 PM Nick Desaulniers wrote: > > On Mon, Feb 1, 2021 at 1:38 PM Theodore Ts'o wrote: > > > > On Mon, Feb 01, 2021 at 01:16:19PM -0800, Nick Desaulniers wrote: > > > I agree; Vinicius, my recommendation for -Wunreachable-* with Clang > > > was to see whether dead code

Re: [PATCH v2] ext4: Enable code path when DX_DEBUG is set

2021-02-01 Thread Vinicius Tinti
On Mon, Feb 1, 2021 at 2:13 PM Theodore Ts'o wrote: > > On Mon, Feb 01, 2021 at 01:15:29PM -0300, Vinicius Tinti wrote: > > On Mon, Feb 1, 2021 at 9:49 AM Christoph Hellwig wrote: > > > > > > DX_DEBUG is completely dead code, so either kill it off or make it a

Re: [PATCH v2] ext4: Enable code path when DX_DEBUG is set

2021-02-01 Thread Vinicius Tinti
On Mon, Feb 1, 2021 at 9:49 AM Christoph Hellwig wrote: > > DX_DEBUG is completely dead code, so either kill it off or make it an > actual CONFIG_* symbol through Kconfig if it seems useful. About the unreachable code in "if (0)" I think it could be removed. It seems to be doing an extra check.

[PATCH v2] ext4: Enable code path when DX_DEBUG is set

2021-01-31 Thread Vinicius Tinti
// linear search cross check ^ /* DISABLES CODE */ ( ) Signed-off-by: Vinicius Tinti --- fs/ext4/namei.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index cf652ba3e74d..46

Re: [PATCH] drm/i915: Remove unreachable code

2021-01-31 Thread Vinicius Tinti
On Sat, Jan 30, 2021 at 9:45 AM Chris Wilson wrote: > > Quoting Vinicius Tinti (2021-01-30 12:34:11) > > On Fri, Jan 29, 2021 at 08:55:54PM +, Chris Wilson wrote: > > > Quoting Vinicius Tinti (2021-01-29 18:15:19) > > > > By enabling -Wunreachable-code-aggre

Re: [PATCH] drm/i915: Remove unreachable code

2021-01-30 Thread Vinicius Tinti
On Fri, Jan 29, 2021 at 08:55:54PM +, Chris Wilson wrote: > Quoting Vinicius Tinti (2021-01-29 18:15:19) > > By enabling -Wunreachable-code-aggressive on Clang the following code > > paths are unreachable. > > That code exists as commentary and, especially for sdvo

[PATCH] ext4: Remove unreachable code

2021-01-29 Thread Vinicius Tinti
r search cross check ^ /* DISABLES CODE */ ( ) Signed-off-by: Vinicius Tinti --- fs/ext4/namei.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index cf652ba3e74d..1f64dbd7237b 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei

[PATCH] drm/i915: Remove unreachable code

2021-01-29 Thread Vinicius Tinti
dvo.c:696:13: warning: unused function 'intel_sdvo_set_encoder_power_state' [-Wunused-function] static bool intel_sdvo_set_encoder_power_state(struct intel_sdvo *intel_sdvo, ^ Signed-off-by: Vinicius Tinti --- drivers/gpu/drm/i915/display/intel_sdvo.c | 30 - d

Re: [PATCH] x86: Avoid undefined behavior in macro expansion

2016-03-21 Thread Vinicius Tinti
On Fri, Mar 18, 2016 at 11:15 PM, Al Viro <v...@zeniv.linux.org.uk> wrote: > On Wed, Mar 16, 2016 at 11:48:49PM -0300, Vinicius Tinti wrote: >> C11 standard (at 6.10.3.3) says that ## operator (paste) has undefined >> behavior when one of the result operands is not a valid p

Re: [PATCH] x86: Avoid undefined behavior in macro expansion

2016-03-21 Thread Vinicius Tinti
On Fri, Mar 18, 2016 at 11:15 PM, Al Viro wrote: > On Wed, Mar 16, 2016 at 11:48:49PM -0300, Vinicius Tinti wrote: >> C11 standard (at 6.10.3.3) says that ## operator (paste) has undefined >> behavior when one of the result operands is not a valid preprocessing >> token. >

[PATCH] x86: Avoid undefined behavior in macro expansion

2016-03-19 Thread Vinicius Tinti
in kernel use CONCAT(a,b) instead of CONCAT(a, b). Changing favors concise usage. Signed-off-by: Vinicius Tinti <viniciusti...@gmail.com> Acked-by: Behan Webster <beh...@converseincode.com> --- arch/x86/crypto/aes_ctrby8_avx-x86_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] x86: Avoid undefined behavior in macro expansion

2016-03-19 Thread Vinicius Tinti
in kernel use CONCAT(a,b) instead of CONCAT(a, b). Changing favors concise usage. Signed-off-by: Vinicius Tinti Acked-by: Behan Webster --- arch/x86/crypto/aes_ctrby8_avx-x86_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/crypto/aes_ctrby8_avx-x86_64.S b/arch/x86

Re: [PATCH] arm64: annotate psci invoke functions as notrace

2015-04-19 Thread Vinicius Tinti
On Tue, Feb 24, 2015 at 3:11 PM, Mark Rutland wrote: > On Tue, Feb 24, 2015 at 05:59:50PM +, Richard W.M. Jones wrote: >> On Wed, Feb 18, 2015 at 12:26:38PM -0500, Kyle McMartin wrote: >> > Using GCC 5 to build the kernel with ftrace enabled, we encounter the >> > following error as a result

Re: [PATCH] arm64: annotate psci invoke functions as notrace

2015-04-19 Thread Vinicius Tinti
On Tue, Feb 24, 2015 at 3:11 PM, Mark Rutland mark.rutl...@arm.com wrote: On Tue, Feb 24, 2015 at 05:59:50PM +, Richard W.M. Jones wrote: On Wed, Feb 18, 2015 at 12:26:38PM -0500, Kyle McMartin wrote: Using GCC 5 to build the kernel with ftrace enabled, we encounter the following error

[PATCH 1/1] arm: remove extra semicolon in if statement

2013-02-28 Thread Vinicius Tinti
Remove extra semicolon in perf_event.c if statement. Signed-off-by: Vinicius Tinti --- arch/arm/kernel/perf_event.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 31e0eb3..a892067 100644 --- a/arch/arm

[PATCH 1/1] arm: remove extra semicolon in if statement

2013-02-28 Thread Vinicius Tinti
Remove extra semicolon in perf_event.c if statement. Signed-off-by: Vinicius Tinti viniciusti...@gmail.com --- arch/arm/kernel/perf_event.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 31e0eb3..a892067