Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: remove some replace macros like |struct foo|

There are three files with replace macros for structs,
mapping them into Sphinx 2.x C domain references.

Well, this is broken on Sphinx 3.x. Also, for Sphinx 2.x,
the automarkup macro should be able to take care of them.

So, let's just drop those.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

+38 -48
+5 -6
Documentation/admin-guide/pm/cpufreq.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 .. include:: <isonum.txt> 3 3 4 - .. |struct cpufreq_policy| replace:: :c:type:`struct cpufreq_policy <cpufreq_policy>` 5 4 .. |intel_pstate| replace:: :doc:`intel_pstate <intel_pstate>` 6 5 7 6 ======================= ··· 91 92 all of those CPUs simultaneously. 92 93 93 94 Sets of CPUs sharing hardware P-state control interfaces are represented by 94 - ``CPUFreq`` as |struct cpufreq_policy| objects. For consistency, 95 - |struct cpufreq_policy| is also used when there is only one CPU in the given 95 + ``CPUFreq`` as struct cpufreq_policy objects. For consistency, 96 + struct cpufreq_policy is also used when there is only one CPU in the given 96 97 set. 97 98 98 - The ``CPUFreq`` core maintains a pointer to a |struct cpufreq_policy| object for 99 + The ``CPUFreq`` core maintains a pointer to a struct cpufreq_policy object for 99 100 every CPU in the system, including CPUs that are currently offline. If multiple 100 101 CPUs share the same hardware P-state control interface, all of the pointers 101 - corresponding to them point to the same |struct cpufreq_policy| object. 102 + corresponding to them point to the same struct cpufreq_policy object. 102 103 103 - ``CPUFreq`` uses |struct cpufreq_policy| as its basic data type and the design 104 + ``CPUFreq`` uses struct cpufreq_policy as its basic data type and the design 104 105 of its user space interface is based on the policy concept. 105 106 106 107
+3 -7
Documentation/driver-api/device_link.rst
··· 1 - .. |struct dev_pm_domain| replace:: :c:type:`struct dev_pm_domain <dev_pm_domain>` 2 - .. |struct generic_pm_domain| replace:: :c:type:`struct generic_pm_domain <generic_pm_domain>` 3 - 4 - 5 1 .. _device_link: 6 2 7 3 ============ ··· 162 166 is the same as if the MMU was the parent of the master device. 163 167 164 168 The fact that both devices share the same power domain would normally 165 - suggest usage of a |struct dev_pm_domain| or |struct generic_pm_domain|, 169 + suggest usage of a struct dev_pm_domain or struct generic_pm_domain, 166 170 however these are not independent devices that happen to share a power 167 171 switch, but rather the MMU device serves the busmaster device and is 168 172 useless without it. A device link creates a synthetic hierarchical ··· 198 202 Alternatives 199 203 ============ 200 204 201 - * A |struct dev_pm_domain| can be used to override the bus, 205 + * A struct dev_pm_domain can be used to override the bus, 202 206 class or device type callbacks. It is intended for devices sharing 203 207 a single on/off switch, however it does not guarantee a specific 204 208 suspend/resume ordering, this needs to be implemented separately. ··· 207 211 suspended. Furthermore it cannot be used to enforce a specific shutdown 208 212 ordering or a driver presence dependency. 209 213 210 - * A |struct generic_pm_domain| is a lot more heavyweight than a 214 + * A struct generic_pm_domain is a lot more heavyweight than a 211 215 device link and does not allow for shutdown ordering or driver presence 212 216 dependencies. It also cannot be used on ACPI systems. 213 217
+30 -35
Documentation/driver-api/pm/cpuidle.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 .. include:: <isonum.txt> 3 3 4 - .. |struct cpuidle_governor| replace:: :c:type:`struct cpuidle_governor <cpuidle_governor>` 5 - .. |struct cpuidle_device| replace:: :c:type:`struct cpuidle_device <cpuidle_device>` 6 - .. |struct cpuidle_driver| replace:: :c:type:`struct cpuidle_driver <cpuidle_driver>` 7 - .. |struct cpuidle_state| replace:: :c:type:`struct cpuidle_state <cpuidle_state>` 8 - 9 4 ======================== 10 5 CPU Idle Time Management 11 6 ======================== ··· 49 54 operated on by them cannot depend on any hardware architecture or platform 50 55 design details as well. 51 56 52 - The governor itself is represented by a |struct cpuidle_governor| object 57 + The governor itself is represented by a struct cpuidle_governor object 53 58 containing four callback pointers, :c:member:`enable`, :c:member:`disable`, 54 59 :c:member:`select`, :c:member:`reflect`, a :c:member:`rating` field described 55 60 below, and a name (string) used for identifying it. ··· 78 83 int (*enable) (struct cpuidle_driver *drv, struct cpuidle_device *dev); 79 84 80 85 The role of this callback is to prepare the governor for handling the 81 - (logical) CPU represented by the |struct cpuidle_device| object pointed 82 - to by the ``dev`` argument. The |struct cpuidle_driver| object pointed 86 + (logical) CPU represented by the struct cpuidle_device object pointed 87 + to by the ``dev`` argument. The struct cpuidle_driver object pointed 83 88 to by the ``drv`` argument represents the ``CPUIdle`` driver to be used 84 89 with that CPU (among other things, it should contain the list of 85 - |struct cpuidle_state| objects representing idle states that the 90 + struct cpuidle_state objects representing idle states that the 86 91 processor holding the given CPU can be asked to enter). 87 92 88 93 It may fail, in which case it is expected to return a negative error ··· 97 102 void (*disable) (struct cpuidle_driver *drv, struct cpuidle_device *dev); 98 103 99 104 Called to make the governor stop handling the (logical) CPU represented 100 - by the |struct cpuidle_device| object pointed to by the ``dev`` 105 + by the struct cpuidle_device object pointed to by the ``dev`` 101 106 argument. 102 107 103 108 It is expected to reverse any changes made by the ``->enable()`` ··· 111 116 bool *stop_tick); 112 117 113 118 Called to select an idle state for the processor holding the (logical) 114 - CPU represented by the |struct cpuidle_device| object pointed to by the 119 + CPU represented by the struct cpuidle_device object pointed to by the 115 120 ``dev`` argument. 116 121 117 122 The list of idle states to take into consideration is represented by the 118 - :c:member:`states` array of |struct cpuidle_state| objects held by the 119 - |struct cpuidle_driver| object pointed to by the ``drv`` argument (which 123 + :c:member:`states` array of struct cpuidle_state objects held by the 124 + struct cpuidle_driver object pointed to by the ``drv`` argument (which 120 125 represents the ``CPUIdle`` driver to be used with the CPU at hand). The 121 126 value returned by this callback is interpreted as an index into that 122 127 array (unless it is a negative error code). ··· 131 136 asking the processor to enter the idle state). 132 137 133 138 This callback is mandatory (i.e. the :c:member:`select` callback pointer 134 - in |struct cpuidle_governor| must not be ``NULL`` for the registration 139 + in struct cpuidle_governor must not be ``NULL`` for the registration 135 140 of the governor to succeed). 136 141 137 142 :c:member:`reflect` ··· 162 167 other parts of ``CPUIdle`` and the hardware. 163 168 164 169 First of all, a ``CPUIdle`` driver has to populate the :c:member:`states` array 165 - of |struct cpuidle_state| objects included in the |struct cpuidle_driver| object 170 + of struct cpuidle_state objects included in the struct cpuidle_driver object 166 171 representing it. Going forward this array will represent the list of available 167 172 idle states that the processor hardware can be asked to enter shared by all of 168 173 the logical CPUs handled by the given driver. 169 174 170 175 The entries in the :c:member:`states` array are expected to be sorted by the 171 - value of the :c:member:`target_residency` field in |struct cpuidle_state| in 176 + value of the :c:member:`target_residency` field in struct cpuidle_state in 172 177 the ascending order (that is, index 0 should correspond to the idle state with 173 178 the minimum value of :c:member:`target_residency`). [Since the 174 179 :c:member:`target_residency` value is expected to reflect the "depth" of the 175 - idle state represented by the |struct cpuidle_state| object holding it, this 180 + idle state represented by the struct cpuidle_state object holding it, this 176 181 sorting order should be the same as the ascending sorting order by the idle 177 182 state "depth".] 178 183 179 - Three fields in |struct cpuidle_state| are used by the existing ``CPUIdle`` 184 + Three fields in struct cpuidle_state are used by the existing ``CPUIdle`` 180 185 governors for computations related to idle state selection: 181 186 182 187 :c:member:`target_residency` ··· 198 203 any idle state at all. [There are other flags used by the ``CPUIdle`` 199 204 core in special situations.] 200 205 201 - The :c:member:`enter` callback pointer in |struct cpuidle_state|, which must not 206 + The :c:member:`enter` callback pointer in struct cpuidle_state, which must not 202 207 be ``NULL``, points to the routine to execute in order to ask the processor to 203 208 enter this particular idle state: 204 209 ··· 207 212 void (*enter) (struct cpuidle_device *dev, struct cpuidle_driver *drv, 208 213 int index); 209 214 210 - The first two arguments of it point to the |struct cpuidle_device| object 215 + The first two arguments of it point to the struct cpuidle_device object 211 216 representing the logical CPU running this callback and the 212 - |struct cpuidle_driver| object representing the driver itself, respectively, 213 - and the last one is an index of the |struct cpuidle_state| entry in the driver's 217 + struct cpuidle_driver object representing the driver itself, respectively, 218 + and the last one is an index of the struct cpuidle_state entry in the driver's 214 219 :c:member:`states` array representing the idle state to ask the processor to 215 220 enter. 216 221 217 - The analogous ``->enter_s2idle()`` callback in |struct cpuidle_state| is used 222 + The analogous ``->enter_s2idle()`` callback in struct cpuidle_state is used 218 223 only for implementing the suspend-to-idle system-wide power management feature. 219 224 The difference between in and ``->enter()`` is that it must not re-enable 220 225 interrupts at any point (even temporarily) or attempt to change the states of ··· 222 227 223 228 Once the :c:member:`states` array has been populated, the number of valid 224 229 entries in it has to be stored in the :c:member:`state_count` field of the 225 - |struct cpuidle_driver| object representing the driver. Moreover, if any 230 + struct cpuidle_driver object representing the driver. Moreover, if any 226 231 entries in the :c:member:`states` array represent "coupled" idle states (that 227 232 is, idle states that can only be asked for if multiple related logical CPUs are 228 - idle), the :c:member:`safe_state_index` field in |struct cpuidle_driver| needs 233 + idle), the :c:member:`safe_state_index` field in struct cpuidle_driver needs 229 234 to be the index of an idle state that is not "coupled" (that is, one that can be 230 235 asked for if only one logical CPU is idle). 231 236 232 237 In addition to that, if the given ``CPUIdle`` driver is only going to handle a 233 238 subset of logical CPUs in the system, the :c:member:`cpumask` field in its 234 - |struct cpuidle_driver| object must point to the set (mask) of CPUs that will be 239 + struct cpuidle_driver object must point to the set (mask) of CPUs that will be 235 240 handled by it. 236 241 237 242 A ``CPUIdle`` driver can only be used after it has been registered. If there 238 243 are no "coupled" idle state entries in the driver's :c:member:`states` array, 239 - that can be accomplished by passing the driver's |struct cpuidle_driver| object 244 + that can be accomplished by passing the driver's struct cpuidle_driver object 240 245 to :c:func:`cpuidle_register_driver()`. Otherwise, :c:func:`cpuidle_register()` 241 246 should be used for this purpose. 242 247 243 - However, it also is necessary to register |struct cpuidle_device| objects for 248 + However, it also is necessary to register struct cpuidle_device objects for 244 249 all of the logical CPUs to be handled by the given ``CPUIdle`` driver with the 245 250 help of :c:func:`cpuidle_register_device()` after the driver has been registered 246 251 and :c:func:`cpuidle_register_driver()`, unlike :c:func:`cpuidle_register()`, 247 252 does not do that automatically. For this reason, the drivers that use 248 253 :c:func:`cpuidle_register_driver()` to register themselves must also take care 249 - of registering the |struct cpuidle_device| objects as needed, so it is generally 254 + of registering the struct cpuidle_device objects as needed, so it is generally 250 255 recommended to use :c:func:`cpuidle_register()` for ``CPUIdle`` driver 251 256 registration in all cases. 252 257 253 - The registration of a |struct cpuidle_device| object causes the ``CPUIdle`` 258 + The registration of a struct cpuidle_device object causes the ``CPUIdle`` 254 259 ``sysfs`` interface to be created and the governor's ``->enable()`` callback to 255 260 be invoked for the logical CPU represented by it, so it must take place after 256 261 registering the driver that will handle the CPU in question. 257 262 258 - ``CPUIdle`` drivers and |struct cpuidle_device| objects can be unregistered 263 + ``CPUIdle`` drivers and struct cpuidle_device objects can be unregistered 259 264 when they are not necessary any more which allows some resources associated with 260 265 them to be released. Due to dependencies between them, all of the 261 - |struct cpuidle_device| objects representing CPUs handled by the given 266 + struct cpuidle_device objects representing CPUs handled by the given 262 267 ``CPUIdle`` driver must be unregistered, with the help of 263 268 :c:func:`cpuidle_unregister_device()`, before calling 264 269 :c:func:`cpuidle_unregister_driver()` to unregister the driver. Alternatively, 265 270 :c:func:`cpuidle_unregister()` can be called to unregister a ``CPUIdle`` driver 266 - along with all of the |struct cpuidle_device| objects representing CPUs handled 271 + along with all of the struct cpuidle_device objects representing CPUs handled 267 272 by it. 268 273 269 274 ``CPUIdle`` drivers can respond to runtime system configuration changes that ··· 272 277 battery or the other way around). Upon a notification of such a change, 273 278 a ``CPUIdle`` driver is expected to call :c:func:`cpuidle_pause_and_lock()` to 274 279 turn ``CPUIdle`` off temporarily and then :c:func:`cpuidle_disable_device()` for 275 - all of the |struct cpuidle_device| objects representing CPUs affected by that 280 + all of the struct cpuidle_device objects representing CPUs affected by that 276 281 change. Next, it can update its :c:member:`states` array in accordance with 277 282 the new configuration of the system, call :c:func:`cpuidle_enable_device()` for 278 - all of the relevant |struct cpuidle_device| objects and invoke 283 + all of the relevant struct cpuidle_device objects and invoke 279 284 :c:func:`cpuidle_resume_and_unlock()` to allow ``CPUIdle`` to be used again.