Skip to content

Commit

Permalink
Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/cmetcalf/linux-tile

Pull arch/tile fixes from Chris Metcalf:
 "One change fixes a platform-independent bug about environment var
  handling in the boot command line.  The other is a trivial
  tile-specific bug fix to avoid a link-time warning."

* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  arch/tile: fix a couple of functions that should be __init
  init: fix bug where environment vars can't be passed via boot args
  • Loading branch information
Linus Torvalds committed Apr 26, 2012
2 parents ebcf596 + 05ef1b7 commit 82b7690
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions arch/tile/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ struct pci_controller {
*/
#define PCI_DMA_BUS_IS_PHYS 1

int __devinit tile_pci_init(void);
int __devinit pcibios_init(void);
int __init tile_pci_init(void);
int __init pcibios_init(void);

static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) {}

Expand Down
4 changes: 2 additions & 2 deletions arch/tile/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static int __devinit tile_init_irqs(int controller_id,
*
* Returns the number of controllers discovered.
*/
int __devinit tile_pci_init(void)
int __init tile_pci_init(void)
{
int i;

Expand Down Expand Up @@ -287,7 +287,7 @@ static void __devinit fixup_read_and_payload_sizes(void)
* The controllers have been set up by the time we get here, by a call to
* tile_pci_init.
*/
int __devinit pcibios_init(void)
int __init pcibios_init(void)
{
int i;

Expand Down
25 changes: 13 additions & 12 deletions init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,9 @@ static int __init loglevel(char *str)

early_param("loglevel", loglevel);

/*
* Unknown boot options get handed to init, unless they look like
* unused parameters (modprobe will find them in /proc/cmdline).
*/
static int __init unknown_bootoption(char *param, char *val)
/* Change NUL term back to "=", to make "param" the whole string. */
static int __init repair_env_string(char *param, char *val)
{
/* Change NUL term back to "=", to make "param" the whole string. */
if (val) {
/* param=val or param="val"? */
if (val == param+strlen(param)+1)
Expand All @@ -243,6 +239,16 @@ static int __init unknown_bootoption(char *param, char *val)
} else
BUG();
}
return 0;
}

/*
* Unknown boot options get handed to init, unless they look like
* unused parameters (modprobe will find them in /proc/cmdline).
*/
static int __init unknown_bootoption(char *param, char *val)
{
repair_env_string(param, val);

/* Handle obsolete-style parameters */
if (obsolete_checksetup(param))
Expand Down Expand Up @@ -732,11 +738,6 @@ static char *initcall_level_names[] __initdata = {
"late parameters",
};

static int __init ignore_unknown_bootoption(char *param, char *val)
{
return 0;
}

static void __init do_initcall_level(int level)
{
extern const struct kernel_param __start___param[], __stop___param[];
Expand All @@ -747,7 +748,7 @@ static void __init do_initcall_level(int level)
static_command_line, __start___param,
__stop___param - __start___param,
level, level,
ignore_unknown_bootoption);
repair_env_string);

for (fn = initcall_levels[level]; fn < initcall_levels[level+1]; fn++)
do_one_initcall(*fn);
Expand Down

0 comments on commit 82b7690

Please sign in to comment.