linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaro Koskinen <aaro.koskinen@iki.fi>
To: Ralf Baechle <ralf@linux-mips.org>,
	Paul Burton <paul.burton@mips.com>,
	James Hogan <jhogan@kernel.org>,
	linux-mips@linux-mips.org
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Subject: [PATCH 14/24] MIPS: OCTEON: make cvmx_bootmem_alloc_range static
Date: Thu, 22 Nov 2018 00:37:35 +0200	[thread overview]
Message-ID: <20181121223745.22792-15-aaro.koskinen@iki.fi> (raw)
In-Reply-To: <20181121223745.22792-1-aaro.koskinen@iki.fi>

Make cvmx_bootmem_alloc_range() static, it's not used outside the file.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
 .../mips/cavium-octeon/executive/cvmx-bootmem.c | 17 +++++++++++++++--
 arch/mips/include/asm/octeon/cvmx-bootmem.h     | 16 ----------------
 2 files changed, 15 insertions(+), 18 deletions(-)

diff --git a/arch/mips/cavium-octeon/executive/cvmx-bootmem.c b/arch/mips/cavium-octeon/executive/cvmx-bootmem.c
index 94d97ebfa036..c2dbf0b8b909 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-bootmem.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-bootmem.c
@@ -122,8 +122,21 @@ static uint64_t cvmx_bootmem_phy_get_next(uint64_t addr)
 	return cvmx_read64_uint64((addr + NEXT_OFFSET) | (1ull << 63));
 }
 
-void *cvmx_bootmem_alloc_range(uint64_t size, uint64_t alignment,
-			       uint64_t min_addr, uint64_t max_addr)
+/**
+ * Allocate a block of memory from the free list that was
+ * passed to the application by the bootloader within a specified
+ * address range. This is an allocate-only algorithm, so
+ * freeing memory is not possible. Allocation will fail if
+ * memory cannot be allocated in the requested range.
+ *
+ * @size:      Size in bytes of block to allocate
+ * @min_addr:  defines the minimum address of the range
+ * @max_addr:  defines the maximum address of the range
+ * @alignment: Alignment required - must be power of 2
+ * Returns pointer to block of memory, NULL on error
+ */
+static void *cvmx_bootmem_alloc_range(uint64_t size, uint64_t alignment,
+				      uint64_t min_addr, uint64_t max_addr)
 {
 	int64_t address;
 	address =
diff --git a/arch/mips/include/asm/octeon/cvmx-bootmem.h b/arch/mips/include/asm/octeon/cvmx-bootmem.h
index 72d2e403a6e4..b762040159a1 100644
--- a/arch/mips/include/asm/octeon/cvmx-bootmem.h
+++ b/arch/mips/include/asm/octeon/cvmx-bootmem.h
@@ -173,22 +173,6 @@ extern void *cvmx_bootmem_alloc(uint64_t size, uint64_t alignment);
 extern void *cvmx_bootmem_alloc_address(uint64_t size, uint64_t address,
 					uint64_t alignment);
 
-/**
- * Allocate a block of memory from the free list that was
- * passed to the application by the bootloader within a specified
- * address range. This is an allocate-only algorithm, so
- * freeing memory is not possible. Allocation will fail if
- * memory cannot be allocated in the requested range.
- *
- * @size:      Size in bytes of block to allocate
- * @min_addr:  defines the minimum address of the range
- * @max_addr:  defines the maximum address of the range
- * @alignment: Alignment required - must be power of 2
- * Returns pointer to block of memory, NULL on error
- */
-extern void *cvmx_bootmem_alloc_range(uint64_t size, uint64_t alignment,
-				      uint64_t min_addr, uint64_t max_addr);
-
 /**
  * Frees a previously allocated named bootmem block.
  *
-- 
2.17.0

  parent reply	other threads:[~2018-11-21 22:38 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21 22:37 [PATCH 00/24] MIPS: OCTEON: cleanups Aaro Koskinen
2018-11-21 22:37 ` [PATCH 01/24] MIPS: OCTEON: cvmx-l2c: make cvmx_l2c_spinlock static Aaro Koskinen
2018-11-21 22:37 ` [PATCH 02/24] MIPS: OCTEON: setup: make internal functions and data static Aaro Koskinen
2018-11-21 22:37 ` [PATCH 03/24] MIPS: OCTEON: setup: include asm/fw/fw.h Aaro Koskinen
2018-11-21 22:37 ` [PATCH 04/24] MIPS: OCTEON: setup: include asm/prom.h Aaro Koskinen
2018-11-21 22:37 ` [PATCH 05/24] MIPS: OCTEON: cvmx-helper: make __cvmx_helper_errata_fix_ipd_ptr_alignment static Aaro Koskinen
2018-11-21 22:37 ` [PATCH 06/24] MIPS: OCTEON: delete unused loopback configuration functions Aaro Koskinen
2018-11-21 22:37 ` [PATCH 07/24] MIPS: OCTEON: octeon-platform: make octeon_ids static Aaro Koskinen
2018-11-21 22:37 ` [PATCH 08/24] MIPS: OCTEON: octeon-platform: fix typing Aaro Koskinen
2018-11-21 22:37 ` [PATCH 09/24] MIPS: OCTEON: octeon-irq: make octeon_irq_ciu3_set_affinity() static Aaro Koskinen
2018-11-21 22:37 ` [PATCH 10/24] MIPS: OCTEON: csrc-octeon: include linux/sched/clock.h Aaro Koskinen
2018-11-21 22:37 ` [PATCH 11/24] MIPS: OCTEON: smp: make internal symbols static Aaro Koskinen
2018-11-21 22:37 ` [PATCH 12/24] MIPS: OCTEON: cvmx-helper-util: delete cvmx_helper_dump_packet Aaro Koskinen
2018-11-21 22:37 ` [PATCH 13/24] MIPS: OCTEON: cvmx-helper-util: make cvmx_helper_setup_red_queue static Aaro Koskinen
2018-11-21 22:37 ` Aaro Koskinen [this message]
2018-11-21 22:37 ` [PATCH 15/24] MIPS: OCTEON: cvmx-bootmem: delete unused functions Aaro Koskinen
2018-11-21 22:37 ` [PATCH 16/24] MIPS: OCTEON: cvmx-bootmem: move code to avoid forward declarations Aaro Koskinen
2018-11-21 22:37 ` [PATCH 17/24] MIPS: OCTEON: cvmx-bootmem: make more functions static Aaro Koskinen
2018-11-21 22:37 ` [PATCH 18/24] MIPS: OCTEON: delete cvmx override functions Aaro Koskinen
2018-11-21 22:37 ` [PATCH 19/24] MIPS: OCTEON: gmxx-defs.h: delete unused functions and macros Aaro Koskinen
2018-11-21 22:37 ` [PATCH 20/24] MIPS: OCTEON: cvmx-gmxx-defs.h: delete unused unions Aaro Koskinen
2018-11-21 22:37 ` [PATCH 21/24] MIPS: OCTEON: cvmx-gmxx-defs.h: delete unused union fields Aaro Koskinen
2018-11-21 22:37 ` [PATCH 22/24] MIPS: OCTEON: cvmx-gmxx-defs.h: use default register value return when possible Aaro Koskinen
2018-11-21 22:37 ` [PATCH 23/24] MIPS: OCTEON: cvmx-ciu2-defs.h: delete unused macros Aaro Koskinen
2018-11-21 22:37 ` [PATCH 24/24] MIPS: OCTEON: cvmx-ciu2-defs.h: delete unused unions Aaro Koskinen
2018-11-21 23:43 ` [PATCH 00/24] MIPS: OCTEON: cleanups Paul Burton
2018-11-21 23:43   ` Paul Burton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181121223745.22792-15-aaro.koskinen@iki.fi \
    --to=aaro.koskinen@iki.fi \
    --cc=jhogan@kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=paul.burton@mips.com \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).