Skip to content

Commit

Permalink
MIPS: CPC: Remove "weak" from mips_cpc_phys_base() and make it static
Browse files Browse the repository at this point in the history
There's only one implementation of mips_cpc_phys_base(), and it's only used
within the same file, so it doesn't need to be weak, and it doesn't need an
extern declaration.

Remove the extern mips_cpc_phys_base() declaration and make it static.

[[email protected]: Fixed conflict.]

Signed-off-by: Bjorn Helgaas <[email protected]>
CC: [email protected]
Cc: Andrew Bresticker <[email protected]>
Cc: James Hogan <[email protected]>
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/10681/
Signed-off-by: Ralf Baechle <[email protected]>
  • Loading branch information
bjorn-helgaas authored and ralfbaechle committed Aug 26, 2015
1 parent 9b4685d commit 8dedde6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
10 changes: 0 additions & 10 deletions arch/mips/include/asm/mips-cpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@ extern void __iomem *mips_cpc_base;
*/
extern phys_addr_t mips_cpc_default_phys_base(void);

/**
* mips_cpc_phys_base - retrieve the physical base address of the CPC
*
* This function returns the physical base address of the Cluster Power
* Controller memory mapped registers, or 0 if no Cluster Power Controller
* is present. It may be overriden by individual platforms which determine
* this address in a different way.
*/
extern phys_addr_t __weak mips_cpc_phys_base(void);

/**
* mips_cpc_probe - probe for a Cluster Power Controller
*
Expand Down
9 changes: 8 additions & 1 deletion arch/mips/kernel/mips-cpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ static DEFINE_PER_CPU_ALIGNED(spinlock_t, cpc_core_lock);

static DEFINE_PER_CPU_ALIGNED(unsigned long, cpc_core_lock_flags);

phys_addr_t __weak mips_cpc_phys_base(void)
/**
* mips_cpc_phys_base - retrieve the physical base address of the CPC
*
* This function returns the physical base address of the Cluster Power
* Controller memory mapped registers, or 0 if no Cluster Power Controller
* is present.
*/
static phys_addr_t mips_cpc_phys_base(void)
{
unsigned long cpc_base;

Expand Down

0 comments on commit 8dedde6

Please sign in to comment.