Skip to content

Commit 0737e2a

Browse files
committed
sys/cpu.h: Some style(9) fixes
MFC after: 3 days
1 parent 7c448f5 commit 0737e2a

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

sys/sys/cpu.h

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,31 @@
4040
#define CPU_IVAR_CPUID_SIZE 3
4141
#define CPU_IVAR_CPUID 4
4242

43-
static __inline struct pcpu *cpu_get_pcpu(device_t dev)
43+
static __inline struct pcpu *
44+
cpu_get_pcpu(device_t dev)
4445
{
4546
uintptr_t v = 0;
47+
4648
BUS_READ_IVAR(device_get_parent(dev), dev, CPU_IVAR_PCPU, &v);
4749
return ((struct pcpu *)v);
4850
}
4951

50-
static __inline int32_t cpu_get_nominal_mhz(device_t dev)
52+
static __inline int32_t
53+
cpu_get_nominal_mhz(device_t dev)
5154
{
5255
uintptr_t v = 0;
56+
5357
if (BUS_READ_IVAR(device_get_parent(dev), dev,
5458
CPU_IVAR_NOMINAL_MHZ, &v) != 0)
5559
return (-1);
5660
return ((int32_t)v);
5761
}
5862

59-
static __inline const uint32_t *cpu_get_cpuid(device_t dev, size_t *count)
63+
static __inline const uint32_t *
64+
cpu_get_cpuid(device_t dev, size_t *count)
6065
{
6166
uintptr_t v = 0;
67+
6268
if (BUS_READ_IVAR(device_get_parent(dev), dev,
6369
CPU_IVAR_CPUID_SIZE, &v) != 0)
6470
return (NULL);
@@ -124,10 +130,10 @@ TAILQ_HEAD(cf_level_lst, cf_level);
124130
* state. It is probably a bug to not combine this with "info only"
125131
*/
126132
#define CPUFREQ_TYPE_MASK 0xffff
127-
#define CPUFREQ_TYPE_RELATIVE (1<<0)
128-
#define CPUFREQ_TYPE_ABSOLUTE (1<<1)
129-
#define CPUFREQ_FLAG_INFO_ONLY (1<<16)
130-
#define CPUFREQ_FLAG_UNCACHED (1<<17)
133+
#define CPUFREQ_TYPE_RELATIVE (1 << 0)
134+
#define CPUFREQ_TYPE_ABSOLUTE (1 << 1)
135+
#define CPUFREQ_FLAG_INFO_ONLY (1 << 16)
136+
#define CPUFREQ_FLAG_UNCACHED (1 << 17)
131137

132138
/*
133139
* When setting a level, the caller indicates the priority of this request.
@@ -162,7 +168,7 @@ int cpufreq_settings_changed(device_t dev);
162168
* The new level and the result of the change (0 is success) is passed in.
163169
* If the driver wishes to revoke the change from cpufreq_pre_change, it
164170
* stores a non-zero error code in the result parameter and the change will
165-
* not be made. If the post-change eventhandler gets a non-zero result,
171+
* not be made. If the post-change eventhandler gets a non-zero result,
166172
* no change was made and the previous level remains in effect. If a change
167173
* is revoked, the post-change eventhandler is still called with the error
168174
* value supplied by the revoking driver. This gives listeners who cached

0 commit comments

Comments
 (0)