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(-) di

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 ide

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

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, lib

[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 --

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
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
as wondering how can it guarantee that the function register placement will hold? If you build the kernel with -O0 some function register allocation changes as opposed to -O2 or if you use another compiler such as Clang. In LLVMLinux we solved this by using one of Andy's solution which is

[PATCH v3] kbuild: add support to generate LLVM bitcode files

2014-09-11 Thread Vinícius Tinti
Allows kbuild to generate LLVM bitcode files using '.ll' suffix. # from c code CC=clang make kernel/pid.ll # from asm code CC=clang make arch/x86/kernel/preempt.ll Signed-off-by: Vinícius Tinti Signed-off-by: Behan Webster --- .gitignore | 1 +

Re: [PATCH v2] kbuild: add support to generate LLVM bitcode files

2014-07-23 Thread Tinti
On Wed, Jul 23, 2014 at 8:56 AM, Vinícius Tinti wrote: > Allows kbuild to generate LLVM bitcode files with the .ll extension. > > # from c code > CC=clang make kernel/pid.ll > > # from asm code > CC=clang make arch/x86/kernel/preempt.ll > > Signed-off-by: Viní

[PATCH v2] kbuild: add support to generate LLVM bitcode files

2014-07-23 Thread Vinícius Tinti
Allows kbuild to generate LLVM bitcode files with the .ll extension. # from c code CC=clang make kernel/pid.ll # from asm code CC=clang make arch/x86/kernel/preempt.ll Signed-off-by: Vinícius Tinti Signed-off-by: Behan Webster --- .gitignore | 1 + Makefile

Re: [PATCH] kbuild: add support to generate LLVM bitcode files

2014-07-21 Thread Tinti
1) Can we drop the test for $(COMPILER) here? Yes. 2) And help section should be updated to list .ll too. I will be adding it too. 3) This chunk belongs together with the other chunk. There is no reason to separate .S => .ll and .c => .ll rules. Sure. But in fact I was not able to create the .

[PATCH] kbuild: add support to generate LLVM bitcode files

2014-07-18 Thread Vinícius Tinti
Allows kbuild to generate LLVM bitcode files with the .ll extension when building with Clang. # c code CC=clang make kernel/pid.ll # asm code CC=clang make arch/arm/kernel/calls.ll Signed-off-by: Vinícius Tinti Signed-off-by: Behan Webster --- Makefile | 7

[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