linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] MIPS: Remove "weak" usage
@ 2015-07-12 23:10 Bjorn Helgaas
  2015-07-12 23:10 ` [PATCH 1/9] MIPS: CPC: Remove "weak" from mips_cpc_phys_base() and make it static Bjorn Helgaas
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Bjorn Helgaas @ 2015-07-12 23:10 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Andrew Bresticker, linux-mips, James Hogan, linux-kernel

These patches don't fix any problem I'm aware of, but I think they make the
code easier to analyze, and they reduce the likelihood of issues if MIPS
ever builds a multi-platform kernel.

Weak function declarations in header files are hard to use safely because
they make every definition weak.  If the linker sees multiple weak
definitions, it silently chooses one based on link order.  That's not a
very obvious criterion, and it can easily lead to running the wrong
version.

These patches remove the weak attribute from function declarations and 
rework the code to match.  I don't have any of these platforms, so I can't
test them, but my intent is that these should cause no functional change.

---

Bjorn Helgaas (9):
      MIPS: CPC: Remove "weak" from mips_cpc_phys_base() and make it static
      MIPS: Remove "weak" from platform_maar_init() declaration
      MIPS: VPE: Exit vpe_release() early if vpe_run() isn't defined
      MIPS: MT: Remove "weak" from vpe_run() declaration
      MIPS: Remove "weak" from get_c0_perfcount_int() declaration
      MIPS: Remove "weak" from get_c0_compare_int() declaration
      MIPS: Remove "weak" from get_c0_fdc_int() declaration
      MIPS: Remove "weak" from mips_cdmm_phys_base() declaration
      MIPS: Remove "__weak" definition from arch-specific linkage.h


 arch/mips/include/asm/cdmm.h         |    4 ++--
 arch/mips/include/asm/irq.h          |    2 +-
 arch/mips/include/asm/linkage.h      |    1 -
 arch/mips/include/asm/maar.h         |    2 +-
 arch/mips/include/asm/mips-cpc.h     |   10 ----------
 arch/mips/include/asm/time.h         |    4 ++--
 arch/mips/include/asm/vpe.h          |    2 +-
 arch/mips/kernel/cevt-r4k.c          |   11 +++++++----
 arch/mips/kernel/mips-cpc.c          |    9 ++++++++-
 arch/mips/kernel/perf_event_mipsxx.c |    7 +------
 arch/mips/kernel/time.c              |   10 +++++++++-
 arch/mips/kernel/vpe.c               |    7 ++++++-
 arch/mips/oprofile/op_model_mipsxx.c |    8 +-------
 drivers/bus/mips_cdmm.c              |   14 +++++++++++++-
 drivers/tty/mips_ejtag_fdc.c         |    9 ++++++---
 15 files changed, 58 insertions(+), 42 deletions(-)

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-07-13 21:35 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-12 23:10 [PATCH 0/9] MIPS: Remove "weak" usage Bjorn Helgaas
2015-07-12 23:10 ` [PATCH 1/9] MIPS: CPC: Remove "weak" from mips_cpc_phys_base() and make it static Bjorn Helgaas
2015-07-12 23:11 ` [PATCH 2/9] MIPS: Remove "weak" from platform_maar_init() declaration Bjorn Helgaas
2015-07-13  9:46   ` James Hogan
2015-07-12 23:11 ` [PATCH 3/9] MIPS: VPE: Exit vpe_release() early if vpe_run() isn't defined Bjorn Helgaas
2015-07-12 23:11 ` [PATCH 4/9] MIPS: MT: Remove "weak" from vpe_run() declaration Bjorn Helgaas
2015-07-13 10:27   ` James Hogan
2015-07-13 21:35     ` Bjorn Helgaas
2015-07-12 23:11 ` [PATCH 5/9] MIPS: Remove "weak" from get_c0_perfcount_int() declaration Bjorn Helgaas
2015-07-13  9:43   ` James Hogan
2015-07-13 21:13     ` Bjorn Helgaas
2015-07-12 23:11 ` [PATCH 6/9] MIPS: Remove "weak" from get_c0_compare_int() declaration Bjorn Helgaas
2015-07-13  9:36   ` James Hogan
2015-07-12 23:11 ` [PATCH 7/9] MIPS: Remove "weak" from get_c0_fdc_int() declaration Bjorn Helgaas
2015-07-13  9:31   ` James Hogan
2015-07-12 23:11 ` [PATCH 8/9] MIPS: Remove "weak" from mips_cdmm_phys_base() declaration Bjorn Helgaas
2015-07-13  9:20   ` James Hogan
2015-07-12 23:12 ` [PATCH 9/9] MIPS: Remove "__weak" definition from arch-specific linkage.h Bjorn Helgaas
2015-07-13 10:08   ` James Hogan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).