Re: [PATCH] pinctrl: Cleanup string initializations (char[] instead of char *)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Manuel Schölling <manuel.schoelling@...> writes:

> 
> Initializations like 'char *foo = "bar"' will create two variables: a 
static
> string and a pointer (foo) to that static string. Instead 'char foo[] = 
"bar"'
> will declare a single variable and will end up in shorter
> assembly (according to Jeff Garzik on the KernelJanitor's TODO list).
> 

For globals this might be the case, but for function locals this is
actually more code since the string now needs to be copied to the stack.


--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux