All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Child <nnac123@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Nick Child <nick.child@ibm.com>, dja@axtens.net
Subject: [PATCH v2 20/20] cuda/pmu: Make find_via_cuda/pmu init functions
Date: Thu, 16 Dec 2021 17:00:35 -0500	[thread overview]
Message-ID: <20211216220035.605465-21-nick.child@ibm.com> (raw)
In-Reply-To: <20211216220035.605465-1-nick.child@ibm.com>

Make `find_via_cuda` and `find_via_pmu` initialization functions.
Previously, their definitions in `drivers/macintosh/via-cuda.h` include
the `__init` attribute but their alternative definitions in
`arch/powerpc/powermac/sectup./c` and prototypes in `include/linux/
cuda.h` and `include/linux/pmu.h` do not use the `__init` macro. Since,
only initialization functions call `find_via_cuda` and `find_via_pmu`
it is safe to label these functions with `__init`.

Signed-off-by: Nick Child <nick.child@ibm.com>
---
 arch/powerpc/platforms/powermac/setup.c | 4 ++--
 include/linux/cuda.h                    | 2 +-
 include/linux/pmu.h                     | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index f7661b81db18..974d4b49867b 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -166,7 +166,7 @@ static void pmac_show_cpuinfo(struct seq_file *m)
 }
 
 #ifndef CONFIG_ADB_CUDA
-int find_via_cuda(void)
+int __init find_via_cuda(void)
 {
 	struct device_node *dn = of_find_node_by_name(NULL, "via-cuda");
 
@@ -180,7 +180,7 @@ int find_via_cuda(void)
 #endif
 
 #ifndef CONFIG_ADB_PMU
-int find_via_pmu(void)
+int __init find_via_pmu(void)
 {
 	struct device_node *dn = of_find_node_by_name(NULL, "via-pmu");
 
diff --git a/include/linux/cuda.h b/include/linux/cuda.h
index 45bfe9d61271..daf3e6f98444 100644
--- a/include/linux/cuda.h
+++ b/include/linux/cuda.h
@@ -12,7 +12,7 @@
 #include <uapi/linux/cuda.h>
 
 
-extern int find_via_cuda(void);
+extern int __init find_via_cuda(void);
 extern int cuda_request(struct adb_request *req,
 			void (*done)(struct adb_request *), int nbytes, ...);
 extern void cuda_poll(void);
diff --git a/include/linux/pmu.h b/include/linux/pmu.h
index 52453a24a24f..c677442d007c 100644
--- a/include/linux/pmu.h
+++ b/include/linux/pmu.h
@@ -13,7 +13,7 @@
 #include <uapi/linux/pmu.h>
 
 
-extern int find_via_pmu(void);
+extern int __init find_via_pmu(void);
 
 extern int pmu_request(struct adb_request *req,
 		void (*done)(struct adb_request *), int nbytes, ...);
-- 
2.25.1


  parent reply	other threads:[~2021-12-16 22:14 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-16 22:00 [PATCH v2 00/20] powerpc: Define eligible functions as __init Nick Child
2021-12-16 22:00 ` [PATCH v2 01/20] powerpc/kernel: Add __init attribute to eligible functions Nick Child
2021-12-16 22:00 ` [PATCH v2 02/20] powerpc/lib: " Nick Child
2021-12-16 22:00 ` [PATCH v2 03/20] powerpc/mm: " Nick Child
2021-12-16 22:00 ` [PATCH v2 04/20] powerpc/perf: " Nick Child
2021-12-16 22:00 ` [PATCH v2 05/20] powerpc/sysdev: " Nick Child
2021-12-16 22:00 ` [PATCH v2 06/20] powerpc/xmon: " Nick Child
2021-12-16 22:00 ` [PATCH v2 07/20] powerpc/cell: " Nick Child
2021-12-16 22:00 ` [PATCH v2 08/20] powerpc/chrp: " Nick Child
2021-12-16 22:00 ` [PATCH v2 09/20] powerpc/pasemi: " Nick Child
2021-12-16 22:00 ` [PATCH v2 10/20] powerpc/powermac: " Nick Child
2021-12-16 22:00 ` [PATCH v2 11/20] powerpc/powernv: " Nick Child
2021-12-16 22:00 ` [PATCH v2 12/20] powerpc/pseries: " Nick Child
2021-12-16 22:00 ` [PATCH v2 13/20] powerpc/ps3: " Nick Child
2021-12-16 22:00 ` [PATCH v2 14/20] powerpc/4xx: " Nick Child
2021-12-16 22:00 ` [PATCH v2 15/20] powerpc/44x: " Nick Child
2021-12-16 22:00 ` [PATCH v2 16/20] powerpc/embedded6xx: " Nick Child
2021-12-16 22:00 ` [PATCH v2 17/20] powerpc/83xx: " Nick Child
2021-12-16 22:00 ` [PATCH v2 18/20] powerpc/85xx: " Nick Child
2021-12-16 22:00 ` [PATCH v2 19/20] powerpc/512x: " Nick Child
2021-12-16 22:00 ` Nick Child [this message]
2021-12-17  6:29 ` [PATCH v2 00/20] powerpc: Define eligible functions as __init Christophe Leroy
2021-12-23 11:44   ` Michael Ellerman
2021-12-26 21:52 ` Michael Ellerman

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=20211216220035.605465-21-nick.child@ibm.com \
    --to=nnac123@gmail.com \
    --cc=dja@axtens.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nick.child@ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.