Re: [PATCH net-next] net: Remove unnecessary intermediate variables

2020-08-22 Thread Joe Perches
On Sat, 2020-08-22 at 14:07 -0700, David Miller wrote: > From: Joe Perches > Date: Sat, 22 Aug 2020 14:03:31 -0700 > > > The compiler didn't inline the code without it. > > Then the compiler had a good reason for doing so, The "good" word choice there is slightly dubious. Compilers make bad

Re: [PATCH net-next] net: Remove unnecessary intermediate variables

2020-08-22 Thread David Miller
From: Joe Perches Date: Sat, 22 Aug 2020 14:03:31 -0700 > The compiler didn't inline the code without it. Then the compiler had a good reason for doing so, or it's a compiler bug that should be reported. I would reject any patch that added inline to a foo.c file, so unless you want to make

Re: [PATCH net-next] net: Remove unnecessary intermediate variables

2020-08-22 Thread Joe Perches
On Sat, 2020-08-22 at 13:59 -0700, David Miller wrote: > From: Joe Perches > Date: Sat, 22 Aug 2020 13:39:28 -0700 > > > It _might_ be slightly faster to use inlines > > We are not using the inline directive in foo.c files and are letting > the compiler decide. > > Please don't give out advice

Re: [PATCH net-next] net: Remove unnecessary intermediate variables

2020-08-22 Thread David Miller
From: Joe Perches Date: Sat, 22 Aug 2020 13:39:28 -0700 > It _might_ be slightly faster to use inlines We are not using the inline directive in foo.c files and are letting the compiler decide. Please don't give out advice like this. Thank you.

Re: [PATCH net-next] net: Remove unnecessary intermediate variables

2020-08-22 Thread Joe Perches
On Sat, 2020-08-22 at 12:33 -0700, David Miller wrote: > From: Jianlin Lv > Date: Sat, 22 Aug 2020 10:04:31 +0800 > > > It is not necessary to use src/dst as an intermediate variable for > > assignment operation; Delete src/dst intermediate variables to avoid > > unnecessary variable

Re: [PATCH net-next] net: Remove unnecessary intermediate variables

2020-08-22 Thread David Miller
From: Jianlin Lv Date: Sat, 22 Aug 2020 10:04:31 +0800 > It is not necessary to use src/dst as an intermediate variable for > assignment operation; Delete src/dst intermediate variables to avoid > unnecessary variable declarations. > > Signed-off-by: Jianlin Lv It keeps the line lengths

[PATCH net-next] net: Remove unnecessary intermediate variables

2020-08-21 Thread Jianlin Lv
It is not necessary to use src/dst as an intermediate variable for assignment operation; Delete src/dst intermediate variables to avoid unnecessary variable declarations. Signed-off-by: Jianlin Lv --- drivers/net/vxlan.c | 16 1 file changed, 4 insertions(+), 12 deletions(-)