From: Geoff Levand <geoff@infradead.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: cbe-oss-dev@lists.ozlabs.org, linuxppc-dev@lists.ozlabs.org,
Nathan Whitehorn <nwhitehorn@freebsd.org>
Subject: [PATCH 1/6] powerpc/ps3: Add empty repository highmem routines
Date: Tue, 13 Jan 2015 01:00:20 +0000 [thread overview]
Message-ID: <5eea9062c9b96ef12a417959990c20b334b016e1.1421109719.git.geoff@infradead.org> (raw)
In-Reply-To: <cover.1421109719.git.geoff@infradead.org>
To avoid the need for preprocessor conditionals in C source files add a set of
empty inline repository highmem write routines to platform.h that are used when
CONFIG_PS3_REPOSITORY_WRITE is not defined.
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
arch/powerpc/platforms/ps3/platform.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index d71329a..1809cfc 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -196,6 +196,7 @@ int ps3_repository_read_highmem_size(unsigned int region_index,
int ps3_repository_read_highmem_info(unsigned int region_index,
u64 *highmem_base, u64 *highmem_size);
+#if defined (CONFIG_PS3_REPOSITORY_WRITE)
int ps3_repository_write_highmem_region_count(unsigned int region_count);
int ps3_repository_write_highmem_base(unsigned int region_index,
u64 highmem_base);
@@ -204,6 +205,18 @@ int ps3_repository_write_highmem_size(unsigned int region_index,
int ps3_repository_write_highmem_info(unsigned int region_index,
u64 highmem_base, u64 highmem_size);
int ps3_repository_delete_highmem_info(unsigned int region_index);
+#else
+static inline int ps3_repository_write_highmem_region_count(
+ unsigned int region_count) {return 0;}
+static inline int ps3_repository_write_highmem_base(unsigned int region_index,
+ u64 highmem_base) {return 0;}
+static inline int ps3_repository_write_highmem_size(unsigned int region_index,
+ u64 highmem_size) {return 0;}
+static inline int ps3_repository_write_highmem_info(unsigned int region_index,
+ u64 highmem_base, u64 highmem_size) {return 0;}
+static inline int ps3_repository_delete_highmem_info(unsigned int region_index)
+ {return 0;}
+#endif
/* repository pme info */
--
1.9.1
next prev parent reply other threads:[~2015-01-13 1:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-13 1:00 [PATCH 0/6] *** SUBJECT HERE *** Geoff Levand
2015-01-13 1:00 ` [PATCH 4/6] powerpc/ps3: Fix vuart sparse warnings Geoff Levand
2015-01-13 1:00 ` [PATCH 3/6] powerpc/ps3: Write highmem info to repository Geoff Levand
2015-01-13 3:04 ` Michael Ellerman
2015-01-13 18:33 ` Geoff Levand
2015-01-13 1:00 ` [PATCH 2/6] powerpc/ps3: Add ps3_mm_set_repository_highmem Geoff Levand
2015-01-13 1:00 ` [PATCH 5/6] powerpc/ps3: Fix sys-manager-core sparse warnings Geoff Levand
2015-01-13 1:00 ` Geoff Levand [this message]
2015-01-13 1:00 ` [PATCH 6/6] powerpc/ps3: Update ps3_defconfig Geoff Levand
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=5eea9062c9b96ef12a417959990c20b334b016e1.1421109719.git.geoff@infradead.org \
--to=geoff@infradead.org \
--cc=benh@kernel.crashing.org \
--cc=cbe-oss-dev@lists.ozlabs.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nwhitehorn@freebsd.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).