Skip to contentSkip to conversation

Build: Scripts/Makefile: Remove Repeated Lines

PATCH In review Progyan Bhattacharya 3 participants 6 messages Feb 14, 2018 – Feb 15, 2018 3 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Build: Scripts/Makefile: Remove Repeated Lines

Last two lines of code was repreated and was causing build error.

Cc Arnd Bergmann <[email protected]>
Cc Daniel Golle <[email protected]>
Cc Joe Perches <[email protected]>
Cc Neil Armstrong <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Stephen Rothwell <[email protected]>
---
 scripts/Makefile.kasan | 4 ----
 1 file changed, 4 deletions(-)
scripts/Makefile.kasan +0 -4
index b7b9ecef44cc..69552a39951d 100644
@@ -45,7 +45,3 @@ endif
 CFLAGS_KASAN_NOSANITIZE := -fno-builtin
 
 endif
-
-CFLAGS_KASAN_NOSANITIZE := -fno-builtin
-
-endif
Signature · 1 line
2.16.1
#1 lore raw

Hi Progyan,

Quoted 29 lines · On Wed, 14 Feb 2018 14:55:58 +0530 Progyan Bhattacharya <[email protected]>…

Last two lines of code was repreated and was causing build error.

Cc Arnd Bergmann <[email protected]>
Cc Daniel Golle <[email protected]>
Cc Joe Perches <[email protected]>
Cc Neil Armstrong <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Stephen Rothwell <[email protected]>
---
 scripts/Makefile.kasan | 4 ----
 1 file changed, 4 deletions(-)
scripts/Makefile.kasan +0 -4
index b7b9ecef44cc..69552a39951d 100644
@@ -45,7 +45,3 @@ endif
 CFLAGS_KASAN_NOSANITIZE := -fno-builtin
 
 endif
-
-CFLAGS_KASAN_NOSANITIZE := -fno-builtin
-
-endif
Signature · 1 line
2.16.1

This file in linux-next and Linus' tree does not have the repeated lines. What tree did you see this in?

Signature · 2 lines
Cheers,
Stephen Rothwell

A message that is not in the archive (sent off-list or not yet received): CAGyWO1-9scERtpPw5CCwQcUbCU0SpcqpNq2eiBWRtwpRC-kB-A@mail.gmail.com

#3 lore raw

Hi Progyan,

Quoted 4 lines · On Thu, 15 Feb 2018 09:50:03 +0530 Progyan Bhattacharya <[email protected]>…

The last commit I have in here:

8396647363e1 (origin/next, next) Add linux-next specific files for 20180206

I don't know where you got that from, as my copy of that commit has SHA1 417c85c22818aefd973fa957b62fb1fe081404dd (as does the copy on git.kernel.org). So you do not have a clean copy of the linux-next tree.

Quoted 2 lines

It was not building properly because of repeated lines in scripts/Makefile.kasan

That file is also correct in my next-20180206.

Quoted 2 lines

PS: I have another question, Is use of range expression within case statements allowed in Kernel? If not, are we using If-Else ladder for that?

I am not sure if we have a policy on ranges in case labels, but it is not standard C (well, C11 at least). If-else ladders are certainly common.

Signature · 2 lines
Cheers,
Stephen Rothwell
#4 lore raw
Quoted 11 lines · Stephen Rothwell

Hi Progyan,

Quoted 4 lines · On Thu, 15 Feb 2018 09:50:03 +0530 Progyan Bhattacharya <[email protected]>…

PS: I have another question, Is use of range expression within case statements allowed in Kernel? If not, are we using If-Else ladder for that?

I am not sure if we have a policy on ranges in case labels, but it is not standard C (well, C11 at least). If-else ladders are certainly common.

I found 964 case ranges in 4.16-rc1.

or you use something like:

	switch (val) {
	case 5:
	case 10:
	case 15:
		// handle multiples of 5:
		break;
	default:
	}
Signature · 1 line
~Randy

A message that is not in the archive (sent off-list or not yet received): CAGyWO1_tmrSB8WwyARGWXhYCz=SL-xqqU4d3Y0A1vqGWQ_8Trg@mail.gmail.com

#6 lore raw
Quoted 7 lines · Progyan Bhattacharya

I think some merge error happened in my local workspace.

Yes the file is correct in Linus's tree as well as current HEAD of linux-next. Thanks.
I will update my tree accordingly.

About the nonstandard range statements in case, should I rewrite them. I think If-Else will be easier to read and understand.

I don't see a need for any such change.

Signature · 1 line
~Randy

A message that is not in the archive (sent off-list or not yet received): CAGyWO1-356ncU=122yrqCoL96pCVfaqJwdFvkmqfot3fzVF6pg@mail.gmail.com

#8 lore raw

Hi Progyan,

Quoted 5 lines · On Thu, 15 Feb 2018 10:04:18 +0530 Progyan Bhattacharya <[email protected]>…

I did some ground work and found this particular commit that causing the error.

Commit Hash: d96977a8c2266792397ed9814bb84b5129a278ad

That hash does not appear in linux-next (or Linus' tree).

Quoted 10 lines

Commit Body:

kasan: rework Kconfig settings

We get a lot of very large stack frames using gcc-7.0.1 with the default -fsanitize-address-use-after-scope --param asan-stack=1 options, which can easily cause an overflow of the kernel stack, e.g....

Author(s):

Quoted 10 lines
Cc Mauro Carvalho Chehab <[email protected]>
Cc Andrey Ryabinin <[email protected]>
Cc Alexander Potapenko <[email protected]>
Cc Dmitry Vyukov <[email protected]>
Cc Andrey Konovalov <[email protected]>

That patch is in Linus' tree now (was in linux-next) but has SHA1 e7c52b84fb18

Signature · 2 lines
Cheers,
Stephen Rothwell