Skip to contentSkip to conversation

PATCH drivers:net:cris/eth_v10: alternate string char arrary

PATCH Karim Eshapa 2 participants 4 messages Apr 24, 2017

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

static char pointer creates two variables in final assembly. static string and pointer to it according to
Jeff Garzik janitors TODO.

---
 drivers/net/cris/eth_v10.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/cris/eth_v10.c +1 -1
index 91c876a..370765f 100644
@@ -44,7 +44,7 @@
  * io regions, irqs and dma channels
  */
 
-static const char* cardname = "ETRAX 100LX built-in ethernet controller";
+static const char cardname[] = "ETRAX 100LX built-in ethernet controller";
 
 /* A default ethernet address. Highlevel SW will set the real one later */
 
Signature · 1 line
2.7.4
maintainer
#1 lore raw

From: Karim Eshapa <[email protected]>
Date: Mon, 24 Apr 2017 19:49:39 +0200

Quoted 5 lines

static char pointer creates two variables in final assembly. static string and pointer to it according to
Jeff Garzik janitors TODO.

Instead of trusting some document written more than 10 years ago on the internet, why don't you build the source file in question and take a look at what actually happens?

I'm not applying this, sorry.

#2 lore raw
In reply to Karim Eshapa
Quoted 10 lines · David Miller
Quoted 4 lines · Karim Eshapa

static char pointer creates two variables in final assembly. static string and pointer to it according to
Jeff Garzik janitors TODO.

Instead of trusting some document written more than 10 years ago on the internet, why don't you build the source file in question and take a look at what actually happens?

I've just dumped the assembly and symbols. I didn't find extraordinary difference between the two strings. sorry for that, but why is that still there in TODO kerneljanitors at kernelnewbies.

Thanks,
Karim

maintainer
#3 lore raw

From: Karim Eshapa <[email protected]>
Date: Mon, 24 Apr 2017 21:54:42 +0200

Quoted 12 lines · David Miller
Quoted 10 lines
Quoted 4 lines · Karim Eshapa

static char pointer creates two variables in final assembly. static string and pointer to it according to
Jeff Garzik janitors TODO.

Instead of trusting some document written more than 10 years ago on the internet, why don't you build the source file in question and take a look at what actually happens?

Quoted 4 lines

I've just dumped the assembly and symbols. I didn't find extraordinary difference between the two strings. sorry for that, but why is that still there in TODO kerneljanitors at kernelnewbies.

Because nobody is updating the documentation.