Skip to content

Commit 342ff1a

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits) trivial: fix typo in aic7xxx comment trivial: fix comment typo in drivers/ata/pata_hpt37x.c trivial: typo in kernel-parameters.txt trivial: fix typo in tracing documentation trivial: add __init/__exit macros in drivers/gpio/bt8xxgpio.c trivial: add __init macro/ fix of __exit macro location in ipmi_poweroff.c trivial: remove unnecessary semicolons trivial: Fix duplicated word "options" in comment trivial: kbuild: remove extraneous blank line after declaration of usage() trivial: improve help text for mm debug config options trivial: doc: hpfall: accept disk device to unload as argument trivial: doc: hpfall: reduce risk that hpfall can do harm trivial: SubmittingPatches: Fix reference to renumbered step trivial: fix typos "man[ae]g?ment" -> "management" trivial: media/video/cx88: add __init/__exit macros to cx88 drivers trivial: fix typo in CONFIG_DEBUG_FS in gcov doc trivial: fix missing printk space in amd_k7_smp_check trivial: fix typo s/ketymap/keymap/ in comment trivial: fix typo "to to" in multiple files trivial: fix typos in comments s/DGBU/DBGU/ ...
2 parents 50223e4 + 24ed7a9 commit 342ff1a

170 files changed

Lines changed: 299 additions & 266 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/DocBook/mtdnand.tmpl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
568568
<para>
569569
The blocks in which the tables are stored are procteted against
570570
accidental access by marking them bad in the memory bad block
571-
table. The bad block table managment functions are allowed
571+
table. The bad block table management functions are allowed
572572
to circumvernt this protection.
573573
</para>
574574
<para>

‎Documentation/DocBook/scsi.tmpl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@
317317
<para>
318318
The SAS transport class contains common code to deal with SAS HBAs,
319319
an aproximated representation of SAS topologies in the driver model,
320-
and various sysfs attributes to expose these topologies and managment
320+
and various sysfs attributes to expose these topologies and management
321321
interfaces to userspace.
322322
</para>
323323
<para>

‎Documentation/SubmittingPatches‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ the MAN-PAGES maintainer (as listed in the MAINTAINERS file)
183183
a man-pages patch, or at least a notification of the change,
184184
so that some information makes its way into the manual pages.
185185

186-
Even if the maintainer did not respond in step #4, make sure to ALWAYS
186+
Even if the maintainer did not respond in step #5, make sure to ALWAYS
187187
copy the maintainer when you change their code.
188188

189189
For small patches you may want to CC the Trivial Patch Monkey

‎Documentation/filesystems/nfsroot.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
105105
the client address and this parameter is NOT empty only
106106
replies from the specified server are accepted.
107107

108-
Only required for for NFS root. That is autoconfiguration
108+
Only required for NFS root. That is autoconfiguration
109109
will not be triggered if it is missing and NFS root is not
110110
in operation.
111111

‎Documentation/gcov.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Possible uses:
4747

4848
Configure the kernel with:
4949

50-
CONFIG_DEBUGFS=y
50+
CONFIG_DEBUG_FS=y
5151
CONFIG_GCOV_KERNEL=y
5252

5353
and to get coverage data for the entire kernel:

‎Documentation/hwmon/hpfall.c‎

Lines changed: 80 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,34 @@
1616
#include <stdint.h>
1717
#include <errno.h>
1818
#include <signal.h>
19+
#include <sys/mman.h>
20+
#include <sched.h>
21+
22+
char unload_heads_path[64];
23+
24+
int set_unload_heads_path(char *device)
25+
{
26+
char devname[64];
27+
28+
if (strlen(device) <= 5 || strncmp(device, "/dev/", 5) != 0)
29+
return -EINVAL;
30+
strncpy(devname, device + 5, sizeof(devname));
31+
32+
snprintf(unload_heads_path, sizeof(unload_heads_path),
33+
"/sys/block/%s/device/unload_heads", devname);
34+
return 0;
35+
}
36+
int valid_disk(void)
37+
{
38+
int fd = open(unload_heads_path, O_RDONLY);
39+
if (fd < 0) {
40+
perror(unload_heads_path);
41+
return 0;
42+
}
43+
44+
close(fd);
45+
return 1;
46+
}
1947

2048
void write_int(char *path, int i)
2149
{
@@ -40,7 +68,7 @@ void set_led(int on)
4068

4169
void protect(int seconds)
4270
{
43-
write_int("/sys/block/sda/device/unload_heads", seconds*1000);
71+
write_int(unload_heads_path, seconds*1000);
4472
}
4573

4674
int on_ac(void)
@@ -57,45 +85,62 @@ void ignore_me(void)
5785
{
5886
protect(0);
5987
set_led(0);
60-
6188
}
6289

63-
int main(int argc, char* argv[])
90+
int main(int argc, char **argv)
6491
{
65-
int fd, ret;
92+
int fd, ret;
93+
struct sched_param param;
94+
95+
if (argc == 1)
96+
ret = set_unload_heads_path("/dev/sda");
97+
else if (argc == 2)
98+
ret = set_unload_heads_path(argv[1]);
99+
else
100+
ret = -EINVAL;
101+
102+
if (ret || !valid_disk()) {
103+
fprintf(stderr, "usage: %s <device> (default: /dev/sda)\n",
104+
argv[0]);
105+
exit(1);
106+
}
107+
108+
fd = open("/dev/freefall", O_RDONLY);
109+
if (fd < 0) {
110+
perror("/dev/freefall");
111+
return EXIT_FAILURE;
112+
}
66113

67-
fd = open("/dev/freefall", O_RDONLY);
68-
if (fd < 0) {
69-
perror("open");
70-
return EXIT_FAILURE;
71-
}
114+
daemon(0, 0);
115+
param.sched_priority = sched_get_priority_max(SCHED_FIFO);
116+
sched_setscheduler(0, SCHED_FIFO, &param);
117+
mlockall(MCL_CURRENT|MCL_FUTURE);
72118

73119
signal(SIGALRM, ignore_me);
74120

75-
for (;;) {
76-
unsigned char count;
77-
78-
ret = read(fd, &count, sizeof(count));
79-
alarm(0);
80-
if ((ret == -1) && (errno == EINTR)) {
81-
/* Alarm expired, time to unpark the heads */
82-
continue;
83-
}
84-
85-
if (ret != sizeof(count)) {
86-
perror("read");
87-
break;
88-
}
89-
90-
protect(21);
91-
set_led(1);
92-
if (1 || on_ac() || lid_open()) {
93-
alarm(2);
94-
} else {
95-
alarm(20);
96-
}
97-
}
98-
99-
close(fd);
100-
return EXIT_SUCCESS;
121+
for (;;) {
122+
unsigned char count;
123+
124+
ret = read(fd, &count, sizeof(count));
125+
alarm(0);
126+
if ((ret == -1) && (errno == EINTR)) {
127+
/* Alarm expired, time to unpark the heads */
128+
continue;
129+
}
130+
131+
if (ret != sizeof(count)) {
132+
perror("read");
133+
break;
134+
}
135+
136+
protect(21);
137+
set_led(1);
138+
if (1 || on_ac() || lid_open())
139+
alarm(2);
140+
else
141+
alarm(20);
142+
}
143+
144+
close(fd);
145+
return EXIT_SUCCESS;
101146
}

‎Documentation/hwmon/pc87427‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ Fan rotation speeds are reported as 14-bit values from a gated clock
3434
signal. Speeds down to 83 RPM can be measured.
3535

3636
An alarm is triggered if the rotation speed drops below a programmable
37-
limit. Another alarm is triggered if the speed is too low to to be measured
37+
limit. Another alarm is triggered if the speed is too low to be measured
3838
(including stalled or missing fan).

‎Documentation/kernel-parameters.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ and is between 256 and 4096 characters. It is defined in the file
933933
1 -- enable informational integrity auditing messages.
934934

935935
ima_hash= [IMA]
936-
Formt: { "sha1" | "md5" }
936+
Format: { "sha1" | "md5" }
937937
default: "sha1"
938938

939939
ima_tcb [IMA]

‎Documentation/networking/regulatory.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Example code - drivers hinting an alpha2:
9696

9797
This example comes from the zd1211rw device driver. You can start
9898
by having a mapping of your device's EEPROM country/regulatory
99-
domain value to to a specific alpha2 as follows:
99+
domain value to a specific alpha2 as follows:
100100

101101
static struct zd_reg_alpha2_map reg_alpha2_map[] = {
102102
{ ZD_REGDOMAIN_FCC, "US" },

‎Documentation/powerpc/dts-bindings/marvell.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ prefixed with the string "marvell,", for Marvell Technology Group Ltd.
3232
devices. This field represents the number of cells needed to
3333
represent the address of the memory-mapped registers of devices
3434
within the system controller chip.
35-
- #size-cells : Size representation for for the memory-mapped
35+
- #size-cells : Size representation for the memory-mapped
3636
registers within the system controller chip.
3737
- #interrupt-cells : Defines the width of cells used to represent
3838
interrupts.

0 commit comments

Comments
 (0)