aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-10-29 08:35:23 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-12-15 05:58:10 -0500
commit66c222a02fadfd7cc62c754c12379d6bb08eaf77 (patch)
tree9d68e0db74bbf71af7205d83c252456385bf229f
parentb73bbad352a50fb2d8dd42241b534a3dace03b49 (diff)
edac: fix kernel-doc tags at the drivers/edac_*.h
Some kernel-doc tags don't provide good descriptions or use a different style. Adjust them. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--Documentation/admin-guide/ras.rst2
-rw-r--r--drivers/edac/edac_mc.h55
2 files changed, 36 insertions, 21 deletions
diff --git a/Documentation/admin-guide/ras.rst b/Documentation/admin-guide/ras.rst
index 2f8706bae5a4..d71340e86c27 100644
--- a/Documentation/admin-guide/ras.rst
+++ b/Documentation/admin-guide/ras.rst
@@ -843,7 +843,7 @@ Module parameters
843EDAC device type 843EDAC device type
844---------------- 844----------------
845 845
846In the header file, edac_core.h, there is a series of edac_device structures 846In the header file, edac_pci.h, there is a series of edac_device structures
847and APIs for the EDAC_DEVICE. 847and APIs for the EDAC_DEVICE.
848 848
849User space access to an edac_device is through the sysfs interface. 849User space access to an edac_device is through the sysfs interface.
diff --git a/drivers/edac/edac_mc.h b/drivers/edac/edac_mc.h
index dcc2c7e3b8bc..50fc1dc9c0d8 100644
--- a/drivers/edac/edac_mc.h
+++ b/drivers/edac/edac_mc.h
@@ -15,6 +15,8 @@
15 * Refactored for multi-source files: 15 * Refactored for multi-source files:
16 * Doug Thompson <norsk5@xmission.com> 16 * Doug Thompson <norsk5@xmission.com>
17 * 17 *
18 * Please look at Documentation/driver-api/edac.rst for more info about
19 * EDAC core structs and functions.
18 */ 20 */
19 21
20#ifndef _EDAC_MC_H_ 22#ifndef _EDAC_MC_H_
@@ -94,7 +96,8 @@ do { \
94#define to_mci(k) container_of(k, struct mem_ctl_info, dev) 96#define to_mci(k) container_of(k, struct mem_ctl_info, dev)
95 97
96/** 98/**
97 * edac_mc_alloc: Allocate and partially fill a struct mem_ctl_info structure 99 * edac_mc_alloc() - Allocate and partially fill a struct &mem_ctl_info.
100 *
98 * @mc_num: Memory controller number 101 * @mc_num: Memory controller number
99 * @n_layers: Number of MC hierarchy layers 102 * @n_layers: Number of MC hierarchy layers
100 * @layers: Describes each layer as seen by the Memory Controller 103 * @layers: Describes each layer as seen by the Memory Controller
@@ -116,8 +119,8 @@ do { \
116 * on such scenarios, as grouping the multiple ranks require drivers change. 119 * on such scenarios, as grouping the multiple ranks require drivers change.
117 * 120 *
118 * Returns: 121 * Returns:
119 * On failure: NULL 122 * On success, return a pointer to struct mem_ctl_info pointer;
120 * On success: struct mem_ctl_info pointer 123 * %NULL otherwise
121 */ 124 */
122struct mem_ctl_info *edac_mc_alloc(unsigned mc_num, 125struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
123 unsigned n_layers, 126 unsigned n_layers,
@@ -125,28 +128,28 @@ struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
125 unsigned sz_pvt); 128 unsigned sz_pvt);
126 129
127/** 130/**
128 * edac_mc_add_mc_with_groups: Insert the 'mci' structure into the mci 131 * edac_mc_add_mc_with_groups() - Insert the @mci structure into the mci
129 * global list and create sysfs entries associated with mci structure 132 * global list and create sysfs entries associated with @mci structure.
133 *
130 * @mci: pointer to the mci structure to be added to the list 134 * @mci: pointer to the mci structure to be added to the list
131 * @groups: optional attribute groups for the driver-specific sysfs entries 135 * @groups: optional attribute groups for the driver-specific sysfs entries
132 * 136 *
133 * Return: 137 * Returns:
134 * 0 Success 138 * 0 on Success, or an error code on failure
135 * !0 Failure
136 */ 139 */
137extern int edac_mc_add_mc_with_groups(struct mem_ctl_info *mci, 140extern int edac_mc_add_mc_with_groups(struct mem_ctl_info *mci,
138 const struct attribute_group **groups); 141 const struct attribute_group **groups);
139#define edac_mc_add_mc(mci) edac_mc_add_mc_with_groups(mci, NULL) 142#define edac_mc_add_mc(mci) edac_mc_add_mc_with_groups(mci, NULL)
140 143
141/** 144/**
142 * edac_mc_free 145 * edac_mc_free() - Frees a previously allocated @mci structure
143 * 'Free' a previously allocated 'mci' structure 146 *
144 * @mci: pointer to a struct mem_ctl_info structure 147 * @mci: pointer to a struct mem_ctl_info structure
145 */ 148 */
146extern void edac_mc_free(struct mem_ctl_info *mci); 149extern void edac_mc_free(struct mem_ctl_info *mci);
147 150
148/** 151/**
149 * edac_mc_find: Search for a mem_ctl_info structure whose index is @idx. 152 * edac_mc_find() - Search for a mem_ctl_info structure whose index is @idx.
150 * 153 *
151 * @idx: index to be seek 154 * @idx: index to be seek
152 * 155 *
@@ -156,29 +159,41 @@ extern void edac_mc_free(struct mem_ctl_info *mci);
156extern struct mem_ctl_info *edac_mc_find(int idx); 159extern struct mem_ctl_info *edac_mc_find(int idx);
157 160
158/** 161/**
159 * find_mci_by_dev 162 * find_mci_by_dev() - Scan list of controllers looking for the one that
163 * manages the @dev device.
160 * 164 *
161 * scan list of controllers looking for the one that manages
162 * the 'dev' device
163 * @dev: pointer to a struct device related with the MCI 165 * @dev: pointer to a struct device related with the MCI
166 *
167 * Returns: on success, returns a pointer to struct &mem_ctl_info;
168 * %NULL otherwise.
164 */ 169 */
165extern struct mem_ctl_info *find_mci_by_dev(struct device *dev); 170extern struct mem_ctl_info *find_mci_by_dev(struct device *dev);
166 171
167/** 172/**
168 * edac_mc_del_mc: Remove sysfs entries for specified mci structure and 173 * edac_mc_del_mc() - Remove sysfs entries for mci structure associated with
169 * remove mci structure from global list 174 * @dev and remove mci structure from global list.
170 * 175 *
171 * @dev: Pointer to struct &device representing mci structure to remove. 176 * @dev: Pointer to struct &device representing mci structure to remove.
172 * 177 *
173 * Returns: pointer to removed mci structure, or NULL if device not found. 178 * Returns: pointer to removed mci structure, or %NULL if device not found.
174 */ 179 */
175extern struct mem_ctl_info *edac_mc_del_mc(struct device *dev); 180extern struct mem_ctl_info *edac_mc_del_mc(struct device *dev);
181
182/**
183 * edac_mc_find_csrow_by_page() - Ancillary routine to identify what csrow
184 * contains a memory page.
185 *
186 * @mci: pointer to a struct mem_ctl_info structure
187 * @page: memory page to find
188 *
189 * Returns: on success, returns the csrow. -1 if not found.
190 */
176extern int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci, 191extern int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci,
177 unsigned long page); 192 unsigned long page);
178 193
179/** 194/**
180 * edac_raw_mc_handle_error - reports a memory event to userspace without doing 195 * edac_raw_mc_handle_error() - Reports a memory event to userspace without
181 * anything to discover the error location 196 * doing anything to discover the error location.
182 * 197 *
183 * @type: severity of the error (CE/UE/Fatal) 198 * @type: severity of the error (CE/UE/Fatal)
184 * @mci: a struct mem_ctl_info pointer 199 * @mci: a struct mem_ctl_info pointer
@@ -193,7 +208,7 @@ void edac_raw_mc_handle_error(const enum hw_event_mc_err_type type,
193 struct edac_raw_error_desc *e); 208 struct edac_raw_error_desc *e);
194 209
195/** 210/**
196 * edac_mc_handle_error - reports a memory event to userspace 211 * edac_mc_handle_error() - Reports a memory event to userspace.
197 * 212 *
198 * @type: severity of the error (CE/UE/Fatal) 213 * @type: severity of the error (CE/UE/Fatal)
199 * @mci: a struct mem_ctl_info pointer 214 * @mci: a struct mem_ctl_info pointer