diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-28 02:09:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-28 02:09:29 -0500 |
commit | 86292b33d4b79ee03e2f43ea0381ef85f077c760 (patch) | |
tree | b69a6ffd8ec5ac01599d351205a96804b9c415da | |
parent | 1ac884f173d4842216f6a24c03c9833e3ce6e982 (diff) | |
parent | 3e761a42e19c63b624ebac94d918d8a15e07e2a7 (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge yet more updates from Andrew Morton:
- a few MM remainders
- misc things
- autofs updates
- signals
- affs updates
- ipc
- nilfs2
- spelling.txt updates
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (78 commits)
mm, x86: fix HIGHMEM64 && PARAVIRT build config for native_pud_clear()
mm: add arch-independent testcases for RODATA
hfs: atomically read inode size
mm: clarify mm_struct.mm_{users,count} documentation
mm: use mmget_not_zero() helper
mm: add new mmget() helper
mm: add new mmgrab() helper
checkpatch: warn when formats use %Z and suggest %z
lib/vsprintf.c: remove %Z support
scripts/spelling.txt: add some typo-words
scripts/spelling.txt: add "followings" pattern and fix typo instances
scripts/spelling.txt: add "therfore" pattern and fix typo instances
scripts/spelling.txt: add "overwriten" pattern and fix typo instances
scripts/spelling.txt: add "overwritting" pattern and fix typo instances
scripts/spelling.txt: add "deintialize(d)" pattern and fix typo instances
scripts/spelling.txt: add "disassocation" pattern and fix typo instances
scripts/spelling.txt: add "omited" pattern and fix typo instances
scripts/spelling.txt: add "explictely" pattern and fix typo instances
scripts/spelling.txt: add "applys" pattern and fix typo instances
scripts/spelling.txt: add "configuartion" pattern and fix typo instances
...
423 files changed, 1288 insertions, 946 deletions
diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl index d7fcdc5a4379..0320910b866d 100644 --- a/Documentation/DocBook/libata.tmpl +++ b/Documentation/DocBook/libata.tmpl | |||
@@ -1020,7 +1020,7 @@ and other resources, etc. | |||
1020 | </itemizedlist> | 1020 | </itemizedlist> |
1021 | 1021 | ||
1022 | <para> | 1022 | <para> |
1023 | Of errors detected as above, the followings are not ATA/ATAPI | 1023 | Of errors detected as above, the following are not ATA/ATAPI |
1024 | device errors but ATA bus errors and should be handled | 1024 | device errors but ATA bus errors and should be handled |
1025 | according to <xref linkend="excatATAbusErr"/>. | 1025 | according to <xref linkend="excatATAbusErr"/>. |
1026 | </para> | 1026 | </para> |
diff --git a/Documentation/acpi/method-customizing.txt b/Documentation/acpi/method-customizing.txt index 5f55373dd53b..a3f598e141f2 100644 --- a/Documentation/acpi/method-customizing.txt +++ b/Documentation/acpi/method-customizing.txt | |||
@@ -57,7 +57,7 @@ Note: To get the ACPI debug object output (Store (AAAA, Debug)), | |||
57 | 3. undo your changes | 57 | 3. undo your changes |
58 | The "undo" operation is not supported for a new inserted method | 58 | The "undo" operation is not supported for a new inserted method |
59 | right now, i.e. we can not remove a method currently. | 59 | right now, i.e. we can not remove a method currently. |
60 | For an overrided method, in order to undo your changes, please | 60 | For an overridden method, in order to undo your changes, please |
61 | save a copy of the method original ASL code in step c) section 1, | 61 | save a copy of the method original ASL code in step c) section 1, |
62 | and redo step c) ~ g) to override the method with the original one. | 62 | and redo step c) ~ g) to override the method with the original one. |
63 | 63 | ||
diff --git a/Documentation/acpi/method-tracing.txt b/Documentation/acpi/method-tracing.txt index c2505eefc878..0aba14c8f459 100644 --- a/Documentation/acpi/method-tracing.txt +++ b/Documentation/acpi/method-tracing.txt | |||
@@ -152,7 +152,7 @@ tracing facility. | |||
152 | Users can enable/disable this debug tracing feature by executing | 152 | Users can enable/disable this debug tracing feature by executing |
153 | the following command: | 153 | the following command: |
154 | # echo string > /sys/module/acpi/parameters/trace_state | 154 | # echo string > /sys/module/acpi/parameters/trace_state |
155 | Where "string" should be one of the followings: | 155 | Where "string" should be one of the following: |
156 | "disable" | 156 | "disable" |
157 | Disable the method tracing feature. | 157 | Disable the method tracing feature. |
158 | "enable" | 158 | "enable" |
diff --git a/Documentation/admin-guide/ras.rst b/Documentation/admin-guide/ras.rst index 9939348bd4a3..1b90c6f00a92 100644 --- a/Documentation/admin-guide/ras.rst +++ b/Documentation/admin-guide/ras.rst | |||
@@ -81,7 +81,7 @@ That defines some categories of errors: | |||
81 | still run, eventually replacing the affected hardware by a hot spare, | 81 | still run, eventually replacing the affected hardware by a hot spare, |
82 | if available. | 82 | if available. |
83 | 83 | ||
84 | Also, when an error happens on an userspace process, it is also possible to | 84 | Also, when an error happens on a userspace process, it is also possible to |
85 | kill such process and let userspace restart it. | 85 | kill such process and let userspace restart it. |
86 | 86 | ||
87 | The mechanism for handling non-fatal errors is usually complex and may | 87 | The mechanism for handling non-fatal errors is usually complex and may |
diff --git a/Documentation/blockdev/mflash.txt b/Documentation/blockdev/mflash.txt index 1f610ecf698a..f7e050551487 100644 --- a/Documentation/blockdev/mflash.txt +++ b/Documentation/blockdev/mflash.txt | |||
@@ -17,7 +17,7 @@ driver and currently works well under standard IDE subsystem. Actually it's | |||
17 | one chip SSD. IO mode is ATA-like custom mode for the host that doesn't have | 17 | one chip SSD. IO mode is ATA-like custom mode for the host that doesn't have |
18 | IDE interface. | 18 | IDE interface. |
19 | 19 | ||
20 | Followings are brief descriptions about IO mode. | 20 | Following are brief descriptions about IO mode. |
21 | A. IO mode based on ATA protocol and uses some custom command. (read confirm, | 21 | A. IO mode based on ATA protocol and uses some custom command. (read confirm, |
22 | write confirm) | 22 | write confirm) |
23 | B. IO mode uses SRAM bus interface. | 23 | B. IO mode uses SRAM bus interface. |
diff --git a/Documentation/device-mapper/dm-raid.txt b/Documentation/device-mapper/dm-raid.txt index 0d199353e477..cd2cb2fc85ea 100644 --- a/Documentation/device-mapper/dm-raid.txt +++ b/Documentation/device-mapper/dm-raid.txt | |||
@@ -319,7 +319,7 @@ Version History | |||
319 | 1.5.2 'mismatch_cnt' is zero unless [last_]sync_action is "check". | 319 | 1.5.2 'mismatch_cnt' is zero unless [last_]sync_action is "check". |
320 | 1.6.0 Add discard support (and devices_handle_discard_safely module param). | 320 | 1.6.0 Add discard support (and devices_handle_discard_safely module param). |
321 | 1.7.0 Add support for MD RAID0 mappings. | 321 | 1.7.0 Add support for MD RAID0 mappings. |
322 | 1.8.0 Explictely check for compatible flags in the superblock metadata | 322 | 1.8.0 Explicitly check for compatible flags in the superblock metadata |
323 | and reject to start the raid set if any are set by a newer | 323 | and reject to start the raid set if any are set by a newer |
324 | target version, thus avoiding data corruption on a raid set | 324 | target version, thus avoiding data corruption on a raid set |
325 | with a reshape in progress. | 325 | with a reshape in progress. |
diff --git a/Documentation/devicetree/bindings/mfd/qcom-rpm.txt b/Documentation/devicetree/bindings/mfd/qcom-rpm.txt index 485bc59fcc48..3c91ad430eea 100644 --- a/Documentation/devicetree/bindings/mfd/qcom-rpm.txt +++ b/Documentation/devicetree/bindings/mfd/qcom-rpm.txt | |||
@@ -234,7 +234,7 @@ see regulator.txt - with additional custom properties described below: | |||
234 | - qcom,switch-mode-frequency: | 234 | - qcom,switch-mode-frequency: |
235 | Usage: required | 235 | Usage: required |
236 | Value type: <u32> | 236 | Value type: <u32> |
237 | Definition: Frequency (Hz) of the swith mode power supply; | 237 | Definition: Frequency (Hz) of the switch mode power supply; |
238 | must be one of: | 238 | must be one of: |
239 | 19200000, 9600000, 6400000, 4800000, 3840000, 3200000, | 239 | 19200000, 9600000, 6400000, 4800000, 3840000, 3200000, |
240 | 2740000, 2400000, 2130000, 1920000, 1750000, 1600000, | 240 | 2740000, 2400000, 2130000, 1920000, 1750000, 1600000, |
diff --git a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt index 7aa840c8768d..ae4234ca4ee4 100644 --- a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt +++ b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | * Marvell Armada 370 / Armada XP / Armada 3700 Ethernet Controller (NETA) | 1 | * Marvell Armada 370 / Armada XP / Armada 3700 Ethernet Controller (NETA) |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: could be one of the followings | 4 | - compatible: could be one of the following: |
5 | "marvell,armada-370-neta" | 5 | "marvell,armada-370-neta" |
6 | "marvell,armada-xp-neta" | 6 | "marvell,armada-xp-neta" |
7 | "marvell,armada-3700-neta" | 7 | "marvell,armada-3700-neta" |
diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt index 9f5ca4457b5f..ecdcfb790704 100644 --- a/Documentation/devicetree/bindings/opp/opp.txt +++ b/Documentation/devicetree/bindings/opp/opp.txt | |||
@@ -136,7 +136,7 @@ Optional properties: | |||
136 | larger OPP table, based on what version of the hardware we are running on. We | 136 | larger OPP table, based on what version of the hardware we are running on. We |
137 | still can't have multiple nodes with the same opp-hz value in OPP table. | 137 | still can't have multiple nodes with the same opp-hz value in OPP table. |
138 | 138 | ||
139 | It's an user defined array containing a hierarchy of hardware version numbers, | 139 | It's a user defined array containing a hierarchy of hardware version numbers, |
140 | supported by the OPP. For example: a platform with hierarchy of three levels | 140 | supported by the OPP. For example: a platform with hierarchy of three levels |
141 | of versions (A, B and C), this field should be like <X Y Z>, where X | 141 | of versions (A, B and C), this field should be like <X Y Z>, where X |
142 | corresponds to Version hierarchy A, Y corresponds to version hierarchy B and Z | 142 | corresponds to Version hierarchy A, Y corresponds to version hierarchy B and Z |
diff --git a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt index 7c85dca4221a..2fd688c8dbdb 100644 --- a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt | |||
@@ -6,7 +6,7 @@ the first two functions being GPIO in and out. The configuration on | |||
6 | the pins includes drive strength and pull-up. | 6 | the pins includes drive strength and pull-up. |
7 | 7 | ||
8 | Required properties: | 8 | Required properties: |
9 | - compatible: Should be one of the followings (depending on you SoC): | 9 | - compatible: Should be one of the following (depending on your SoC): |
10 | "allwinner,sun4i-a10-pinctrl" | 10 | "allwinner,sun4i-a10-pinctrl" |
11 | "allwinner,sun5i-a10s-pinctrl" | 11 | "allwinner,sun5i-a10s-pinctrl" |
12 | "allwinner,sun5i-a13-pinctrl" | 12 | "allwinner,sun5i-a13-pinctrl" |
diff --git a/Documentation/devicetree/bindings/power/pd-samsung.txt b/Documentation/devicetree/bindings/power/pd-samsung.txt index 7eb9674e9687..549f7dee9b9d 100644 --- a/Documentation/devicetree/bindings/power/pd-samsung.txt +++ b/Documentation/devicetree/bindings/power/pd-samsung.txt | |||
@@ -23,7 +23,7 @@ Optional Properties: | |||
23 | - clock-names: The following clocks can be specified: | 23 | - clock-names: The following clocks can be specified: |
24 | - oscclk: Oscillator clock. | 24 | - oscclk: Oscillator clock. |
25 | - clkN: Input clocks to the devices in this power domain. These clocks | 25 | - clkN: Input clocks to the devices in this power domain. These clocks |
26 | will be reparented to oscclk before swithing power domain off. | 26 | will be reparented to oscclk before switching power domain off. |
27 | Their original parent will be brought back after turning on | 27 | Their original parent will be brought back after turning on |
28 | the domain. Maximum of 4 clocks (N = 0 to 3) are supported. | 28 | the domain. Maximum of 4 clocks (N = 0 to 3) are supported. |
29 | - asbN: Clocks required by asynchronous bridges (ASB) present in | 29 | - asbN: Clocks required by asynchronous bridges (ASB) present in |
diff --git a/Documentation/devicetree/bindings/soc/rockchip/grf.txt b/Documentation/devicetree/bindings/soc/rockchip/grf.txt index c6e62cb30712..a0685c209218 100644 --- a/Documentation/devicetree/bindings/soc/rockchip/grf.txt +++ b/Documentation/devicetree/bindings/soc/rockchip/grf.txt | |||
@@ -10,7 +10,7 @@ From RK3368 SoCs, the GRF is divided into two sections, | |||
10 | 10 | ||
11 | Required Properties: | 11 | Required Properties: |
12 | 12 | ||
13 | - compatible: GRF should be one of the followings | 13 | - compatible: GRF should be one of the following: |
14 | - "rockchip,rk3036-grf", "syscon": for rk3036 | 14 | - "rockchip,rk3036-grf", "syscon": for rk3036 |
15 | - "rockchip,rk3066-grf", "syscon": for rk3066 | 15 | - "rockchip,rk3066-grf", "syscon": for rk3066 |
16 | - "rockchip,rk3188-grf", "syscon": for rk3188 | 16 | - "rockchip,rk3188-grf", "syscon": for rk3188 |
@@ -18,7 +18,7 @@ Required Properties: | |||
18 | - "rockchip,rk3288-grf", "syscon": for rk3288 | 18 | - "rockchip,rk3288-grf", "syscon": for rk3288 |
19 | - "rockchip,rk3368-grf", "syscon": for rk3368 | 19 | - "rockchip,rk3368-grf", "syscon": for rk3368 |
20 | - "rockchip,rk3399-grf", "syscon": for rk3399 | 20 | - "rockchip,rk3399-grf", "syscon": for rk3399 |
21 | - compatible: PMUGRF should be one of the followings | 21 | - compatible: PMUGRF should be one of the following: |
22 | - "rockchip,rk3368-pmugrf", "syscon": for rk3368 | 22 | - "rockchip,rk3368-pmugrf", "syscon": for rk3368 |
23 | - "rockchip,rk3399-pmugrf", "syscon": for rk3399 | 23 | - "rockchip,rk3399-pmugrf", "syscon": for rk3399 |
24 | - compatible: SGRF should be one of the following | 24 | - compatible: SGRF should be one of the following |
diff --git a/Documentation/devicetree/bindings/sound/rockchip-i2s.txt b/Documentation/devicetree/bindings/sound/rockchip-i2s.txt index 4ea29aa9af59..a6600f6dea64 100644 --- a/Documentation/devicetree/bindings/sound/rockchip-i2s.txt +++ b/Documentation/devicetree/bindings/sound/rockchip-i2s.txt | |||
@@ -5,7 +5,7 @@ audio data transfer between devices in the system. | |||
5 | 5 | ||
6 | Required properties: | 6 | Required properties: |
7 | 7 | ||
8 | - compatible: should be one of the followings | 8 | - compatible: should be one of the following: |
9 | - "rockchip,rk3066-i2s": for rk3066 | 9 | - "rockchip,rk3066-i2s": for rk3066 |
10 | - "rockchip,rk3188-i2s", "rockchip,rk3066-i2s": for rk3188 | 10 | - "rockchip,rk3188-i2s", "rockchip,rk3066-i2s": for rk3188 |
11 | - "rockchip,rk3288-i2s", "rockchip,rk3066-i2s": for rk3288 | 11 | - "rockchip,rk3288-i2s", "rockchip,rk3066-i2s": for rk3288 |
@@ -17,7 +17,7 @@ Required properties: | |||
17 | Documentation/devicetree/bindings/dma/dma.txt | 17 | Documentation/devicetree/bindings/dma/dma.txt |
18 | - dma-names: should include "tx" and "rx". | 18 | - dma-names: should include "tx" and "rx". |
19 | - clocks: a list of phandle + clock-specifer pairs, one for each entry in clock-names. | 19 | - clocks: a list of phandle + clock-specifer pairs, one for each entry in clock-names. |
20 | - clock-names: should contain followings: | 20 | - clock-names: should contain the following: |
21 | - "i2s_hclk": clock for I2S BUS | 21 | - "i2s_hclk": clock for I2S BUS |
22 | - "i2s_clk" : clock for I2S controller | 22 | - "i2s_clk" : clock for I2S controller |
23 | - rockchip,playback-channels: max playback channels, if not set, 8 channels default. | 23 | - rockchip,playback-channels: max playback channels, if not set, 8 channels default. |
diff --git a/Documentation/devicetree/bindings/sound/sun4i-codec.txt b/Documentation/devicetree/bindings/sound/sun4i-codec.txt index 3033bd8aab0f..3863531d1e6d 100644 --- a/Documentation/devicetree/bindings/sound/sun4i-codec.txt +++ b/Documentation/devicetree/bindings/sound/sun4i-codec.txt | |||
@@ -14,7 +14,7 @@ Required properties: | |||
14 | - dma-names: should include "tx" and "rx". | 14 | - dma-names: should include "tx" and "rx". |
15 | - clocks: a list of phandle + clock-specifer pairs, one for each entry | 15 | - clocks: a list of phandle + clock-specifer pairs, one for each entry |
16 | in clock-names. | 16 | in clock-names. |
17 | - clock-names: should contain followings: | 17 | - clock-names: should contain the following: |
18 | - "apb": the parent APB clock for this controller | 18 | - "apb": the parent APB clock for this controller |
19 | - "codec": the parent module clock | 19 | - "codec": the parent module clock |
20 | 20 | ||
diff --git a/Documentation/devicetree/bindings/sound/sun4i-i2s.txt b/Documentation/devicetree/bindings/sound/sun4i-i2s.txt index f4adc58f82ba..ee21da865771 100644 --- a/Documentation/devicetree/bindings/sound/sun4i-i2s.txt +++ b/Documentation/devicetree/bindings/sound/sun4i-i2s.txt | |||
@@ -5,7 +5,7 @@ audio data transfer between devices in the system. | |||
5 | 5 | ||
6 | Required properties: | 6 | Required properties: |
7 | 7 | ||
8 | - compatible: should be one of the followings | 8 | - compatible: should be one of the following: |
9 | - "allwinner,sun4i-a10-i2s" | 9 | - "allwinner,sun4i-a10-i2s" |
10 | - "allwinner,sun6i-a31-i2s" | 10 | - "allwinner,sun6i-a31-i2s" |
11 | - reg: physical base address of the controller and length of memory mapped | 11 | - reg: physical base address of the controller and length of memory mapped |
@@ -15,7 +15,7 @@ Required properties: | |||
15 | Documentation/devicetree/bindings/dma/dma.txt | 15 | Documentation/devicetree/bindings/dma/dma.txt |
16 | - dma-names: should include "tx" and "rx". | 16 | - dma-names: should include "tx" and "rx". |
17 | - clocks: a list of phandle + clock-specifer pairs, one for each entry in clock-names. | 17 | - clocks: a list of phandle + clock-specifer pairs, one for each entry in clock-names. |
18 | - clock-names: should contain followings: | 18 | - clock-names: should contain the following: |
19 | - "apb" : clock for the I2S bus interface | 19 | - "apb" : clock for the I2S bus interface |
20 | - "mod" : module clock for the I2S controller | 20 | - "mod" : module clock for the I2S controller |
21 | - #sound-dai-cells : Must be equal to 0 | 21 | - #sound-dai-cells : Must be equal to 0 |
diff --git a/Documentation/filesystems/autofs4-mount-control.txt b/Documentation/filesystems/autofs4-mount-control.txt index 50a3e01a36f8..e5177cb31a04 100644 --- a/Documentation/filesystems/autofs4-mount-control.txt +++ b/Documentation/filesystems/autofs4-mount-control.txt | |||
@@ -179,6 +179,7 @@ struct autofs_dev_ioctl { | |||
179 | * including this struct */ | 179 | * including this struct */ |
180 | __s32 ioctlfd; /* automount command fd */ | 180 | __s32 ioctlfd; /* automount command fd */ |
181 | 181 | ||
182 | /* Command parameters */ | ||
182 | union { | 183 | union { |
183 | struct args_protover protover; | 184 | struct args_protover protover; |
184 | struct args_protosubver protosubver; | 185 | struct args_protosubver protosubver; |
diff --git a/Documentation/filesystems/autofs4.txt b/Documentation/filesystems/autofs4.txt index 8fac3fe7b8c9..f10dd590f69f 100644 --- a/Documentation/filesystems/autofs4.txt +++ b/Documentation/filesystems/autofs4.txt | |||
@@ -65,7 +65,7 @@ directory is a mount trap only if the filesystem is mounted *direct* | |||
65 | and the root is empty. | 65 | and the root is empty. |
66 | 66 | ||
67 | Directories created in the root directory are mount traps only if the | 67 | Directories created in the root directory are mount traps only if the |
68 | filesystem is mounted *indirect* and they are empty. | 68 | filesystem is mounted *indirect* and they are empty. |
69 | 69 | ||
70 | Directories further down the tree depend on the *maxproto* mount | 70 | Directories further down the tree depend on the *maxproto* mount |
71 | option and particularly whether it is less than five or not. | 71 | option and particularly whether it is less than five or not. |
@@ -352,7 +352,7 @@ Communicating with autofs: root directory ioctls | |||
352 | ------------------------------------------------ | 352 | ------------------------------------------------ |
353 | 353 | ||
354 | The root directory of an autofs filesystem will respond to a number of | 354 | The root directory of an autofs filesystem will respond to a number of |
355 | ioctls. The process issuing the ioctl must have the CAP_SYS_ADMIN | 355 | ioctls. The process issuing the ioctl must have the CAP_SYS_ADMIN |
356 | capability, or must be the automount daemon. | 356 | capability, or must be the automount daemon. |
357 | 357 | ||
358 | The available ioctl commands are: | 358 | The available ioctl commands are: |
@@ -425,8 +425,20 @@ Each ioctl is passed a pointer to an `autofs_dev_ioctl` structure: | |||
425 | * including this struct */ | 425 | * including this struct */ |
426 | __s32 ioctlfd; /* automount command fd */ | 426 | __s32 ioctlfd; /* automount command fd */ |
427 | 427 | ||
428 | __u32 arg1; /* Command parameters */ | 428 | /* Command parameters */ |
429 | __u32 arg2; | 429 | union { |
430 | struct args_protover protover; | ||
431 | struct args_protosubver protosubver; | ||
432 | struct args_openmount openmount; | ||
433 | struct args_ready ready; | ||
434 | struct args_fail fail; | ||
435 | struct args_setpipefd setpipefd; | ||
436 | struct args_timeout timeout; | ||
437 | struct args_requester requester; | ||
438 | struct args_expire expire; | ||
439 | struct args_askumount askumount; | ||
440 | struct args_ismountpoint ismountpoint; | ||
441 | }; | ||
430 | 442 | ||
431 | char path[0]; | 443 | char path[0]; |
432 | }; | 444 | }; |
@@ -446,25 +458,22 @@ Commands are: | |||
446 | set version numbers. | 458 | set version numbers. |
447 | - **AUTOFS_DEV_IOCTL_OPENMOUNT_CMD**: return an open file descriptor | 459 | - **AUTOFS_DEV_IOCTL_OPENMOUNT_CMD**: return an open file descriptor |
448 | on the root of an autofs filesystem. The filesystem is identified | 460 | on the root of an autofs filesystem. The filesystem is identified |
449 | by name and device number, which is stored in `arg1`. Device | 461 | by name and device number, which is stored in `openmount.devid`. |
450 | numbers for existing filesystems can be found in | 462 | Device numbers for existing filesystems can be found in |
451 | `/proc/self/mountinfo`. | 463 | `/proc/self/mountinfo`. |
452 | - **AUTOFS_DEV_IOCTL_CLOSEMOUNT_CMD**: same as `close(ioctlfd)`. | 464 | - **AUTOFS_DEV_IOCTL_CLOSEMOUNT_CMD**: same as `close(ioctlfd)`. |
453 | - **AUTOFS_DEV_IOCTL_SETPIPEFD_CMD**: if the filesystem is in | 465 | - **AUTOFS_DEV_IOCTL_SETPIPEFD_CMD**: if the filesystem is in |
454 | catatonic mode, this can provide the write end of a new pipe | 466 | catatonic mode, this can provide the write end of a new pipe |
455 | in `arg1` to re-establish communication with a daemon. The | 467 | in `setpipefd.pipefd` to re-establish communication with a daemon. |
456 | process group of the calling process is used to identify the | 468 | The process group of the calling process is used to identify the |
457 | daemon. | 469 | daemon. |
458 | - **AUTOFS_DEV_IOCTL_REQUESTER_CMD**: `path` should be a | 470 | - **AUTOFS_DEV_IOCTL_REQUESTER_CMD**: `path` should be a |
459 | name within the filesystem that has been auto-mounted on. | 471 | name within the filesystem that has been auto-mounted on. |
460 | arg1 is the dev number of the underlying autofs. On successful | 472 | On successful return, `requester.uid` and `requester.gid` will be |
461 | return, `arg1` and `arg2` will be the UID and GID of the process | 473 | the UID and GID of the process which triggered that mount. |
462 | which triggered that mount. | ||
463 | |||
464 | - **AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD**: Check if path is a | 474 | - **AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD**: Check if path is a |
465 | mountpoint of a particular type - see separate documentation for | 475 | mountpoint of a particular type - see separate documentation for |
466 | details. | 476 | details. |
467 | |||
468 | - **AUTOFS_DEV_IOCTL_PROTOVER_CMD**: | 477 | - **AUTOFS_DEV_IOCTL_PROTOVER_CMD**: |
469 | - **AUTOFS_DEV_IOCTL_PROTOSUBVER_CMD**: | 478 | - **AUTOFS_DEV_IOCTL_PROTOSUBVER_CMD**: |
470 | - **AUTOFS_DEV_IOCTL_READY_CMD**: | 479 | - **AUTOFS_DEV_IOCTL_READY_CMD**: |
@@ -474,7 +483,7 @@ Commands are: | |||
474 | - **AUTOFS_DEV_IOCTL_EXPIRE_CMD**: | 483 | - **AUTOFS_DEV_IOCTL_EXPIRE_CMD**: |
475 | - **AUTOFS_DEV_IOCTL_ASKUMOUNT_CMD**: These all have the same | 484 | - **AUTOFS_DEV_IOCTL_ASKUMOUNT_CMD**: These all have the same |
476 | function as the similarly named **AUTOFS_IOC** ioctls, except | 485 | function as the similarly named **AUTOFS_IOC** ioctls, except |
477 | that **FAIL** can be given an explicit error number in `arg1` | 486 | that **FAIL** can be given an explicit error number in `fail.status` |
478 | instead of assuming `ENOENT`, and this **EXPIRE** command | 487 | instead of assuming `ENOENT`, and this **EXPIRE** command |
479 | corresponds to **AUTOFS_IOC_EXPIRE_MULTI**. | 488 | corresponds to **AUTOFS_IOC_EXPIRE_MULTI**. |
480 | 489 | ||
@@ -512,7 +521,7 @@ always be mounted "shared". e.g. | |||
512 | 521 | ||
513 | > `mount --make-shared /autofs/mount/point` | 522 | > `mount --make-shared /autofs/mount/point` |
514 | 523 | ||
515 | The automount daemon is only able to mange a single mount location for | 524 | The automount daemon is only able to manage a single mount location for |
516 | an autofs filesystem and if mounts on that are not 'shared', other | 525 | an autofs filesystem and if mounts on that are not 'shared', other |
517 | locations will not behave as expected. In particular access to those | 526 | locations will not behave as expected. In particular access to those |
518 | other locations will likely result in the `ELOOP` error | 527 | other locations will likely result in the `ELOOP` error |
diff --git a/Documentation/filesystems/quota.txt b/Documentation/filesystems/quota.txt index 29fc01552646..32874b06ebe9 100644 --- a/Documentation/filesystems/quota.txt +++ b/Documentation/filesystems/quota.txt | |||
@@ -6,7 +6,7 @@ Quota subsystem allows system administrator to set limits on used space and | |||
6 | number of used inodes (inode is a filesystem structure which is associated with | 6 | number of used inodes (inode is a filesystem structure which is associated with |
7 | each file or directory) for users and/or groups. For both used space and number | 7 | each file or directory) for users and/or groups. For both used space and number |
8 | of used inodes there are actually two limits. The first one is called softlimit | 8 | of used inodes there are actually two limits. The first one is called softlimit |
9 | and the second one hardlimit. An user can never exceed a hardlimit for any | 9 | and the second one hardlimit. A user can never exceed a hardlimit for any |
10 | resource (unless he has CAP_SYS_RESOURCE capability). User is allowed to exceed | 10 | resource (unless he has CAP_SYS_RESOURCE capability). User is allowed to exceed |
11 | softlimit but only for limited period of time. This period is called "grace | 11 | softlimit but only for limited period of time. This period is called "grace |
12 | period" or "grace time". When grace time is over, user is not able to allocate | 12 | period" or "grace time". When grace time is over, user is not able to allocate |
diff --git a/Documentation/kselftest.txt b/Documentation/kselftest.txt index d431dc82c228..5bd590335839 100644 --- a/Documentation/kselftest.txt +++ b/Documentation/kselftest.txt | |||
@@ -59,14 +59,14 @@ Install selftests | |||
59 | ================= | 59 | ================= |
60 | 60 | ||
61 | You can use kselftest_install.sh tool installs selftests in default | 61 | You can use kselftest_install.sh tool installs selftests in default |
62 | location which is tools/testing/selftests/kselftest or an user specified | 62 | location which is tools/testing/selftests/kselftest or a user specified |
63 | location. | 63 | location. |
64 | 64 | ||
65 | To install selftests in default location: | 65 | To install selftests in default location: |
66 | $ cd tools/testing/selftests | 66 | $ cd tools/testing/selftests |
67 | $ ./kselftest_install.sh | 67 | $ ./kselftest_install.sh |
68 | 68 | ||
69 | To install selftests in an user specified location: | 69 | To install selftests in a user specified location: |
70 | $ cd tools/testing/selftests | 70 | $ cd tools/testing/selftests |
71 | $ ./kselftest_install.sh install_dir | 71 | $ ./kselftest_install.sh install_dir |
72 | 72 | ||
diff --git a/Documentation/media/dvb-drivers/ci.rst b/Documentation/media/dvb-drivers/ci.rst index 8124bf5ce5ef..69b07e9d1816 100644 --- a/Documentation/media/dvb-drivers/ci.rst +++ b/Documentation/media/dvb-drivers/ci.rst | |||
@@ -20,7 +20,7 @@ existing low level CI API. | |||
20 | ca_zap | 20 | ca_zap |
21 | ~~~~~~ | 21 | ~~~~~~ |
22 | 22 | ||
23 | An userspace application, like ``ca_zap`` is required to handle encrypted | 23 | A userspace application, like ``ca_zap`` is required to handle encrypted |
24 | MPEG-TS streams. | 24 | MPEG-TS streams. |
25 | 25 | ||
26 | The ``ca_zap`` userland application is in charge of sending the | 26 | The ``ca_zap`` userland application is in charge of sending the |
diff --git a/Documentation/media/uapi/dvb/dvb-frontend-parameters.rst b/Documentation/media/uapi/dvb/dvb-frontend-parameters.rst index bf31411fc9df..899fd5c3545e 100644 --- a/Documentation/media/uapi/dvb/dvb-frontend-parameters.rst +++ b/Documentation/media/uapi/dvb/dvb-frontend-parameters.rst | |||
@@ -9,7 +9,7 @@ frontend parameters | |||
9 | The kind of parameters passed to the frontend device for tuning depend | 9 | The kind of parameters passed to the frontend device for tuning depend |
10 | on the kind of hardware you are using. | 10 | on the kind of hardware you are using. |
11 | 11 | ||
12 | The struct ``dvb_frontend_parameters`` uses an union with specific | 12 | The struct ``dvb_frontend_parameters`` uses a union with specific |
13 | per-system parameters. However, as newer delivery systems required more | 13 | per-system parameters. However, as newer delivery systems required more |
14 | data, the structure size weren't enough to fit, and just extending its | 14 | data, the structure size weren't enough to fit, and just extending its |
15 | size would break the existing applications. So, those parameters were | 15 | size would break the existing applications. So, those parameters were |
@@ -23,7 +23,7 @@ So, newer applications should use | |||
23 | instead, in order to be able to support the newer System Delivery like | 23 | instead, in order to be able to support the newer System Delivery like |
24 | DVB-S2, DVB-T2, DVB-C2, ISDB, etc. | 24 | DVB-S2, DVB-T2, DVB-C2, ISDB, etc. |
25 | 25 | ||
26 | All kinds of parameters are combined as an union in the | 26 | All kinds of parameters are combined as a union in the |
27 | FrontendParameters structure: | 27 | FrontendParameters structure: |
28 | 28 | ||
29 | 29 | ||
diff --git a/Documentation/memory-hotplug.txt b/Documentation/memory-hotplug.txt index 5de846d3ecc0..670f3ded0802 100644 --- a/Documentation/memory-hotplug.txt +++ b/Documentation/memory-hotplug.txt | |||
@@ -114,11 +114,11 @@ config options. | |||
114 | Memory model -> Sparse Memory (CONFIG_SPARSEMEM) | 114 | Memory model -> Sparse Memory (CONFIG_SPARSEMEM) |
115 | Allow for memory hot-add (CONFIG_MEMORY_HOTPLUG) | 115 | Allow for memory hot-add (CONFIG_MEMORY_HOTPLUG) |
116 | 116 | ||
117 | - To enable memory removal, the followings are also necessary | 117 | - To enable memory removal, the following are also necessary |
118 | Allow for memory hot remove (CONFIG_MEMORY_HOTREMOVE) | 118 | Allow for memory hot remove (CONFIG_MEMORY_HOTREMOVE) |
119 | Page Migration (CONFIG_MIGRATION) | 119 | Page Migration (CONFIG_MIGRATION) |
120 | 120 | ||
121 | - For ACPI memory hotplug, the followings are also necessary | 121 | - For ACPI memory hotplug, the following are also necessary |
122 | Memory hotplug (under ACPI Support menu) (CONFIG_ACPI_HOTPLUG_MEMORY) | 122 | Memory hotplug (under ACPI Support menu) (CONFIG_ACPI_HOTPLUG_MEMORY) |
123 | This option can be kernel module. | 123 | This option can be kernel module. |
124 | 124 | ||
diff --git a/Documentation/networking/cdc_mbim.txt b/Documentation/networking/cdc_mbim.txt index a15ea602aa52..b9482ca10254 100644 --- a/Documentation/networking/cdc_mbim.txt +++ b/Documentation/networking/cdc_mbim.txt | |||
@@ -38,7 +38,7 @@ Basic usage | |||
38 | =========== | 38 | =========== |
39 | 39 | ||
40 | MBIM functions are inactive when unmanaged. The cdc_mbim driver only | 40 | MBIM functions are inactive when unmanaged. The cdc_mbim driver only |
41 | provides an userspace interface to the MBIM control channel, and will | 41 | provides a userspace interface to the MBIM control channel, and will |
42 | not participate in the management of the function. This implies that a | 42 | not participate in the management of the function. This implies that a |
43 | userspace MBIM management application always is required to enable a | 43 | userspace MBIM management application always is required to enable a |
44 | MBIM function. | 44 | MBIM function. |
@@ -200,7 +200,7 @@ structure described in section 10.5.29 of [1]. | |||
200 | The DSS VLAN subdevices are used as a practical interface between the | 200 | The DSS VLAN subdevices are used as a practical interface between the |
201 | shared MBIM data channel and a MBIM DSS aware userspace application. | 201 | shared MBIM data channel and a MBIM DSS aware userspace application. |
202 | It is not intended to be presented as-is to an end user. The | 202 | It is not intended to be presented as-is to an end user. The |
203 | assumption is that an userspace application initiating a DSS session | 203 | assumption is that a userspace application initiating a DSS session |
204 | also takes care of the necessary framing of the DSS data, presenting | 204 | also takes care of the necessary framing of the DSS data, presenting |
205 | the stream to the end user in an appropriate way for the stream type. | 205 | the stream to the end user in an appropriate way for the stream type. |
206 | 206 | ||
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas index 00ffdf187f0b..234ddabb23ef 100644 --- a/Documentation/scsi/ChangeLog.megaraid_sas +++ b/Documentation/scsi/ChangeLog.megaraid_sas | |||
@@ -549,7 +549,7 @@ ii. Reduced by 1 max cmds sent to FW from Driver to make the reply_q_sz same | |||
549 | 3 Older Version : 00.00.03.02 | 549 | 3 Older Version : 00.00.03.02 |
550 | 550 | ||
551 | i. Send stop adapter to FW & Dump pending FW cmds before declaring adapter dead. | 551 | i. Send stop adapter to FW & Dump pending FW cmds before declaring adapter dead. |
552 | New varible added to set dbg level. | 552 | New variable added to set dbg level. |
553 | ii. Disable interrupt made as fn pointer as they are different for 1068 / 1078 | 553 | ii. Disable interrupt made as fn pointer as they are different for 1068 / 1078 |
554 | iii. Frame count optimization. Main frame can contain 2 SGE for 64 bit SGLs and | 554 | iii. Frame count optimization. Main frame can contain 2 SGE for 64 bit SGLs and |
555 | 3 SGE for 32 bit SGL | 555 | 3 SGE for 32 bit SGL |
diff --git a/Documentation/sound/hd-audio/notes.rst b/Documentation/sound/hd-audio/notes.rst index 168d0cfab1ce..9eeb9b468706 100644 --- a/Documentation/sound/hd-audio/notes.rst +++ b/Documentation/sound/hd-audio/notes.rst | |||
@@ -697,7 +697,7 @@ If it's a regression, at best, send alsa-info outputs of both working | |||
697 | and non-working kernels. This is really helpful because we can | 697 | and non-working kernels. This is really helpful because we can |
698 | compare the codec registers directly. | 698 | compare the codec registers directly. |
699 | 699 | ||
700 | Send a bug report either the followings: | 700 | Send a bug report either the following: |
701 | 701 | ||
702 | kernel-bugzilla | 702 | kernel-bugzilla |
703 | https://bugzilla.kernel.org/ | 703 | https://bugzilla.kernel.org/ |
diff --git a/Documentation/vm/userfaultfd.txt b/Documentation/vm/userfaultfd.txt index fe51a5aa8963..0e5543a920e5 100644 --- a/Documentation/vm/userfaultfd.txt +++ b/Documentation/vm/userfaultfd.txt | |||
@@ -149,7 +149,7 @@ migration thread in the QEMU running in the destination node will | |||
149 | receive the page that triggered the userfault and it'll map it as | 149 | receive the page that triggered the userfault and it'll map it as |
150 | usual with the UFFDIO_COPY|ZEROPAGE (without actually knowing if it | 150 | usual with the UFFDIO_COPY|ZEROPAGE (without actually knowing if it |
151 | was spontaneously sent by the source or if it was an urgent page | 151 | was spontaneously sent by the source or if it was an urgent page |
152 | requested through an userfault). | 152 | requested through a userfault). |
153 | 153 | ||
154 | By the time the userfaults start, the QEMU in the destination node | 154 | By the time the userfaults start, the QEMU in the destination node |
155 | doesn't need to keep any per-page state bitmap relative to the live | 155 | doesn't need to keep any per-page state bitmap relative to the live |
diff --git a/MAINTAINERS b/MAINTAINERS index 6cd8945b9094..846f97aa3508 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -7286,6 +7286,7 @@ M: Masami Hiramatsu <mhiramat@kernel.org> | |||
7286 | S: Maintained | 7286 | S: Maintained |
7287 | F: Documentation/kprobes.txt | 7287 | F: Documentation/kprobes.txt |
7288 | F: include/linux/kprobes.h | 7288 | F: include/linux/kprobes.h |
7289 | F: include/asm-generic/kprobes.h | ||
7289 | F: kernel/kprobes.c | 7290 | F: kernel/kprobes.c |
7290 | 7291 | ||
7291 | KS0108 LCD CONTROLLER DRIVER | 7292 | KS0108 LCD CONTROLLER DRIVER |
diff --git a/arch/Kconfig b/arch/Kconfig index d0012add6b19..cd211a14a88f 100644 --- a/arch/Kconfig +++ b/arch/Kconfig | |||
@@ -29,7 +29,7 @@ config OPROFILE_EVENT_MULTIPLEX | |||
29 | The number of hardware counters is limited. The multiplexing | 29 | The number of hardware counters is limited. The multiplexing |
30 | feature enables OProfile to gather more events than counters | 30 | feature enables OProfile to gather more events than counters |
31 | are provided by the hardware. This is realized by switching | 31 | are provided by the hardware. This is realized by switching |
32 | between events at an user specified time interval. | 32 | between events at a user specified time interval. |
33 | 33 | ||
34 | If unsure, say N. | 34 | If unsure, say N. |
35 | 35 | ||
diff --git a/arch/alpha/include/asm/Kbuild b/arch/alpha/include/asm/Kbuild index 46e47c088622..d103db5af5ff 100644 --- a/arch/alpha/include/asm/Kbuild +++ b/arch/alpha/include/asm/Kbuild | |||
@@ -10,3 +10,4 @@ generic-y += preempt.h | |||
10 | generic-y += sections.h | 10 | generic-y += sections.h |
11 | generic-y += trace_clock.h | 11 | generic-y += trace_clock.h |
12 | generic-y += current.h | 12 | generic-y += current.h |
13 | generic-y += kprobes.h | ||
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 46bf263c3153..acb4b146a607 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c | |||
@@ -144,7 +144,7 @@ smp_callin(void) | |||
144 | alpha_mv.smp_callin(); | 144 | alpha_mv.smp_callin(); |
145 | 145 | ||
146 | /* All kernel threads share the same mm context. */ | 146 | /* All kernel threads share the same mm context. */ |
147 | atomic_inc(&init_mm.mm_count); | 147 | mmgrab(&init_mm); |
148 | current->active_mm = &init_mm; | 148 | current->active_mm = &init_mm; |
149 | 149 | ||
150 | /* inform the notifiers about the new cpu */ | 150 | /* inform the notifiers about the new cpu */ |
diff --git a/arch/arc/include/asm/kprobes.h b/arch/arc/include/asm/kprobes.h index 944dbedb38b5..00bdbe167615 100644 --- a/arch/arc/include/asm/kprobes.h +++ b/arch/arc/include/asm/kprobes.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef _ARC_KPROBES_H | 9 | #ifndef _ARC_KPROBES_H |
10 | #define _ARC_KPROBES_H | 10 | #define _ARC_KPROBES_H |
11 | 11 | ||
12 | #include <asm-generic/kprobes.h> | ||
13 | |||
12 | #ifdef CONFIG_KPROBES | 14 | #ifdef CONFIG_KPROBES |
13 | 15 | ||
14 | typedef u16 kprobe_opcode_t; | 16 | typedef u16 kprobe_opcode_t; |
@@ -55,6 +57,6 @@ void trap_is_kprobe(unsigned long address, struct pt_regs *regs); | |||
55 | static void trap_is_kprobe(unsigned long address, struct pt_regs *regs) | 57 | static void trap_is_kprobe(unsigned long address, struct pt_regs *regs) |
56 | { | 58 | { |
57 | } | 59 | } |
58 | #endif | 60 | #endif /* CONFIG_KPROBES */ |
59 | 61 | ||
60 | #endif | 62 | #endif /* _ARC_KPROBES_H */ |
diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c index 2afbafadb6ab..b8e8d3944481 100644 --- a/arch/arc/kernel/smp.c +++ b/arch/arc/kernel/smp.c | |||
@@ -139,8 +139,8 @@ void start_kernel_secondary(void) | |||
139 | /* MMU, Caches, Vector Table, Interrupts etc */ | 139 | /* MMU, Caches, Vector Table, Interrupts etc */ |
140 | setup_processor(); | 140 | setup_processor(); |
141 | 141 | ||
142 | atomic_inc(&mm->mm_users); | 142 | mmget(mm); |
143 | atomic_inc(&mm->mm_count); | 143 | mmgrab(mm); |
144 | current->active_mm = mm; | 144 | current->active_mm = mm; |
145 | cpumask_set_cpu(cpu, mm_cpumask(mm)); | 145 | cpumask_set_cpu(cpu, mm_cpumask(mm)); |
146 | 146 | ||
diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c index 61fd1ce63c56..b6e4f7a7419b 100644 --- a/arch/arc/kernel/unwind.c +++ b/arch/arc/kernel/unwind.c | |||
@@ -1051,9 +1051,9 @@ int arc_unwind(struct unwind_frame_info *frame) | |||
1051 | ++ptr; | 1051 | ++ptr; |
1052 | } | 1052 | } |
1053 | if (cie != NULL) { | 1053 | if (cie != NULL) { |
1054 | /* get code aligment factor */ | 1054 | /* get code alignment factor */ |
1055 | state.codeAlign = get_uleb128(&ptr, end); | 1055 | state.codeAlign = get_uleb128(&ptr, end); |
1056 | /* get data aligment factor */ | 1056 | /* get data alignment factor */ |
1057 | state.dataAlign = get_sleb128(&ptr, end); | 1057 | state.dataAlign = get_sleb128(&ptr, end); |
1058 | if (state.codeAlign == 0 || state.dataAlign == 0 || ptr >= end) | 1058 | if (state.codeAlign == 0 || state.dataAlign == 0 || ptr >= end) |
1059 | cie = NULL; | 1059 | cie = NULL; |
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index fc6d541549a2..9150f9732785 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -1196,7 +1196,7 @@ skip: | |||
1196 | bgt loop1 | 1196 | bgt loop1 |
1197 | finished: | 1197 | finished: |
1198 | ldmfd sp!, {r0-r7, r9-r11} | 1198 | ldmfd sp!, {r0-r7, r9-r11} |
1199 | mov r10, #0 @ swith back to cache level 0 | 1199 | mov r10, #0 @ switch back to cache level 0 |
1200 | mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr | 1200 | mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr |
1201 | iflush: | 1201 | iflush: |
1202 | mcr p15, 0, r10, c7, c10, 4 @ DSB | 1202 | mcr p15, 0, r10, c7, c10, 4 @ DSB |
diff --git a/arch/arm/include/asm/kprobes.h b/arch/arm/include/asm/kprobes.h index 3ea9be559726..59655459da59 100644 --- a/arch/arm/include/asm/kprobes.h +++ b/arch/arm/include/asm/kprobes.h | |||
@@ -16,6 +16,9 @@ | |||
16 | #ifndef _ARM_KPROBES_H | 16 | #ifndef _ARM_KPROBES_H |
17 | #define _ARM_KPROBES_H | 17 | #define _ARM_KPROBES_H |
18 | 18 | ||
19 | #include <asm-generic/kprobes.h> | ||
20 | |||
21 | #ifdef CONFIG_KPROBES | ||
19 | #include <linux/types.h> | 22 | #include <linux/types.h> |
20 | #include <linux/ptrace.h> | 23 | #include <linux/ptrace.h> |
21 | #include <linux/notifier.h> | 24 | #include <linux/notifier.h> |
@@ -83,4 +86,5 @@ struct arch_optimized_insn { | |||
83 | */ | 86 | */ |
84 | }; | 87 | }; |
85 | 88 | ||
89 | #endif /* CONFIG_KPROBES */ | ||
86 | #endif /* _ARM_KPROBES_H */ | 90 | #endif /* _ARM_KPROBES_H */ |
diff --git a/arch/arm/include/asm/mach/flash.h b/arch/arm/include/asm/mach/flash.h index 4ca69fe2c850..bada3f845a97 100644 --- a/arch/arm/include/asm/mach/flash.h +++ b/arch/arm/include/asm/mach/flash.h | |||
@@ -22,7 +22,7 @@ struct mtd_info; | |||
22 | * set_vpp: method called to enable or disable VPP | 22 | * set_vpp: method called to enable or disable VPP |
23 | * mmcontrol: method called to enable or disable Sync. Burst Read in OneNAND | 23 | * mmcontrol: method called to enable or disable Sync. Burst Read in OneNAND |
24 | * parts: optional array of mtd_partitions for static partitioning | 24 | * parts: optional array of mtd_partitions for static partitioning |
25 | * nr_parts: number of mtd_partitions for static partitoning | 25 | * nr_parts: number of mtd_partitions for static partitioning |
26 | */ | 26 | */ |
27 | struct flash_platform_data { | 27 | struct flash_platform_data { |
28 | const char *map_name; | 28 | const char *map_name; |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 7dd14e8395e6..c6514ce0fcbc 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -371,7 +371,7 @@ asmlinkage void secondary_start_kernel(void) | |||
371 | * reference and switch to it. | 371 | * reference and switch to it. |
372 | */ | 372 | */ |
373 | cpu = smp_processor_id(); | 373 | cpu = smp_processor_id(); |
374 | atomic_inc(&mm->mm_count); | 374 | mmgrab(mm); |
375 | current->active_mm = mm; | 375 | current->active_mm = mm; |
376 | cpumask_set_cpu(cpu, mm_cpumask(mm)); | 376 | cpumask_set_cpu(cpu, mm_cpumask(mm)); |
377 | 377 | ||
diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c index 6bf626700557..1346b3ab34a5 100644 --- a/arch/arm/mach-omap2/omap_twl.c +++ b/arch/arm/mach-omap2/omap_twl.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /** | 1 | /** |
2 | * OMAP and TWL PMIC specific intializations. | 2 | * OMAP and TWL PMIC specific initializations. |
3 | * | 3 | * |
4 | * Copyright (C) 2010 Texas Instruments Incorporated. | 4 | * Copyright (C) 2010 Texas Instruments Incorporated. |
5 | * Thara Gopinath | 5 | * Thara Gopinath |
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index a134d8a13d00..de78109d002d 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -164,7 +164,7 @@ skip: | |||
164 | cmp r3, r10 | 164 | cmp r3, r10 |
165 | bgt flush_levels | 165 | bgt flush_levels |
166 | finished: | 166 | finished: |
167 | mov r10, #0 @ swith back to cache level 0 | 167 | mov r10, #0 @ switch back to cache level 0 |
168 | mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr | 168 | mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr |
169 | dsb st | 169 | dsb st |
170 | isb | 170 | isb |
diff --git a/arch/arm/mm/cache-v7m.S b/arch/arm/mm/cache-v7m.S index 816a7e44e6f1..788486e830d3 100644 --- a/arch/arm/mm/cache-v7m.S +++ b/arch/arm/mm/cache-v7m.S | |||
@@ -217,7 +217,7 @@ skip: | |||
217 | cmp r3, r10 | 217 | cmp r3, r10 |
218 | bgt flush_levels | 218 | bgt flush_levels |
219 | finished: | 219 | finished: |
220 | mov r10, #0 @ swith back to cache level 0 | 220 | mov r10, #0 @ switch back to cache level 0 |
221 | write_csselr r10, r3 @ select current cache level in cssr | 221 | write_csselr r10, r3 @ select current cache level in cssr |
222 | dsb st | 222 | dsb st |
223 | isb | 223 | isb |
diff --git a/arch/arm/probes/decode.h b/arch/arm/probes/decode.h index f9b08ba7fe73..548d622a3159 100644 --- a/arch/arm/probes/decode.h +++ b/arch/arm/probes/decode.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/stddef.h> | 23 | #include <linux/stddef.h> |
24 | #include <asm/probes.h> | 24 | #include <asm/probes.h> |
25 | #include <asm/kprobes.h> | ||
25 | 26 | ||
26 | void __init arm_probes_decode_init(void); | 27 | void __init arm_probes_decode_init(void); |
27 | 28 | ||
diff --git a/arch/arm64/include/asm/kprobes.h b/arch/arm64/include/asm/kprobes.h index 1737aecfcc5e..6deb8d726041 100644 --- a/arch/arm64/include/asm/kprobes.h +++ b/arch/arm64/include/asm/kprobes.h | |||
@@ -16,6 +16,9 @@ | |||
16 | #ifndef _ARM_KPROBES_H | 16 | #ifndef _ARM_KPROBES_H |
17 | #define _ARM_KPROBES_H | 17 | #define _ARM_KPROBES_H |
18 | 18 | ||
19 | #include <asm-generic/kprobes.h> | ||
20 | |||
21 | #ifdef CONFIG_KPROBES | ||
19 | #include <linux/types.h> | 22 | #include <linux/types.h> |
20 | #include <linux/ptrace.h> | 23 | #include <linux/ptrace.h> |
21 | #include <linux/percpu.h> | 24 | #include <linux/percpu.h> |
@@ -57,4 +60,5 @@ int kprobe_single_step_handler(struct pt_regs *regs, unsigned int esr); | |||
57 | void kretprobe_trampoline(void); | 60 | void kretprobe_trampoline(void); |
58 | void __kprobes *trampoline_probe_handler(struct pt_regs *regs); | 61 | void __kprobes *trampoline_probe_handler(struct pt_regs *regs); |
59 | 62 | ||
63 | #endif /* CONFIG_KPROBES */ | ||
60 | #endif /* _ARM_KPROBES_H */ | 64 | #endif /* _ARM_KPROBES_H */ |
diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c index 86032a012388..657977e77ec8 100644 --- a/arch/arm64/kernel/armv8_deprecated.c +++ b/arch/arm64/kernel/armv8_deprecated.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/sysreg.h> | 19 | #include <asm/sysreg.h> |
20 | #include <asm/system_misc.h> | 20 | #include <asm/system_misc.h> |
21 | #include <asm/traps.h> | 21 | #include <asm/traps.h> |
22 | #include <asm/kprobes.h> | ||
22 | #include <linux/uaccess.h> | 23 | #include <linux/uaccess.h> |
23 | #include <asm/cpufeature.h> | 24 | #include <asm/cpufeature.h> |
24 | 25 | ||
diff --git a/arch/arm64/kernel/insn.c b/arch/arm64/kernel/insn.c index b6badff5a151..3a63954a8b14 100644 --- a/arch/arm64/kernel/insn.c +++ b/arch/arm64/kernel/insn.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <asm/debug-monitors.h> | 31 | #include <asm/debug-monitors.h> |
32 | #include <asm/fixmap.h> | 32 | #include <asm/fixmap.h> |
33 | #include <asm/insn.h> | 33 | #include <asm/insn.h> |
34 | #include <asm/kprobes.h> | ||
34 | 35 | ||
35 | #define AARCH64_INSN_SF_BIT BIT(31) | 36 | #define AARCH64_INSN_SF_BIT BIT(31) |
36 | #define AARCH64_INSN_N_BIT BIT(22) | 37 | #define AARCH64_INSN_N_BIT BIT(22) |
diff --git a/arch/arm64/kernel/probes/decode-insn.h b/arch/arm64/kernel/probes/decode-insn.h index 76d3f315407f..192ab007bacb 100644 --- a/arch/arm64/kernel/probes/decode-insn.h +++ b/arch/arm64/kernel/probes/decode-insn.h | |||
@@ -16,6 +16,8 @@ | |||
16 | #ifndef _ARM_KERNEL_KPROBES_ARM64_H | 16 | #ifndef _ARM_KERNEL_KPROBES_ARM64_H |
17 | #define _ARM_KERNEL_KPROBES_ARM64_H | 17 | #define _ARM_KERNEL_KPROBES_ARM64_H |
18 | 18 | ||
19 | #include <asm/kprobes.h> | ||
20 | |||
19 | /* | 21 | /* |
20 | * ARM strongly recommends a limit of 128 bytes between LoadExcl and | 22 | * ARM strongly recommends a limit of 128 bytes between LoadExcl and |
21 | * StoreExcl instructions in a single thread of execution. So keep the | 23 | * StoreExcl instructions in a single thread of execution. So keep the |
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index a8ec5da530af..827d52d78b67 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c | |||
@@ -222,7 +222,7 @@ asmlinkage void secondary_start_kernel(void) | |||
222 | * All kernel threads share the same mm context; grab a | 222 | * All kernel threads share the same mm context; grab a |
223 | * reference and switch to it. | 223 | * reference and switch to it. |
224 | */ | 224 | */ |
225 | atomic_inc(&mm->mm_count); | 225 | mmgrab(mm); |
226 | current->active_mm = mm; | 226 | current->active_mm = mm; |
227 | 227 | ||
228 | /* | 228 | /* |
diff --git a/arch/arm64/lib/copy_template.S b/arch/arm64/lib/copy_template.S index 410fbdb8163f..f5b9210f1c83 100644 --- a/arch/arm64/lib/copy_template.S +++ b/arch/arm64/lib/copy_template.S | |||
@@ -62,7 +62,7 @@ D_h .req x14 | |||
62 | sub count, count, tmp2 | 62 | sub count, count, tmp2 |
63 | /* | 63 | /* |
64 | * Copy the leading memory data from src to dst in an increasing | 64 | * Copy the leading memory data from src to dst in an increasing |
65 | * address order.By this way,the risk of overwritting the source | 65 | * address order.By this way,the risk of overwriting the source |
66 | * memory data is eliminated when the distance between src and | 66 | * memory data is eliminated when the distance between src and |
67 | * dst is less than 16. The memory accesses here are alignment. | 67 | * dst is less than 16. The memory accesses here are alignment. |
68 | */ | 68 | */ |
diff --git a/arch/avr32/include/asm/kprobes.h b/arch/avr32/include/asm/kprobes.h index 45f563ed73fd..28dfc61ad384 100644 --- a/arch/avr32/include/asm/kprobes.h +++ b/arch/avr32/include/asm/kprobes.h | |||
@@ -11,10 +11,14 @@ | |||
11 | #ifndef __ASM_AVR32_KPROBES_H | 11 | #ifndef __ASM_AVR32_KPROBES_H |
12 | #define __ASM_AVR32_KPROBES_H | 12 | #define __ASM_AVR32_KPROBES_H |
13 | 13 | ||
14 | #include <asm-generic/kprobes.h> | ||
15 | |||
16 | #define BREAKPOINT_INSTRUCTION 0xd673 /* breakpoint */ | ||
17 | |||
18 | #ifdef CONFIG_KPROBES | ||
14 | #include <linux/types.h> | 19 | #include <linux/types.h> |
15 | 20 | ||
16 | typedef u16 kprobe_opcode_t; | 21 | typedef u16 kprobe_opcode_t; |
17 | #define BREAKPOINT_INSTRUCTION 0xd673 /* breakpoint */ | ||
18 | #define MAX_INSN_SIZE 2 | 22 | #define MAX_INSN_SIZE 2 |
19 | #define MAX_STACK_SIZE 64 /* 32 would probably be OK */ | 23 | #define MAX_STACK_SIZE 64 /* 32 would probably be OK */ |
20 | 24 | ||
@@ -46,4 +50,5 @@ extern int kprobe_exceptions_notify(struct notifier_block *self, | |||
46 | 50 | ||
47 | #define flush_insn_slot(p) do { } while (0) | 51 | #define flush_insn_slot(p) do { } while (0) |
48 | 52 | ||
53 | #endif /* CONFIG_KPROBES */ | ||
49 | #endif /* __ASM_AVR32_KPROBES_H */ | 54 | #endif /* __ASM_AVR32_KPROBES_H */ |
diff --git a/arch/blackfin/include/asm/Kbuild b/arch/blackfin/include/asm/Kbuild index d6fa60b158be..625db8ac815e 100644 --- a/arch/blackfin/include/asm/Kbuild +++ b/arch/blackfin/include/asm/Kbuild | |||
@@ -46,3 +46,4 @@ generic-y += unaligned.h | |||
46 | generic-y += user.h | 46 | generic-y += user.h |
47 | generic-y += word-at-a-time.h | 47 | generic-y += word-at-a-time.h |
48 | generic-y += xor.h | 48 | generic-y += xor.h |
49 | generic-y += kprobes.h | ||
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index 23c4ef5f8bdc..a2e6db2ce811 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c | |||
@@ -307,8 +307,8 @@ void secondary_start_kernel(void) | |||
307 | local_irq_disable(); | 307 | local_irq_disable(); |
308 | 308 | ||
309 | /* Attach the new idle task to the global mm. */ | 309 | /* Attach the new idle task to the global mm. */ |
310 | atomic_inc(&mm->mm_users); | 310 | mmget(mm); |
311 | atomic_inc(&mm->mm_count); | 311 | mmgrab(mm); |
312 | current->active_mm = mm; | 312 | current->active_mm = mm; |
313 | 313 | ||
314 | preempt_disable(); | 314 | preempt_disable(); |
diff --git a/arch/c6x/include/asm/Kbuild b/arch/c6x/include/asm/Kbuild index 4e9f57433f3a..82619c32d25b 100644 --- a/arch/c6x/include/asm/Kbuild +++ b/arch/c6x/include/asm/Kbuild | |||
@@ -61,3 +61,4 @@ generic-y += user.h | |||
61 | generic-y += vga.h | 61 | generic-y += vga.h |
62 | generic-y += word-at-a-time.h | 62 | generic-y += word-at-a-time.h |
63 | generic-y += xor.h | 63 | generic-y += xor.h |
64 | generic-y += kprobes.h | ||
diff --git a/arch/cris/include/asm/Kbuild b/arch/cris/include/asm/Kbuild index 8e4ef321001f..0f5132b08896 100644 --- a/arch/cris/include/asm/Kbuild +++ b/arch/cris/include/asm/Kbuild | |||
@@ -45,3 +45,4 @@ generic-y += types.h | |||
45 | generic-y += vga.h | 45 | generic-y += vga.h |
46 | generic-y += word-at-a-time.h | 46 | generic-y += word-at-a-time.h |
47 | generic-y += xor.h | 47 | generic-y += xor.h |
48 | generic-y += kprobes.h | ||
diff --git a/arch/frv/include/asm/Kbuild b/arch/frv/include/asm/Kbuild index 0f5b0d5d313c..c33b46715f65 100644 --- a/arch/frv/include/asm/Kbuild +++ b/arch/frv/include/asm/Kbuild | |||
@@ -7,3 +7,4 @@ generic-y += mm-arch-hooks.h | |||
7 | generic-y += preempt.h | 7 | generic-y += preempt.h |
8 | generic-y += trace_clock.h | 8 | generic-y += trace_clock.h |
9 | generic-y += word-at-a-time.h | 9 | generic-y += word-at-a-time.h |
10 | generic-y += kprobes.h | ||
diff --git a/arch/frv/mm/mmu-context.c b/arch/frv/mm/mmu-context.c index 81757d55a5b5..3473bde77f56 100644 --- a/arch/frv/mm/mmu-context.c +++ b/arch/frv/mm/mmu-context.c | |||
@@ -188,7 +188,7 @@ int cxn_pin_by_pid(pid_t pid) | |||
188 | task_lock(tsk); | 188 | task_lock(tsk); |
189 | if (tsk->mm) { | 189 | if (tsk->mm) { |
190 | mm = tsk->mm; | 190 | mm = tsk->mm; |
191 | atomic_inc(&mm->mm_users); | 191 | mmget(mm); |
192 | ret = 0; | 192 | ret = 0; |
193 | } | 193 | } |
194 | task_unlock(tsk); | 194 | task_unlock(tsk); |
diff --git a/arch/h8300/include/asm/Kbuild b/arch/h8300/include/asm/Kbuild index 5efd0c87f3c0..341740c3581c 100644 --- a/arch/h8300/include/asm/Kbuild +++ b/arch/h8300/include/asm/Kbuild | |||
@@ -74,3 +74,4 @@ generic-y += unaligned.h | |||
74 | generic-y += vga.h | 74 | generic-y += vga.h |
75 | generic-y += word-at-a-time.h | 75 | generic-y += word-at-a-time.h |
76 | generic-y += xor.h | 76 | generic-y += xor.h |
77 | generic-y += kprobes.h | ||
diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild index a43a7c90e4af..797b64a4b80b 100644 --- a/arch/hexagon/include/asm/Kbuild +++ b/arch/hexagon/include/asm/Kbuild | |||
@@ -59,3 +59,4 @@ generic-y += unaligned.h | |||
59 | generic-y += vga.h | 59 | generic-y += vga.h |
60 | generic-y += word-at-a-time.h | 60 | generic-y += word-at-a-time.h |
61 | generic-y += xor.h | 61 | generic-y += xor.h |
62 | generic-y += kprobes.h | ||
diff --git a/arch/hexagon/kernel/smp.c b/arch/hexagon/kernel/smp.c index 983bae7d2665..c02a6455839e 100644 --- a/arch/hexagon/kernel/smp.c +++ b/arch/hexagon/kernel/smp.c | |||
@@ -162,7 +162,7 @@ void start_secondary(void) | |||
162 | ); | 162 | ); |
163 | 163 | ||
164 | /* Set the memory struct */ | 164 | /* Set the memory struct */ |
165 | atomic_inc(&init_mm.mm_count); | 165 | mmgrab(&init_mm); |
166 | current->active_mm = &init_mm; | 166 | current->active_mm = &init_mm; |
167 | 167 | ||
168 | cpu = smp_processor_id(); | 168 | cpu = smp_processor_id(); |
diff --git a/arch/ia64/include/asm/kprobes.h b/arch/ia64/include/asm/kprobes.h index d5505d6f2382..0302b3664789 100644 --- a/arch/ia64/include/asm/kprobes.h +++ b/arch/ia64/include/asm/kprobes.h | |||
@@ -23,14 +23,19 @@ | |||
23 | * 2005-Apr Rusty Lynch <rusty.lynch@intel.com> and Anil S Keshavamurthy | 23 | * 2005-Apr Rusty Lynch <rusty.lynch@intel.com> and Anil S Keshavamurthy |
24 | * <anil.s.keshavamurthy@intel.com> adapted from i386 | 24 | * <anil.s.keshavamurthy@intel.com> adapted from i386 |
25 | */ | 25 | */ |
26 | #include <asm-generic/kprobes.h> | ||
27 | #include <asm/break.h> | ||
28 | |||
29 | #define BREAK_INST (long)(__IA64_BREAK_KPROBE << 6) | ||
30 | |||
31 | #ifdef CONFIG_KPROBES | ||
32 | |||
26 | #include <linux/types.h> | 33 | #include <linux/types.h> |
27 | #include <linux/ptrace.h> | 34 | #include <linux/ptrace.h> |
28 | #include <linux/percpu.h> | 35 | #include <linux/percpu.h> |
29 | #include <asm/break.h> | ||
30 | 36 | ||
31 | #define __ARCH_WANT_KPROBES_INSN_SLOT | 37 | #define __ARCH_WANT_KPROBES_INSN_SLOT |
32 | #define MAX_INSN_SIZE 2 /* last half is for kprobe-booster */ | 38 | #define MAX_INSN_SIZE 2 /* last half is for kprobe-booster */ |
33 | #define BREAK_INST (long)(__IA64_BREAK_KPROBE << 6) | ||
34 | #define NOP_M_INST (long)(1<<27) | 39 | #define NOP_M_INST (long)(1<<27) |
35 | #define BRL_INST(i1, i2) ((long)((0xcL << 37) | /* brl */ \ | 40 | #define BRL_INST(i1, i2) ((long)((0xcL << 37) | /* brl */ \ |
36 | (0x1L << 12) | /* many */ \ | 41 | (0x1L << 12) | /* many */ \ |
@@ -124,4 +129,5 @@ extern void invalidate_stacked_regs(void); | |||
124 | extern void flush_register_stack(void); | 129 | extern void flush_register_stack(void); |
125 | extern void arch_remove_kprobe(struct kprobe *p); | 130 | extern void arch_remove_kprobe(struct kprobe *p); |
126 | 131 | ||
127 | #endif /* _ASM_KPROBES_H */ | 132 | #endif /* CONFIG_KPROBES */ |
133 | #endif /* _ASM_KPROBES_H */ | ||
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index c483ece3eb84..d68322966f33 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -994,7 +994,7 @@ cpu_init (void) | |||
994 | */ | 994 | */ |
995 | ia64_setreg(_IA64_REG_CR_DCR, ( IA64_DCR_DP | IA64_DCR_DK | IA64_DCR_DX | IA64_DCR_DR | 995 | ia64_setreg(_IA64_REG_CR_DCR, ( IA64_DCR_DP | IA64_DCR_DK | IA64_DCR_DX | IA64_DCR_DR |
996 | | IA64_DCR_DA | IA64_DCR_DD | IA64_DCR_LC)); | 996 | | IA64_DCR_DA | IA64_DCR_DD | IA64_DCR_LC)); |
997 | atomic_inc(&init_mm.mm_count); | 997 | mmgrab(&init_mm); |
998 | current->active_mm = &init_mm; | 998 | current->active_mm = &init_mm; |
999 | BUG_ON(current->mm); | 999 | BUG_ON(current->mm); |
1000 | 1000 | ||
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c index 4c3b84d8406a..52704f199dd6 100644 --- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c +++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c | |||
@@ -525,7 +525,7 @@ static int sn_topology_show(struct seq_file *s, void *d) | |||
525 | /* both ends local to this partition */ | 525 | /* both ends local to this partition */ |
526 | seq_puts(s, " local"); | 526 | seq_puts(s, " local"); |
527 | else if (SN_HWPERF_FOREIGN(p)) | 527 | else if (SN_HWPERF_FOREIGN(p)) |
528 | /* both ends of the link in foreign partiton */ | 528 | /* both ends of the link in foreign partition */ |
529 | seq_puts(s, " foreign"); | 529 | seq_puts(s, " foreign"); |
530 | else | 530 | else |
531 | /* link straddles a partition */ | 531 | /* link straddles a partition */ |
diff --git a/arch/m32r/include/asm/Kbuild b/arch/m32r/include/asm/Kbuild index 8c24c5e1db66..deb298777df2 100644 --- a/arch/m32r/include/asm/Kbuild +++ b/arch/m32r/include/asm/Kbuild | |||
@@ -11,3 +11,4 @@ generic-y += preempt.h | |||
11 | generic-y += sections.h | 11 | generic-y += sections.h |
12 | generic-y += trace_clock.h | 12 | generic-y += trace_clock.h |
13 | generic-y += word-at-a-time.h | 13 | generic-y += word-at-a-time.h |
14 | generic-y += kprobes.h | ||
diff --git a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c index 136c69f1fb8a..b18bc0bd6544 100644 --- a/arch/m32r/kernel/setup.c +++ b/arch/m32r/kernel/setup.c | |||
@@ -403,7 +403,7 @@ void __init cpu_init (void) | |||
403 | printk(KERN_INFO "Initializing CPU#%d\n", cpu_id); | 403 | printk(KERN_INFO "Initializing CPU#%d\n", cpu_id); |
404 | 404 | ||
405 | /* Set up and load the per-CPU TSS and LDT */ | 405 | /* Set up and load the per-CPU TSS and LDT */ |
406 | atomic_inc(&init_mm.mm_count); | 406 | mmgrab(&init_mm); |
407 | current->active_mm = &init_mm; | 407 | current->active_mm = &init_mm; |
408 | if (current->mm) | 408 | if (current->mm) |
409 | BUG(); | 409 | BUG(); |
diff --git a/arch/m68k/ifpsp060/src/isp.S b/arch/m68k/ifpsp060/src/isp.S index 6dccda766e22..b865c1a052ba 100644 --- a/arch/m68k/ifpsp060/src/isp.S +++ b/arch/m68k/ifpsp060/src/isp.S | |||
@@ -3814,7 +3814,7 @@ CAS2W2_FILLER: | |||
3814 | # (3) Save current DFC/SFC (ASSUMED TO BE EQUAL!!!); Then set # | 3814 | # (3) Save current DFC/SFC (ASSUMED TO BE EQUAL!!!); Then set # |
3815 | # SFC/DFC according to whether exception occurred in user or # | 3815 | # SFC/DFC according to whether exception occurred in user or # |
3816 | # supervisor mode. # | 3816 | # supervisor mode. # |
3817 | # (4) Use "plpaw" instruction to pre-load ATC with efective # | 3817 | # (4) Use "plpaw" instruction to pre-load ATC with effective # |
3818 | # address page(s). THIS SHOULD NOT FAULT!!! The relevant # | 3818 | # address page(s). THIS SHOULD NOT FAULT!!! The relevant # |
3819 | # page(s) should have been made resident prior to entering # | 3819 | # page(s) should have been made resident prior to entering # |
3820 | # this routine. # | 3820 | # this routine. # |
diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild index 6c76d6c24b3d..d4f9ccbfa85c 100644 --- a/arch/m68k/include/asm/Kbuild +++ b/arch/m68k/include/asm/Kbuild | |||
@@ -33,3 +33,4 @@ generic-y += trace_clock.h | |||
33 | generic-y += types.h | 33 | generic-y += types.h |
34 | generic-y += word-at-a-time.h | 34 | generic-y += word-at-a-time.h |
35 | generic-y += xor.h | 35 | generic-y += xor.h |
36 | generic-y += kprobes.h | ||
diff --git a/arch/metag/include/asm/Kbuild b/arch/metag/include/asm/Kbuild index d3731f0db73b..f9b9df5d6de9 100644 --- a/arch/metag/include/asm/Kbuild +++ b/arch/metag/include/asm/Kbuild | |||
@@ -54,3 +54,4 @@ generic-y += user.h | |||
54 | generic-y += vga.h | 54 | generic-y += vga.h |
55 | generic-y += word-at-a-time.h | 55 | generic-y += word-at-a-time.h |
56 | generic-y += xor.h | 56 | generic-y += xor.h |
57 | generic-y += kprobes.h | ||
diff --git a/arch/metag/kernel/smp.c b/arch/metag/kernel/smp.c index bad13232de51..c622293254e4 100644 --- a/arch/metag/kernel/smp.c +++ b/arch/metag/kernel/smp.c | |||
@@ -344,8 +344,8 @@ asmlinkage void secondary_start_kernel(void) | |||
344 | * All kernel threads share the same mm context; grab a | 344 | * All kernel threads share the same mm context; grab a |
345 | * reference and switch to it. | 345 | * reference and switch to it. |
346 | */ | 346 | */ |
347 | atomic_inc(&mm->mm_users); | 347 | mmget(mm); |
348 | atomic_inc(&mm->mm_count); | 348 | mmgrab(mm); |
349 | current->active_mm = mm; | 349 | current->active_mm = mm; |
350 | cpumask_set_cpu(cpu, mm_cpumask(mm)); | 350 | cpumask_set_cpu(cpu, mm_cpumask(mm)); |
351 | enter_lazy_tlb(mm, current); | 351 | enter_lazy_tlb(mm, current); |
diff --git a/arch/microblaze/include/asm/Kbuild b/arch/microblaze/include/asm/Kbuild index 6275eb051801..1732ec13b211 100644 --- a/arch/microblaze/include/asm/Kbuild +++ b/arch/microblaze/include/asm/Kbuild | |||
@@ -10,3 +10,4 @@ generic-y += preempt.h | |||
10 | generic-y += syscalls.h | 10 | generic-y += syscalls.h |
11 | generic-y += trace_clock.h | 11 | generic-y += trace_clock.h |
12 | generic-y += word-at-a-time.h | 12 | generic-y += word-at-a-time.h |
13 | generic-y += kprobes.h | ||
diff --git a/arch/mips/include/asm/kprobes.h b/arch/mips/include/asm/kprobes.h index daba1f9a4f79..291846d9ba83 100644 --- a/arch/mips/include/asm/kprobes.h +++ b/arch/mips/include/asm/kprobes.h | |||
@@ -22,6 +22,9 @@ | |||
22 | #ifndef _ASM_KPROBES_H | 22 | #ifndef _ASM_KPROBES_H |
23 | #define _ASM_KPROBES_H | 23 | #define _ASM_KPROBES_H |
24 | 24 | ||
25 | #include <asm-generic/kprobes.h> | ||
26 | |||
27 | #ifdef CONFIG_KPROBES | ||
25 | #include <linux/ptrace.h> | 28 | #include <linux/ptrace.h> |
26 | #include <linux/types.h> | 29 | #include <linux/types.h> |
27 | 30 | ||
@@ -94,4 +97,5 @@ struct kprobe_ctlblk { | |||
94 | extern int kprobe_exceptions_notify(struct notifier_block *self, | 97 | extern int kprobe_exceptions_notify(struct notifier_block *self, |
95 | unsigned long val, void *data); | 98 | unsigned long val, void *data); |
96 | 99 | ||
97 | #endif /* _ASM_KPROBES_H */ | 100 | #endif /* CONFIG_KPROBES */ |
101 | #endif /* _ASM_KPROBES_H */ | ||
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index cb479be31a50..49c6df20672a 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -2232,7 +2232,7 @@ void per_cpu_trap_init(bool is_boot_cpu) | |||
2232 | if (!cpu_data[cpu].asid_cache) | 2232 | if (!cpu_data[cpu].asid_cache) |
2233 | cpu_data[cpu].asid_cache = asid_first_version(cpu); | 2233 | cpu_data[cpu].asid_cache = asid_first_version(cpu); |
2234 | 2234 | ||
2235 | atomic_inc(&init_mm.mm_count); | 2235 | mmgrab(&init_mm); |
2236 | current->active_mm = &init_mm; | 2236 | current->active_mm = &init_mm; |
2237 | BUG_ON(current->mm); | 2237 | BUG_ON(current->mm); |
2238 | enter_lazy_tlb(&init_mm, current); | 2238 | enter_lazy_tlb(&init_mm, current); |
diff --git a/arch/mn10300/include/asm/kprobes.h b/arch/mn10300/include/asm/kprobes.h index c800b590183a..7abea0bdb549 100644 --- a/arch/mn10300/include/asm/kprobes.h +++ b/arch/mn10300/include/asm/kprobes.h | |||
@@ -21,13 +21,17 @@ | |||
21 | #ifndef _ASM_KPROBES_H | 21 | #ifndef _ASM_KPROBES_H |
22 | #define _ASM_KPROBES_H | 22 | #define _ASM_KPROBES_H |
23 | 23 | ||
24 | #include <asm-generic/kprobes.h> | ||
25 | |||
26 | #define BREAKPOINT_INSTRUCTION 0xff | ||
27 | |||
28 | #ifdef CONFIG_KPROBES | ||
24 | #include <linux/types.h> | 29 | #include <linux/types.h> |
25 | #include <linux/ptrace.h> | 30 | #include <linux/ptrace.h> |
26 | 31 | ||
27 | struct kprobe; | 32 | struct kprobe; |
28 | 33 | ||
29 | typedef unsigned char kprobe_opcode_t; | 34 | typedef unsigned char kprobe_opcode_t; |
30 | #define BREAKPOINT_INSTRUCTION 0xff | ||
31 | #define MAX_INSN_SIZE 8 | 35 | #define MAX_INSN_SIZE 8 |
32 | #define MAX_STACK_SIZE 128 | 36 | #define MAX_STACK_SIZE 128 |
33 | 37 | ||
@@ -47,4 +51,5 @@ extern int kprobe_exceptions_notify(struct notifier_block *self, | |||
47 | 51 | ||
48 | extern void arch_remove_kprobe(struct kprobe *p); | 52 | extern void arch_remove_kprobe(struct kprobe *p); |
49 | 53 | ||
54 | #endif /* CONFIG_KPROBES */ | ||
50 | #endif /* _ASM_KPROBES_H */ | 55 | #endif /* _ASM_KPROBES_H */ |
diff --git a/arch/mn10300/kernel/smp.c b/arch/mn10300/kernel/smp.c index 426173c4b0b9..e65b5cc2fa67 100644 --- a/arch/mn10300/kernel/smp.c +++ b/arch/mn10300/kernel/smp.c | |||
@@ -589,7 +589,7 @@ static void __init smp_cpu_init(void) | |||
589 | } | 589 | } |
590 | printk(KERN_INFO "Initializing CPU#%d\n", cpu_id); | 590 | printk(KERN_INFO "Initializing CPU#%d\n", cpu_id); |
591 | 591 | ||
592 | atomic_inc(&init_mm.mm_count); | 592 | mmgrab(&init_mm); |
593 | current->active_mm = &init_mm; | 593 | current->active_mm = &init_mm; |
594 | BUG_ON(current->mm); | 594 | BUG_ON(current->mm); |
595 | 595 | ||
diff --git a/arch/nios2/include/asm/Kbuild b/arch/nios2/include/asm/Kbuild index 35b0e883761a..aaa3c218b56c 100644 --- a/arch/nios2/include/asm/Kbuild +++ b/arch/nios2/include/asm/Kbuild | |||
@@ -62,3 +62,4 @@ generic-y += user.h | |||
62 | generic-y += vga.h | 62 | generic-y += vga.h |
63 | generic-y += word-at-a-time.h | 63 | generic-y += word-at-a-time.h |
64 | generic-y += xor.h | 64 | generic-y += xor.h |
65 | generic-y += kprobes.h | ||
diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild index fb241757f7f0..fb01873a5aad 100644 --- a/arch/openrisc/include/asm/Kbuild +++ b/arch/openrisc/include/asm/Kbuild | |||
@@ -67,3 +67,4 @@ generic-y += user.h | |||
67 | generic-y += vga.h | 67 | generic-y += vga.h |
68 | generic-y += word-at-a-time.h | 68 | generic-y += word-at-a-time.h |
69 | generic-y += xor.h | 69 | generic-y += xor.h |
70 | generic-y += kprobes.h | ||
diff --git a/arch/openrisc/kernel/entry.S b/arch/openrisc/kernel/entry.S index bc6500860f4d..1b7160c79646 100644 --- a/arch/openrisc/kernel/entry.S +++ b/arch/openrisc/kernel/entry.S | |||
@@ -319,7 +319,7 @@ EXCEPTION_ENTRY(_timer_handler) | |||
319 | l.j _ret_from_intr | 319 | l.j _ret_from_intr |
320 | l.nop | 320 | l.nop |
321 | 321 | ||
322 | /* ---[ 0x600: Aligment exception ]-------------------------------------- */ | 322 | /* ---[ 0x600: Alignment exception ]-------------------------------------- */ |
323 | 323 | ||
324 | EXCEPTION_ENTRY(_alignment_handler) | 324 | EXCEPTION_ENTRY(_alignment_handler) |
325 | CLEAR_LWA_FLAG(r3) | 325 | CLEAR_LWA_FLAG(r3) |
@@ -331,8 +331,8 @@ EXCEPTION_ENTRY(_alignment_handler) | |||
331 | l.nop | 331 | l.nop |
332 | 332 | ||
333 | #if 0 | 333 | #if 0 |
334 | EXCEPTION_ENTRY(_aligment_handler) | 334 | EXCEPTION_ENTRY(_alignment_handler) |
335 | // l.mfspr r2,r0,SPR_EEAR_BASE /* Load the efective addres */ | 335 | // l.mfspr r2,r0,SPR_EEAR_BASE /* Load the effective address */ |
336 | l.addi r2,r4,0 | 336 | l.addi r2,r4,0 |
337 | // l.mfspr r5,r0,SPR_EPCR_BASE /* Load the insn address */ | 337 | // l.mfspr r5,r0,SPR_EPCR_BASE /* Load the insn address */ |
338 | l.lwz r5,PT_PC(r1) | 338 | l.lwz r5,PT_PC(r1) |
diff --git a/arch/openrisc/kernel/head.S b/arch/openrisc/kernel/head.S index d01b82eace3e..1e87913576e3 100644 --- a/arch/openrisc/kernel/head.S +++ b/arch/openrisc/kernel/head.S | |||
@@ -325,7 +325,7 @@ _dispatch_do_ipage_fault: | |||
325 | .org 0x500 | 325 | .org 0x500 |
326 | EXCEPTION_HANDLE(_timer_handler) | 326 | EXCEPTION_HANDLE(_timer_handler) |
327 | 327 | ||
328 | /* ---[ 0x600: Aligment exception ]-------------------------------------- */ | 328 | /* ---[ 0x600: Alignment exception ]-------------------------------------- */ |
329 | .org 0x600 | 329 | .org 0x600 |
330 | EXCEPTION_HANDLE(_alignment_handler) | 330 | EXCEPTION_HANDLE(_alignment_handler) |
331 | 331 | ||
@@ -640,8 +640,8 @@ _flush_tlb: | |||
640 | 640 | ||
641 | /* ========================================[ cache ]=== */ | 641 | /* ========================================[ cache ]=== */ |
642 | 642 | ||
643 | /* aligment here so we don't change memory offsets with | 643 | /* alignment here so we don't change memory offsets with |
644 | * memory controler defined | 644 | * memory controller defined |
645 | */ | 645 | */ |
646 | .align 0x2000 | 646 | .align 0x2000 |
647 | 647 | ||
diff --git a/arch/openrisc/kernel/vmlinux.lds.S b/arch/openrisc/kernel/vmlinux.lds.S index 552544616b9d..00ddb7804be4 100644 --- a/arch/openrisc/kernel/vmlinux.lds.S +++ b/arch/openrisc/kernel/vmlinux.lds.S | |||
@@ -19,8 +19,8 @@ | |||
19 | 19 | ||
20 | /* TODO | 20 | /* TODO |
21 | * - clean up __offset & stuff | 21 | * - clean up __offset & stuff |
22 | * - change all 8192 aligment to PAGE !!! | 22 | * - change all 8192 alignment to PAGE !!! |
23 | * - recheck if all aligments are really needed | 23 | * - recheck if all alignments are really needed |
24 | */ | 24 | */ |
25 | 25 | ||
26 | # define LOAD_OFFSET PAGE_OFFSET | 26 | # define LOAD_OFFSET PAGE_OFFSET |
diff --git a/arch/parisc/include/asm/Kbuild b/arch/parisc/include/asm/Kbuild index cc70b4116718..a9909c2d04c5 100644 --- a/arch/parisc/include/asm/Kbuild +++ b/arch/parisc/include/asm/Kbuild | |||
@@ -28,3 +28,4 @@ generic-y += user.h | |||
28 | generic-y += vga.h | 28 | generic-y += vga.h |
29 | generic-y += word-at-a-time.h | 29 | generic-y += word-at-a-time.h |
30 | generic-y += xor.h | 30 | generic-y += xor.h |
31 | generic-y += kprobes.h | ||
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 75dab2871346..67b452b41ff6 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
@@ -279,7 +279,7 @@ smp_cpu_init(int cpunum) | |||
279 | set_cpu_online(cpunum, true); | 279 | set_cpu_online(cpunum, true); |
280 | 280 | ||
281 | /* Initialise the idle task for this CPU */ | 281 | /* Initialise the idle task for this CPU */ |
282 | atomic_inc(&init_mm.mm_count); | 282 | mmgrab(&init_mm); |
283 | current->active_mm = &init_mm; | 283 | current->active_mm = &init_mm; |
284 | BUG_ON(current->mm); | 284 | BUG_ON(current->mm); |
285 | enter_lazy_tlb(&init_mm, current); | 285 | enter_lazy_tlb(&init_mm, current); |
diff --git a/arch/powerpc/boot/dts/fsl/mpc8569mds.dts b/arch/powerpc/boot/dts/fsl/mpc8569mds.dts index 8e94448f296c..76b2bd6f7742 100644 --- a/arch/powerpc/boot/dts/fsl/mpc8569mds.dts +++ b/arch/powerpc/boot/dts/fsl/mpc8569mds.dts | |||
@@ -55,7 +55,7 @@ | |||
55 | label = "kernel"; | 55 | label = "kernel"; |
56 | reg = <0x01c00000 0x002e0000>; | 56 | reg = <0x01c00000 0x002e0000>; |
57 | }; | 57 | }; |
58 | partiton@1ee0000 { | 58 | partition@1ee0000 { |
59 | label = "dtb"; | 59 | label = "dtb"; |
60 | reg = <0x01ee0000 0x00020000>; | 60 | reg = <0x01ee0000 0x00020000>; |
61 | }; | 61 | }; |
diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h index d73e9dfa5237..1145dc8e726d 100644 --- a/arch/powerpc/include/asm/book3s/64/mmu.h +++ b/arch/powerpc/include/asm/book3s/64/mmu.h | |||
@@ -30,7 +30,7 @@ extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT]; | |||
30 | 30 | ||
31 | #ifndef __ASSEMBLY__ | 31 | #ifndef __ASSEMBLY__ |
32 | /* | 32 | /* |
33 | * ISA 3.0 partiton and process table entry format | 33 | * ISA 3.0 partition and process table entry format |
34 | */ | 34 | */ |
35 | struct prtb_entry { | 35 | struct prtb_entry { |
36 | __be64 prtb0; | 36 | __be64 prtb0; |
diff --git a/arch/powerpc/include/asm/fsl_hcalls.h b/arch/powerpc/include/asm/fsl_hcalls.h index 3abb58394da4..b889d13547fd 100644 --- a/arch/powerpc/include/asm/fsl_hcalls.h +++ b/arch/powerpc/include/asm/fsl_hcalls.h | |||
@@ -109,7 +109,7 @@ static inline unsigned int fh_send_nmi(unsigned int vcpu_mask) | |||
109 | #define FH_DTPROP_MAX_PROPLEN 32768 | 109 | #define FH_DTPROP_MAX_PROPLEN 32768 |
110 | 110 | ||
111 | /** | 111 | /** |
112 | * fh_partiton_get_dtprop - get a property from a guest device tree. | 112 | * fh_partition_get_dtprop - get a property from a guest device tree. |
113 | * @handle: handle of partition whose device tree is to be accessed | 113 | * @handle: handle of partition whose device tree is to be accessed |
114 | * @dtpath_addr: physical address of device tree path to access | 114 | * @dtpath_addr: physical address of device tree path to access |
115 | * @propname_addr: physical address of name of property | 115 | * @propname_addr: physical address of name of property |
diff --git a/arch/powerpc/include/asm/kprobes.h b/arch/powerpc/include/asm/kprobes.h index d821835ade86..0503c98b2117 100644 --- a/arch/powerpc/include/asm/kprobes.h +++ b/arch/powerpc/include/asm/kprobes.h | |||
@@ -1,5 +1,8 @@ | |||
1 | #ifndef _ASM_POWERPC_KPROBES_H | 1 | #ifndef _ASM_POWERPC_KPROBES_H |
2 | #define _ASM_POWERPC_KPROBES_H | 2 | #define _ASM_POWERPC_KPROBES_H |
3 | |||
4 | #include <asm-generic/kprobes.h> | ||
5 | |||
3 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
4 | /* | 7 | /* |
5 | * Kernel Probes (KProbes) | 8 | * Kernel Probes (KProbes) |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 893bd7f79be6..573fb3a461b5 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -707,7 +707,7 @@ void start_secondary(void *unused) | |||
707 | unsigned int cpu = smp_processor_id(); | 707 | unsigned int cpu = smp_processor_id(); |
708 | int i, base; | 708 | int i, base; |
709 | 709 | ||
710 | atomic_inc(&init_mm.mm_count); | 710 | mmgrab(&init_mm); |
711 | current->active_mm = &init_mm; | 711 | current->active_mm = &init_mm; |
712 | 712 | ||
713 | smp_store_cpu_info(cpu); | 713 | smp_store_cpu_info(cpu); |
diff --git a/arch/powerpc/lib/code-patching.c b/arch/powerpc/lib/code-patching.c index 0899315e1434..0d3002b7e2b4 100644 --- a/arch/powerpc/lib/code-patching.c +++ b/arch/powerpc/lib/code-patching.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <asm/page.h> | 14 | #include <asm/page.h> |
15 | #include <asm/code-patching.h> | 15 | #include <asm/code-patching.h> |
16 | #include <linux/uaccess.h> | 16 | #include <linux/uaccess.h> |
17 | #include <linux/kprobes.h> | ||
17 | 18 | ||
18 | 19 | ||
19 | int patch_instruction(unsigned int *addr, unsigned int instr) | 20 | int patch_instruction(unsigned int *addr, unsigned int instr) |
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 8278f43ad4b8..e0f83c204ccc 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c | |||
@@ -3034,7 +3034,7 @@ static void pnv_ioda_setup_pe_res(struct pnv_ioda_pe *pe, | |||
3034 | /* | 3034 | /* |
3035 | * This function is supposed to be called on basis of PE from top | 3035 | * This function is supposed to be called on basis of PE from top |
3036 | * to bottom style. So the the I/O or MMIO segment assigned to | 3036 | * to bottom style. So the the I/O or MMIO segment assigned to |
3037 | * parent PE could be overrided by its child PEs if necessary. | 3037 | * parent PE could be overridden by its child PEs if necessary. |
3038 | */ | 3038 | */ |
3039 | static void pnv_ioda_setup_pe_seg(struct pnv_ioda_pe *pe) | 3039 | static void pnv_ioda_setup_pe_seg(struct pnv_ioda_pe *pe) |
3040 | { | 3040 | { |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 0024e451bb36..4d757eaa46bf 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -1020,7 +1020,7 @@ static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn) | |||
1020 | /* check largest block * page size > max memory hotplug addr */ | 1020 | /* check largest block * page size > max memory hotplug addr */ |
1021 | max_addr = memory_hotplug_max(); | 1021 | max_addr = memory_hotplug_max(); |
1022 | if (query.largest_available_block < (max_addr >> page_shift)) { | 1022 | if (query.largest_available_block < (max_addr >> page_shift)) { |
1023 | dev_dbg(&dev->dev, "can't map partiton max 0x%llx with %u " | 1023 | dev_dbg(&dev->dev, "can't map partition max 0x%llx with %u " |
1024 | "%llu-sized pages\n", max_addr, query.largest_available_block, | 1024 | "%llu-sized pages\n", max_addr, query.largest_available_block, |
1025 | 1ULL << page_shift); | 1025 | 1ULL << page_shift); |
1026 | goto out_failed; | 1026 | goto out_failed; |
diff --git a/arch/powerpc/xmon/ppc-opc.c b/arch/powerpc/xmon/ppc-opc.c index 6845e91ba04a..954dbf8222d7 100644 --- a/arch/powerpc/xmon/ppc-opc.c +++ b/arch/powerpc/xmon/ppc-opc.c | |||
@@ -1587,7 +1587,7 @@ extract_tbr (unsigned long insn, | |||
1587 | #define CTX(op, xop) (OP (op) | (((unsigned long)(xop)) & 0x7)) | 1587 | #define CTX(op, xop) (OP (op) | (((unsigned long)(xop)) & 0x7)) |
1588 | #define CTX_MASK CTX(0x3f, 0x7) | 1588 | #define CTX_MASK CTX(0x3f, 0x7) |
1589 | 1589 | ||
1590 | /* An User Context form instruction. */ | 1590 | /* A User Context form instruction. */ |
1591 | #define UCTX(op, xop) (OP (op) | (((unsigned long)(xop)) & 0x1f)) | 1591 | #define UCTX(op, xop) (OP (op) | (((unsigned long)(xop)) & 0x1f)) |
1592 | #define UCTX_MASK UCTX(0x3f, 0x1f) | 1592 | #define UCTX_MASK UCTX(0x3f, 0x1f) |
1593 | 1593 | ||
diff --git a/arch/s390/include/asm/kprobes.h b/arch/s390/include/asm/kprobes.h index 591e5a5279b0..84c0f9086483 100644 --- a/arch/s390/include/asm/kprobes.h +++ b/arch/s390/include/asm/kprobes.h | |||
@@ -27,6 +27,11 @@ | |||
27 | * 2005-Dec Used as a template for s390 by Mike Grundy | 27 | * 2005-Dec Used as a template for s390 by Mike Grundy |
28 | * <grundym@us.ibm.com> | 28 | * <grundym@us.ibm.com> |
29 | */ | 29 | */ |
30 | #include <asm-generic/kprobes.h> | ||
31 | |||
32 | #define BREAKPOINT_INSTRUCTION 0x0002 | ||
33 | |||
34 | #ifdef CONFIG_KPROBES | ||
30 | #include <linux/types.h> | 35 | #include <linux/types.h> |
31 | #include <linux/ptrace.h> | 36 | #include <linux/ptrace.h> |
32 | #include <linux/percpu.h> | 37 | #include <linux/percpu.h> |
@@ -37,7 +42,6 @@ struct pt_regs; | |||
37 | struct kprobe; | 42 | struct kprobe; |
38 | 43 | ||
39 | typedef u16 kprobe_opcode_t; | 44 | typedef u16 kprobe_opcode_t; |
40 | #define BREAKPOINT_INSTRUCTION 0x0002 | ||
41 | 45 | ||
42 | /* Maximum instruction size is 3 (16bit) halfwords: */ | 46 | /* Maximum instruction size is 3 (16bit) halfwords: */ |
43 | #define MAX_INSN_SIZE 0x0003 | 47 | #define MAX_INSN_SIZE 0x0003 |
@@ -91,4 +95,5 @@ int probe_is_insn_relative_long(u16 *insn); | |||
91 | 95 | ||
92 | #define flush_insn_slot(p) do { } while (0) | 96 | #define flush_insn_slot(p) do { } while (0) |
93 | 97 | ||
98 | #endif /* CONFIG_KPROBES */ | ||
94 | #endif /* _ASM_S390_KPROBES_H */ | 99 | #endif /* _ASM_S390_KPROBES_H */ |
diff --git a/arch/s390/kernel/processor.c b/arch/s390/kernel/processor.c index 21004aaac69b..bc2b60dcb178 100644 --- a/arch/s390/kernel/processor.c +++ b/arch/s390/kernel/processor.c | |||
@@ -73,7 +73,7 @@ void cpu_init(void) | |||
73 | get_cpu_id(id); | 73 | get_cpu_id(id); |
74 | if (machine_has_cpu_mhz) | 74 | if (machine_has_cpu_mhz) |
75 | update_cpu_mhz(NULL); | 75 | update_cpu_mhz(NULL); |
76 | atomic_inc(&init_mm.mm_count); | 76 | mmgrab(&init_mm); |
77 | current->active_mm = &init_mm; | 77 | current->active_mm = &init_mm; |
78 | BUG_ON(current->mm); | 78 | BUG_ON(current->mm); |
79 | enter_lazy_tlb(&init_mm, current); | 79 | enter_lazy_tlb(&init_mm, current); |
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index b4a3e9e06ef2..31bd96e81167 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c | |||
@@ -350,7 +350,7 @@ static void __add_vtimer(struct vtimer_list *timer, int periodic) | |||
350 | } | 350 | } |
351 | 351 | ||
352 | /* | 352 | /* |
353 | * add_virt_timer - add an oneshot virtual CPU timer | 353 | * add_virt_timer - add a oneshot virtual CPU timer |
354 | */ | 354 | */ |
355 | void add_virt_timer(struct vtimer_list *timer) | 355 | void add_virt_timer(struct vtimer_list *timer) |
356 | { | 356 | { |
diff --git a/arch/score/include/asm/Kbuild b/arch/score/include/asm/Kbuild index db3e28ca3ae2..926943a49ea5 100644 --- a/arch/score/include/asm/Kbuild +++ b/arch/score/include/asm/Kbuild | |||
@@ -13,3 +13,4 @@ generic-y += trace_clock.h | |||
13 | generic-y += xor.h | 13 | generic-y += xor.h |
14 | generic-y += serial.h | 14 | generic-y += serial.h |
15 | generic-y += word-at-a-time.h | 15 | generic-y += word-at-a-time.h |
16 | generic-y += kprobes.h | ||
diff --git a/arch/score/kernel/traps.c b/arch/score/kernel/traps.c index 2b22bcf02c27..569ac02f68df 100644 --- a/arch/score/kernel/traps.c +++ b/arch/score/kernel/traps.c | |||
@@ -336,7 +336,7 @@ void __init trap_init(void) | |||
336 | set_except_vector(18, handle_dbe); | 336 | set_except_vector(18, handle_dbe); |
337 | flush_icache_range(DEBUG_VECTOR_BASE_ADDR, IRQ_VECTOR_BASE_ADDR); | 337 | flush_icache_range(DEBUG_VECTOR_BASE_ADDR, IRQ_VECTOR_BASE_ADDR); |
338 | 338 | ||
339 | atomic_inc(&init_mm.mm_count); | 339 | mmgrab(&init_mm); |
340 | current->active_mm = &init_mm; | 340 | current->active_mm = &init_mm; |
341 | cpu_cache_init(); | 341 | cpu_cache_init(); |
342 | } | 342 | } |
diff --git a/arch/sh/include/asm/kprobes.h b/arch/sh/include/asm/kprobes.h index 134f3980e44a..f0986f9b3844 100644 --- a/arch/sh/include/asm/kprobes.h +++ b/arch/sh/include/asm/kprobes.h | |||
@@ -1,13 +1,16 @@ | |||
1 | #ifndef __ASM_SH_KPROBES_H | 1 | #ifndef __ASM_SH_KPROBES_H |
2 | #define __ASM_SH_KPROBES_H | 2 | #define __ASM_SH_KPROBES_H |
3 | 3 | ||
4 | #include <asm-generic/kprobes.h> | ||
5 | |||
6 | #define BREAKPOINT_INSTRUCTION 0xc33a | ||
7 | |||
4 | #ifdef CONFIG_KPROBES | 8 | #ifdef CONFIG_KPROBES |
5 | 9 | ||
6 | #include <linux/types.h> | 10 | #include <linux/types.h> |
7 | #include <linux/ptrace.h> | 11 | #include <linux/ptrace.h> |
8 | 12 | ||
9 | typedef insn_size_t kprobe_opcode_t; | 13 | typedef insn_size_t kprobe_opcode_t; |
10 | #define BREAKPOINT_INSTRUCTION 0xc33a | ||
11 | 14 | ||
12 | #define MAX_INSN_SIZE 16 | 15 | #define MAX_INSN_SIZE 16 |
13 | #define MAX_STACK_SIZE 64 | 16 | #define MAX_STACK_SIZE 64 |
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index bc3591125df7..04487e8fc9b1 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c | |||
@@ -99,7 +99,7 @@ static inline void handle_one_irq(unsigned int irq) | |||
99 | "mov %0, r4 \n" | 99 | "mov %0, r4 \n" |
100 | "mov r15, r8 \n" | 100 | "mov r15, r8 \n" |
101 | "jsr @%1 \n" | 101 | "jsr @%1 \n" |
102 | /* swith to the irq stack */ | 102 | /* switch to the irq stack */ |
103 | " mov %2, r15 \n" | 103 | " mov %2, r15 \n" |
104 | /* restore the stack (ring zero) */ | 104 | /* restore the stack (ring zero) */ |
105 | "mov r8, r15 \n" | 105 | "mov r8, r15 \n" |
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c index 38e7860845db..edc4769b047e 100644 --- a/arch/sh/kernel/smp.c +++ b/arch/sh/kernel/smp.c | |||
@@ -178,8 +178,8 @@ asmlinkage void start_secondary(void) | |||
178 | struct mm_struct *mm = &init_mm; | 178 | struct mm_struct *mm = &init_mm; |
179 | 179 | ||
180 | enable_mmu(); | 180 | enable_mmu(); |
181 | atomic_inc(&mm->mm_count); | 181 | mmgrab(mm); |
182 | atomic_inc(&mm->mm_users); | 182 | mmget(mm); |
183 | current->active_mm = mm; | 183 | current->active_mm = mm; |
184 | #ifdef CONFIG_MMU | 184 | #ifdef CONFIG_MMU |
185 | enter_lazy_tlb(mm, current); | 185 | enter_lazy_tlb(mm, current); |
diff --git a/arch/sparc/include/asm/kprobes.h b/arch/sparc/include/asm/kprobes.h index a145d798e112..49f8402035d7 100644 --- a/arch/sparc/include/asm/kprobes.h +++ b/arch/sparc/include/asm/kprobes.h | |||
@@ -1,13 +1,17 @@ | |||
1 | #ifndef _SPARC64_KPROBES_H | 1 | #ifndef _SPARC64_KPROBES_H |
2 | #define _SPARC64_KPROBES_H | 2 | #define _SPARC64_KPROBES_H |
3 | 3 | ||
4 | #include <asm-generic/kprobes.h> | ||
5 | |||
6 | #define BREAKPOINT_INSTRUCTION 0x91d02070 /* ta 0x70 */ | ||
7 | #define BREAKPOINT_INSTRUCTION_2 0x91d02071 /* ta 0x71 */ | ||
8 | |||
9 | #ifdef CONFIG_KPROBES | ||
4 | #include <linux/types.h> | 10 | #include <linux/types.h> |
5 | #include <linux/percpu.h> | 11 | #include <linux/percpu.h> |
6 | 12 | ||
7 | typedef u32 kprobe_opcode_t; | 13 | typedef u32 kprobe_opcode_t; |
8 | 14 | ||
9 | #define BREAKPOINT_INSTRUCTION 0x91d02070 /* ta 0x70 */ | ||
10 | #define BREAKPOINT_INSTRUCTION_2 0x91d02071 /* ta 0x71 */ | ||
11 | #define MAX_INSN_SIZE 2 | 15 | #define MAX_INSN_SIZE 2 |
12 | 16 | ||
13 | #define kretprobe_blacklist_size 0 | 17 | #define kretprobe_blacklist_size 0 |
@@ -48,4 +52,6 @@ int kprobe_exceptions_notify(struct notifier_block *self, | |||
48 | int kprobe_fault_handler(struct pt_regs *regs, int trapnr); | 52 | int kprobe_fault_handler(struct pt_regs *regs, int trapnr); |
49 | asmlinkage void __kprobes kprobe_trap(unsigned long trap_level, | 53 | asmlinkage void __kprobes kprobe_trap(unsigned long trap_level, |
50 | struct pt_regs *regs); | 54 | struct pt_regs *regs); |
55 | |||
56 | #endif /* CONFIG_KPROBES */ | ||
51 | #endif /* _SPARC64_KPROBES_H */ | 57 | #endif /* _SPARC64_KPROBES_H */ |
diff --git a/arch/sparc/include/asm/switch_to_32.h b/arch/sparc/include/asm/switch_to_32.h index 16f10374feb3..475dd4158ae4 100644 --- a/arch/sparc/include/asm/switch_to_32.h +++ b/arch/sparc/include/asm/switch_to_32.h | |||
@@ -9,7 +9,7 @@ extern struct thread_info *current_set[NR_CPUS]; | |||
9 | * Flush windows so that the VM switch which follows | 9 | * Flush windows so that the VM switch which follows |
10 | * would not pull the stack from under us. | 10 | * would not pull the stack from under us. |
11 | * | 11 | * |
12 | * SWITCH_ENTER and SWITH_DO_LAZY_FPU do not work yet (e.g. SMP does not work) | 12 | * SWITCH_ENTER and SWITCH_DO_LAZY_FPU do not work yet (e.g. SMP does not work) |
13 | * XXX WTF is the above comment? Found in late teen 2.4.x. | 13 | * XXX WTF is the above comment? Found in late teen 2.4.x. |
14 | */ | 14 | */ |
15 | #ifdef CONFIG_SMP | 15 | #ifdef CONFIG_SMP |
diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c index 71e16f2241c2..b99d33797e1d 100644 --- a/arch/sparc/kernel/leon_smp.c +++ b/arch/sparc/kernel/leon_smp.c | |||
@@ -93,7 +93,7 @@ void leon_cpu_pre_online(void *arg) | |||
93 | : "memory" /* paranoid */); | 93 | : "memory" /* paranoid */); |
94 | 94 | ||
95 | /* Attach to the address space of init_task. */ | 95 | /* Attach to the address space of init_task. */ |
96 | atomic_inc(&init_mm.mm_count); | 96 | mmgrab(&init_mm); |
97 | current->active_mm = &init_mm; | 97 | current->active_mm = &init_mm; |
98 | 98 | ||
99 | while (!cpumask_test_cpu(cpuid, &smp_commenced_mask)) | 99 | while (!cpumask_test_cpu(cpuid, &smp_commenced_mask)) |
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index 90a02cb64e20..8e3e13924594 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c | |||
@@ -122,7 +122,7 @@ void smp_callin(void) | |||
122 | current_thread_info()->new_child = 0; | 122 | current_thread_info()->new_child = 0; |
123 | 123 | ||
124 | /* Attach to the address space of init_task. */ | 124 | /* Attach to the address space of init_task. */ |
125 | atomic_inc(&init_mm.mm_count); | 125 | mmgrab(&init_mm); |
126 | current->active_mm = &init_mm; | 126 | current->active_mm = &init_mm; |
127 | 127 | ||
128 | /* inform the notifiers about the new cpu */ | 128 | /* inform the notifiers about the new cpu */ |
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c index 9d98e5002a09..7b55c50eabe5 100644 --- a/arch/sparc/kernel/sun4d_smp.c +++ b/arch/sparc/kernel/sun4d_smp.c | |||
@@ -93,7 +93,7 @@ void sun4d_cpu_pre_online(void *arg) | |||
93 | show_leds(cpuid); | 93 | show_leds(cpuid); |
94 | 94 | ||
95 | /* Attach to the address space of init_task. */ | 95 | /* Attach to the address space of init_task. */ |
96 | atomic_inc(&init_mm.mm_count); | 96 | mmgrab(&init_mm); |
97 | current->active_mm = &init_mm; | 97 | current->active_mm = &init_mm; |
98 | 98 | ||
99 | local_ops->cache_all(); | 99 | local_ops->cache_all(); |
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c index 278c40abce82..633c4cf6fdb0 100644 --- a/arch/sparc/kernel/sun4m_smp.c +++ b/arch/sparc/kernel/sun4m_smp.c | |||
@@ -59,7 +59,7 @@ void sun4m_cpu_pre_online(void *arg) | |||
59 | : "memory" /* paranoid */); | 59 | : "memory" /* paranoid */); |
60 | 60 | ||
61 | /* Attach to the address space of init_task. */ | 61 | /* Attach to the address space of init_task. */ |
62 | atomic_inc(&init_mm.mm_count); | 62 | mmgrab(&init_mm); |
63 | current->active_mm = &init_mm; | 63 | current->active_mm = &init_mm; |
64 | 64 | ||
65 | while (!cpumask_test_cpu(cpuid, &smp_commenced_mask)) | 65 | while (!cpumask_test_cpu(cpuid, &smp_commenced_mask)) |
diff --git a/arch/sparc/kernel/traps_32.c b/arch/sparc/kernel/traps_32.c index 4f21df7d4f13..ecddac5a4c96 100644 --- a/arch/sparc/kernel/traps_32.c +++ b/arch/sparc/kernel/traps_32.c | |||
@@ -448,7 +448,7 @@ void trap_init(void) | |||
448 | thread_info_offsets_are_bolixed_pete(); | 448 | thread_info_offsets_are_bolixed_pete(); |
449 | 449 | ||
450 | /* Attach to the address space of init_task. */ | 450 | /* Attach to the address space of init_task. */ |
451 | atomic_inc(&init_mm.mm_count); | 451 | mmgrab(&init_mm); |
452 | current->active_mm = &init_mm; | 452 | current->active_mm = &init_mm; |
453 | 453 | ||
454 | /* NOTE: Other cpus have this done as they are started | 454 | /* NOTE: Other cpus have this done as they are started |
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c index dfc97a47c9a0..e022d7b00390 100644 --- a/arch/sparc/kernel/traps_64.c +++ b/arch/sparc/kernel/traps_64.c | |||
@@ -2837,6 +2837,6 @@ void __init trap_init(void) | |||
2837 | /* Attach to the address space of init_task. On SMP we | 2837 | /* Attach to the address space of init_task. On SMP we |
2838 | * do this in smp.c:smp_callin for other cpus. | 2838 | * do this in smp.c:smp_callin for other cpus. |
2839 | */ | 2839 | */ |
2840 | atomic_inc(&init_mm.mm_count); | 2840 | mmgrab(&init_mm); |
2841 | current->active_mm = &init_mm; | 2841 | current->active_mm = &init_mm; |
2842 | } | 2842 | } |
diff --git a/arch/sparc/kernel/visemul.c b/arch/sparc/kernel/visemul.c index c4ac58e483a4..8f35eea2103a 100644 --- a/arch/sparc/kernel/visemul.c +++ b/arch/sparc/kernel/visemul.c | |||
@@ -30,7 +30,7 @@ | |||
30 | /* 001001011 - two 32-bit merges */ | 30 | /* 001001011 - two 32-bit merges */ |
31 | #define FPMERGE_OPF 0x04b | 31 | #define FPMERGE_OPF 0x04b |
32 | 32 | ||
33 | /* 000110001 - 8-by-16-bit partitoned product */ | 33 | /* 000110001 - 8-by-16-bit partitioned product */ |
34 | #define FMUL8x16_OPF 0x031 | 34 | #define FMUL8x16_OPF 0x031 |
35 | 35 | ||
36 | /* 000110011 - 8-by-16-bit upper alpha partitioned product */ | 36 | /* 000110011 - 8-by-16-bit upper alpha partitioned product */ |
diff --git a/arch/tile/include/asm/kprobes.h b/arch/tile/include/asm/kprobes.h index d8f9a83943b1..4a8b1cadca24 100644 --- a/arch/tile/include/asm/kprobes.h +++ b/arch/tile/include/asm/kprobes.h | |||
@@ -17,10 +17,13 @@ | |||
17 | #ifndef _ASM_TILE_KPROBES_H | 17 | #ifndef _ASM_TILE_KPROBES_H |
18 | #define _ASM_TILE_KPROBES_H | 18 | #define _ASM_TILE_KPROBES_H |
19 | 19 | ||
20 | #include <asm-generic/kprobes.h> | ||
21 | |||
22 | #ifdef CONFIG_KPROBES | ||
23 | |||
20 | #include <linux/types.h> | 24 | #include <linux/types.h> |
21 | #include <linux/ptrace.h> | 25 | #include <linux/ptrace.h> |
22 | #include <linux/percpu.h> | 26 | #include <linux/percpu.h> |
23 | |||
24 | #include <arch/opcode.h> | 27 | #include <arch/opcode.h> |
25 | 28 | ||
26 | #define __ARCH_WANT_KPROBES_INSN_SLOT | 29 | #define __ARCH_WANT_KPROBES_INSN_SLOT |
@@ -76,4 +79,5 @@ void arch_remove_kprobe(struct kprobe *); | |||
76 | extern int kprobe_exceptions_notify(struct notifier_block *self, | 79 | extern int kprobe_exceptions_notify(struct notifier_block *self, |
77 | unsigned long val, void *data); | 80 | unsigned long val, void *data); |
78 | 81 | ||
82 | #endif /* CONFIG_KPROBES */ | ||
79 | #endif /* _ASM_TILE_KPROBES_H */ | 83 | #endif /* _ASM_TILE_KPROBES_H */ |
diff --git a/arch/tile/kernel/smpboot.c b/arch/tile/kernel/smpboot.c index 6c0abaacec33..53ce940a5016 100644 --- a/arch/tile/kernel/smpboot.c +++ b/arch/tile/kernel/smpboot.c | |||
@@ -160,7 +160,7 @@ static void start_secondary(void) | |||
160 | __this_cpu_write(current_asid, min_asid); | 160 | __this_cpu_write(current_asid, min_asid); |
161 | 161 | ||
162 | /* Set up this thread as another owner of the init_mm */ | 162 | /* Set up this thread as another owner of the init_mm */ |
163 | atomic_inc(&init_mm.mm_count); | 163 | mmgrab(&init_mm); |
164 | current->active_mm = &init_mm; | 164 | current->active_mm = &init_mm; |
165 | if (current->mm) | 165 | if (current->mm) |
166 | BUG(); | 166 | BUG(); |
diff --git a/arch/um/include/asm/Kbuild b/arch/um/include/asm/Kbuild index 90c281cd7e1d..e9d42aab76dc 100644 --- a/arch/um/include/asm/Kbuild +++ b/arch/um/include/asm/Kbuild | |||
@@ -25,3 +25,4 @@ generic-y += topology.h | |||
25 | generic-y += trace_clock.h | 25 | generic-y += trace_clock.h |
26 | generic-y += word-at-a-time.h | 26 | generic-y += word-at-a-time.h |
27 | generic-y += xor.h | 27 | generic-y += xor.h |
28 | generic-y += kprobes.h | ||
diff --git a/arch/unicore32/include/asm/Kbuild b/arch/unicore32/include/asm/Kbuild index 5d51ade89f4c..84205fe1cd79 100644 --- a/arch/unicore32/include/asm/Kbuild +++ b/arch/unicore32/include/asm/Kbuild | |||
@@ -63,3 +63,4 @@ generic-y += user.h | |||
63 | generic-y += vga.h | 63 | generic-y += vga.h |
64 | generic-y += word-at-a-time.h | 64 | generic-y += word-at-a-time.h |
65 | generic-y += xor.h | 65 | generic-y += xor.h |
66 | generic-y += kprobes.h | ||
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index c4cba00dbdee..63c1d13aaf9f 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug | |||
@@ -74,14 +74,6 @@ config EFI_PGT_DUMP | |||
74 | issues with the mapping of the EFI runtime regions into that | 74 | issues with the mapping of the EFI runtime regions into that |
75 | table. | 75 | table. |
76 | 76 | ||
77 | config DEBUG_RODATA_TEST | ||
78 | bool "Testcase for the marking rodata read-only" | ||
79 | default y | ||
80 | ---help--- | ||
81 | This option enables a testcase for the setting rodata read-only | ||
82 | as well as for the change_page_attr() infrastructure. | ||
83 | If in doubt, say "N" | ||
84 | |||
85 | config DEBUG_WX | 77 | config DEBUG_WX |
86 | bool "Warn on W+X mappings at boot" | 78 | bool "Warn on W+X mappings at boot" |
87 | select X86_PTDUMP_CORE | 79 | select X86_PTDUMP_CORE |
diff --git a/arch/x86/include/asm/cacheflush.h b/arch/x86/include/asm/cacheflush.h index 872877d930de..e7e1942edff7 100644 --- a/arch/x86/include/asm/cacheflush.h +++ b/arch/x86/include/asm/cacheflush.h | |||
@@ -90,18 +90,8 @@ void clflush_cache_range(void *addr, unsigned int size); | |||
90 | 90 | ||
91 | #define mmio_flush_range(addr, size) clflush_cache_range(addr, size) | 91 | #define mmio_flush_range(addr, size) clflush_cache_range(addr, size) |
92 | 92 | ||
93 | extern const int rodata_test_data; | ||
94 | extern int kernel_set_to_readonly; | 93 | extern int kernel_set_to_readonly; |
95 | void set_kernel_text_rw(void); | 94 | void set_kernel_text_rw(void); |
96 | void set_kernel_text_ro(void); | 95 | void set_kernel_text_ro(void); |
97 | 96 | ||
98 | #ifdef CONFIG_DEBUG_RODATA_TEST | ||
99 | int rodata_test(void); | ||
100 | #else | ||
101 | static inline int rodata_test(void) | ||
102 | { | ||
103 | return 0; | ||
104 | } | ||
105 | #endif | ||
106 | |||
107 | #endif /* _ASM_X86_CACHEFLUSH_H */ | 97 | #endif /* _ASM_X86_CACHEFLUSH_H */ |
diff --git a/arch/x86/include/asm/desc_defs.h b/arch/x86/include/asm/desc_defs.h index eb5deb42484d..49265345d4d2 100644 --- a/arch/x86/include/asm/desc_defs.h +++ b/arch/x86/include/asm/desc_defs.h | |||
@@ -15,7 +15,7 @@ | |||
15 | * FIXME: Accessing the desc_struct through its fields is more elegant, | 15 | * FIXME: Accessing the desc_struct through its fields is more elegant, |
16 | * and should be the one valid thing to do. However, a lot of open code | 16 | * and should be the one valid thing to do. However, a lot of open code |
17 | * still touches the a and b accessors, and doing this allow us to do it | 17 | * still touches the a and b accessors, and doing this allow us to do it |
18 | * incrementally. We keep the signature as a struct, rather than an union, | 18 | * incrementally. We keep the signature as a struct, rather than a union, |
19 | * so we can get rid of it transparently in the future -- glommer | 19 | * so we can get rid of it transparently in the future -- glommer |
20 | */ | 20 | */ |
21 | /* 8 byte segment descriptor */ | 21 | /* 8 byte segment descriptor */ |
diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86/include/asm/kprobes.h index d1d1e5094c28..200581691c6e 100644 --- a/arch/x86/include/asm/kprobes.h +++ b/arch/x86/include/asm/kprobes.h | |||
@@ -21,6 +21,12 @@ | |||
21 | * | 21 | * |
22 | * See arch/x86/kernel/kprobes.c for x86 kprobes history. | 22 | * See arch/x86/kernel/kprobes.c for x86 kprobes history. |
23 | */ | 23 | */ |
24 | |||
25 | #include <asm-generic/kprobes.h> | ||
26 | |||
27 | #define BREAKPOINT_INSTRUCTION 0xcc | ||
28 | |||
29 | #ifdef CONFIG_KPROBES | ||
24 | #include <linux/types.h> | 30 | #include <linux/types.h> |
25 | #include <linux/ptrace.h> | 31 | #include <linux/ptrace.h> |
26 | #include <linux/percpu.h> | 32 | #include <linux/percpu.h> |
@@ -32,7 +38,6 @@ struct pt_regs; | |||
32 | struct kprobe; | 38 | struct kprobe; |
33 | 39 | ||
34 | typedef u8 kprobe_opcode_t; | 40 | typedef u8 kprobe_opcode_t; |
35 | #define BREAKPOINT_INSTRUCTION 0xcc | ||
36 | #define RELATIVEJUMP_OPCODE 0xe9 | 41 | #define RELATIVEJUMP_OPCODE 0xe9 |
37 | #define RELATIVEJUMP_SIZE 5 | 42 | #define RELATIVEJUMP_SIZE 5 |
38 | #define RELATIVECALL_OPCODE 0xe8 | 43 | #define RELATIVECALL_OPCODE 0xe8 |
@@ -116,4 +121,6 @@ extern int kprobe_exceptions_notify(struct notifier_block *self, | |||
116 | unsigned long val, void *data); | 121 | unsigned long val, void *data); |
117 | extern int kprobe_int3_handler(struct pt_regs *regs); | 122 | extern int kprobe_int3_handler(struct pt_regs *regs); |
118 | extern int kprobe_debug_handler(struct pt_regs *regs); | 123 | extern int kprobe_debug_handler(struct pt_regs *regs); |
124 | |||
125 | #endif /* CONFIG_KPROBES */ | ||
119 | #endif /* _ASM_X86_KPROBES_H */ | 126 | #endif /* _ASM_X86_KPROBES_H */ |
diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h index 8f50fb3f04e1..72277b1028a5 100644 --- a/arch/x86/include/asm/pgtable-3level.h +++ b/arch/x86/include/asm/pgtable-3level.h | |||
@@ -121,7 +121,8 @@ static inline void native_pmd_clear(pmd_t *pmd) | |||
121 | *(tmp + 1) = 0; | 121 | *(tmp + 1) = 0; |
122 | } | 122 | } |
123 | 123 | ||
124 | #ifndef CONFIG_SMP | 124 | #if !defined(CONFIG_SMP) || (defined(CONFIG_HIGHMEM64G) && \ |
125 | defined(CONFIG_PARAVIRT)) | ||
125 | static inline void native_pud_clear(pud_t *pudp) | 126 | static inline void native_pud_clear(pud_t *pudp) |
126 | { | 127 | { |
127 | } | 128 | } |
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index bdcdb3b3a219..84c00592d359 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile | |||
@@ -100,7 +100,6 @@ obj-$(CONFIG_HPET_TIMER) += hpet.o | |||
100 | obj-$(CONFIG_APB_TIMER) += apb_timer.o | 100 | obj-$(CONFIG_APB_TIMER) += apb_timer.o |
101 | 101 | ||
102 | obj-$(CONFIG_AMD_NB) += amd_nb.o | 102 | obj-$(CONFIG_AMD_NB) += amd_nb.o |
103 | obj-$(CONFIG_DEBUG_RODATA_TEST) += test_rodata.o | ||
104 | obj-$(CONFIG_DEBUG_NMI_SELFTEST) += nmi_selftest.o | 103 | obj-$(CONFIG_DEBUG_NMI_SELFTEST) += nmi_selftest.o |
105 | 104 | ||
106 | obj-$(CONFIG_KVM_GUEST) += kvm.o kvmclock.o | 105 | obj-$(CONFIG_KVM_GUEST) += kvm.o kvmclock.o |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index f07005e6f461..c64ca5929cb5 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -1510,7 +1510,7 @@ void cpu_init(void) | |||
1510 | for (i = 0; i <= IO_BITMAP_LONGS; i++) | 1510 | for (i = 0; i <= IO_BITMAP_LONGS; i++) |
1511 | t->io_bitmap[i] = ~0UL; | 1511 | t->io_bitmap[i] = ~0UL; |
1512 | 1512 | ||
1513 | atomic_inc(&init_mm.mm_count); | 1513 | mmgrab(&init_mm); |
1514 | me->active_mm = &init_mm; | 1514 | me->active_mm = &init_mm; |
1515 | BUG_ON(me->mm); | 1515 | BUG_ON(me->mm); |
1516 | enter_lazy_tlb(&init_mm, me); | 1516 | enter_lazy_tlb(&init_mm, me); |
@@ -1561,7 +1561,7 @@ void cpu_init(void) | |||
1561 | /* | 1561 | /* |
1562 | * Set up and load the per-CPU TSS and LDT | 1562 | * Set up and load the per-CPU TSS and LDT |
1563 | */ | 1563 | */ |
1564 | atomic_inc(&init_mm.mm_count); | 1564 | mmgrab(&init_mm); |
1565 | curr->active_mm = &init_mm; | 1565 | curr->active_mm = &init_mm; |
1566 | BUG_ON(curr->mm); | 1566 | BUG_ON(curr->mm); |
1567 | enter_lazy_tlb(&init_mm, curr); | 1567 | enter_lazy_tlb(&init_mm, curr); |
diff --git a/arch/x86/kernel/test_rodata.c b/arch/x86/kernel/test_rodata.c deleted file mode 100644 index 222e84e2432e..000000000000 --- a/arch/x86/kernel/test_rodata.c +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | /* | ||
2 | * test_rodata.c: functional test for mark_rodata_ro function | ||
3 | * | ||
4 | * (C) Copyright 2008 Intel Corporation | ||
5 | * Author: Arjan van de Ven <arjan@linux.intel.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; version 2 | ||
10 | * of the License. | ||
11 | */ | ||
12 | #include <asm/cacheflush.h> | ||
13 | #include <asm/sections.h> | ||
14 | #include <asm/asm.h> | ||
15 | |||
16 | int rodata_test(void) | ||
17 | { | ||
18 | unsigned long result; | ||
19 | unsigned long start, end; | ||
20 | |||
21 | /* test 1: read the value */ | ||
22 | /* If this test fails, some previous testrun has clobbered the state */ | ||
23 | if (!rodata_test_data) { | ||
24 | printk(KERN_ERR "rodata_test: test 1 fails (start data)\n"); | ||
25 | return -ENODEV; | ||
26 | } | ||
27 | |||
28 | /* test 2: write to the variable; this should fault */ | ||
29 | /* | ||
30 | * If this test fails, we managed to overwrite the data | ||
31 | * | ||
32 | * This is written in assembly to be able to catch the | ||
33 | * exception that is supposed to happen in the correct | ||
34 | * case | ||
35 | */ | ||
36 | |||
37 | result = 1; | ||
38 | asm volatile( | ||
39 | "0: mov %[zero],(%[rodata_test])\n" | ||
40 | " mov %[zero], %[rslt]\n" | ||
41 | "1:\n" | ||
42 | ".section .fixup,\"ax\"\n" | ||
43 | "2: jmp 1b\n" | ||
44 | ".previous\n" | ||
45 | _ASM_EXTABLE(0b,2b) | ||
46 | : [rslt] "=r" (result) | ||
47 | : [rodata_test] "r" (&rodata_test_data), [zero] "r" (0UL) | ||
48 | ); | ||
49 | |||
50 | |||
51 | if (!result) { | ||
52 | printk(KERN_ERR "rodata_test: test data was not read only\n"); | ||
53 | return -ENODEV; | ||
54 | } | ||
55 | |||
56 | /* test 3: check the value hasn't changed */ | ||
57 | /* If this test fails, we managed to overwrite the data */ | ||
58 | if (!rodata_test_data) { | ||
59 | printk(KERN_ERR "rodata_test: Test 3 fails (end data)\n"); | ||
60 | return -ENODEV; | ||
61 | } | ||
62 | /* test 4: check if the rodata section is 4Kb aligned */ | ||
63 | start = (unsigned long)__start_rodata; | ||
64 | end = (unsigned long)__end_rodata; | ||
65 | if (start & (PAGE_SIZE - 1)) { | ||
66 | printk(KERN_ERR "rodata_test: .rodata is not 4k aligned\n"); | ||
67 | return -ENODEV; | ||
68 | } | ||
69 | if (end & (PAGE_SIZE - 1)) { | ||
70 | printk(KERN_ERR "rodata_test: .rodata end is not 4k aligned\n"); | ||
71 | return -ENODEV; | ||
72 | } | ||
73 | |||
74 | return 0; | ||
75 | } | ||
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 2fd7586aad4d..1cda35277278 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -4102,7 +4102,7 @@ static void update_permission_bitmask(struct kvm_vcpu *vcpu, | |||
4102 | * as a SMAP violation if all of the following | 4102 | * as a SMAP violation if all of the following |
4103 | * conditions are ture: | 4103 | * conditions are ture: |
4104 | * - X86_CR4_SMAP is set in CR4 | 4104 | * - X86_CR4_SMAP is set in CR4 |
4105 | * - An user page is accessed | 4105 | * - A user page is accessed |
4106 | * - Page fault in kernel mode | 4106 | * - Page fault in kernel mode |
4107 | * - if CPL = 3 or X86_EFLAGS_AC is clear | 4107 | * - if CPL = 3 or X86_EFLAGS_AC is clear |
4108 | * | 4108 | * |
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 928d657de829..2b4b53e6793f 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -864,9 +864,6 @@ static noinline int do_test_wp_bit(void) | |||
864 | return flag; | 864 | return flag; |
865 | } | 865 | } |
866 | 866 | ||
867 | const int rodata_test_data = 0xC3; | ||
868 | EXPORT_SYMBOL_GPL(rodata_test_data); | ||
869 | |||
870 | int kernel_set_to_readonly __read_mostly; | 867 | int kernel_set_to_readonly __read_mostly; |
871 | 868 | ||
872 | void set_kernel_text_rw(void) | 869 | void set_kernel_text_rw(void) |
@@ -939,7 +936,6 @@ void mark_rodata_ro(void) | |||
939 | set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT); | 936 | set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT); |
940 | printk(KERN_INFO "Write protecting the kernel read-only data: %luk\n", | 937 | printk(KERN_INFO "Write protecting the kernel read-only data: %luk\n", |
941 | size >> 10); | 938 | size >> 10); |
942 | rodata_test(); | ||
943 | 939 | ||
944 | #ifdef CONFIG_CPA_DEBUG | 940 | #ifdef CONFIG_CPA_DEBUG |
945 | printk(KERN_INFO "Testing CPA: undo %lx-%lx\n", start, start + size); | 941 | printk(KERN_INFO "Testing CPA: undo %lx-%lx\n", start, start + size); |
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 97346f987ef2..15173d37f399 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -1000,9 +1000,6 @@ void __init mem_init(void) | |||
1000 | mem_init_print_info(NULL); | 1000 | mem_init_print_info(NULL); |
1001 | } | 1001 | } |
1002 | 1002 | ||
1003 | const int rodata_test_data = 0xC3; | ||
1004 | EXPORT_SYMBOL_GPL(rodata_test_data); | ||
1005 | |||
1006 | int kernel_set_to_readonly; | 1003 | int kernel_set_to_readonly; |
1007 | 1004 | ||
1008 | void set_kernel_text_rw(void) | 1005 | void set_kernel_text_rw(void) |
@@ -1071,8 +1068,6 @@ void mark_rodata_ro(void) | |||
1071 | all_end = roundup((unsigned long)_brk_end, PMD_SIZE); | 1068 | all_end = roundup((unsigned long)_brk_end, PMD_SIZE); |
1072 | set_memory_nx(text_end, (all_end - text_end) >> PAGE_SHIFT); | 1069 | set_memory_nx(text_end, (all_end - text_end) >> PAGE_SHIFT); |
1073 | 1070 | ||
1074 | rodata_test(); | ||
1075 | |||
1076 | #ifdef CONFIG_CPA_DEBUG | 1071 | #ifdef CONFIG_CPA_DEBUG |
1077 | printk(KERN_INFO "Testing CPA: undo %lx-%lx\n", start, end); | 1072 | printk(KERN_INFO "Testing CPA: undo %lx-%lx\n", start, end); |
1078 | set_memory_rw(start, (end-start) >> PAGE_SHIFT); | 1073 | set_memory_rw(start, (end-start) >> PAGE_SHIFT); |
diff --git a/arch/xtensa/include/asm/Kbuild b/arch/xtensa/include/asm/Kbuild index 9e9760b20be5..f41408c53fe1 100644 --- a/arch/xtensa/include/asm/Kbuild +++ b/arch/xtensa/include/asm/Kbuild | |||
@@ -31,3 +31,4 @@ generic-y += topology.h | |||
31 | generic-y += trace_clock.h | 31 | generic-y += trace_clock.h |
32 | generic-y += word-at-a-time.h | 32 | generic-y += word-at-a-time.h |
33 | generic-y += xor.h | 33 | generic-y += xor.h |
34 | generic-y += kprobes.h | ||
diff --git a/arch/xtensa/kernel/smp.c b/arch/xtensa/kernel/smp.c index fc4ad21a5ed4..fcea72019df7 100644 --- a/arch/xtensa/kernel/smp.c +++ b/arch/xtensa/kernel/smp.c | |||
@@ -135,8 +135,8 @@ void secondary_start_kernel(void) | |||
135 | 135 | ||
136 | /* All kernel threads share the same mm context. */ | 136 | /* All kernel threads share the same mm context. */ |
137 | 137 | ||
138 | atomic_inc(&mm->mm_users); | 138 | mmget(mm); |
139 | atomic_inc(&mm->mm_count); | 139 | mmgrab(mm); |
140 | current->active_mm = mm; | 140 | current->active_mm = mm; |
141 | cpumask_set_cpu(cpu, mm_cpumask(mm)); | 141 | cpumask_set_cpu(cpu, mm_cpumask(mm)); |
142 | enter_lazy_tlb(mm, current); | 142 | enter_lazy_tlb(mm, current); |
diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 82fd0cc394eb..8fab716e4059 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c | |||
@@ -185,7 +185,7 @@ static struct throtl_grp *sq_to_tg(struct throtl_service_queue *sq) | |||
185 | * sq_to_td - return throtl_data the specified service queue belongs to | 185 | * sq_to_td - return throtl_data the specified service queue belongs to |
186 | * @sq: the throtl_service_queue of interest | 186 | * @sq: the throtl_service_queue of interest |
187 | * | 187 | * |
188 | * A service_queue can be embeded in either a throtl_grp or throtl_data. | 188 | * A service_queue can be embedded in either a throtl_grp or throtl_data. |
189 | * Determine the associated throtl_data accordingly and return it. | 189 | * Determine the associated throtl_data accordingly and return it. |
190 | */ | 190 | */ |
191 | static struct throtl_data *sq_to_td(struct throtl_service_queue *sq) | 191 | static struct throtl_data *sq_to_td(struct throtl_service_queue *sq) |
diff --git a/block/bsg.c b/block/bsg.c index a9a8b8e0446f..74835dbf0c47 100644 --- a/block/bsg.c +++ b/block/bsg.c | |||
@@ -573,7 +573,7 @@ bsg_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) | |||
573 | int ret; | 573 | int ret; |
574 | ssize_t bytes_read; | 574 | ssize_t bytes_read; |
575 | 575 | ||
576 | dprintk("%s: read %Zd bytes\n", bd->name, count); | 576 | dprintk("%s: read %zd bytes\n", bd->name, count); |
577 | 577 | ||
578 | bsg_set_block(bd, file); | 578 | bsg_set_block(bd, file); |
579 | 579 | ||
@@ -648,7 +648,7 @@ bsg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) | |||
648 | ssize_t bytes_written; | 648 | ssize_t bytes_written; |
649 | int ret; | 649 | int ret; |
650 | 650 | ||
651 | dprintk("%s: write %Zd bytes\n", bd->name, count); | 651 | dprintk("%s: write %zd bytes\n", bd->name, count); |
652 | 652 | ||
653 | if (unlikely(segment_eq(get_fs(), KERNEL_DS))) | 653 | if (unlikely(segment_eq(get_fs(), KERNEL_DS))) |
654 | return -EINVAL; | 654 | return -EINVAL; |
@@ -667,7 +667,7 @@ bsg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) | |||
667 | if (!bytes_written || err_block_err(ret)) | 667 | if (!bytes_written || err_block_err(ret)) |
668 | bytes_written = ret; | 668 | bytes_written = ret; |
669 | 669 | ||
670 | dprintk("%s: returning %Zd\n", bd->name, bytes_written); | 670 | dprintk("%s: returning %zd\n", bd->name, bytes_written); |
671 | return bytes_written; | 671 | return bytes_written; |
672 | } | 672 | } |
673 | 673 | ||
diff --git a/drivers/acpi/acpica/dbconvert.c b/drivers/acpi/acpica/dbconvert.c index 251f9477a984..857dbc43a9b1 100644 --- a/drivers/acpi/acpica/dbconvert.c +++ b/drivers/acpi/acpica/dbconvert.c | |||
@@ -242,7 +242,7 @@ acpi_status acpi_db_convert_to_package(char *string, union acpi_object *object) | |||
242 | * | 242 | * |
243 | * RETURN: Status | 243 | * RETURN: Status |
244 | * | 244 | * |
245 | * DESCRIPTION: Convert a typed and tokenized string to an union acpi_object. Typing: | 245 | * DESCRIPTION: Convert a typed and tokenized string to a union acpi_object. Typing: |
246 | * 1) String objects were surrounded by quotes. | 246 | * 1) String objects were surrounded by quotes. |
247 | * 2) Buffer objects were surrounded by parentheses. | 247 | * 2) Buffer objects were surrounded by parentheses. |
248 | * 3) Package objects were surrounded by brackets "[]". | 248 | * 3) Package objects were surrounded by brackets "[]". |
diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c index 3dbbecf22087..9d14b509529e 100644 --- a/drivers/acpi/acpica/nspredef.c +++ b/drivers/acpi/acpica/nspredef.c | |||
@@ -323,7 +323,7 @@ acpi_ns_check_reference(struct acpi_evaluate_info *info, | |||
323 | 323 | ||
324 | /* | 324 | /* |
325 | * Check the reference object for the correct reference type (opcode). | 325 | * Check the reference object for the correct reference type (opcode). |
326 | * The only type of reference that can be converted to an union acpi_object is | 326 | * The only type of reference that can be converted to a union acpi_object is |
327 | * a reference to a named object (reference class: NAME) | 327 | * a reference to a named object (reference class: NAME) |
328 | */ | 328 | */ |
329 | if (return_object->reference.class == ACPI_REFCLASS_NAME) { | 329 | if (return_object->reference.class == ACPI_REFCLASS_NAME) { |
diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c index 8e365c0e766b..c944ff5c9c3d 100644 --- a/drivers/acpi/acpica/nsxfeval.c +++ b/drivers/acpi/acpica/nsxfeval.c | |||
@@ -495,9 +495,9 @@ static void acpi_ns_resolve_references(struct acpi_evaluate_info *info) | |||
495 | /* | 495 | /* |
496 | * Two types of references are supported - those created by Index and | 496 | * Two types of references are supported - those created by Index and |
497 | * ref_of operators. A name reference (AML_NAMEPATH_OP) can be converted | 497 | * ref_of operators. A name reference (AML_NAMEPATH_OP) can be converted |
498 | * to an union acpi_object, so it is not dereferenced here. A ddb_handle | 498 | * to a union acpi_object, so it is not dereferenced here. A ddb_handle |
499 | * (AML_LOAD_OP) cannot be dereferenced, nor can it be converted to | 499 | * (AML_LOAD_OP) cannot be dereferenced, nor can it be converted to |
500 | * an union acpi_object. | 500 | * a union acpi_object. |
501 | */ | 501 | */ |
502 | switch (info->return_object->reference.class) { | 502 | switch (info->return_object->reference.class) { |
503 | case ACPI_REFCLASS_INDEX: | 503 | case ACPI_REFCLASS_INDEX: |
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index 8b11d6d385dc..cd4c4271dc4c 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c | |||
@@ -406,7 +406,7 @@ static void acpi_dev_get_irqresource(struct resource *res, u32 gsi, | |||
406 | } | 406 | } |
407 | 407 | ||
408 | /* | 408 | /* |
409 | * In IO-APIC mode, use overrided attribute. Two reasons: | 409 | * In IO-APIC mode, use overridden attribute. Two reasons: |
410 | * 1. BIOS bug in DSDT | 410 | * 1. BIOS bug in DSDT |
411 | * 2. BIOS uses IO-APIC mode Interrupt Source Override | 411 | * 2. BIOS uses IO-APIC mode Interrupt Source Override |
412 | * | 412 | * |
diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c index 2b5d0fac81f0..01c94669a2b0 100644 --- a/drivers/acpi/spcr.c +++ b/drivers/acpi/spcr.c | |||
@@ -46,7 +46,7 @@ static bool qdf2400_erratum_44_present(struct acpi_table_header *h) | |||
46 | * console is registered and if @earlycon is true, earlycon is set up. | 46 | * console is registered and if @earlycon is true, earlycon is set up. |
47 | * | 47 | * |
48 | * When CONFIG_ACPI_SPCR_TABLE is defined, this function should be called | 48 | * When CONFIG_ACPI_SPCR_TABLE is defined, this function should be called |
49 | * from arch inintialization code as soon as the DT/ACPI decision is made. | 49 | * from arch initialization code as soon as the DT/ACPI decision is made. |
50 | * | 50 | * |
51 | */ | 51 | */ |
52 | int __init parse_spcr(bool earlycon) | 52 | int __init parse_spcr(bool earlycon) |
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 4e5bf36c5f46..ef68232b5222 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -2034,7 +2034,7 @@ static int speed_down_verdict_cb(struct ata_ering_entry *ent, void *void_arg) | |||
2034 | * This is to expedite speed down decisions right after device is | 2034 | * This is to expedite speed down decisions right after device is |
2035 | * initially configured. | 2035 | * initially configured. |
2036 | * | 2036 | * |
2037 | * The followings are speed down rules. #1 and #2 deal with | 2037 | * The following are speed down rules. #1 and #2 deal with |
2038 | * DUBIOUS errors. | 2038 | * DUBIOUS errors. |
2039 | * | 2039 | * |
2040 | * 1. If more than one DUBIOUS_ATA_BUS or DUBIOUS_TOUT_HSM errors | 2040 | * 1. If more than one DUBIOUS_ATA_BUS or DUBIOUS_TOUT_HSM errors |
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index f1a9198dfe5a..4a610795b585 100644 --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c | |||
@@ -2394,12 +2394,7 @@ static int __init amb_module_init (void) | |||
2394 | { | 2394 | { |
2395 | PRINTD (DBG_FLOW|DBG_INIT, "init_module"); | 2395 | PRINTD (DBG_FLOW|DBG_INIT, "init_module"); |
2396 | 2396 | ||
2397 | // sanity check - cast needed as printk does not support %Zu | 2397 | BUILD_BUG_ON(sizeof(amb_mem) != 4*16 + 4*12); |
2398 | if (sizeof(amb_mem) != 4*16 + 4*12) { | ||
2399 | PRINTK (KERN_ERR, "Fix amb_mem (is %lu words).", | ||
2400 | (unsigned long) sizeof(amb_mem)); | ||
2401 | return -ENOMEM; | ||
2402 | } | ||
2403 | 2398 | ||
2404 | show_version(); | 2399 | show_version(); |
2405 | 2400 | ||
diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c index 623359e407aa..b042ec458544 100644 --- a/drivers/atm/eni.c +++ b/drivers/atm/eni.c | |||
@@ -2326,11 +2326,7 @@ static int __init eni_init(void) | |||
2326 | { | 2326 | { |
2327 | struct sk_buff *skb; /* dummy for sizeof */ | 2327 | struct sk_buff *skb; /* dummy for sizeof */ |
2328 | 2328 | ||
2329 | if (sizeof(skb->cb) < sizeof(struct eni_skb_prv)) { | 2329 | BUILD_BUG_ON(sizeof(skb->cb) < sizeof(struct eni_skb_prv)); |
2330 | printk(KERN_ERR "eni_detect: skb->cb is too small (%Zd < %Zd)\n", | ||
2331 | sizeof(skb->cb),sizeof(struct eni_skb_prv)); | ||
2332 | return -EIO; | ||
2333 | } | ||
2334 | return pci_register_driver(&eni_driver); | 2330 | return pci_register_driver(&eni_driver); |
2335 | } | 2331 | } |
2336 | 2332 | ||
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index 80c2ddcfa92c..22dcab952a24 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c | |||
@@ -895,7 +895,7 @@ static int fs_open(struct atm_vcc *atm_vcc) | |||
895 | /* XXX handle qos parameters (rate limiting) ? */ | 895 | /* XXX handle qos parameters (rate limiting) ? */ |
896 | 896 | ||
897 | vcc = kmalloc(sizeof(struct fs_vcc), GFP_KERNEL); | 897 | vcc = kmalloc(sizeof(struct fs_vcc), GFP_KERNEL); |
898 | fs_dprintk (FS_DEBUG_ALLOC, "Alloc VCC: %p(%Zd)\n", vcc, sizeof(struct fs_vcc)); | 898 | fs_dprintk (FS_DEBUG_ALLOC, "Alloc VCC: %p(%zd)\n", vcc, sizeof(struct fs_vcc)); |
899 | if (!vcc) { | 899 | if (!vcc) { |
900 | clear_bit(ATM_VF_ADDR, &atm_vcc->flags); | 900 | clear_bit(ATM_VF_ADDR, &atm_vcc->flags); |
901 | return -ENOMEM; | 901 | return -ENOMEM; |
@@ -946,7 +946,7 @@ static int fs_open(struct atm_vcc *atm_vcc) | |||
946 | 946 | ||
947 | if (DO_DIRECTION (txtp)) { | 947 | if (DO_DIRECTION (txtp)) { |
948 | tc = kmalloc (sizeof (struct fs_transmit_config), GFP_KERNEL); | 948 | tc = kmalloc (sizeof (struct fs_transmit_config), GFP_KERNEL); |
949 | fs_dprintk (FS_DEBUG_ALLOC, "Alloc tc: %p(%Zd)\n", | 949 | fs_dprintk (FS_DEBUG_ALLOC, "Alloc tc: %p(%zd)\n", |
950 | tc, sizeof (struct fs_transmit_config)); | 950 | tc, sizeof (struct fs_transmit_config)); |
951 | if (!tc) { | 951 | if (!tc) { |
952 | fs_dprintk (FS_DEBUG_OPEN, "fs: can't alloc transmit_config.\n"); | 952 | fs_dprintk (FS_DEBUG_OPEN, "fs: can't alloc transmit_config.\n"); |
@@ -1185,7 +1185,7 @@ static int fs_send (struct atm_vcc *atm_vcc, struct sk_buff *skb) | |||
1185 | vcc->last_skb = skb; | 1185 | vcc->last_skb = skb; |
1186 | 1186 | ||
1187 | td = kmalloc (sizeof (struct FS_BPENTRY), GFP_ATOMIC); | 1187 | td = kmalloc (sizeof (struct FS_BPENTRY), GFP_ATOMIC); |
1188 | fs_dprintk (FS_DEBUG_ALLOC, "Alloc transd: %p(%Zd)\n", td, sizeof (struct FS_BPENTRY)); | 1188 | fs_dprintk (FS_DEBUG_ALLOC, "Alloc transd: %p(%zd)\n", td, sizeof (struct FS_BPENTRY)); |
1189 | if (!td) { | 1189 | if (!td) { |
1190 | /* Oops out of mem */ | 1190 | /* Oops out of mem */ |
1191 | return -ENOMEM; | 1191 | return -ENOMEM; |
@@ -1492,7 +1492,7 @@ static void top_off_fp (struct fs_dev *dev, struct freepool *fp, | |||
1492 | fs_dprintk (FS_DEBUG_ALLOC, "Alloc rec-skb: %p(%d)\n", skb, fp->bufsize); | 1492 | fs_dprintk (FS_DEBUG_ALLOC, "Alloc rec-skb: %p(%d)\n", skb, fp->bufsize); |
1493 | if (!skb) break; | 1493 | if (!skb) break; |
1494 | ne = kmalloc (sizeof (struct FS_BPENTRY), gfp_flags); | 1494 | ne = kmalloc (sizeof (struct FS_BPENTRY), gfp_flags); |
1495 | fs_dprintk (FS_DEBUG_ALLOC, "Alloc rec-d: %p(%Zd)\n", ne, sizeof (struct FS_BPENTRY)); | 1495 | fs_dprintk (FS_DEBUG_ALLOC, "Alloc rec-d: %p(%zd)\n", ne, sizeof (struct FS_BPENTRY)); |
1496 | if (!ne) { | 1496 | if (!ne) { |
1497 | fs_dprintk (FS_DEBUG_ALLOC, "Free rec-skb: %p\n", skb); | 1497 | fs_dprintk (FS_DEBUG_ALLOC, "Free rec-skb: %p\n", skb); |
1498 | dev_kfree_skb_any (skb); | 1498 | dev_kfree_skb_any (skb); |
@@ -1803,7 +1803,7 @@ static int fs_init(struct fs_dev *dev) | |||
1803 | } | 1803 | } |
1804 | dev->atm_vccs = kcalloc (dev->nchannels, sizeof (struct atm_vcc *), | 1804 | dev->atm_vccs = kcalloc (dev->nchannels, sizeof (struct atm_vcc *), |
1805 | GFP_KERNEL); | 1805 | GFP_KERNEL); |
1806 | fs_dprintk (FS_DEBUG_ALLOC, "Alloc atmvccs: %p(%Zd)\n", | 1806 | fs_dprintk (FS_DEBUG_ALLOC, "Alloc atmvccs: %p(%zd)\n", |
1807 | dev->atm_vccs, dev->nchannels * sizeof (struct atm_vcc *)); | 1807 | dev->atm_vccs, dev->nchannels * sizeof (struct atm_vcc *)); |
1808 | 1808 | ||
1809 | if (!dev->atm_vccs) { | 1809 | if (!dev->atm_vccs) { |
@@ -1911,7 +1911,7 @@ static int firestream_init_one(struct pci_dev *pci_dev, | |||
1911 | goto err_out; | 1911 | goto err_out; |
1912 | 1912 | ||
1913 | fs_dev = kzalloc (sizeof (struct fs_dev), GFP_KERNEL); | 1913 | fs_dev = kzalloc (sizeof (struct fs_dev), GFP_KERNEL); |
1914 | fs_dprintk (FS_DEBUG_ALLOC, "Alloc fs-dev: %p(%Zd)\n", | 1914 | fs_dprintk (FS_DEBUG_ALLOC, "Alloc fs-dev: %p(%zd)\n", |
1915 | fs_dev, sizeof (struct fs_dev)); | 1915 | fs_dev, sizeof (struct fs_dev)); |
1916 | if (!fs_dev) | 1916 | if (!fs_dev) |
1917 | goto err_out; | 1917 | goto err_out; |
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c index 584aa881882b..2bf1ef1c3c78 100644 --- a/drivers/atm/horizon.c +++ b/drivers/atm/horizon.c | |||
@@ -2884,12 +2884,7 @@ static struct pci_driver hrz_driver = { | |||
2884 | /********** module entry **********/ | 2884 | /********** module entry **********/ |
2885 | 2885 | ||
2886 | static int __init hrz_module_init (void) { | 2886 | static int __init hrz_module_init (void) { |
2887 | // sanity check - cast is needed since printk does not support %Zu | 2887 | BUILD_BUG_ON(sizeof(struct MEMMAP) != 128*1024/4); |
2888 | if (sizeof(struct MEMMAP) != 128*1024/4) { | ||
2889 | PRINTK (KERN_ERR, "Fix struct MEMMAP (is %lu fakewords).", | ||
2890 | (unsigned long) sizeof(struct MEMMAP)); | ||
2891 | return -ENOMEM; | ||
2892 | } | ||
2893 | 2888 | ||
2894 | show_version(); | 2889 | show_version(); |
2895 | 2890 | ||
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index 8640bafeb471..a4fa6c82261e 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c | |||
@@ -21,7 +21,7 @@ | |||
21 | supports a variety of varients of Interphase ATM PCI (i)Chip adapter | 21 | supports a variety of varients of Interphase ATM PCI (i)Chip adapter |
22 | card family (See www.iphase.com/products/ClassSheet.cfm?ClassID=ATM) | 22 | card family (See www.iphase.com/products/ClassSheet.cfm?ClassID=ATM) |
23 | in terms of PHY type, the size of control memory and the size of | 23 | in terms of PHY type, the size of control memory and the size of |
24 | packet memory. The followings are the change log and history: | 24 | packet memory. The following are the change log and history: |
25 | 25 | ||
26 | Bugfix the Mona's UBR driver. | 26 | Bugfix the Mona's UBR driver. |
27 | Modify the basic memory allocation and dma logic. | 27 | Modify the basic memory allocation and dma logic. |
diff --git a/drivers/atm/iphase.h b/drivers/atm/iphase.h index 53ecac5a2161..2beacf2fc1ec 100644 --- a/drivers/atm/iphase.h +++ b/drivers/atm/iphase.h | |||
@@ -21,7 +21,7 @@ | |||
21 | supports a variety of varients of Interphase ATM PCI (i)Chip adapter | 21 | supports a variety of varients of Interphase ATM PCI (i)Chip adapter |
22 | card family (See www.iphase.com/products/ClassSheet.cfm?ClassID=ATM) | 22 | card family (See www.iphase.com/products/ClassSheet.cfm?ClassID=ATM) |
23 | in terms of PHY type, the size of control memory and the size of | 23 | in terms of PHY type, the size of control memory and the size of |
24 | packet memory. The followings are the change log and history: | 24 | packet memory. The following are the change log and history: |
25 | 25 | ||
26 | Bugfix the Mona's UBR driver. | 26 | Bugfix the Mona's UBR driver. |
27 | Modify the basic memory allocation and dma logic. | 27 | Modify the basic memory allocation and dma logic. |
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c index 445505d9ea07..1a9bc51284b0 100644 --- a/drivers/atm/lanai.c +++ b/drivers/atm/lanai.c | |||
@@ -1389,7 +1389,7 @@ static void vcc_rx_aal5(struct lanai_vcc *lvcc, int endptr) | |||
1389 | if (n < 0) | 1389 | if (n < 0) |
1390 | n += lanai_buf_size(&lvcc->rx.buf); | 1390 | n += lanai_buf_size(&lvcc->rx.buf); |
1391 | APRINTK(n >= 0 && n < lanai_buf_size(&lvcc->rx.buf) && !(n & 15), | 1391 | APRINTK(n >= 0 && n < lanai_buf_size(&lvcc->rx.buf) && !(n & 15), |
1392 | "vcc_rx_aal5: n out of range (%d/%Zu)\n", | 1392 | "vcc_rx_aal5: n out of range (%d/%zu)\n", |
1393 | n, lanai_buf_size(&lvcc->rx.buf)); | 1393 | n, lanai_buf_size(&lvcc->rx.buf)); |
1394 | /* Recover the second-to-last word to get true pdu length */ | 1394 | /* Recover the second-to-last word to get true pdu length */ |
1395 | if ((x = &end[-2]) < lvcc->rx.buf.start) | 1395 | if ((x = &end[-2]) < lvcc->rx.buf.start) |
@@ -1493,9 +1493,9 @@ static int lanai_get_sized_buffer(struct lanai_dev *lanai, | |||
1493 | return -ENOMEM; | 1493 | return -ENOMEM; |
1494 | if (unlikely(lanai_buf_size(buf) < size)) | 1494 | if (unlikely(lanai_buf_size(buf) < size)) |
1495 | printk(KERN_WARNING DEV_LABEL "(itf %d): wanted %d bytes " | 1495 | printk(KERN_WARNING DEV_LABEL "(itf %d): wanted %d bytes " |
1496 | "for %s buffer, got only %Zu\n", lanai->number, size, | 1496 | "for %s buffer, got only %zu\n", lanai->number, size, |
1497 | name, lanai_buf_size(buf)); | 1497 | name, lanai_buf_size(buf)); |
1498 | DPRINTK("Allocated %Zu byte %s buffer\n", lanai_buf_size(buf), name); | 1498 | DPRINTK("Allocated %zu byte %s buffer\n", lanai_buf_size(buf), name); |
1499 | return 0; | 1499 | return 0; |
1500 | } | 1500 | } |
1501 | 1501 | ||
@@ -1586,7 +1586,7 @@ static int service_buffer_allocate(struct lanai_dev *lanai) | |||
1586 | lanai->pci); | 1586 | lanai->pci); |
1587 | if (unlikely(lanai->service.start == NULL)) | 1587 | if (unlikely(lanai->service.start == NULL)) |
1588 | return -ENOMEM; | 1588 | return -ENOMEM; |
1589 | DPRINTK("allocated service buffer at 0x%08lX, size %Zu(%d)\n", | 1589 | DPRINTK("allocated service buffer at 0x%08lX, size %zu(%d)\n", |
1590 | (unsigned long) lanai->service.start, | 1590 | (unsigned long) lanai->service.start, |
1591 | lanai_buf_size(&lanai->service), | 1591 | lanai_buf_size(&lanai->service), |
1592 | lanai_buf_size_cardorder(&lanai->service)); | 1592 | lanai_buf_size_cardorder(&lanai->service)); |
@@ -2467,8 +2467,8 @@ static int lanai_proc_read(struct atm_dev *atmdev, loff_t *pos, char *page) | |||
2467 | (lanai->status & STATUS_LED) ? 1 : 0, | 2467 | (lanai->status & STATUS_LED) ? 1 : 0, |
2468 | (lanai->status & STATUS_GPIN) ? 1 : 0); | 2468 | (lanai->status & STATUS_GPIN) ? 1 : 0); |
2469 | if (left-- == 0) | 2469 | if (left-- == 0) |
2470 | return sprintf(page, "global buffer sizes: service=%Zu, " | 2470 | return sprintf(page, "global buffer sizes: service=%zu, " |
2471 | "aal0_rx=%Zu\n", lanai_buf_size(&lanai->service), | 2471 | "aal0_rx=%zu\n", lanai_buf_size(&lanai->service), |
2472 | lanai->naal0 ? lanai_buf_size(&lanai->aal0buf) : 0); | 2472 | lanai->naal0 ? lanai_buf_size(&lanai->aal0buf) : 0); |
2473 | if (left-- == 0) { | 2473 | if (left-- == 0) { |
2474 | get_statistics(lanai); | 2474 | get_statistics(lanai); |
@@ -2513,7 +2513,7 @@ static int lanai_proc_read(struct atm_dev *atmdev, loff_t *pos, char *page) | |||
2513 | left += sprintf(&page[left], ",\n rx_AAL=%d", | 2513 | left += sprintf(&page[left], ",\n rx_AAL=%d", |
2514 | lvcc->rx.atmvcc->qos.aal == ATM_AAL5 ? 5 : 0); | 2514 | lvcc->rx.atmvcc->qos.aal == ATM_AAL5 ? 5 : 0); |
2515 | if (lvcc->rx.atmvcc->qos.aal == ATM_AAL5) | 2515 | if (lvcc->rx.atmvcc->qos.aal == ATM_AAL5) |
2516 | left += sprintf(&page[left], ", rx_buf_size=%Zu, " | 2516 | left += sprintf(&page[left], ", rx_buf_size=%zu, " |
2517 | "rx_bad_len=%u,\n rx_service_trash=%u, " | 2517 | "rx_bad_len=%u,\n rx_service_trash=%u, " |
2518 | "rx_service_stream=%u, rx_bad_crc=%u", | 2518 | "rx_service_stream=%u, rx_bad_crc=%u", |
2519 | lanai_buf_size(&lvcc->rx.buf), | 2519 | lanai_buf_size(&lvcc->rx.buf), |
@@ -2524,7 +2524,7 @@ static int lanai_proc_read(struct atm_dev *atmdev, loff_t *pos, char *page) | |||
2524 | } | 2524 | } |
2525 | if (lvcc->tx.atmvcc != NULL) | 2525 | if (lvcc->tx.atmvcc != NULL) |
2526 | left += sprintf(&page[left], ",\n tx_AAL=%d, " | 2526 | left += sprintf(&page[left], ",\n tx_AAL=%d, " |
2527 | "tx_buf_size=%Zu, tx_qos=%cBR, tx_backlogged=%c", | 2527 | "tx_buf_size=%zu, tx_qos=%cBR, tx_backlogged=%c", |
2528 | lvcc->tx.atmvcc->qos.aal == ATM_AAL5 ? 5 : 0, | 2528 | lvcc->tx.atmvcc->qos.aal == ATM_AAL5 ? 5 : 0, |
2529 | lanai_buf_size(&lvcc->tx.buf), | 2529 | lanai_buf_size(&lvcc->tx.buf), |
2530 | lvcc->tx.atmvcc == lanai->cbrvcc ? 'C' : 'U', | 2530 | lvcc->tx.atmvcc == lanai->cbrvcc ? 'C' : 'U', |
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 304377182c1a..4b52a1690329 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
@@ -186,7 +186,7 @@ static void __loop_update_dio(struct loop_device *lo, bool dio) | |||
186 | * | 186 | * |
187 | * TODO: the above condition may be loosed in the future, and | 187 | * TODO: the above condition may be loosed in the future, and |
188 | * direct I/O may be switched runtime at that time because most | 188 | * direct I/O may be switched runtime at that time because most |
189 | * of requests in sane appplications should be PAGE_SIZE algined | 189 | * of requests in sane applications should be PAGE_SIZE aligned |
190 | */ | 190 | */ |
191 | if (dio) { | 191 | if (dio) { |
192 | if (queue_logical_block_size(lo->lo_queue) >= sb_bsize && | 192 | if (queue_logical_block_size(lo->lo_queue) >= sb_bsize && |
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index e051fc8aa7d7..cd53771b9ae7 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c | |||
@@ -655,7 +655,7 @@ static void terminate_monitor(struct cm4000_dev *dev) | |||
655 | * monitor the card every 50msec. as a side-effect, retrieve the | 655 | * monitor the card every 50msec. as a side-effect, retrieve the |
656 | * atr once a card is inserted. another side-effect of retrieving the | 656 | * atr once a card is inserted. another side-effect of retrieving the |
657 | * atr is that the card will be powered on, so there is no need to | 657 | * atr is that the card will be powered on, so there is no need to |
658 | * power on the card explictely from the application: the driver | 658 | * power on the card explicitly from the application: the driver |
659 | * is already doing that for you. | 659 | * is already doing that for you. |
660 | */ | 660 | */ |
661 | 661 | ||
@@ -1037,7 +1037,7 @@ release_io: | |||
1037 | clear_bit(LOCK_IO, &dev->flags); | 1037 | clear_bit(LOCK_IO, &dev->flags); |
1038 | wake_up_interruptible(&dev->ioq); | 1038 | wake_up_interruptible(&dev->ioq); |
1039 | 1039 | ||
1040 | DEBUGP(2, dev, "<- cmm_read returns: rc = %Zi\n", | 1040 | DEBUGP(2, dev, "<- cmm_read returns: rc = %zi\n", |
1041 | (rc < 0 ? rc : count)); | 1041 | (rc < 0 ? rc : count)); |
1042 | return rc < 0 ? rc : count; | 1042 | return rc < 0 ? rc : count; |
1043 | } | 1043 | } |
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c index d7123259143e..d4dbd8d8e524 100644 --- a/drivers/char/pcmcia/cm4040_cs.c +++ b/drivers/char/pcmcia/cm4040_cs.c | |||
@@ -331,7 +331,7 @@ static ssize_t cm4040_write(struct file *filp, const char __user *buf, | |||
331 | } | 331 | } |
332 | 332 | ||
333 | if ((count < 5) || (count > READ_WRITE_BUFFER_SIZE)) { | 333 | if ((count < 5) || (count > READ_WRITE_BUFFER_SIZE)) { |
334 | DEBUGP(2, dev, "<- cm4040_write buffersize=%Zd < 5\n", count); | 334 | DEBUGP(2, dev, "<- cm4040_write buffersize=%zd < 5\n", count); |
335 | return -EIO; | 335 | return -EIO; |
336 | } | 336 | } |
337 | 337 | ||
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index 4fa7fcd8af36..f4f866ee54bc 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c | |||
@@ -603,7 +603,7 @@ static void sonypi_type3_srs(void) | |||
603 | u16 v16; | 603 | u16 v16; |
604 | u8 v8; | 604 | u8 v8; |
605 | 605 | ||
606 | /* This model type uses the same initialiazation of | 606 | /* This model type uses the same initialization of |
607 | * the embedded controller as the type2 models. */ | 607 | * the embedded controller as the type2 models. */ |
608 | sonypi_type2_srs(); | 608 | sonypi_type2_srs(); |
609 | 609 | ||
diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index 579f8263c479..fef39f9f41ee 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c | |||
@@ -269,7 +269,7 @@ static int deinstantiate_rng(struct device *ctrldev, int state_handle_mask) | |||
269 | /* | 269 | /* |
270 | * If the corresponding bit is set, then it means the state | 270 | * If the corresponding bit is set, then it means the state |
271 | * handle was initialized by us, and thus it needs to be | 271 | * handle was initialized by us, and thus it needs to be |
272 | * deintialized as well | 272 | * deinitialized as well |
273 | */ | 273 | */ |
274 | if ((1 << sh_idx) & state_handle_mask) { | 274 | if ((1 << sh_idx) & state_handle_mask) { |
275 | /* | 275 | /* |
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 551a271353d2..dea04871b50d 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c | |||
@@ -1228,7 +1228,7 @@ static int __init devfreq_init(void) | |||
1228 | subsys_initcall(devfreq_init); | 1228 | subsys_initcall(devfreq_init); |
1229 | 1229 | ||
1230 | /* | 1230 | /* |
1231 | * The followings are helper functions for devfreq user device drivers with | 1231 | * The following are helper functions for devfreq user device drivers with |
1232 | * OPP framework. | 1232 | * OPP framework. |
1233 | */ | 1233 | */ |
1234 | 1234 | ||
diff --git a/drivers/extcon/extcon-rt8973a.c b/drivers/extcon/extcon-rt8973a.c index 3e882aa107e8..eaa355e7d9e4 100644 --- a/drivers/extcon/extcon-rt8973a.c +++ b/drivers/extcon/extcon-rt8973a.c | |||
@@ -537,7 +537,7 @@ static void rt8973a_init_dev_type(struct rt8973a_muic_info *info) | |||
537 | regmap_update_bits(info->regmap, reg, mask, val); | 537 | regmap_update_bits(info->regmap, reg, mask, val); |
538 | } | 538 | } |
539 | 539 | ||
540 | /* Check whether RT8973A is auto swithcing mode or not */ | 540 | /* Check whether RT8973A is auto switching mode or not */ |
541 | ret = regmap_read(info->regmap, RT8973A_REG_CONTROL1, &data); | 541 | ret = regmap_read(info->regmap, RT8973A_REG_CONTROL1, &data); |
542 | if (ret) { | 542 | if (ret) { |
543 | dev_err(info->dev, | 543 | dev_err(info->dev, |
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c index f9e3aee6a211..7c2eed76011e 100644 --- a/drivers/firewire/core-device.c +++ b/drivers/firewire/core-device.c | |||
@@ -1068,7 +1068,7 @@ static void fw_device_init(struct work_struct *work) | |||
1068 | 1068 | ||
1069 | /* | 1069 | /* |
1070 | * Transition the device to running state. If it got pulled | 1070 | * Transition the device to running state. If it got pulled |
1071 | * out from under us while we did the intialization work, we | 1071 | * out from under us while we did the initialization work, we |
1072 | * have to shut down the device again here. Normally, though, | 1072 | * have to shut down the device again here. Normally, though, |
1073 | * fw_node_event will be responsible for shutting it down when | 1073 | * fw_node_event will be responsible for shutting it down when |
1074 | * necessary. We have to use the atomic cmpxchg here to avoid | 1074 | * necessary. We have to use the atomic cmpxchg here to avoid |
@@ -1231,7 +1231,7 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event) | |||
1231 | break; | 1231 | break; |
1232 | 1232 | ||
1233 | /* | 1233 | /* |
1234 | * Do minimal intialization of the device here, the | 1234 | * Do minimal initialization of the device here, the |
1235 | * rest will happen in fw_device_init(). | 1235 | * rest will happen in fw_device_init(). |
1236 | * | 1236 | * |
1237 | * Attention: A lot of things, even fw_device_get(), | 1237 | * Attention: A lot of things, even fw_device_get(), |
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c index ef7c8de7060e..ca5f2aa7232d 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c | |||
@@ -262,7 +262,7 @@ static void kfd_process_notifier_release(struct mmu_notifier *mn, | |||
262 | * and because the mmu_notifier_unregister function also drop | 262 | * and because the mmu_notifier_unregister function also drop |
263 | * mm_count we need to take an extra count here. | 263 | * mm_count we need to take an extra count here. |
264 | */ | 264 | */ |
265 | atomic_inc(&p->mm->mm_count); | 265 | mmgrab(p->mm); |
266 | mmu_notifier_unregister_no_release(&p->mmu_notifier, p->mm); | 266 | mmu_notifier_unregister_no_release(&p->mmu_notifier, p->mm); |
267 | mmu_notifier_call_srcu(&p->rcu, &kfd_process_destroy_delayed); | 267 | mmu_notifier_call_srcu(&p->rcu, &kfd_process_destroy_delayed); |
268 | } | 268 | } |
diff --git a/drivers/gpu/drm/amd/include/atombios.h b/drivers/gpu/drm/amd/include/atombios.h index 4a4d3797a6d3..181a2c3c6362 100644 --- a/drivers/gpu/drm/amd/include/atombios.h +++ b/drivers/gpu/drm/amd/include/atombios.h | |||
@@ -188,7 +188,7 @@ | |||
188 | #define HW_ASSISTED_I2C_STATUS_FAILURE 2 | 188 | #define HW_ASSISTED_I2C_STATUS_FAILURE 2 |
189 | #define HW_ASSISTED_I2C_STATUS_SUCCESS 1 | 189 | #define HW_ASSISTED_I2C_STATUS_SUCCESS 1 |
190 | 190 | ||
191 | #pragma pack(1) // BIOS data must use byte aligment | 191 | #pragma pack(1) // BIOS data must use byte alignment |
192 | 192 | ||
193 | // Define offset to location of ROM header. | 193 | // Define offset to location of ROM header. |
194 | #define OFFSET_TO_POINTER_TO_ATOM_ROM_HEADER 0x00000048L | 194 | #define OFFSET_TO_POINTER_TO_ATOM_ROM_HEADER 0x00000048L |
@@ -4361,7 +4361,7 @@ typedef struct _ATOM_GPIO_PIN_ASSIGNMENT | |||
4361 | // GPIO use to control PCIE_VDDC in certain SLT board | 4361 | // GPIO use to control PCIE_VDDC in certain SLT board |
4362 | #define PCIE_VDDC_CONTROL_GPIO_PINID 56 | 4362 | #define PCIE_VDDC_CONTROL_GPIO_PINID 56 |
4363 | 4363 | ||
4364 | //from SMU7.x, if ucGPIO_ID=PP_AC_DC_SWITCH_GPIO_PINID in GPIO_LUTTable, AC/DC swithing feature is enable | 4364 | //from SMU7.x, if ucGPIO_ID=PP_AC_DC_SWITCH_GPIO_PINID in GPIO_LUTTable, AC/DC switching feature is enable |
4365 | #define PP_AC_DC_SWITCH_GPIO_PINID 60 | 4365 | #define PP_AC_DC_SWITCH_GPIO_PINID 60 |
4366 | //from SMU7.x, if ucGPIO_ID=VDDC_REGULATOR_VRHOT_GPIO_PINID in GPIO_LUTable, VRHot feature is enable | 4366 | //from SMU7.x, if ucGPIO_ID=VDDC_REGULATOR_VRHOT_GPIO_PINID in GPIO_LUTable, VRHot feature is enable |
4367 | #define VDDC_VRHOT_GPIO_PINID 61 | 4367 | #define VDDC_VRHOT_GPIO_PINID 61 |
@@ -9180,7 +9180,7 @@ typedef struct _ATOM_POWERPLAY_INFO_V3 | |||
9180 | 9180 | ||
9181 | /*********************************************************************************/ | 9181 | /*********************************************************************************/ |
9182 | 9182 | ||
9183 | #pragma pack() // BIOS data must use byte aligment | 9183 | #pragma pack() // BIOS data must use byte alignment |
9184 | 9184 | ||
9185 | #pragma pack(1) | 9185 | #pragma pack(1) |
9186 | 9186 | ||
@@ -9211,7 +9211,7 @@ typedef struct _ATOM_SERVICE_INFO | |||
9211 | 9211 | ||
9212 | 9212 | ||
9213 | 9213 | ||
9214 | #pragma pack() // BIOS data must use byte aligment | 9214 | #pragma pack() // BIOS data must use byte alignment |
9215 | 9215 | ||
9216 | // | 9216 | // |
9217 | // AMD ACPI Table | 9217 | // AMD ACPI Table |
diff --git a/drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h b/drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h index 26129972f686..80ed65985af8 100644 --- a/drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h +++ b/drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h | |||
@@ -89,7 +89,7 @@ enum phm_platform_caps { | |||
89 | PHM_PlatformCaps_EnableSideportControl, /* indicates Sideport can be controlled */ | 89 | PHM_PlatformCaps_EnableSideportControl, /* indicates Sideport can be controlled */ |
90 | PHM_PlatformCaps_VideoPlaybackEEUNotification, /* indicates EEU notification of video start/stop is required */ | 90 | PHM_PlatformCaps_VideoPlaybackEEUNotification, /* indicates EEU notification of video start/stop is required */ |
91 | PHM_PlatformCaps_TurnOffPll_ASPML1, /* PCIE Turn Off PLL in ASPM L1 */ | 91 | PHM_PlatformCaps_TurnOffPll_ASPML1, /* PCIE Turn Off PLL in ASPM L1 */ |
92 | PHM_PlatformCaps_EnableHTLinkControl, /* indicates HT Link can be controlled by ACPI or CLMC overrided/automated mode. */ | 92 | PHM_PlatformCaps_EnableHTLinkControl, /* indicates HT Link can be controlled by ACPI or CLMC overridden/automated mode. */ |
93 | PHM_PlatformCaps_PerformanceStateOnly, /* indicates only performance power state to be used on current system. */ | 93 | PHM_PlatformCaps_PerformanceStateOnly, /* indicates only performance power state to be used on current system. */ |
94 | PHM_PlatformCaps_ExclusiveModeAlwaysHigh, /* In Exclusive (3D) mode always stay in High state. */ | 94 | PHM_PlatformCaps_ExclusiveModeAlwaysHigh, /* In Exclusive (3D) mode always stay in High state. */ |
95 | PHM_PlatformCaps_DisableMGClockGating, /* to disable Medium Grain Clock Gating or not */ | 95 | PHM_PlatformCaps_DisableMGClockGating, /* to disable Medium Grain Clock Gating or not */ |
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c index 93381454bdf7..dc4419ada12c 100644 --- a/drivers/gpu/drm/drm_probe_helper.c +++ b/drivers/gpu/drm/drm_probe_helper.c | |||
@@ -220,8 +220,8 @@ drm_connector_detect(struct drm_connector *connector, bool force) | |||
220 | * - drm_mode_validate_basic() performs basic sanity checks | 220 | * - drm_mode_validate_basic() performs basic sanity checks |
221 | * - drm_mode_validate_size() filters out modes larger than @maxX and @maxY | 221 | * - drm_mode_validate_size() filters out modes larger than @maxX and @maxY |
222 | * (if specified) | 222 | * (if specified) |
223 | * - drm_mode_validate_flag() checks the modes againt basic connector | 223 | * - drm_mode_validate_flag() checks the modes against basic connector |
224 | * capabilites (interlace_allowed,doublescan_allowed,stereo_allowed) | 224 | * capabilities (interlace_allowed,doublescan_allowed,stereo_allowed) |
225 | * - the optional &drm_connector_helper_funcs.mode_valid helper can perform | 225 | * - the optional &drm_connector_helper_funcs.mode_valid helper can perform |
226 | * driver and/or hardware specific checks | 226 | * driver and/or hardware specific checks |
227 | * | 227 | * |
diff --git a/drivers/gpu/drm/i915/i915_gem_render_state.c b/drivers/gpu/drm/i915/i915_gem_render_state.c index b42c81b42487..7032c542a9b1 100644 --- a/drivers/gpu/drm/i915/i915_gem_render_state.c +++ b/drivers/gpu/drm/i915/i915_gem_render_state.c | |||
@@ -60,7 +60,7 @@ render_state_get_rodata(const struct intel_engine_cs *engine) | |||
60 | * this is sufficient as the null state generator makes the final batch | 60 | * this is sufficient as the null state generator makes the final batch |
61 | * with two passes to build command and state separately. At this point | 61 | * with two passes to build command and state separately. At this point |
62 | * the size of both are known and it compacts them by relocating the state | 62 | * the size of both are known and it compacts them by relocating the state |
63 | * right after the commands taking care of aligment so we should sufficient | 63 | * right after the commands taking care of alignment so we should sufficient |
64 | * space below them for adding new commands. | 64 | * space below them for adding new commands. |
65 | */ | 65 | */ |
66 | #define OUT_BATCH(batch, i, val) \ | 66 | #define OUT_BATCH(batch, i, val) \ |
diff --git a/drivers/gpu/drm/i915/i915_gem_userptr.c b/drivers/gpu/drm/i915/i915_gem_userptr.c index 6a8fa085b74e..0115989e324a 100644 --- a/drivers/gpu/drm/i915/i915_gem_userptr.c +++ b/drivers/gpu/drm/i915/i915_gem_userptr.c | |||
@@ -334,7 +334,7 @@ i915_gem_userptr_init__mm_struct(struct drm_i915_gem_object *obj) | |||
334 | mm->i915 = to_i915(obj->base.dev); | 334 | mm->i915 = to_i915(obj->base.dev); |
335 | 335 | ||
336 | mm->mm = current->mm; | 336 | mm->mm = current->mm; |
337 | atomic_inc(¤t->mm->mm_count); | 337 | mmgrab(current->mm); |
338 | 338 | ||
339 | mm->mn = NULL; | 339 | mm->mn = NULL; |
340 | 340 | ||
@@ -507,7 +507,7 @@ __i915_gem_userptr_get_pages_worker(struct work_struct *_work) | |||
507 | flags |= FOLL_WRITE; | 507 | flags |= FOLL_WRITE; |
508 | 508 | ||
509 | ret = -EFAULT; | 509 | ret = -EFAULT; |
510 | if (atomic_inc_not_zero(&mm->mm_users)) { | 510 | if (mmget_not_zero(mm)) { |
511 | down_read(&mm->mmap_sem); | 511 | down_read(&mm->mmap_sem); |
512 | while (pinned < npages) { | 512 | while (pinned < npages) { |
513 | ret = get_user_pages_remote | 513 | ret = get_user_pages_remote |
diff --git a/drivers/gpu/drm/mga/mga_drv.h b/drivers/gpu/drm/mga/mga_drv.h index d5ce829b3199..45cf363d25ad 100644 --- a/drivers/gpu/drm/mga/mga_drv.h +++ b/drivers/gpu/drm/mga/mga_drv.h | |||
@@ -266,7 +266,7 @@ do { \ | |||
266 | do { \ | 266 | do { \ |
267 | if (MGA_VERBOSE) { \ | 267 | if (MGA_VERBOSE) { \ |
268 | DRM_INFO("BEGIN_DMA(%d)\n", (n)); \ | 268 | DRM_INFO("BEGIN_DMA(%d)\n", (n)); \ |
269 | DRM_INFO(" space=0x%x req=0x%Zx\n", \ | 269 | DRM_INFO(" space=0x%x req=0x%zx\n", \ |
270 | dev_priv->prim.space, (n) * DMA_BLOCK_SIZE); \ | 270 | dev_priv->prim.space, (n) * DMA_BLOCK_SIZE); \ |
271 | } \ | 271 | } \ |
272 | prim = dev_priv->prim.start; \ | 272 | prim = dev_priv->prim.start; \ |
@@ -313,7 +313,7 @@ do { \ | |||
313 | #define DMA_WRITE(offset, val) \ | 313 | #define DMA_WRITE(offset, val) \ |
314 | do { \ | 314 | do { \ |
315 | if (MGA_VERBOSE) \ | 315 | if (MGA_VERBOSE) \ |
316 | DRM_INFO(" DMA_WRITE( 0x%08x ) at 0x%04Zx\n", \ | 316 | DRM_INFO(" DMA_WRITE( 0x%08x ) at 0x%04zx\n", \ |
317 | (u32)(val), write + (offset) * sizeof(u32)); \ | 317 | (u32)(val), write + (offset) * sizeof(u32)); \ |
318 | *(volatile u32 *)(prim + write + (offset) * sizeof(u32)) = val; \ | 318 | *(volatile u32 *)(prim + write + (offset) * sizeof(u32)) = val; \ |
319 | } while (0) | 319 | } while (0) |
diff --git a/drivers/gpu/drm/radeon/atombios.h b/drivers/gpu/drm/radeon/atombios.h index ab89eed9ddd9..4b86e8b45009 100644 --- a/drivers/gpu/drm/radeon/atombios.h +++ b/drivers/gpu/drm/radeon/atombios.h | |||
@@ -181,7 +181,7 @@ | |||
181 | #define HW_ASSISTED_I2C_STATUS_FAILURE 2 | 181 | #define HW_ASSISTED_I2C_STATUS_FAILURE 2 |
182 | #define HW_ASSISTED_I2C_STATUS_SUCCESS 1 | 182 | #define HW_ASSISTED_I2C_STATUS_SUCCESS 1 |
183 | 183 | ||
184 | #pragma pack(1) /* BIOS data must use byte aligment */ | 184 | #pragma pack(1) /* BIOS data must use byte alignment */ |
185 | 185 | ||
186 | /* Define offset to location of ROM header. */ | 186 | /* Define offset to location of ROM header. */ |
187 | 187 | ||
@@ -3883,7 +3883,7 @@ typedef struct _ATOM_GPIO_PIN_ASSIGNMENT | |||
3883 | }ATOM_GPIO_PIN_ASSIGNMENT; | 3883 | }ATOM_GPIO_PIN_ASSIGNMENT; |
3884 | 3884 | ||
3885 | //ucGPIO_ID pre-define id for multiple usage | 3885 | //ucGPIO_ID pre-define id for multiple usage |
3886 | //from SMU7.x, if ucGPIO_ID=PP_AC_DC_SWITCH_GPIO_PINID in GPIO_LUTTable, AC/DC swithing feature is enable | 3886 | //from SMU7.x, if ucGPIO_ID=PP_AC_DC_SWITCH_GPIO_PINID in GPIO_LUTTable, AC/DC switching feature is enable |
3887 | #define PP_AC_DC_SWITCH_GPIO_PINID 60 | 3887 | #define PP_AC_DC_SWITCH_GPIO_PINID 60 |
3888 | //from SMU7.x, if ucGPIO_ID=VDDC_REGULATOR_VRHOT_GPIO_PINID in GPIO_LUTable, VRHot feature is enable | 3888 | //from SMU7.x, if ucGPIO_ID=VDDC_REGULATOR_VRHOT_GPIO_PINID in GPIO_LUTable, VRHot feature is enable |
3889 | #define VDDC_VRHOT_GPIO_PINID 61 | 3889 | #define VDDC_VRHOT_GPIO_PINID 61 |
@@ -7909,7 +7909,7 @@ typedef struct _ATOM_POWERPLAY_INFO_V3 | |||
7909 | 7909 | ||
7910 | /*********************************************************************************/ | 7910 | /*********************************************************************************/ |
7911 | 7911 | ||
7912 | #pragma pack() // BIOS data must use byte aligment | 7912 | #pragma pack() // BIOS data must use byte alignment |
7913 | 7913 | ||
7914 | // | 7914 | // |
7915 | // AMD ACPI Table | 7915 | // AMD ACPI Table |
diff --git a/drivers/hid/hid-kye.c b/drivers/hid/hid-kye.c index 0dd1167b2c9b..9c113f62472d 100644 --- a/drivers/hid/hid-kye.c +++ b/drivers/hid/hid-kye.c | |||
@@ -487,7 +487,7 @@ static __u8 *kye_consumer_control_fixup(struct hid_device *hdev, __u8 *rdesc, | |||
487 | unsigned int *rsize, int offset, const char *device_name) { | 487 | unsigned int *rsize, int offset, const char *device_name) { |
488 | /* | 488 | /* |
489 | * the fixup that need to be done: | 489 | * the fixup that need to be done: |
490 | * - change Usage Maximum in the Comsumer Control | 490 | * - change Usage Maximum in the Consumer Control |
491 | * (report ID 3) to a reasonable value | 491 | * (report ID 3) to a reasonable value |
492 | */ | 492 | */ |
493 | if (*rsize >= offset + 31 && | 493 | if (*rsize >= offset + 31 && |
diff --git a/drivers/hwmon/g762.c b/drivers/hwmon/g762.c index 6dca2fd3d303..6d1208b2b6d2 100644 --- a/drivers/hwmon/g762.c +++ b/drivers/hwmon/g762.c | |||
@@ -861,7 +861,7 @@ static ssize_t fan1_pulses_store(struct device *dev, | |||
861 | * (i.e. closed or open-loop). | 861 | * (i.e. closed or open-loop). |
862 | * | 862 | * |
863 | * Following documentation about hwmon's sysfs interface, a pwm1_enable node | 863 | * Following documentation about hwmon's sysfs interface, a pwm1_enable node |
864 | * should accept followings: | 864 | * should accept the following: |
865 | * | 865 | * |
866 | * 0 : no fan speed control (i.e. fan at full speed) | 866 | * 0 : no fan speed control (i.e. fan at full speed) |
867 | * 1 : manual fan speed control enabled (use pwm[1-*]) (open-loop) | 867 | * 1 : manual fan speed control enabled (use pwm[1-*]) (open-loop) |
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c index b6940992a6ff..968038482d2f 100644 --- a/drivers/ide/ide-acpi.c +++ b/drivers/ide/ide-acpi.c | |||
@@ -447,7 +447,7 @@ void ide_acpi_get_timing(ide_hwif_t *hwif) | |||
447 | memcpy(&hwif->acpidata->gtm, out_obj->buffer.pointer, | 447 | memcpy(&hwif->acpidata->gtm, out_obj->buffer.pointer, |
448 | sizeof(struct GTM_buffer)); | 448 | sizeof(struct GTM_buffer)); |
449 | 449 | ||
450 | DEBPRINT("_GTM info: ptr: 0x%p, len: 0x%x, exp.len: 0x%Zx\n", | 450 | DEBPRINT("_GTM info: ptr: 0x%p, len: 0x%x, exp.len: 0x%zx\n", |
451 | out_obj->buffer.pointer, out_obj->buffer.length, | 451 | out_obj->buffer.pointer, out_obj->buffer.length, |
452 | sizeof(struct GTM_buffer)); | 452 | sizeof(struct GTM_buffer)); |
453 | 453 | ||
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 3c1b7974d66d..d8a552b47718 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -1136,7 +1136,7 @@ static ssize_t idetape_chrdev_read(struct file *file, char __user *buf, | |||
1136 | ssize_t ret = 0; | 1136 | ssize_t ret = 0; |
1137 | int rc; | 1137 | int rc; |
1138 | 1138 | ||
1139 | ide_debug_log(IDE_DBG_FUNC, "count %Zd", count); | 1139 | ide_debug_log(IDE_DBG_FUNC, "count %zd", count); |
1140 | 1140 | ||
1141 | if (tape->chrdev_dir != IDETAPE_DIR_READ) { | 1141 | if (tape->chrdev_dir != IDETAPE_DIR_READ) { |
1142 | if (test_bit(ilog2(IDE_AFLAG_DETECT_BS), &drive->atapi_flags)) | 1142 | if (test_bit(ilog2(IDE_AFLAG_DETECT_BS), &drive->atapi_flags)) |
@@ -1195,7 +1195,7 @@ static ssize_t idetape_chrdev_write(struct file *file, const char __user *buf, | |||
1195 | if (tape->write_prot) | 1195 | if (tape->write_prot) |
1196 | return -EACCES; | 1196 | return -EACCES; |
1197 | 1197 | ||
1198 | ide_debug_log(IDE_DBG_FUNC, "count %Zd", count); | 1198 | ide_debug_log(IDE_DBG_FUNC, "count %zd", count); |
1199 | 1199 | ||
1200 | /* Initialize write operation */ | 1200 | /* Initialize write operation */ |
1201 | rc = idetape_init_rw(drive, IDETAPE_DIR_WRITE); | 1201 | rc = idetape_init_rw(drive, IDETAPE_DIR_WRITE); |
diff --git a/drivers/infiniband/hw/hfi1/file_ops.c b/drivers/infiniband/hw/hfi1/file_ops.c index f46033984d07..3b19c16a9e45 100644 --- a/drivers/infiniband/hw/hfi1/file_ops.c +++ b/drivers/infiniband/hw/hfi1/file_ops.c | |||
@@ -185,7 +185,7 @@ static int hfi1_file_open(struct inode *inode, struct file *fp) | |||
185 | if (fd) { | 185 | if (fd) { |
186 | fd->rec_cpu_num = -1; /* no cpu affinity by default */ | 186 | fd->rec_cpu_num = -1; /* no cpu affinity by default */ |
187 | fd->mm = current->mm; | 187 | fd->mm = current->mm; |
188 | atomic_inc(&fd->mm->mm_count); | 188 | mmgrab(fd->mm); |
189 | fp->private_data = fd; | 189 | fp->private_data = fd; |
190 | } else { | 190 | } else { |
191 | fp->private_data = NULL; | 191 | fp->private_data = NULL; |
diff --git a/drivers/infiniband/hw/qib/qib_iba6120.c b/drivers/infiniband/hw/qib/qib_iba6120.c index 92399d3ffd15..06de1cbcf67d 100644 --- a/drivers/infiniband/hw/qib/qib_iba6120.c +++ b/drivers/infiniband/hw/qib/qib_iba6120.c | |||
@@ -707,7 +707,7 @@ static void qib_6120_clear_freeze(struct qib_devdata *dd) | |||
707 | /* disable error interrupts, to avoid confusion */ | 707 | /* disable error interrupts, to avoid confusion */ |
708 | qib_write_kreg(dd, kr_errmask, 0ULL); | 708 | qib_write_kreg(dd, kr_errmask, 0ULL); |
709 | 709 | ||
710 | /* also disable interrupts; errormask is sometimes overwriten */ | 710 | /* also disable interrupts; errormask is sometimes overwritten */ |
711 | qib_6120_set_intr_state(dd, 0); | 711 | qib_6120_set_intr_state(dd, 0); |
712 | 712 | ||
713 | qib_cancel_sends(dd->pport); | 713 | qib_cancel_sends(dd->pport); |
diff --git a/drivers/infiniband/hw/qib/qib_iba7220.c b/drivers/infiniband/hw/qib/qib_iba7220.c index e55e31a69195..55a18384c22d 100644 --- a/drivers/infiniband/hw/qib/qib_iba7220.c +++ b/drivers/infiniband/hw/qib/qib_iba7220.c | |||
@@ -1259,7 +1259,7 @@ static void qib_7220_clear_freeze(struct qib_devdata *dd) | |||
1259 | /* disable error interrupts, to avoid confusion */ | 1259 | /* disable error interrupts, to avoid confusion */ |
1260 | qib_write_kreg(dd, kr_errmask, 0ULL); | 1260 | qib_write_kreg(dd, kr_errmask, 0ULL); |
1261 | 1261 | ||
1262 | /* also disable interrupts; errormask is sometimes overwriten */ | 1262 | /* also disable interrupts; errormask is sometimes overwritten */ |
1263 | qib_7220_set_intr_state(dd, 0); | 1263 | qib_7220_set_intr_state(dd, 0); |
1264 | 1264 | ||
1265 | qib_cancel_sends(dd->pport); | 1265 | qib_cancel_sends(dd->pport); |
diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c index 9cc97bd42775..12c4208fd701 100644 --- a/drivers/infiniband/hw/qib/qib_iba7322.c +++ b/drivers/infiniband/hw/qib/qib_iba7322.c | |||
@@ -2053,7 +2053,7 @@ static void qib_7322_clear_freeze(struct qib_devdata *dd) | |||
2053 | qib_write_kreg_port(dd->pport + pidx, krp_errmask, | 2053 | qib_write_kreg_port(dd->pport + pidx, krp_errmask, |
2054 | 0ULL); | 2054 | 0ULL); |
2055 | 2055 | ||
2056 | /* also disable interrupts; errormask is sometimes overwriten */ | 2056 | /* also disable interrupts; errormask is sometimes overwritten */ |
2057 | qib_7322_set_intr_state(dd, 0); | 2057 | qib_7322_set_intr_state(dd, 0); |
2058 | 2058 | ||
2059 | /* clear the freeze, and be sure chip saw it */ | 2059 | /* clear the freeze, and be sure chip saw it */ |
diff --git a/drivers/infiniband/sw/rdmavt/mad.c b/drivers/infiniband/sw/rdmavt/mad.c index f6e99778d7ca..bba241faca61 100644 --- a/drivers/infiniband/sw/rdmavt/mad.c +++ b/drivers/infiniband/sw/rdmavt/mad.c | |||
@@ -74,9 +74,9 @@ int rvt_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num, | |||
74 | u16 *out_mad_pkey_index) | 74 | u16 *out_mad_pkey_index) |
75 | { | 75 | { |
76 | /* | 76 | /* |
77 | * MAD processing is quite different between hfi1 and qib. Therfore this | 77 | * MAD processing is quite different between hfi1 and qib. Therefore |
78 | * is expected to be provided by the driver. Other drivers in the future | 78 | * this is expected to be provided by the driver. Other drivers in the |
79 | * may chose to implement this but it should not be made into a | 79 | * future may choose to implement this but it should not be made into a |
80 | * requirement. | 80 | * requirement. |
81 | */ | 81 | */ |
82 | if (ibport_num_to_idx(ibdev, port_num) < 0) | 82 | if (ibport_num_to_idx(ibdev, port_num) < 0) |
diff --git a/drivers/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.c index 44deca88c579..beaf61ce775b 100644 --- a/drivers/input/touchscreen/cyttsp4_core.c +++ b/drivers/input/touchscreen/cyttsp4_core.c | |||
@@ -202,7 +202,7 @@ static int cyttsp4_si_get_cydata(struct cyttsp4 *cd) | |||
202 | int rc; | 202 | int rc; |
203 | 203 | ||
204 | si->si_ofs.cydata_size = si->si_ofs.test_ofs - si->si_ofs.cydata_ofs; | 204 | si->si_ofs.cydata_size = si->si_ofs.test_ofs - si->si_ofs.cydata_ofs; |
205 | dev_dbg(cd->dev, "%s: cydata size: %Zd\n", __func__, | 205 | dev_dbg(cd->dev, "%s: cydata size: %zd\n", __func__, |
206 | si->si_ofs.cydata_size); | 206 | si->si_ofs.cydata_size); |
207 | 207 | ||
208 | p = krealloc(si->si_ptrs.cydata, si->si_ofs.cydata_size, GFP_KERNEL); | 208 | p = krealloc(si->si_ptrs.cydata, si->si_ofs.cydata_size, GFP_KERNEL); |
@@ -430,13 +430,13 @@ static int cyttsp4_si_get_opcfg_data(struct cyttsp4 *cd) | |||
430 | for (abs = 0; abs < CY_TCH_NUM_ABS; abs++) { | 430 | for (abs = 0; abs < CY_TCH_NUM_ABS; abs++) { |
431 | dev_dbg(cd->dev, "%s: tch_rec_%s\n", __func__, | 431 | dev_dbg(cd->dev, "%s: tch_rec_%s\n", __func__, |
432 | cyttsp4_tch_abs_string[abs]); | 432 | cyttsp4_tch_abs_string[abs]); |
433 | dev_dbg(cd->dev, "%s: ofs =%2Zd\n", __func__, | 433 | dev_dbg(cd->dev, "%s: ofs =%2zd\n", __func__, |
434 | si->si_ofs.tch_abs[abs].ofs); | 434 | si->si_ofs.tch_abs[abs].ofs); |
435 | dev_dbg(cd->dev, "%s: siz =%2Zd\n", __func__, | 435 | dev_dbg(cd->dev, "%s: siz =%2zd\n", __func__, |
436 | si->si_ofs.tch_abs[abs].size); | 436 | si->si_ofs.tch_abs[abs].size); |
437 | dev_dbg(cd->dev, "%s: max =%2Zd\n", __func__, | 437 | dev_dbg(cd->dev, "%s: max =%2zd\n", __func__, |
438 | si->si_ofs.tch_abs[abs].max); | 438 | si->si_ofs.tch_abs[abs].max); |
439 | dev_dbg(cd->dev, "%s: bofs=%2Zd\n", __func__, | 439 | dev_dbg(cd->dev, "%s: bofs=%2zd\n", __func__, |
440 | si->si_ofs.tch_abs[abs].bofs); | 440 | si->si_ofs.tch_abs[abs].bofs); |
441 | } | 441 | } |
442 | 442 | ||
@@ -586,62 +586,62 @@ static int cyttsp4_si_get_op_data_ptrs(struct cyttsp4 *cd) | |||
586 | static void cyttsp4_si_put_log_data(struct cyttsp4 *cd) | 586 | static void cyttsp4_si_put_log_data(struct cyttsp4 *cd) |
587 | { | 587 | { |
588 | struct cyttsp4_sysinfo *si = &cd->sysinfo; | 588 | struct cyttsp4_sysinfo *si = &cd->sysinfo; |
589 | dev_dbg(cd->dev, "%s: cydata_ofs =%4Zd siz=%4Zd\n", __func__, | 589 | dev_dbg(cd->dev, "%s: cydata_ofs =%4zd siz=%4zd\n", __func__, |
590 | si->si_ofs.cydata_ofs, si->si_ofs.cydata_size); | 590 | si->si_ofs.cydata_ofs, si->si_ofs.cydata_size); |
591 | dev_dbg(cd->dev, "%s: test_ofs =%4Zd siz=%4Zd\n", __func__, | 591 | dev_dbg(cd->dev, "%s: test_ofs =%4zd siz=%4zd\n", __func__, |
592 | si->si_ofs.test_ofs, si->si_ofs.test_size); | 592 | si->si_ofs.test_ofs, si->si_ofs.test_size); |
593 | dev_dbg(cd->dev, "%s: pcfg_ofs =%4Zd siz=%4Zd\n", __func__, | 593 | dev_dbg(cd->dev, "%s: pcfg_ofs =%4zd siz=%4zd\n", __func__, |
594 | si->si_ofs.pcfg_ofs, si->si_ofs.pcfg_size); | 594 | si->si_ofs.pcfg_ofs, si->si_ofs.pcfg_size); |
595 | dev_dbg(cd->dev, "%s: opcfg_ofs =%4Zd siz=%4Zd\n", __func__, | 595 | dev_dbg(cd->dev, "%s: opcfg_ofs =%4zd siz=%4zd\n", __func__, |
596 | si->si_ofs.opcfg_ofs, si->si_ofs.opcfg_size); | 596 | si->si_ofs.opcfg_ofs, si->si_ofs.opcfg_size); |
597 | dev_dbg(cd->dev, "%s: ddata_ofs =%4Zd siz=%4Zd\n", __func__, | 597 | dev_dbg(cd->dev, "%s: ddata_ofs =%4zd siz=%4zd\n", __func__, |
598 | si->si_ofs.ddata_ofs, si->si_ofs.ddata_size); | 598 | si->si_ofs.ddata_ofs, si->si_ofs.ddata_size); |
599 | dev_dbg(cd->dev, "%s: mdata_ofs =%4Zd siz=%4Zd\n", __func__, | 599 | dev_dbg(cd->dev, "%s: mdata_ofs =%4zd siz=%4zd\n", __func__, |
600 | si->si_ofs.mdata_ofs, si->si_ofs.mdata_size); | 600 | si->si_ofs.mdata_ofs, si->si_ofs.mdata_size); |
601 | 601 | ||
602 | dev_dbg(cd->dev, "%s: cmd_ofs =%4Zd\n", __func__, | 602 | dev_dbg(cd->dev, "%s: cmd_ofs =%4zd\n", __func__, |
603 | si->si_ofs.cmd_ofs); | 603 | si->si_ofs.cmd_ofs); |
604 | dev_dbg(cd->dev, "%s: rep_ofs =%4Zd\n", __func__, | 604 | dev_dbg(cd->dev, "%s: rep_ofs =%4zd\n", __func__, |
605 | si->si_ofs.rep_ofs); | 605 | si->si_ofs.rep_ofs); |
606 | dev_dbg(cd->dev, "%s: rep_sz =%4Zd\n", __func__, | 606 | dev_dbg(cd->dev, "%s: rep_sz =%4zd\n", __func__, |
607 | si->si_ofs.rep_sz); | 607 | si->si_ofs.rep_sz); |
608 | dev_dbg(cd->dev, "%s: num_btns =%4Zd\n", __func__, | 608 | dev_dbg(cd->dev, "%s: num_btns =%4zd\n", __func__, |
609 | si->si_ofs.num_btns); | 609 | si->si_ofs.num_btns); |
610 | dev_dbg(cd->dev, "%s: num_btn_regs =%4Zd\n", __func__, | 610 | dev_dbg(cd->dev, "%s: num_btn_regs =%4zd\n", __func__, |
611 | si->si_ofs.num_btn_regs); | 611 | si->si_ofs.num_btn_regs); |
612 | dev_dbg(cd->dev, "%s: tt_stat_ofs =%4Zd\n", __func__, | 612 | dev_dbg(cd->dev, "%s: tt_stat_ofs =%4zd\n", __func__, |
613 | si->si_ofs.tt_stat_ofs); | 613 | si->si_ofs.tt_stat_ofs); |
614 | dev_dbg(cd->dev, "%s: tch_rec_size =%4Zd\n", __func__, | 614 | dev_dbg(cd->dev, "%s: tch_rec_size =%4zd\n", __func__, |
615 | si->si_ofs.tch_rec_size); | 615 | si->si_ofs.tch_rec_size); |
616 | dev_dbg(cd->dev, "%s: max_tchs =%4Zd\n", __func__, | 616 | dev_dbg(cd->dev, "%s: max_tchs =%4zd\n", __func__, |
617 | si->si_ofs.max_tchs); | 617 | si->si_ofs.max_tchs); |
618 | dev_dbg(cd->dev, "%s: mode_size =%4Zd\n", __func__, | 618 | dev_dbg(cd->dev, "%s: mode_size =%4zd\n", __func__, |
619 | si->si_ofs.mode_size); | 619 | si->si_ofs.mode_size); |
620 | dev_dbg(cd->dev, "%s: data_size =%4Zd\n", __func__, | 620 | dev_dbg(cd->dev, "%s: data_size =%4zd\n", __func__, |
621 | si->si_ofs.data_size); | 621 | si->si_ofs.data_size); |
622 | dev_dbg(cd->dev, "%s: map_sz =%4Zd\n", __func__, | 622 | dev_dbg(cd->dev, "%s: map_sz =%4zd\n", __func__, |
623 | si->si_ofs.map_sz); | 623 | si->si_ofs.map_sz); |
624 | 624 | ||
625 | dev_dbg(cd->dev, "%s: btn_rec_size =%2Zd\n", __func__, | 625 | dev_dbg(cd->dev, "%s: btn_rec_size =%2zd\n", __func__, |
626 | si->si_ofs.btn_rec_size); | 626 | si->si_ofs.btn_rec_size); |
627 | dev_dbg(cd->dev, "%s: btn_diff_ofs =%2Zd\n", __func__, | 627 | dev_dbg(cd->dev, "%s: btn_diff_ofs =%2zd\n", __func__, |
628 | si->si_ofs.btn_diff_ofs); | 628 | si->si_ofs.btn_diff_ofs); |
629 | dev_dbg(cd->dev, "%s: btn_diff_size =%2Zd\n", __func__, | 629 | dev_dbg(cd->dev, "%s: btn_diff_size =%2zd\n", __func__, |
630 | si->si_ofs.btn_diff_size); | 630 | si->si_ofs.btn_diff_size); |
631 | 631 | ||
632 | dev_dbg(cd->dev, "%s: max_x = 0x%04ZX (%Zd)\n", __func__, | 632 | dev_dbg(cd->dev, "%s: max_x = 0x%04zX (%zd)\n", __func__, |
633 | si->si_ofs.max_x, si->si_ofs.max_x); | 633 | si->si_ofs.max_x, si->si_ofs.max_x); |
634 | dev_dbg(cd->dev, "%s: x_origin = %Zd (%s)\n", __func__, | 634 | dev_dbg(cd->dev, "%s: x_origin = %zd (%s)\n", __func__, |
635 | si->si_ofs.x_origin, | 635 | si->si_ofs.x_origin, |
636 | si->si_ofs.x_origin == CY_NORMAL_ORIGIN ? | 636 | si->si_ofs.x_origin == CY_NORMAL_ORIGIN ? |
637 | "left corner" : "right corner"); | 637 | "left corner" : "right corner"); |
638 | dev_dbg(cd->dev, "%s: max_y = 0x%04ZX (%Zd)\n", __func__, | 638 | dev_dbg(cd->dev, "%s: max_y = 0x%04zX (%zd)\n", __func__, |
639 | si->si_ofs.max_y, si->si_ofs.max_y); | 639 | si->si_ofs.max_y, si->si_ofs.max_y); |
640 | dev_dbg(cd->dev, "%s: y_origin = %Zd (%s)\n", __func__, | 640 | dev_dbg(cd->dev, "%s: y_origin = %zd (%s)\n", __func__, |
641 | si->si_ofs.y_origin, | 641 | si->si_ofs.y_origin, |
642 | si->si_ofs.y_origin == CY_NORMAL_ORIGIN ? | 642 | si->si_ofs.y_origin == CY_NORMAL_ORIGIN ? |
643 | "upper corner" : "lower corner"); | 643 | "upper corner" : "lower corner"); |
644 | dev_dbg(cd->dev, "%s: max_p = 0x%04ZX (%Zd)\n", __func__, | 644 | dev_dbg(cd->dev, "%s: max_p = 0x%04zX (%zd)\n", __func__, |
645 | si->si_ofs.max_p, si->si_ofs.max_p); | 645 | si->si_ofs.max_p, si->si_ofs.max_p); |
646 | 646 | ||
647 | dev_dbg(cd->dev, "%s: xy_mode=%p xy_data=%p\n", __func__, | 647 | dev_dbg(cd->dev, "%s: xy_mode=%p xy_data=%p\n", __func__, |
@@ -1000,7 +1000,7 @@ static int cyttsp4_xy_worker(struct cyttsp4 *cd) | |||
1000 | dev_dbg(dev, "%s: Large area detected\n", __func__); | 1000 | dev_dbg(dev, "%s: Large area detected\n", __func__); |
1001 | 1001 | ||
1002 | if (num_cur_tch > si->si_ofs.max_tchs) { | 1002 | if (num_cur_tch > si->si_ofs.max_tchs) { |
1003 | dev_err(dev, "%s: too many tch; set to max tch (n=%d c=%Zd)\n", | 1003 | dev_err(dev, "%s: too many tch; set to max tch (n=%d c=%zd)\n", |
1004 | __func__, num_cur_tch, si->si_ofs.max_tchs); | 1004 | __func__, num_cur_tch, si->si_ofs.max_tchs); |
1005 | num_cur_tch = si->si_ofs.max_tchs; | 1005 | num_cur_tch = si->si_ofs.max_tchs; |
1006 | } | 1006 | } |
diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel-svm.c index cb72e0011310..51f2b228723f 100644 --- a/drivers/iommu/intel-svm.c +++ b/drivers/iommu/intel-svm.c | |||
@@ -579,7 +579,7 @@ static irqreturn_t prq_event_thread(int irq, void *d) | |||
579 | if (!svm->mm) | 579 | if (!svm->mm) |
580 | goto bad_req; | 580 | goto bad_req; |
581 | /* If the mm is already defunct, don't handle faults. */ | 581 | /* If the mm is already defunct, don't handle faults. */ |
582 | if (!atomic_inc_not_zero(&svm->mm->mm_users)) | 582 | if (!mmget_not_zero(svm->mm)) |
583 | goto bad_req; | 583 | goto bad_req; |
584 | down_read(&svm->mm->mmap_sem); | 584 | down_read(&svm->mm->mmap_sem); |
585 | vma = find_extend_vma(svm->mm, address); | 585 | vma = find_extend_vma(svm->mm, address); |
diff --git a/drivers/isdn/hardware/eicon/debug.c b/drivers/isdn/hardware/eicon/debug.c index 576b7b4a3278..8bc2791bc39c 100644 --- a/drivers/isdn/hardware/eicon/debug.c +++ b/drivers/isdn/hardware/eicon/debug.c | |||
@@ -2049,7 +2049,7 @@ static int diva_dbg_cmp_key(const char *ref, const char *key) { | |||
2049 | /* | 2049 | /* |
2050 | In case trace filter starts with "C" character then | 2050 | In case trace filter starts with "C" character then |
2051 | all following characters are interpreted as command. | 2051 | all following characters are interpreted as command. |
2052 | Followings commands are available: | 2052 | Following commands are available: |
2053 | - single, trace single call at time, independent from CPN/CiPN | 2053 | - single, trace single call at time, independent from CPN/CiPN |
2054 | */ | 2054 | */ |
2055 | static int diva_mnt_cmp_nmbr(const char *nmbr) { | 2055 | static int diva_mnt_cmp_nmbr(const char *nmbr) { |
diff --git a/drivers/isdn/hardware/mISDN/mISDNipac.c b/drivers/isdn/hardware/mISDN/mISDNipac.c index 8d338ba366d0..77dec28ba874 100644 --- a/drivers/isdn/hardware/mISDN/mISDNipac.c +++ b/drivers/isdn/hardware/mISDN/mISDNipac.c | |||
@@ -1625,7 +1625,7 @@ mISDNipac_init(struct ipac_hw *ipac, void *hw) | |||
1625 | ipac->hscx[i].bch.hw = hw; | 1625 | ipac->hscx[i].bch.hw = hw; |
1626 | ipac->hscx[i].ip = ipac; | 1626 | ipac->hscx[i].ip = ipac; |
1627 | /* default values for IOM time slots | 1627 | /* default values for IOM time slots |
1628 | * can be overwriten by card */ | 1628 | * can be overwritten by card */ |
1629 | ipac->hscx[i].slot = (i == 0) ? 0x2f : 0x03; | 1629 | ipac->hscx[i].slot = (i == 0) ? 0x2f : 0x03; |
1630 | } | 1630 | } |
1631 | 1631 | ||
diff --git a/drivers/isdn/mISDN/dsp_core.c b/drivers/isdn/mISDN/dsp_core.c index 0222b1a35a2d..9b85295aa657 100644 --- a/drivers/isdn/mISDN/dsp_core.c +++ b/drivers/isdn/mISDN/dsp_core.c | |||
@@ -115,7 +115,7 @@ | |||
115 | * | 115 | * |
116 | * The CMX has special functions for conferences with one, two and more | 116 | * The CMX has special functions for conferences with one, two and more |
117 | * members. It will allow different types of data flow. Receive and transmit | 117 | * members. It will allow different types of data flow. Receive and transmit |
118 | * data to/form upper layer may be swithed on/off individually without losing | 118 | * data to/form upper layer may be switched on/off individually without losing |
119 | * features of CMX, Tones and DTMF. | 119 | * features of CMX, Tones and DTMF. |
120 | * | 120 | * |
121 | * Echo Cancellation: Sometimes we like to cancel echo from the interface. | 121 | * Echo Cancellation: Sometimes we like to cancel echo from the interface. |
diff --git a/drivers/media/dvb-core/dvb_ringbuffer.h b/drivers/media/dvb-core/dvb_ringbuffer.h index bbe94873d44d..8ed6bcc3a56e 100644 --- a/drivers/media/dvb-core/dvb_ringbuffer.h +++ b/drivers/media/dvb-core/dvb_ringbuffer.h | |||
@@ -136,7 +136,7 @@ extern void dvb_ringbuffer_flush_spinlock_wakeup(struct dvb_ringbuffer *rbuf); | |||
136 | } | 136 | } |
137 | 137 | ||
138 | /** | 138 | /** |
139 | * dvb_ringbuffer_read_user - Reads a buffer into an user pointer | 139 | * dvb_ringbuffer_read_user - Reads a buffer into a user pointer |
140 | * | 140 | * |
141 | * @rbuf: pointer to struct dvb_ringbuffer | 141 | * @rbuf: pointer to struct dvb_ringbuffer |
142 | * @buf: pointer to the buffer where the data will be stored | 142 | * @buf: pointer to the buffer where the data will be stored |
@@ -193,7 +193,7 @@ extern ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *rbuf, const u8 *buf, | |||
193 | size_t len); | 193 | size_t len); |
194 | 194 | ||
195 | /** | 195 | /** |
196 | * dvb_ringbuffer_write_user - Writes a buffer received via an user pointer | 196 | * dvb_ringbuffer_write_user - Writes a buffer received via a user pointer |
197 | * | 197 | * |
198 | * @rbuf: pointer to struct dvb_ringbuffer | 198 | * @rbuf: pointer to struct dvb_ringbuffer |
199 | * @buf: pointer to the buffer where the data will be read | 199 | * @buf: pointer to the buffer where the data will be read |
diff --git a/drivers/media/dvb-frontends/drx39xyj/drx_driver.h b/drivers/media/dvb-frontends/drx39xyj/drx_driver.h index 9076bf21cc8a..7a681d8202c7 100644 --- a/drivers/media/dvb-frontends/drx39xyj/drx_driver.h +++ b/drivers/media/dvb-frontends/drx39xyj/drx_driver.h | |||
@@ -1317,9 +1317,9 @@ struct drx_version_list { | |||
1317 | DRX_MPEG_STR_WIDTH_8 | 1317 | DRX_MPEG_STR_WIDTH_8 |
1318 | }; | 1318 | }; |
1319 | 1319 | ||
1320 | /* CTRL CFG MPEG ouput */ | 1320 | /* CTRL CFG MPEG output */ |
1321 | /** | 1321 | /** |
1322 | * \struct struct drx_cfg_mpeg_output * \brief Configuartion parameters for MPEG output control. | 1322 | * \struct struct drx_cfg_mpeg_output * \brief Configuration parameters for MPEG output control. |
1323 | * | 1323 | * |
1324 | * Used by DRX_CFG_MPEG_OUTPUT, in combination with DRX_CTRL_SET_CFG and | 1324 | * Used by DRX_CFG_MPEG_OUTPUT, in combination with DRX_CTRL_SET_CFG and |
1325 | * DRX_CTRL_GET_CFG. | 1325 | * DRX_CTRL_GET_CFG. |
diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c b/drivers/media/dvb-frontends/drx39xyj/drxj.c index f1c3e3b09b65..daeaf965dd56 100644 --- a/drivers/media/dvb-frontends/drx39xyj/drxj.c +++ b/drivers/media/dvb-frontends/drx39xyj/drxj.c | |||
@@ -601,7 +601,7 @@ static struct drxj_data drxj_data_g = { | |||
601 | 0, /* hi_cfg_wake_up_key */ | 601 | 0, /* hi_cfg_wake_up_key */ |
602 | 0, /* hi_cfg_ctrl */ | 602 | 0, /* hi_cfg_ctrl */ |
603 | 0, /* HICfgTimeout */ | 603 | 0, /* HICfgTimeout */ |
604 | /* UIO configuartion */ | 604 | /* UIO configuration */ |
605 | DRX_UIO_MODE_DISABLE, /* uio_sma_rx_mode */ | 605 | DRX_UIO_MODE_DISABLE, /* uio_sma_rx_mode */ |
606 | DRX_UIO_MODE_DISABLE, /* uio_sma_tx_mode */ | 606 | DRX_UIO_MODE_DISABLE, /* uio_sma_tx_mode */ |
607 | DRX_UIO_MODE_DISABLE, /* uioASELMode */ | 607 | DRX_UIO_MODE_DISABLE, /* uioASELMode */ |
@@ -619,7 +619,7 @@ static struct drxj_data drxj_data_g = { | |||
619 | /* false, * flagHDevSet */ | 619 | /* false, * flagHDevSet */ |
620 | /* (u16) 0xFFF, * rdsLastCount */ | 620 | /* (u16) 0xFFF, * rdsLastCount */ |
621 | 621 | ||
622 | /* ATV configuartion */ | 622 | /* ATV configuration */ |
623 | 0UL, /* flags cfg changes */ | 623 | 0UL, /* flags cfg changes */ |
624 | /* shadow of ATV_TOP_EQU0__A */ | 624 | /* shadow of ATV_TOP_EQU0__A */ |
625 | {-5, | 625 | {-5, |
@@ -3352,7 +3352,7 @@ rw_error: | |||
3352 | /*----------------------------------------------------------------------------*/ | 3352 | /*----------------------------------------------------------------------------*/ |
3353 | 3353 | ||
3354 | /*----------------------------------------------------------------------------*/ | 3354 | /*----------------------------------------------------------------------------*/ |
3355 | /* miscellaneous configuartions - begin */ | 3355 | /* miscellaneous configurations - begin */ |
3356 | /*----------------------------------------------------------------------------*/ | 3356 | /*----------------------------------------------------------------------------*/ |
3357 | 3357 | ||
3358 | /** | 3358 | /** |
@@ -3515,7 +3515,7 @@ rw_error: | |||
3515 | } | 3515 | } |
3516 | 3516 | ||
3517 | /*----------------------------------------------------------------------------*/ | 3517 | /*----------------------------------------------------------------------------*/ |
3518 | /* miscellaneous configuartions - end */ | 3518 | /* miscellaneous configurations - end */ |
3519 | /*----------------------------------------------------------------------------*/ | 3519 | /*----------------------------------------------------------------------------*/ |
3520 | 3520 | ||
3521 | /*----------------------------------------------------------------------------*/ | 3521 | /*----------------------------------------------------------------------------*/ |
@@ -10952,7 +10952,7 @@ rw_error: | |||
10952 | 10952 | ||
10953 | static void drxj_reset_mode(struct drxj_data *ext_attr) | 10953 | static void drxj_reset_mode(struct drxj_data *ext_attr) |
10954 | { | 10954 | { |
10955 | /* Initialize default AFE configuartion for QAM */ | 10955 | /* Initialize default AFE configuration for QAM */ |
10956 | if (ext_attr->has_lna) { | 10956 | if (ext_attr->has_lna) { |
10957 | /* IF AGC off, PGA active */ | 10957 | /* IF AGC off, PGA active */ |
10958 | #ifndef DRXJ_VSB_ONLY | 10958 | #ifndef DRXJ_VSB_ONLY |
@@ -10996,7 +10996,7 @@ static void drxj_reset_mode(struct drxj_data *ext_attr) | |||
10996 | ext_attr->qam_pre_saw_cfg.reference = 0x07; | 10996 | ext_attr->qam_pre_saw_cfg.reference = 0x07; |
10997 | ext_attr->qam_pre_saw_cfg.use_pre_saw = true; | 10997 | ext_attr->qam_pre_saw_cfg.use_pre_saw = true; |
10998 | #endif | 10998 | #endif |
10999 | /* Initialize default AFE configuartion for VSB */ | 10999 | /* Initialize default AFE configuration for VSB */ |
11000 | ext_attr->vsb_rf_agc_cfg.standard = DRX_STANDARD_8VSB; | 11000 | ext_attr->vsb_rf_agc_cfg.standard = DRX_STANDARD_8VSB; |
11001 | ext_attr->vsb_rf_agc_cfg.ctrl_mode = DRX_AGC_CTRL_AUTO; | 11001 | ext_attr->vsb_rf_agc_cfg.ctrl_mode = DRX_AGC_CTRL_AUTO; |
11002 | ext_attr->vsb_rf_agc_cfg.min_output_level = 0; | 11002 | ext_attr->vsb_rf_agc_cfg.min_output_level = 0; |
@@ -11072,9 +11072,9 @@ ctrl_power_mode(struct drx_demod_instance *demod, enum drx_power_mode *mode) | |||
11072 | } | 11072 | } |
11073 | 11073 | ||
11074 | if ((*mode == DRX_POWER_UP)) { | 11074 | if ((*mode == DRX_POWER_UP)) { |
11075 | /* Restore analog & pin configuartion */ | 11075 | /* Restore analog & pin configuration */ |
11076 | 11076 | ||
11077 | /* Initialize default AFE configuartion for VSB */ | 11077 | /* Initialize default AFE configuration for VSB */ |
11078 | drxj_reset_mode(ext_attr); | 11078 | drxj_reset_mode(ext_attr); |
11079 | } else { | 11079 | } else { |
11080 | /* Power down to requested mode */ | 11080 | /* Power down to requested mode */ |
diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.h b/drivers/media/dvb-frontends/drx39xyj/drxj.h index 55ad535197d2..6c5b8f78f9f6 100644 --- a/drivers/media/dvb-frontends/drx39xyj/drxj.h +++ b/drivers/media/dvb-frontends/drx39xyj/drxj.h | |||
@@ -447,7 +447,7 @@ struct drxj_cfg_atv_output { | |||
447 | u16 hi_cfg_ctrl; /**< HI Configure() parameter 5 */ | 447 | u16 hi_cfg_ctrl; /**< HI Configure() parameter 5 */ |
448 | u16 hi_cfg_transmit; /**< HI Configure() parameter 6 */ | 448 | u16 hi_cfg_transmit; /**< HI Configure() parameter 6 */ |
449 | 449 | ||
450 | /* UIO configuartion */ | 450 | /* UIO configuration */ |
451 | enum drxuio_mode uio_sma_rx_mode;/**< current mode of SmaRx pin */ | 451 | enum drxuio_mode uio_sma_rx_mode;/**< current mode of SmaRx pin */ |
452 | enum drxuio_mode uio_sma_tx_mode;/**< current mode of SmaTx pin */ | 452 | enum drxuio_mode uio_sma_tx_mode;/**< current mode of SmaTx pin */ |
453 | enum drxuio_mode uio_gpio_mode; /**< current mode of ASEL pin */ | 453 | enum drxuio_mode uio_gpio_mode; /**< current mode of ASEL pin */ |
@@ -459,7 +459,7 @@ struct drxj_cfg_atv_output { | |||
459 | /* IQM RC frequecy shift */ | 459 | /* IQM RC frequecy shift */ |
460 | u32 iqm_rc_rate_ofs; /**< frequency shifter setting after setchannel */ | 460 | u32 iqm_rc_rate_ofs; /**< frequency shifter setting after setchannel */ |
461 | 461 | ||
462 | /* ATV configuartion */ | 462 | /* ATV configuration */ |
463 | u32 atv_cfg_changed_flags; /**< flag: flags cfg changes */ | 463 | u32 atv_cfg_changed_flags; /**< flag: flags cfg changes */ |
464 | s16 atv_top_equ0[DRXJ_COEF_IDX_MAX]; /**< shadow of ATV_TOP_EQU0__A */ | 464 | s16 atv_top_equ0[DRXJ_COEF_IDX_MAX]; /**< shadow of ATV_TOP_EQU0__A */ |
465 | s16 atv_top_equ1[DRXJ_COEF_IDX_MAX]; /**< shadow of ATV_TOP_EQU1__A */ | 465 | s16 atv_top_equ1[DRXJ_COEF_IDX_MAX]; /**< shadow of ATV_TOP_EQU1__A */ |
diff --git a/drivers/media/dvb-frontends/drxk_hard.c b/drivers/media/dvb-frontends/drxk_hard.c index 15d2cac588b1..7e1bbbaad625 100644 --- a/drivers/media/dvb-frontends/drxk_hard.c +++ b/drivers/media/dvb-frontends/drxk_hard.c | |||
@@ -1626,7 +1626,7 @@ static int ctrl_power_mode(struct drxk_state *state, enum drx_power_mode *mode) | |||
1626 | } | 1626 | } |
1627 | 1627 | ||
1628 | if (*mode == DRX_POWER_UP) { | 1628 | if (*mode == DRX_POWER_UP) { |
1629 | /* Restore analog & pin configuartion */ | 1629 | /* Restore analog & pin configuration */ |
1630 | } else { | 1630 | } else { |
1631 | /* Power down to requested mode */ | 1631 | /* Power down to requested mode */ |
1632 | /* Backup some register settings */ | 1632 | /* Backup some register settings */ |
diff --git a/drivers/media/dvb-frontends/helene.c b/drivers/media/dvb-frontends/helene.c index ef35c2b30ea3..4bf5a551ba40 100644 --- a/drivers/media/dvb-frontends/helene.c +++ b/drivers/media/dvb-frontends/helene.c | |||
@@ -309,7 +309,7 @@ static int helene_write_regs(struct helene_priv *priv, | |||
309 | 309 | ||
310 | if (len + 1 > sizeof(buf)) { | 310 | if (len + 1 > sizeof(buf)) { |
311 | dev_warn(&priv->i2c->dev, | 311 | dev_warn(&priv->i2c->dev, |
312 | "wr reg=%04x: len=%d vs %Zu is too big!\n", | 312 | "wr reg=%04x: len=%d vs %zu is too big!\n", |
313 | reg, len + 1, sizeof(buf)); | 313 | reg, len + 1, sizeof(buf)); |
314 | return -E2BIG; | 314 | return -E2BIG; |
315 | } | 315 | } |
diff --git a/drivers/media/dvb-frontends/or51132.c b/drivers/media/dvb-frontends/or51132.c index 4b67d7e0116d..62aa00767015 100644 --- a/drivers/media/dvb-frontends/or51132.c +++ b/drivers/media/dvb-frontends/or51132.c | |||
@@ -133,7 +133,7 @@ static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware | |||
133 | u32 firmwareAsize, firmwareBsize; | 133 | u32 firmwareAsize, firmwareBsize; |
134 | int i,ret; | 134 | int i,ret; |
135 | 135 | ||
136 | dprintk("Firmware is %Zd bytes\n",fw->size); | 136 | dprintk("Firmware is %zd bytes\n",fw->size); |
137 | 137 | ||
138 | /* Get size of firmware A and B */ | 138 | /* Get size of firmware A and B */ |
139 | firmwareAsize = le32_to_cpu(*((__le32*)fw->data)); | 139 | firmwareAsize = le32_to_cpu(*((__le32*)fw->data)); |
diff --git a/drivers/media/dvb-frontends/tda10048.c b/drivers/media/dvb-frontends/tda10048.c index 92ab34c3e0be..143b39b5f6c9 100644 --- a/drivers/media/dvb-frontends/tda10048.c +++ b/drivers/media/dvb-frontends/tda10048.c | |||
@@ -499,7 +499,7 @@ static int tda10048_firmware_upload(struct dvb_frontend *fe) | |||
499 | __func__); | 499 | __func__); |
500 | return -EIO; | 500 | return -EIO; |
501 | } else { | 501 | } else { |
502 | printk(KERN_INFO "%s: firmware read %Zu bytes.\n", | 502 | printk(KERN_INFO "%s: firmware read %zu bytes.\n", |
503 | __func__, | 503 | __func__, |
504 | fw->size); | 504 | fw->size); |
505 | ret = 0; | 505 | ret = 0; |
diff --git a/drivers/media/i2c/adv7183_regs.h b/drivers/media/i2c/adv7183_regs.h index 843d4998435e..4ade89d33d62 100644 --- a/drivers/media/i2c/adv7183_regs.h +++ b/drivers/media/i2c/adv7183_regs.h | |||
@@ -83,7 +83,7 @@ | |||
83 | #define ADV7183_LETTERBOX_3 0x9D /* Letterbox 3 */ | 83 | #define ADV7183_LETTERBOX_3 0x9D /* Letterbox 3 */ |
84 | #define ADV7183_CRC_EN 0xB2 /* CRC enable */ | 84 | #define ADV7183_CRC_EN 0xB2 /* CRC enable */ |
85 | #define ADV7183_ADC_SWITCH_1 0xC3 /* ADC switch 1 */ | 85 | #define ADV7183_ADC_SWITCH_1 0xC3 /* ADC switch 1 */ |
86 | #define ADV7183_ADC_SWITCH_2 0xC4 /* ADC swithc 2 */ | 86 | #define ADV7183_ADC_SWITCH_2 0xC4 /* ADC switch 2 */ |
87 | #define ADV7183_LETTERBOX_CTRL_1 0xDC /* Letterbox control 1 */ | 87 | #define ADV7183_LETTERBOX_CTRL_1 0xDC /* Letterbox control 1 */ |
88 | #define ADV7183_LETTERBOX_CTRL_2 0xDD /* Letterbox control 2 */ | 88 | #define ADV7183_LETTERBOX_CTRL_2 0xDD /* Letterbox control 2 */ |
89 | #define ADV7183_SD_OFFSET_CB 0xE1 /* SD offset Cb */ | 89 | #define ADV7183_SD_OFFSET_CB 0xE1 /* SD offset Cb */ |
diff --git a/drivers/media/pci/saa7164/saa7164-fw.c b/drivers/media/pci/saa7164/saa7164-fw.c index 4ba5eade7ce2..ef4906406ebf 100644 --- a/drivers/media/pci/saa7164/saa7164-fw.c +++ b/drivers/media/pci/saa7164/saa7164-fw.c | |||
@@ -422,7 +422,7 @@ int saa7164_downloadfirmware(struct saa7164_dev *dev) | |||
422 | return -ENOMEM; | 422 | return -ENOMEM; |
423 | } | 423 | } |
424 | 424 | ||
425 | printk(KERN_INFO "%s() firmware read %Zu bytes.\n", | 425 | printk(KERN_INFO "%s() firmware read %zu bytes.\n", |
426 | __func__, fw->size); | 426 | __func__, fw->size); |
427 | 427 | ||
428 | if (fw->size != fwlength) { | 428 | if (fw->size != fwlength) { |
diff --git a/drivers/media/platform/exynos4-is/fimc-core.h b/drivers/media/platform/exynos4-is/fimc-core.h index 5615fefbf7af..c0373aede81a 100644 --- a/drivers/media/platform/exynos4-is/fimc-core.h +++ b/drivers/media/platform/exynos4-is/fimc-core.h | |||
@@ -358,7 +358,7 @@ struct fimc_pix_limit { | |||
358 | * @pix_limit: pixel size constraints for the scaler | 358 | * @pix_limit: pixel size constraints for the scaler |
359 | * @min_inp_pixsize: minimum input pixel size | 359 | * @min_inp_pixsize: minimum input pixel size |
360 | * @min_out_pixsize: minimum output pixel size | 360 | * @min_out_pixsize: minimum output pixel size |
361 | * @hor_offs_align: horizontal pixel offset aligment | 361 | * @hor_offs_align: horizontal pixel offset alignment |
362 | * @min_vsize_align: minimum vertical pixel size alignment | 362 | * @min_vsize_align: minimum vertical pixel size alignment |
363 | */ | 363 | */ |
364 | struct fimc_variant { | 364 | struct fimc_variant { |
diff --git a/drivers/media/tuners/xc5000.c b/drivers/media/tuners/xc5000.c index 0345b274eccc..91947cf1950e 100644 --- a/drivers/media/tuners/xc5000.c +++ b/drivers/media/tuners/xc5000.c | |||
@@ -1144,7 +1144,7 @@ static int xc_load_fw_and_init_tuner(struct dvb_frontend *fe, int force) | |||
1144 | pr_err("xc5000: Upload failed. rc %d\n", ret); | 1144 | pr_err("xc5000: Upload failed. rc %d\n", ret); |
1145 | return ret; | 1145 | return ret; |
1146 | } | 1146 | } |
1147 | dprintk(1, "firmware read %Zu bytes.\n", fw->size); | 1147 | dprintk(1, "firmware read %zu bytes.\n", fw->size); |
1148 | 1148 | ||
1149 | if (fw->size != desired_fw->size) { | 1149 | if (fw->size != desired_fw->size) { |
1150 | pr_err("xc5000: Firmware file with incorrect size\n"); | 1150 | pr_err("xc5000: Firmware file with incorrect size\n"); |
diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c b/drivers/media/usb/dvb-usb/dib0700_devices.c index 81d7fd4f7776..85ab3fa48f9a 100644 --- a/drivers/media/usb/dvb-usb/dib0700_devices.c +++ b/drivers/media/usb/dvb-usb/dib0700_devices.c | |||
@@ -2414,7 +2414,7 @@ static int stk9090m_frontend_attach(struct dvb_usb_adapter *adap) | |||
2414 | deb_info("%s: Upload failed. (file not found?)\n", __func__); | 2414 | deb_info("%s: Upload failed. (file not found?)\n", __func__); |
2415 | return -ENODEV; | 2415 | return -ENODEV; |
2416 | } else { | 2416 | } else { |
2417 | deb_info("%s: firmware read %Zu bytes.\n", __func__, state->frontend_firmware->size); | 2417 | deb_info("%s: firmware read %zu bytes.\n", __func__, state->frontend_firmware->size); |
2418 | } | 2418 | } |
2419 | stk9090m_config.microcode_B_fe_size = state->frontend_firmware->size; | 2419 | stk9090m_config.microcode_B_fe_size = state->frontend_firmware->size; |
2420 | stk9090m_config.microcode_B_fe_buffer = state->frontend_firmware->data; | 2420 | stk9090m_config.microcode_B_fe_buffer = state->frontend_firmware->data; |
@@ -2480,7 +2480,7 @@ static int nim9090md_frontend_attach(struct dvb_usb_adapter *adap) | |||
2480 | deb_info("%s: Upload failed. (file not found?)\n", __func__); | 2480 | deb_info("%s: Upload failed. (file not found?)\n", __func__); |
2481 | return -EIO; | 2481 | return -EIO; |
2482 | } else { | 2482 | } else { |
2483 | deb_info("%s: firmware read %Zu bytes.\n", __func__, state->frontend_firmware->size); | 2483 | deb_info("%s: firmware read %zu bytes.\n", __func__, state->frontend_firmware->size); |
2484 | } | 2484 | } |
2485 | nim9090md_config[0].microcode_B_fe_size = state->frontend_firmware->size; | 2485 | nim9090md_config[0].microcode_B_fe_size = state->frontend_firmware->size; |
2486 | nim9090md_config[0].microcode_B_fe_buffer = state->frontend_firmware->data; | 2486 | nim9090md_config[0].microcode_B_fe_buffer = state->frontend_firmware->data; |
diff --git a/drivers/media/usb/gspca/t613.c b/drivers/media/usb/gspca/t613.c index 42667710af92..46fb76349000 100644 --- a/drivers/media/usb/gspca/t613.c +++ b/drivers/media/usb/gspca/t613.c | |||
@@ -570,9 +570,9 @@ static void setfreq(struct gspca_dev *gspca_dev, s32 val) | |||
570 | /* this function is called at probe and resume time */ | 570 | /* this function is called at probe and resume time */ |
571 | static int sd_init(struct gspca_dev *gspca_dev) | 571 | static int sd_init(struct gspca_dev *gspca_dev) |
572 | { | 572 | { |
573 | /* some of this registers are not really neded, because | 573 | /* some of this registers are not really needed, because |
574 | * they are overriden by setbrigthness, setcontrast, etc, | 574 | * they are overridden by setbrigthness, setcontrast, etc., |
575 | * but wont hurt anyway, and can help someone with similar webcam | 575 | * but won't hurt anyway, and can help someone with similar webcam |
576 | * to see the initial parameters.*/ | 576 | * to see the initial parameters.*/ |
577 | struct sd *sd = (struct sd *) gspca_dev; | 577 | struct sd *sd = (struct sd *) gspca_dev; |
578 | const struct additional_sensor_data *sensor; | 578 | const struct additional_sensor_data *sensor; |
diff --git a/drivers/media/usb/tm6000/tm6000-input.c b/drivers/media/usb/tm6000/tm6000-input.c index 4afd4655d562..39c15bb2b20c 100644 --- a/drivers/media/usb/tm6000/tm6000-input.c +++ b/drivers/media/usb/tm6000/tm6000-input.c | |||
@@ -438,7 +438,7 @@ int tm6000_ir_init(struct tm6000_core *dev) | |||
438 | 438 | ||
439 | /* input setup */ | 439 | /* input setup */ |
440 | rc->allowed_protocols = RC_BIT_RC5 | RC_BIT_NEC; | 440 | rc->allowed_protocols = RC_BIT_RC5 | RC_BIT_NEC; |
441 | /* Neded, in order to support NEC remotes with 24 or 32 bits */ | 441 | /* Needed, in order to support NEC remotes with 24 or 32 bits */ |
442 | rc->scancode_mask = 0xffff; | 442 | rc->scancode_mask = 0xffff; |
443 | rc->priv = ir; | 443 | rc->priv = ir; |
444 | rc->change_protocol = tm6000_ir_change_protocol; | 444 | rc->change_protocol = tm6000_ir_change_protocol; |
diff --git a/drivers/media/v4l2-core/tuner-core.c b/drivers/media/v4l2-core/tuner-core.c index 05b5c6652cfa..e48b7c032c95 100644 --- a/drivers/media/v4l2-core/tuner-core.c +++ b/drivers/media/v4l2-core/tuner-core.c | |||
@@ -245,7 +245,7 @@ static const struct analog_demod_ops tuner_analog_ops = { | |||
245 | * @tuner_callback: an optional function to be called when switching | 245 | * @tuner_callback: an optional function to be called when switching |
246 | * to analog mode | 246 | * to analog mode |
247 | * | 247 | * |
248 | * This function applys the tuner config to tuner specified | 248 | * This function applies the tuner config to tuner specified |
249 | * by tun_setup structure. It contains several per-tuner initialization "magic" | 249 | * by tun_setup structure. It contains several per-tuner initialization "magic" |
250 | */ | 250 | */ |
251 | static void set_type(struct i2c_client *c, unsigned int type, | 251 | static void set_type(struct i2c_client *c, unsigned int type, |
@@ -463,7 +463,7 @@ attach_failed: | |||
463 | * @sd: subdev descriptor | 463 | * @sd: subdev descriptor |
464 | * @tun_setup: type to be associated to a given tuner i2c address | 464 | * @tun_setup: type to be associated to a given tuner i2c address |
465 | * | 465 | * |
466 | * This function applys the tuner config to tuner specified | 466 | * This function applies the tuner config to tuner specified |
467 | * by tun_setup structure. | 467 | * by tun_setup structure. |
468 | * If tuner I2C address is UNSET, then it will only set the device | 468 | * If tuner I2C address is UNSET, then it will only set the device |
469 | * if the tuner supports the mode specified in the call. | 469 | * if the tuner supports the mode specified in the call. |
diff --git a/drivers/misc/vmw_vmci/vmci_context.c b/drivers/misc/vmw_vmci/vmci_context.c index f866a4baecb5..f35f0c8606b9 100644 --- a/drivers/misc/vmw_vmci/vmci_context.c +++ b/drivers/misc/vmw_vmci/vmci_context.c | |||
@@ -303,7 +303,7 @@ int vmci_ctx_enqueue_datagram(u32 cid, struct vmci_datagram *dg) | |||
303 | 303 | ||
304 | vmci_dg_size = VMCI_DG_SIZE(dg); | 304 | vmci_dg_size = VMCI_DG_SIZE(dg); |
305 | if (vmci_dg_size > VMCI_MAX_DG_SIZE) { | 305 | if (vmci_dg_size > VMCI_MAX_DG_SIZE) { |
306 | pr_devel("Datagram too large (bytes=%Zu)\n", vmci_dg_size); | 306 | pr_devel("Datagram too large (bytes=%zu)\n", vmci_dg_size); |
307 | return VMCI_ERROR_INVALID_ARGS; | 307 | return VMCI_ERROR_INVALID_ARGS; |
308 | } | 308 | } |
309 | 309 | ||
diff --git a/drivers/misc/vmw_vmci/vmci_queue_pair.c b/drivers/misc/vmw_vmci/vmci_queue_pair.c index f84a4275ca29..498c0854305f 100644 --- a/drivers/misc/vmw_vmci/vmci_queue_pair.c +++ b/drivers/misc/vmw_vmci/vmci_queue_pair.c | |||
@@ -2928,7 +2928,7 @@ int vmci_qpair_get_produce_indexes(const struct vmci_qp *qpair, | |||
2928 | EXPORT_SYMBOL_GPL(vmci_qpair_get_produce_indexes); | 2928 | EXPORT_SYMBOL_GPL(vmci_qpair_get_produce_indexes); |
2929 | 2929 | ||
2930 | /* | 2930 | /* |
2931 | * vmci_qpair_get_consume_indexes() - Retrieves the indexes of the comsumer. | 2931 | * vmci_qpair_get_consume_indexes() - Retrieves the indexes of the consumer. |
2932 | * @qpair: Pointer to the queue pair struct. | 2932 | * @qpair: Pointer to the queue pair struct. |
2933 | * @consumer_tail: Reference used for storing consumer tail index. | 2933 | * @consumer_tail: Reference used for storing consumer tail index. |
2934 | * @producer_head: Reference used for storing the producer head index. | 2934 | * @producer_head: Reference used for storing the producer head index. |
diff --git a/drivers/mmc/host/mmci_qcom_dml.c b/drivers/mmc/host/mmci_qcom_dml.c index 2b7fc3764803..00750c9d3514 100644 --- a/drivers/mmc/host/mmci_qcom_dml.c +++ b/drivers/mmc/host/mmci_qcom_dml.c | |||
@@ -170,7 +170,7 @@ int dml_hw_init(struct mmci_host *host, struct device_node *np) | |||
170 | writel_relaxed(producer_id | (consumer_id << CONSUMER_PIPE_ID_SHFT), | 170 | writel_relaxed(producer_id | (consumer_id << CONSUMER_PIPE_ID_SHFT), |
171 | base + DML_PIPE_ID); | 171 | base + DML_PIPE_ID); |
172 | 172 | ||
173 | /* Make sure dml intialization is finished */ | 173 | /* Make sure dml initialization is finished */ |
174 | mb(); | 174 | mb(); |
175 | 175 | ||
176 | return 0; | 176 | return 0; |
diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c index 6ea963e3b89a..62ee439d5882 100644 --- a/drivers/net/arcnet/arcnet.c +++ b/drivers/net/arcnet/arcnet.c | |||
@@ -123,7 +123,7 @@ static int __init arcnet_init(void) | |||
123 | arc_proto_map[count] = arc_proto_default; | 123 | arc_proto_map[count] = arc_proto_default; |
124 | 124 | ||
125 | if (BUGLVL(D_DURING)) | 125 | if (BUGLVL(D_DURING)) |
126 | pr_info("struct sizes: %Zd %Zd %Zd %Zd %Zd\n", | 126 | pr_info("struct sizes: %zd %zd %zd %zd %zd\n", |
127 | sizeof(struct arc_hardware), | 127 | sizeof(struct arc_hardware), |
128 | sizeof(struct arc_rfc1201), | 128 | sizeof(struct arc_rfc1201), |
129 | sizeof(struct arc_rfc1051), | 129 | sizeof(struct arc_rfc1051), |
diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c index a81731303730..a9ac58c351a0 100644 --- a/drivers/net/ethernet/adi/bfin_mac.c +++ b/drivers/net/ethernet/adi/bfin_mac.c | |||
@@ -1206,7 +1206,7 @@ static void bfin_mac_rx(struct bfin_mac_local *lp) | |||
1206 | /* reserve 2 bytes for RXDWA padding */ | 1206 | /* reserve 2 bytes for RXDWA padding */ |
1207 | skb_reserve(new_skb, NET_IP_ALIGN); | 1207 | skb_reserve(new_skb, NET_IP_ALIGN); |
1208 | /* Invalidate the data cache of skb->data range when it is write back | 1208 | /* Invalidate the data cache of skb->data range when it is write back |
1209 | * cache. It will prevent overwritting the new data from DMA | 1209 | * cache. It will prevent overwriting the new data from DMA |
1210 | */ | 1210 | */ |
1211 | blackfin_dcache_invalidate_range((unsigned long)new_skb->head, | 1211 | blackfin_dcache_invalidate_range((unsigned long)new_skb->head, |
1212 | (unsigned long)new_skb->end); | 1212 | (unsigned long)new_skb->end); |
diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c index 0ee6e208aa07..50d88d3e03b6 100644 --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c | |||
@@ -817,7 +817,7 @@ static void bcm_enet_adjust_phy_link(struct net_device *dev) | |||
817 | rx_pause_en = 1; | 817 | rx_pause_en = 1; |
818 | tx_pause_en = 1; | 818 | tx_pause_en = 1; |
819 | } else if (!priv->pause_auto) { | 819 | } else if (!priv->pause_auto) { |
820 | /* pause setting overrided by user */ | 820 | /* pause setting overridden by user */ |
821 | rx_pause_en = priv->pause_rx; | 821 | rx_pause_en = priv->pause_rx; |
822 | tx_pause_en = priv->pause_tx; | 822 | tx_pause_en = priv->pause_tx; |
823 | } else { | 823 | } else { |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c index 05356efdbf93..b209b7f6093e 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | |||
@@ -6957,7 +6957,7 @@ int bnx2x_link_update(struct link_params *params, struct link_vars *vars) | |||
6957 | * hence its link is expected to be down | 6957 | * hence its link is expected to be down |
6958 | * - SECOND_PHY means that first phy should not be able | 6958 | * - SECOND_PHY means that first phy should not be able |
6959 | * to link up by itself (using configuration) | 6959 | * to link up by itself (using configuration) |
6960 | * - DEFAULT should be overriden during initialiazation | 6960 | * - DEFAULT should be overridden during initialization |
6961 | */ | 6961 | */ |
6962 | DP(NETIF_MSG_LINK, "Invalid link indication" | 6962 | DP(NETIF_MSG_LINK, "Invalid link indication" |
6963 | "mpc=0x%x. DISABLING LINK !!!\n", | 6963 | "mpc=0x%x. DISABLING LINK !!!\n", |
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c index 016d481c6476..30606b11b128 100644 --- a/drivers/net/ethernet/cadence/macb.c +++ b/drivers/net/ethernet/cadence/macb.c | |||
@@ -1622,7 +1622,7 @@ static void macb_init_rx_buffer_size(struct macb *bp, size_t size) | |||
1622 | } | 1622 | } |
1623 | } | 1623 | } |
1624 | 1624 | ||
1625 | netdev_dbg(bp->dev, "mtu [%u] rx_buffer_size [%Zu]\n", | 1625 | netdev_dbg(bp->dev, "mtu [%u] rx_buffer_size [%zu]\n", |
1626 | bp->dev->mtu, bp->rx_buffer_size); | 1626 | bp->dev->mtu, bp->rx_buffer_size); |
1627 | } | 1627 | } |
1628 | 1628 | ||
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c index acc231293e4d..f6e739da7bb7 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | |||
@@ -1416,7 +1416,7 @@ static unsigned int xdigit2int(unsigned char c) | |||
1416 | * <pattern data>[/<pattern mask>][@<anchor>] | 1416 | * <pattern data>[/<pattern mask>][@<anchor>] |
1417 | * | 1417 | * |
1418 | * Up to 2 filter patterns can be specified. If 2 are supplied the first one | 1418 | * Up to 2 filter patterns can be specified. If 2 are supplied the first one |
1419 | * must be anchored at 0. An omited mask is taken as a mask of 1s, an omitted | 1419 | * must be anchored at 0. An omitted mask is taken as a mask of 1s, an omitted |
1420 | * anchor is taken as 0. | 1420 | * anchor is taken as 0. |
1421 | */ | 1421 | */ |
1422 | static ssize_t mps_trc_write(struct file *file, const char __user *buf, | 1422 | static ssize_t mps_trc_write(struct file *file, const char __user *buf, |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index cbbf8648307a..78460c52b7c4 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | |||
@@ -847,9 +847,7 @@ static void i40e_free_vf_res(struct i40e_vf *vf) | |||
847 | wr32(hw, reg_idx, reg); | 847 | wr32(hw, reg_idx, reg); |
848 | i40e_flush(hw); | 848 | i40e_flush(hw); |
849 | } | 849 | } |
850 | /* reset some of the state varibles keeping | 850 | /* reset some of the state variables keeping track of the resources */ |
851 | * track of the resources | ||
852 | */ | ||
853 | vf->num_queue_pairs = 0; | 851 | vf->num_queue_pairs = 0; |
854 | vf->vf_states = 0; | 852 | vf->vf_states = 0; |
855 | clear_bit(I40E_VF_STAT_INIT, &vf->vf_states); | 853 | clear_bit(I40E_VF_STAT_INIT, &vf->vf_states); |
diff --git a/drivers/net/ethernet/intel/igb/e1000_phy.c b/drivers/net/ethernet/intel/igb/e1000_phy.c index 2788a5409023..68812d783f33 100644 --- a/drivers/net/ethernet/intel/igb/e1000_phy.c +++ b/drivers/net/ethernet/intel/igb/e1000_phy.c | |||
@@ -294,7 +294,7 @@ s32 igb_write_phy_reg_i2c(struct e1000_hw *hw, u32 offset, u16 data) | |||
294 | u32 i, i2ccmd = 0; | 294 | u32 i, i2ccmd = 0; |
295 | u16 phy_data_swapped; | 295 | u16 phy_data_swapped; |
296 | 296 | ||
297 | /* Prevent overwritting SFP I2C EEPROM which is at A0 address.*/ | 297 | /* Prevent overwriting SFP I2C EEPROM which is at A0 address.*/ |
298 | if ((hw->phy.addr == 0) || (hw->phy.addr > 7)) { | 298 | if ((hw->phy.addr == 0) || (hw->phy.addr > 7)) { |
299 | hw_dbg("PHY I2C Address %d is out of range.\n", | 299 | hw_dbg("PHY I2C Address %d is out of range.\n", |
300 | hw->phy.addr); | 300 | hw->phy.addr); |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c index 30535e6b68f0..c8ac46049f34 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | |||
@@ -1449,7 +1449,7 @@ do { \ | |||
1449 | * @atr_input: input bitstream to compute the hash on | 1449 | * @atr_input: input bitstream to compute the hash on |
1450 | * @input_mask: mask for the input bitstream | 1450 | * @input_mask: mask for the input bitstream |
1451 | * | 1451 | * |
1452 | * This function serves two main purposes. First it applys the input_mask | 1452 | * This function serves two main purposes. First it applies the input_mask |
1453 | * to the atr_input resulting in a cleaned up atr_input data stream. | 1453 | * to the atr_input resulting in a cleaned up atr_input data stream. |
1454 | * Secondly it computes the hash and stores it in the bkt_hash field at | 1454 | * Secondly it computes the hash and stores it in the bkt_hash field at |
1455 | * the end of the input byte stream. This way it will be available for | 1455 | * the end of the input byte stream. This way it will be available for |
diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c index ee38c18c2d2d..ee1c78abab0b 100644 --- a/drivers/net/ethernet/micrel/ksz884x.c +++ b/drivers/net/ethernet/micrel/ksz884x.c | |||
@@ -1251,10 +1251,10 @@ struct ksz_port_info { | |||
1251 | * @tx_size: Transmit data size. Used for TX optimization. | 1251 | * @tx_size: Transmit data size. Used for TX optimization. |
1252 | * The maximum is defined by MAX_TX_HELD_SIZE. | 1252 | * The maximum is defined by MAX_TX_HELD_SIZE. |
1253 | * @perm_addr: Permanent MAC address. | 1253 | * @perm_addr: Permanent MAC address. |
1254 | * @override_addr: Overrided MAC address. | 1254 | * @override_addr: Overridden MAC address. |
1255 | * @address: Additional MAC address entries. | 1255 | * @address: Additional MAC address entries. |
1256 | * @addr_list_size: Additional MAC address list size. | 1256 | * @addr_list_size: Additional MAC address list size. |
1257 | * @mac_override: Indication of MAC address overrided. | 1257 | * @mac_override: Indication of MAC address overridden. |
1258 | * @promiscuous: Counter to keep track of promiscuous mode set. | 1258 | * @promiscuous: Counter to keep track of promiscuous mode set. |
1259 | * @all_multi: Counter to keep track of all multicast mode set. | 1259 | * @all_multi: Counter to keep track of all multicast mode set. |
1260 | * @multi_list: Multicast address entries. | 1260 | * @multi_list: Multicast address entries. |
@@ -4042,7 +4042,7 @@ static int empty_addr(u8 *addr) | |||
4042 | * @hw: The hardware instance. | 4042 | * @hw: The hardware instance. |
4043 | * | 4043 | * |
4044 | * This routine programs the MAC address of the hardware when the address is | 4044 | * This routine programs the MAC address of the hardware when the address is |
4045 | * overrided. | 4045 | * overridden. |
4046 | */ | 4046 | */ |
4047 | static void hw_set_addr(struct ksz_hw *hw) | 4047 | static void hw_set_addr(struct ksz_hw *hw) |
4048 | { | 4048 | { |
@@ -7043,7 +7043,7 @@ static int pcidev_init(struct pci_dev *pdev, const struct pci_device_id *id) | |||
7043 | if (macaddr[0] != ':') | 7043 | if (macaddr[0] != ':') |
7044 | get_mac_addr(hw_priv, macaddr, MAIN_PORT); | 7044 | get_mac_addr(hw_priv, macaddr, MAIN_PORT); |
7045 | 7045 | ||
7046 | /* Read MAC address and initialize override address if not overrided. */ | 7046 | /* Read MAC address and initialize override address if not overridden. */ |
7047 | hw_read_addr(hw); | 7047 | hw_read_addr(hw); |
7048 | 7048 | ||
7049 | /* Multiple device interfaces mode requires a second MAC address. */ | 7049 | /* Multiple device interfaces mode requires a second MAC address. */ |
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c index 99b187bfdd55..718bf58a7da6 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | |||
@@ -178,7 +178,7 @@ const u32 qlcnic_83xx_reg_tbl[] = { | |||
178 | 0x3540, /* Device state, DRV_REG1 */ | 178 | 0x3540, /* Device state, DRV_REG1 */ |
179 | 0x3544, /* Driver state, DRV_REG2 */ | 179 | 0x3544, /* Driver state, DRV_REG2 */ |
180 | 0x3548, /* Driver scratch, DRV_REG3 */ | 180 | 0x3548, /* Driver scratch, DRV_REG3 */ |
181 | 0x354C, /* Device partiton info, DRV_REG4 */ | 181 | 0x354C, /* Device partition info, DRV_REG4 */ |
182 | 0x3524, /* Driver IDC ver, DRV_REG5 */ | 182 | 0x3524, /* Driver IDC ver, DRV_REG5 */ |
183 | 0x3550, /* FW_VER_MAJOR */ | 183 | 0x3550, /* FW_VER_MAJOR */ |
184 | 0x3554, /* FW_VER_MINOR */ | 184 | 0x3554, /* FW_VER_MINOR */ |
diff --git a/drivers/net/ethernet/sfc/mcdi_pcol.h b/drivers/net/ethernet/sfc/mcdi_pcol.h index 47ced8a898ca..91fb54fd03d9 100644 --- a/drivers/net/ethernet/sfc/mcdi_pcol.h +++ b/drivers/net/ethernet/sfc/mcdi_pcol.h | |||
@@ -10832,7 +10832,7 @@ | |||
10832 | 10832 | ||
10833 | /***********************************/ | 10833 | /***********************************/ |
10834 | /* MC_CMD_GET_LICENSED_V3_FEATURE_STATES | 10834 | /* MC_CMD_GET_LICENSED_V3_FEATURE_STATES |
10835 | * Query the state of an one or more licensed features. (Note that the actual | 10835 | * Query the state of one or more licensed features. (Note that the actual |
10836 | * state may be invalidated by the MC_CMD_LICENSING_V3 OP_UPDATE_LICENSE | 10836 | * state may be invalidated by the MC_CMD_LICENSING_V3 OP_UPDATE_LICENSE |
10837 | * operation or a reboot of the MC.) Used for V3 licensing (Medford) | 10837 | * operation or a reboot of the MC.) Used for V3 licensing (Medford) |
10838 | */ | 10838 | */ |
diff --git a/drivers/net/ethernet/sis/sis900.c b/drivers/net/ethernet/sis/sis900.c index 19a458716f1a..1b6f6171d078 100644 --- a/drivers/net/ethernet/sis/sis900.c +++ b/drivers/net/ethernet/sis/sis900.c | |||
@@ -176,7 +176,7 @@ struct sis900_private { | |||
176 | 176 | ||
177 | u32 msg_enable; | 177 | u32 msg_enable; |
178 | 178 | ||
179 | unsigned int cur_rx, dirty_rx; /* producer/comsumer pointers for Tx/Rx ring */ | 179 | unsigned int cur_rx, dirty_rx; /* producer/consumer pointers for Tx/Rx ring */ |
180 | unsigned int cur_tx, dirty_tx; | 180 | unsigned int cur_tx, dirty_tx; |
181 | 181 | ||
182 | /* The saved address of a sent/receive-in-place packet buffer */ | 182 | /* The saved address of a sent/receive-in-place packet buffer */ |
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index bda0c6413450..89698741682f 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c | |||
@@ -1330,7 +1330,7 @@ static int __init gtp_init(void) | |||
1330 | if (err < 0) | 1330 | if (err < 0) |
1331 | goto unreg_genl_family; | 1331 | goto unreg_genl_family; |
1332 | 1332 | ||
1333 | pr_info("GTP module loaded (pdp ctx size %Zd bytes)\n", | 1333 | pr_info("GTP module loaded (pdp ctx size %zd bytes)\n", |
1334 | sizeof(struct pdp_ctx)); | 1334 | sizeof(struct pdp_ctx)); |
1335 | return 0; | 1335 | return 0; |
1336 | 1336 | ||
diff --git a/drivers/net/usb/kalmia.c b/drivers/net/usb/kalmia.c index 3e37724d30ae..8aefb282c862 100644 --- a/drivers/net/usb/kalmia.c +++ b/drivers/net/usb/kalmia.c | |||
@@ -343,7 +343,7 @@ static const struct driver_info kalmia_info = { | |||
343 | static const struct usb_device_id products[] = { | 343 | static const struct usb_device_id products[] = { |
344 | /* The unswitched USB ID, to get the module auto loaded: */ | 344 | /* The unswitched USB ID, to get the module auto loaded: */ |
345 | { USB_DEVICE(0x04e8, 0x689a) }, | 345 | { USB_DEVICE(0x04e8, 0x689a) }, |
346 | /* The stick swithed into modem (by e.g. usb_modeswitch): */ | 346 | /* The stick switched into modem (by e.g. usb_modeswitch): */ |
347 | { USB_DEVICE(0x04e8, 0x6889), | 347 | { USB_DEVICE(0x04e8, 0x6889), |
348 | .driver_info = (unsigned long) &kalmia_info, }, | 348 | .driver_info = (unsigned long) &kalmia_info, }, |
349 | { /* EMPTY == end of list */} }; | 349 | { /* EMPTY == end of list */} }; |
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c index 4f4f71b2966b..c5b21138b7eb 100644 --- a/drivers/net/usb/rndis_host.c +++ b/drivers/net/usb/rndis_host.c | |||
@@ -383,7 +383,7 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags) | |||
383 | 383 | ||
384 | /* REVISIT: peripheral "alignment" request is ignored ... */ | 384 | /* REVISIT: peripheral "alignment" request is ignored ... */ |
385 | dev_dbg(&intf->dev, | 385 | dev_dbg(&intf->dev, |
386 | "hard mtu %u (%u from dev), rx buflen %Zu, align %d\n", | 386 | "hard mtu %u (%u from dev), rx buflen %zu, align %d\n", |
387 | dev->hard_mtu, tmp, dev->rx_urb_size, | 387 | dev->hard_mtu, tmp, dev->rx_urb_size, |
388 | 1 << le32_to_cpu(u.init_c->packet_alignment)); | 388 | 1 << le32_to_cpu(u.init_c->packet_alignment)); |
389 | 389 | ||
diff --git a/drivers/net/usb/sierra_net.c b/drivers/net/usb/sierra_net.c index d9440bc022f2..ac69f28d92d2 100644 --- a/drivers/net/usb/sierra_net.c +++ b/drivers/net/usb/sierra_net.c | |||
@@ -379,7 +379,7 @@ static int sierra_net_parse_lsi(struct usbnet *dev, char *data, int datalen) | |||
379 | u32 expected_length; | 379 | u32 expected_length; |
380 | 380 | ||
381 | if (datalen < sizeof(struct lsi_umts_single)) { | 381 | if (datalen < sizeof(struct lsi_umts_single)) { |
382 | netdev_err(dev->net, "%s: Data length %d, exp >= %Zu\n", | 382 | netdev_err(dev->net, "%s: Data length %d, exp >= %zu\n", |
383 | __func__, datalen, sizeof(struct lsi_umts_single)); | 383 | __func__, datalen, sizeof(struct lsi_umts_single)); |
384 | return -1; | 384 | return -1; |
385 | } | 385 | } |
diff --git a/drivers/net/wimax/i2400m/usb-fw.c b/drivers/net/wimax/i2400m/usb-fw.c index e74664b84925..502c346aa790 100644 --- a/drivers/net/wimax/i2400m/usb-fw.c +++ b/drivers/net/wimax/i2400m/usb-fw.c | |||
@@ -237,7 +237,7 @@ void __i2400mu_bm_notif_cb(struct urb *urb) | |||
237 | * | 237 | * |
238 | * @i2400m: device descriptor | 238 | * @i2400m: device descriptor |
239 | * @urb: urb to use | 239 | * @urb: urb to use |
240 | * @completion: completion varible to complete when done | 240 | * @completion: completion variable to complete when done |
241 | * | 241 | * |
242 | * Data is always read to i2400m->bm_ack_buf | 242 | * Data is always read to i2400m->bm_ack_buf |
243 | */ | 243 | */ |
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c index 815efe9fd208..5214dd7a3936 100644 --- a/drivers/net/wireless/ath/ath9k/ani.c +++ b/drivers/net/wireless/ath/ath9k/ani.c | |||
@@ -59,13 +59,13 @@ static const struct ani_ofdm_level_entry ofdm_level_table[] = { | |||
59 | /* | 59 | /* |
60 | * MRC (Maximal Ratio Combining) has always been used with multi-antenna ofdm. | 60 | * MRC (Maximal Ratio Combining) has always been used with multi-antenna ofdm. |
61 | * With OFDM for single stream you just add up all antenna inputs, you're | 61 | * With OFDM for single stream you just add up all antenna inputs, you're |
62 | * only interested in what you get after FFT. Signal aligment is also not | 62 | * only interested in what you get after FFT. Signal alignment is also not |
63 | * required for OFDM because any phase difference adds up in the frequency | 63 | * required for OFDM because any phase difference adds up in the frequency |
64 | * domain. | 64 | * domain. |
65 | * | 65 | * |
66 | * MRC requires extra work for use with CCK. You need to align the antenna | 66 | * MRC requires extra work for use with CCK. You need to align the antenna |
67 | * signals from the different antenna before you can add the signals together. | 67 | * signals from the different antenna before you can add the signals together. |
68 | * You need aligment of signals as CCK is in time domain, so addition can cancel | 68 | * You need alignment of signals as CCK is in time domain, so addition can cancel |
69 | * your signal completely if phase is 180 degrees (think of adding sine waves). | 69 | * your signal completely if phase is 180 degrees (think of adding sine waves). |
70 | * You also need to remove noise before the addition and this is where ANI | 70 | * You also need to remove noise before the addition and this is where ANI |
71 | * MRC CCK comes into play. One of the antenna inputs may be stronger but | 71 | * MRC CCK comes into play. One of the antenna inputs may be stronger but |
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 10098b7586f3..944b83cfc519 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | |||
@@ -4874,7 +4874,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, | |||
4874 | kfree(af_params); | 4874 | kfree(af_params); |
4875 | } else { | 4875 | } else { |
4876 | brcmf_dbg(TRACE, "Unhandled, fc=%04x!!\n", mgmt->frame_control); | 4876 | brcmf_dbg(TRACE, "Unhandled, fc=%04x!!\n", mgmt->frame_control); |
4877 | brcmf_dbg_hex_dump(true, buf, len, "payload, len=%Zu\n", len); | 4877 | brcmf_dbg_hex_dump(true, buf, len, "payload, len=%zu\n", len); |
4878 | } | 4878 | } |
4879 | 4879 | ||
4880 | exit: | 4880 | exit: |
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c index 356aba9d3d53..f922859acf40 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c | |||
@@ -1238,7 +1238,7 @@ static int ipw2100_get_hw_features(struct ipw2100_priv *priv) | |||
1238 | } | 1238 | } |
1239 | 1239 | ||
1240 | /* | 1240 | /* |
1241 | * Start firmware execution after power on and intialization | 1241 | * Start firmware execution after power on and initialization |
1242 | * The sequence is: | 1242 | * The sequence is: |
1243 | * 1. Release ARC | 1243 | * 1. Release ARC |
1244 | * 2. Wait for f/w initialization completes; | 1244 | * 2. Wait for f/w initialization completes; |
@@ -1277,7 +1277,7 @@ static int ipw2100_start_adapter(struct ipw2100_priv *priv) | |||
1277 | /* Release ARC - clear reset bit */ | 1277 | /* Release ARC - clear reset bit */ |
1278 | write_register(priv->net_dev, IPW_REG_RESET_REG, 0); | 1278 | write_register(priv->net_dev, IPW_REG_RESET_REG, 0); |
1279 | 1279 | ||
1280 | /* wait for f/w intialization complete */ | 1280 | /* wait for f/w initialization complete */ |
1281 | IPW_DEBUG_FW("Waiting for f/w initialization to complete...\n"); | 1281 | IPW_DEBUG_FW("Waiting for f/w initialization to complete...\n"); |
1282 | i = 5000; | 1282 | i = 5000; |
1283 | do { | 1283 | do { |
@@ -5652,7 +5652,7 @@ static void shim__set_security(struct net_device *dev, | |||
5652 | 5652 | ||
5653 | /* As a temporary work around to enable WPA until we figure out why | 5653 | /* As a temporary work around to enable WPA until we figure out why |
5654 | * wpa_supplicant toggles the security capability of the driver, which | 5654 | * wpa_supplicant toggles the security capability of the driver, which |
5655 | * forces a disassocation with force_update... | 5655 | * forces a disassociation with force_update... |
5656 | * | 5656 | * |
5657 | * if (force_update || !(priv->status & STATUS_ASSOCIATED))*/ | 5657 | * if (force_update || !(priv->status & STATUS_ASSOCIATED))*/ |
5658 | if (!(priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING))) | 5658 | if (!(priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING))) |
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c index ef9af8a29cad..5ef3c5cc47c5 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c | |||
@@ -3974,7 +3974,7 @@ static void ipw_send_disassociate(struct ipw_priv *priv, int quiet) | |||
3974 | return; | 3974 | return; |
3975 | } | 3975 | } |
3976 | 3976 | ||
3977 | IPW_DEBUG_ASSOC("Disassocation attempt from %pM " | 3977 | IPW_DEBUG_ASSOC("Disassociation attempt from %pM " |
3978 | "on channel %d.\n", | 3978 | "on channel %d.\n", |
3979 | priv->assoc_request.bssid, | 3979 | priv->assoc_request.bssid, |
3980 | priv->assoc_request.channel); | 3980 | priv->assoc_request.channel); |
@@ -5196,7 +5196,7 @@ static void ipw_rx_queue_restock(struct ipw_priv *priv) | |||
5196 | * Move all used packet from rx_used to rx_free, allocating a new SKB for each. | 5196 | * Move all used packet from rx_used to rx_free, allocating a new SKB for each. |
5197 | * Also restock the Rx queue via ipw_rx_queue_restock. | 5197 | * Also restock the Rx queue via ipw_rx_queue_restock. |
5198 | * | 5198 | * |
5199 | * This is called as a scheduled work item (except for during intialization) | 5199 | * This is called as a scheduled work item (except for during initialization) |
5200 | */ | 5200 | */ |
5201 | static void ipw_rx_queue_replenish(void *data) | 5201 | static void ipw_rx_queue_replenish(void *data) |
5202 | { | 5202 | { |
diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c index a91d170a614b..2781f5728d07 100644 --- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c | |||
@@ -4855,39 +4855,39 @@ il4965_ucode_callback(const struct firmware *ucode_raw, void *context) | |||
4855 | */ | 4855 | */ |
4856 | 4856 | ||
4857 | D_INFO("f/w package hdr ucode version raw = 0x%x\n", il->ucode_ver); | 4857 | D_INFO("f/w package hdr ucode version raw = 0x%x\n", il->ucode_ver); |
4858 | D_INFO("f/w package hdr runtime inst size = %Zd\n", pieces.inst_size); | 4858 | D_INFO("f/w package hdr runtime inst size = %zd\n", pieces.inst_size); |
4859 | D_INFO("f/w package hdr runtime data size = %Zd\n", pieces.data_size); | 4859 | D_INFO("f/w package hdr runtime data size = %zd\n", pieces.data_size); |
4860 | D_INFO("f/w package hdr init inst size = %Zd\n", pieces.init_size); | 4860 | D_INFO("f/w package hdr init inst size = %zd\n", pieces.init_size); |
4861 | D_INFO("f/w package hdr init data size = %Zd\n", pieces.init_data_size); | 4861 | D_INFO("f/w package hdr init data size = %zd\n", pieces.init_data_size); |
4862 | D_INFO("f/w package hdr boot inst size = %Zd\n", pieces.boot_size); | 4862 | D_INFO("f/w package hdr boot inst size = %zd\n", pieces.boot_size); |
4863 | 4863 | ||
4864 | /* Verify that uCode images will fit in card's SRAM */ | 4864 | /* Verify that uCode images will fit in card's SRAM */ |
4865 | if (pieces.inst_size > il->hw_params.max_inst_size) { | 4865 | if (pieces.inst_size > il->hw_params.max_inst_size) { |
4866 | IL_ERR("uCode instr len %Zd too large to fit in\n", | 4866 | IL_ERR("uCode instr len %zd too large to fit in\n", |
4867 | pieces.inst_size); | 4867 | pieces.inst_size); |
4868 | goto try_again; | 4868 | goto try_again; |
4869 | } | 4869 | } |
4870 | 4870 | ||
4871 | if (pieces.data_size > il->hw_params.max_data_size) { | 4871 | if (pieces.data_size > il->hw_params.max_data_size) { |
4872 | IL_ERR("uCode data len %Zd too large to fit in\n", | 4872 | IL_ERR("uCode data len %zd too large to fit in\n", |
4873 | pieces.data_size); | 4873 | pieces.data_size); |
4874 | goto try_again; | 4874 | goto try_again; |
4875 | } | 4875 | } |
4876 | 4876 | ||
4877 | if (pieces.init_size > il->hw_params.max_inst_size) { | 4877 | if (pieces.init_size > il->hw_params.max_inst_size) { |
4878 | IL_ERR("uCode init instr len %Zd too large to fit in\n", | 4878 | IL_ERR("uCode init instr len %zd too large to fit in\n", |
4879 | pieces.init_size); | 4879 | pieces.init_size); |
4880 | goto try_again; | 4880 | goto try_again; |
4881 | } | 4881 | } |
4882 | 4882 | ||
4883 | if (pieces.init_data_size > il->hw_params.max_data_size) { | 4883 | if (pieces.init_data_size > il->hw_params.max_data_size) { |
4884 | IL_ERR("uCode init data len %Zd too large to fit in\n", | 4884 | IL_ERR("uCode init data len %zd too large to fit in\n", |
4885 | pieces.init_data_size); | 4885 | pieces.init_data_size); |
4886 | goto try_again; | 4886 | goto try_again; |
4887 | } | 4887 | } |
4888 | 4888 | ||
4889 | if (pieces.boot_size > il->hw_params.max_bsm_size) { | 4889 | if (pieces.boot_size > il->hw_params.max_bsm_size) { |
4890 | IL_ERR("uCode boot instr len %Zd too large to fit in\n", | 4890 | IL_ERR("uCode boot instr len %zd too large to fit in\n", |
4891 | pieces.boot_size); | 4891 | pieces.boot_size); |
4892 | goto try_again; | 4892 | goto try_again; |
4893 | } | 4893 | } |
@@ -4938,7 +4938,7 @@ il4965_ucode_callback(const struct firmware *ucode_raw, void *context) | |||
4938 | /* Copy images into buffers for card's bus-master reads ... */ | 4938 | /* Copy images into buffers for card's bus-master reads ... */ |
4939 | 4939 | ||
4940 | /* Runtime instructions (first block of data in file) */ | 4940 | /* Runtime instructions (first block of data in file) */ |
4941 | D_INFO("Copying (but not loading) uCode instr len %Zd\n", | 4941 | D_INFO("Copying (but not loading) uCode instr len %zd\n", |
4942 | pieces.inst_size); | 4942 | pieces.inst_size); |
4943 | memcpy(il->ucode_code.v_addr, pieces.inst, pieces.inst_size); | 4943 | memcpy(il->ucode_code.v_addr, pieces.inst, pieces.inst_size); |
4944 | 4944 | ||
@@ -4949,28 +4949,28 @@ il4965_ucode_callback(const struct firmware *ucode_raw, void *context) | |||
4949 | * Runtime data | 4949 | * Runtime data |
4950 | * NOTE: Copy into backup buffer will be done in il_up() | 4950 | * NOTE: Copy into backup buffer will be done in il_up() |
4951 | */ | 4951 | */ |
4952 | D_INFO("Copying (but not loading) uCode data len %Zd\n", | 4952 | D_INFO("Copying (but not loading) uCode data len %zd\n", |
4953 | pieces.data_size); | 4953 | pieces.data_size); |
4954 | memcpy(il->ucode_data.v_addr, pieces.data, pieces.data_size); | 4954 | memcpy(il->ucode_data.v_addr, pieces.data, pieces.data_size); |
4955 | memcpy(il->ucode_data_backup.v_addr, pieces.data, pieces.data_size); | 4955 | memcpy(il->ucode_data_backup.v_addr, pieces.data, pieces.data_size); |
4956 | 4956 | ||
4957 | /* Initialization instructions */ | 4957 | /* Initialization instructions */ |
4958 | if (pieces.init_size) { | 4958 | if (pieces.init_size) { |
4959 | D_INFO("Copying (but not loading) init instr len %Zd\n", | 4959 | D_INFO("Copying (but not loading) init instr len %zd\n", |
4960 | pieces.init_size); | 4960 | pieces.init_size); |
4961 | memcpy(il->ucode_init.v_addr, pieces.init, pieces.init_size); | 4961 | memcpy(il->ucode_init.v_addr, pieces.init, pieces.init_size); |
4962 | } | 4962 | } |
4963 | 4963 | ||
4964 | /* Initialization data */ | 4964 | /* Initialization data */ |
4965 | if (pieces.init_data_size) { | 4965 | if (pieces.init_data_size) { |
4966 | D_INFO("Copying (but not loading) init data len %Zd\n", | 4966 | D_INFO("Copying (but not loading) init data len %zd\n", |
4967 | pieces.init_data_size); | 4967 | pieces.init_data_size); |
4968 | memcpy(il->ucode_init_data.v_addr, pieces.init_data, | 4968 | memcpy(il->ucode_init_data.v_addr, pieces.init_data, |
4969 | pieces.init_data_size); | 4969 | pieces.init_data_size); |
4970 | } | 4970 | } |
4971 | 4971 | ||
4972 | /* Bootstrap instructions */ | 4972 | /* Bootstrap instructions */ |
4973 | D_INFO("Copying (but not loading) boot instr len %Zd\n", | 4973 | D_INFO("Copying (but not loading) boot instr len %zd\n", |
4974 | pieces.boot_size); | 4974 | pieces.boot_size); |
4975 | memcpy(il->ucode_boot.v_addr, pieces.boot, pieces.boot_size); | 4975 | memcpy(il->ucode_boot.v_addr, pieces.boot, pieces.boot_size); |
4976 | 4976 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c index 0e0293d42b5d..be466a074c1d 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c | |||
@@ -1141,21 +1141,21 @@ static int validate_sec_sizes(struct iwl_drv *drv, | |||
1141 | struct iwl_firmware_pieces *pieces, | 1141 | struct iwl_firmware_pieces *pieces, |
1142 | const struct iwl_cfg *cfg) | 1142 | const struct iwl_cfg *cfg) |
1143 | { | 1143 | { |
1144 | IWL_DEBUG_INFO(drv, "f/w package hdr runtime inst size = %Zd\n", | 1144 | IWL_DEBUG_INFO(drv, "f/w package hdr runtime inst size = %zd\n", |
1145 | get_sec_size(pieces, IWL_UCODE_REGULAR, | 1145 | get_sec_size(pieces, IWL_UCODE_REGULAR, |
1146 | IWL_UCODE_SECTION_INST)); | 1146 | IWL_UCODE_SECTION_INST)); |
1147 | IWL_DEBUG_INFO(drv, "f/w package hdr runtime data size = %Zd\n", | 1147 | IWL_DEBUG_INFO(drv, "f/w package hdr runtime data size = %zd\n", |
1148 | get_sec_size(pieces, IWL_UCODE_REGULAR, | 1148 | get_sec_size(pieces, IWL_UCODE_REGULAR, |
1149 | IWL_UCODE_SECTION_DATA)); | 1149 | IWL_UCODE_SECTION_DATA)); |
1150 | IWL_DEBUG_INFO(drv, "f/w package hdr init inst size = %Zd\n", | 1150 | IWL_DEBUG_INFO(drv, "f/w package hdr init inst size = %zd\n", |
1151 | get_sec_size(pieces, IWL_UCODE_INIT, IWL_UCODE_SECTION_INST)); | 1151 | get_sec_size(pieces, IWL_UCODE_INIT, IWL_UCODE_SECTION_INST)); |
1152 | IWL_DEBUG_INFO(drv, "f/w package hdr init data size = %Zd\n", | 1152 | IWL_DEBUG_INFO(drv, "f/w package hdr init data size = %zd\n", |
1153 | get_sec_size(pieces, IWL_UCODE_INIT, IWL_UCODE_SECTION_DATA)); | 1153 | get_sec_size(pieces, IWL_UCODE_INIT, IWL_UCODE_SECTION_DATA)); |
1154 | 1154 | ||
1155 | /* Verify that uCode images will fit in card's SRAM. */ | 1155 | /* Verify that uCode images will fit in card's SRAM. */ |
1156 | if (get_sec_size(pieces, IWL_UCODE_REGULAR, IWL_UCODE_SECTION_INST) > | 1156 | if (get_sec_size(pieces, IWL_UCODE_REGULAR, IWL_UCODE_SECTION_INST) > |
1157 | cfg->max_inst_size) { | 1157 | cfg->max_inst_size) { |
1158 | IWL_ERR(drv, "uCode instr len %Zd too large to fit in\n", | 1158 | IWL_ERR(drv, "uCode instr len %zd too large to fit in\n", |
1159 | get_sec_size(pieces, IWL_UCODE_REGULAR, | 1159 | get_sec_size(pieces, IWL_UCODE_REGULAR, |
1160 | IWL_UCODE_SECTION_INST)); | 1160 | IWL_UCODE_SECTION_INST)); |
1161 | return -1; | 1161 | return -1; |
@@ -1163,7 +1163,7 @@ static int validate_sec_sizes(struct iwl_drv *drv, | |||
1163 | 1163 | ||
1164 | if (get_sec_size(pieces, IWL_UCODE_REGULAR, IWL_UCODE_SECTION_DATA) > | 1164 | if (get_sec_size(pieces, IWL_UCODE_REGULAR, IWL_UCODE_SECTION_DATA) > |
1165 | cfg->max_data_size) { | 1165 | cfg->max_data_size) { |
1166 | IWL_ERR(drv, "uCode data len %Zd too large to fit in\n", | 1166 | IWL_ERR(drv, "uCode data len %zd too large to fit in\n", |
1167 | get_sec_size(pieces, IWL_UCODE_REGULAR, | 1167 | get_sec_size(pieces, IWL_UCODE_REGULAR, |
1168 | IWL_UCODE_SECTION_DATA)); | 1168 | IWL_UCODE_SECTION_DATA)); |
1169 | return -1; | 1169 | return -1; |
@@ -1171,7 +1171,7 @@ static int validate_sec_sizes(struct iwl_drv *drv, | |||
1171 | 1171 | ||
1172 | if (get_sec_size(pieces, IWL_UCODE_INIT, IWL_UCODE_SECTION_INST) > | 1172 | if (get_sec_size(pieces, IWL_UCODE_INIT, IWL_UCODE_SECTION_INST) > |
1173 | cfg->max_inst_size) { | 1173 | cfg->max_inst_size) { |
1174 | IWL_ERR(drv, "uCode init instr len %Zd too large to fit in\n", | 1174 | IWL_ERR(drv, "uCode init instr len %zd too large to fit in\n", |
1175 | get_sec_size(pieces, IWL_UCODE_INIT, | 1175 | get_sec_size(pieces, IWL_UCODE_INIT, |
1176 | IWL_UCODE_SECTION_INST)); | 1176 | IWL_UCODE_SECTION_INST)); |
1177 | return -1; | 1177 | return -1; |
@@ -1179,7 +1179,7 @@ static int validate_sec_sizes(struct iwl_drv *drv, | |||
1179 | 1179 | ||
1180 | if (get_sec_size(pieces, IWL_UCODE_INIT, IWL_UCODE_SECTION_DATA) > | 1180 | if (get_sec_size(pieces, IWL_UCODE_INIT, IWL_UCODE_SECTION_DATA) > |
1181 | cfg->max_data_size) { | 1181 | cfg->max_data_size) { |
1182 | IWL_ERR(drv, "uCode init data len %Zd too large to fit in\n", | 1182 | IWL_ERR(drv, "uCode init data len %zd too large to fit in\n", |
1183 | get_sec_size(pieces, IWL_UCODE_REGULAR, | 1183 | get_sec_size(pieces, IWL_UCODE_REGULAR, |
1184 | IWL_UCODE_SECTION_DATA)); | 1184 | IWL_UCODE_SECTION_DATA)); |
1185 | return -1; | 1185 | return -1; |
diff --git a/drivers/net/wireless/marvell/mwifiex/wmm.c b/drivers/net/wireless/marvell/mwifiex/wmm.c index 28c2f6fae3e6..e4ff3b973850 100644 --- a/drivers/net/wireless/marvell/mwifiex/wmm.c +++ b/drivers/net/wireless/marvell/mwifiex/wmm.c | |||
@@ -673,8 +673,8 @@ void mwifiex_update_ralist_tx_pause(struct mwifiex_private *priv, u8 *mac, | |||
673 | spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, flags); | 673 | spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, flags); |
674 | } | 674 | } |
675 | 675 | ||
676 | /* This function update non-tdls peer ralist tx_pause while | 676 | /* This function updates non-tdls peer ralist tx_pause while |
677 | * tdls channel swithing | 677 | * tdls channel switching |
678 | */ | 678 | */ |
679 | void mwifiex_update_ralist_tx_pause_in_tdls_cs(struct mwifiex_private *priv, | 679 | void mwifiex_update_ralist_tx_pause_in_tdls_cs(struct mwifiex_private *priv, |
680 | u8 *mac, u8 tx_pause) | 680 | u8 *mac, u8 tx_pause) |
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.c index 1922e78ad6bd..89a0a28b8b20 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.c | |||
@@ -455,7 +455,7 @@ static u32 _rtl92s_fill_h2c_cmd(struct sk_buff *skb, u32 h2cbufferlen, | |||
455 | u8 i = 0; | 455 | u8 i = 0; |
456 | 456 | ||
457 | do { | 457 | do { |
458 | /* 8 - Byte aligment */ | 458 | /* 8 - Byte alignment */ |
459 | len = H2C_TX_CMD_HDR_LEN + N_BYTE_ALIGMENT(pcmd_len[i], 8); | 459 | len = H2C_TX_CMD_HDR_LEN + N_BYTE_ALIGMENT(pcmd_len[i], 8); |
460 | 460 | ||
461 | /* Buffer length is not enough */ | 461 | /* Buffer length is not enough */ |
@@ -504,7 +504,7 @@ static u32 _rtl92s_get_h2c_cmdlen(u32 h2cbufferlen, u32 cmd_num, u32 *pcmd_len) | |||
504 | u8 i = 0; | 504 | u8 i = 0; |
505 | 505 | ||
506 | do { | 506 | do { |
507 | /* 8 - Byte aligment */ | 507 | /* 8 - Byte alignment */ |
508 | len = H2C_TX_CMD_HDR_LEN + N_BYTE_ALIGMENT(pcmd_len[i], 8); | 508 | len = H2C_TX_CMD_HDR_LEN + N_BYTE_ALIGMENT(pcmd_len[i], 8); |
509 | 509 | ||
510 | /* Buffer length is not enough */ | 510 | /* Buffer length is not enough */ |
diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c index ef5d394f185b..cc8deecea8cb 100644 --- a/drivers/net/wireless/rsi/rsi_91x_usb.c +++ b/drivers/net/wireless/rsi/rsi_91x_usb.c | |||
@@ -516,7 +516,7 @@ err: | |||
516 | 516 | ||
517 | /** | 517 | /** |
518 | * rsi_disconnect() - This function performs the reverse of the probe function, | 518 | * rsi_disconnect() - This function performs the reverse of the probe function, |
519 | * it deintialize the driver structure. | 519 | * it deinitialize the driver structure. |
520 | * @pfunction: Pointer to the USB interface structure. | 520 | * @pfunction: Pointer to the USB interface structure. |
521 | * | 521 | * |
522 | * Return: None. | 522 | * Return: None. |
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c index 5bdf7a03e3dd..d1aa3eee0e81 100644 --- a/drivers/net/wireless/ti/wl18xx/main.c +++ b/drivers/net/wireless/ti/wl18xx/main.c | |||
@@ -178,7 +178,7 @@ static struct wlcore_conf wl18xx_conf = { | |||
178 | .sg = { | 178 | .sg = { |
179 | .params = { | 179 | .params = { |
180 | [WL18XX_CONF_SG_PARAM_0] = 0, | 180 | [WL18XX_CONF_SG_PARAM_0] = 0, |
181 | /* Configuartion Parameters */ | 181 | /* Configuration Parameters */ |
182 | [WL18XX_CONF_SG_ANTENNA_CONFIGURATION] = 0, | 182 | [WL18XX_CONF_SG_ANTENNA_CONFIGURATION] = 0, |
183 | [WL18XX_CONF_SG_ZIGBEE_COEX] = 0, | 183 | [WL18XX_CONF_SG_ZIGBEE_COEX] = 0, |
184 | [WL18XX_CONF_SG_TIME_SYNC] = 0, | 184 | [WL18XX_CONF_SG_TIME_SYNC] = 0, |
diff --git a/drivers/net/wireless/ti/wlcore/init.c b/drivers/net/wireless/ti/wlcore/init.c index d0b7734030ef..58898b99d3f7 100644 --- a/drivers/net/wireless/ti/wlcore/init.c +++ b/drivers/net/wireless/ti/wlcore/init.c | |||
@@ -544,7 +544,7 @@ static int wl12xx_init_sta_role(struct wl1271 *wl, struct wl12xx_vif *wlvif) | |||
544 | return 0; | 544 | return 0; |
545 | } | 545 | } |
546 | 546 | ||
547 | /* vif-specific intialization */ | 547 | /* vif-specific initialization */ |
548 | static int wl12xx_init_ap_role(struct wl1271 *wl, struct wl12xx_vif *wlvif) | 548 | static int wl12xx_init_ap_role(struct wl1271 *wl, struct wl12xx_vif *wlvif) |
549 | { | 549 | { |
550 | int ret; | 550 | int ret; |
diff --git a/drivers/nfc/pn533/pn533.c b/drivers/nfc/pn533/pn533.c index d9c55830b2b2..a966c6a85ea8 100644 --- a/drivers/nfc/pn533/pn533.c +++ b/drivers/nfc/pn533/pn533.c | |||
@@ -487,7 +487,7 @@ static int pn533_send_cmd_async(struct pn533 *dev, u8 cmd_code, | |||
487 | /* | 487 | /* |
488 | * pn533_send_cmd_direct_async | 488 | * pn533_send_cmd_direct_async |
489 | * | 489 | * |
490 | * The function sends a piority cmd directly to the chip omiting the cmd | 490 | * The function sends a piority cmd directly to the chip omitting the cmd |
491 | * queue. It's intended to be used by chaining mechanism of received responses | 491 | * queue. It's intended to be used by chaining mechanism of received responses |
492 | * where the host has to request every single chunk of data before scheduling | 492 | * where the host has to request every single chunk of data before scheduling |
493 | * next cmd from the queue. | 493 | * next cmd from the queue. |
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index bc20a2442a04..779f516e7a4e 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c | |||
@@ -1051,7 +1051,7 @@ static int nvme_rdma_post_send(struct nvme_rdma_queue *queue, | |||
1051 | * sequencer is not allocated in our driver's tagset and it's | 1051 | * sequencer is not allocated in our driver's tagset and it's |
1052 | * triggered to be freed by blk_cleanup_queue(). So we need to | 1052 | * triggered to be freed by blk_cleanup_queue(). So we need to |
1053 | * always mark it as signaled to ensure that the "wr_cqe", which is | 1053 | * always mark it as signaled to ensure that the "wr_cqe", which is |
1054 | * embeded in request's payload, is not freed when __ib_process_cq() | 1054 | * embedded in request's payload, is not freed when __ib_process_cq() |
1055 | * calls wr_cqe->done(). | 1055 | * calls wr_cqe->done(). |
1056 | */ | 1056 | */ |
1057 | if ((++queue->sig_count % 32) == 0 || flush) | 1057 | if ((++queue->sig_count % 32) == 0 || flush) |
diff --git a/drivers/parport/ieee1284_ops.c b/drivers/parport/ieee1284_ops.c index c0e7d21c88c2..75071605d22f 100644 --- a/drivers/parport/ieee1284_ops.c +++ b/drivers/parport/ieee1284_ops.c | |||
@@ -307,7 +307,7 @@ size_t parport_ieee1284_read_byte (struct parport *port, | |||
307 | if (parport_read_status (port) & PARPORT_STATUS_ERROR) { | 307 | if (parport_read_status (port) & PARPORT_STATUS_ERROR) { |
308 | end_of_data: | 308 | end_of_data: |
309 | DPRINTK (KERN_DEBUG | 309 | DPRINTK (KERN_DEBUG |
310 | "%s: No more byte data (%Zd bytes)\n", | 310 | "%s: No more byte data (%zd bytes)\n", |
311 | port->name, count); | 311 | port->name, count); |
312 | 312 | ||
313 | /* Go to reverse idle phase. */ | 313 | /* Go to reverse idle phase. */ |
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index 78530d1714dc..3e56e7deab8e 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c | |||
@@ -902,7 +902,7 @@ static size_t parport_pc_ecp_write_block_pio(struct parport *port, | |||
902 | * ****************************************** | 902 | * ****************************************** |
903 | */ | 903 | */ |
904 | 904 | ||
905 | /* GCC is not inlining extern inline function later overwriten to non-inline, | 905 | /* GCC is not inlining extern inline function later overwritten to non-inline, |
906 | so we use outlined_ variants here. */ | 906 | so we use outlined_ variants here. */ |
907 | static const struct parport_operations parport_pc_ops = { | 907 | static const struct parport_operations parport_pc_ops = { |
908 | .write_data = parport_pc_write_data, | 908 | .write_data = parport_pc_write_data, |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index ca77d235867f..f754453fe754 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -3630,7 +3630,7 @@ static int __init pci_apply_final_quirks(void) | |||
3630 | fs_initcall_sync(pci_apply_final_quirks); | 3630 | fs_initcall_sync(pci_apply_final_quirks); |
3631 | 3631 | ||
3632 | /* | 3632 | /* |
3633 | * Followings are device-specific reset methods which can be used to | 3633 | * Following are device-specific reset methods which can be used to |
3634 | * reset a single function if other methods (e.g. FLR, PM D0->D3) are | 3634 | * reset a single function if other methods (e.g. FLR, PM D0->D3) are |
3635 | * not available. | 3635 | * not available. |
3636 | */ | 3636 | */ |
diff --git a/drivers/pinctrl/bcm/Kconfig b/drivers/pinctrl/bcm/Kconfig index 8968dd7aebed..e8c4e4f934a6 100644 --- a/drivers/pinctrl/bcm/Kconfig +++ b/drivers/pinctrl/bcm/Kconfig | |||
@@ -70,7 +70,7 @@ config PINCTRL_CYGNUS_MUX | |||
70 | 70 | ||
71 | The Broadcom Cygnus IOMUX driver supports group based IOMUX | 71 | The Broadcom Cygnus IOMUX driver supports group based IOMUX |
72 | configuration, with the exception that certain individual pins | 72 | configuration, with the exception that certain individual pins |
73 | can be overrided to GPIO function | 73 | can be overridden to GPIO function |
74 | 74 | ||
75 | config PINCTRL_NSP_GPIO | 75 | config PINCTRL_NSP_GPIO |
76 | bool "Broadcom NSP GPIO (with PINCONF) driver" | 76 | bool "Broadcom NSP GPIO (with PINCONF) driver" |
diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c index fa0f19b975a6..974fd684bab2 100644 --- a/drivers/power/avs/smartreflex.c +++ b/drivers/power/avs/smartreflex.c | |||
@@ -195,7 +195,7 @@ static void sr_stop_vddautocomp(struct omap_sr *sr) | |||
195 | } | 195 | } |
196 | 196 | ||
197 | /* | 197 | /* |
198 | * This function handles the intializations which have to be done | 198 | * This function handles the initializations which have to be done |
199 | * only when both sr device and class driver regiter has | 199 | * only when both sr device and class driver regiter has |
200 | * completed. This will be attempted to be called from both sr class | 200 | * completed. This will be attempted to be called from both sr class |
201 | * driver register and sr device intializtion API's. Only one call | 201 | * driver register and sr device intializtion API's. Only one call |
@@ -671,7 +671,7 @@ int sr_register_class(struct omap_sr_class_data *class_data) | |||
671 | sr_class = class_data; | 671 | sr_class = class_data; |
672 | 672 | ||
673 | /* | 673 | /* |
674 | * Call into late init to do intializations that require | 674 | * Call into late init to do initializations that require |
675 | * both sr driver and sr class driver to be initiallized. | 675 | * both sr driver and sr class driver to be initiallized. |
676 | */ | 676 | */ |
677 | list_for_each_entry(sr_info, &sr_list, node) | 677 | list_for_each_entry(sr_info, &sr_list, node) |
@@ -899,7 +899,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) | |||
899 | list_add(&sr_info->node, &sr_list); | 899 | list_add(&sr_info->node, &sr_list); |
900 | 900 | ||
901 | /* | 901 | /* |
902 | * Call into late init to do intializations that require | 902 | * Call into late init to do initializations that require |
903 | * both sr driver and sr class driver to be initiallized. | 903 | * both sr driver and sr class driver to be initiallized. |
904 | */ | 904 | */ |
905 | if (sr_class) { | 905 | if (sr_class) { |
diff --git a/drivers/rapidio/devices/rio_mport_cdev.c b/drivers/rapidio/devices/rio_mport_cdev.c index 9013a585507e..50b617af81bd 100644 --- a/drivers/rapidio/devices/rio_mport_cdev.c +++ b/drivers/rapidio/devices/rio_mport_cdev.c | |||
@@ -889,17 +889,16 @@ rio_dma_transfer(struct file *filp, u32 transfer_mode, | |||
889 | goto err_req; | 889 | goto err_req; |
890 | } | 890 | } |
891 | 891 | ||
892 | down_read(¤t->mm->mmap_sem); | 892 | pinned = get_user_pages_unlocked( |
893 | pinned = get_user_pages( | ||
894 | (unsigned long)xfer->loc_addr & PAGE_MASK, | 893 | (unsigned long)xfer->loc_addr & PAGE_MASK, |
895 | nr_pages, | 894 | nr_pages, |
896 | dir == DMA_FROM_DEVICE ? FOLL_WRITE : 0, | 895 | page_list, |
897 | page_list, NULL); | 896 | dir == DMA_FROM_DEVICE ? FOLL_WRITE : 0); |
898 | up_read(¤t->mm->mmap_sem); | ||
899 | 897 | ||
900 | if (pinned != nr_pages) { | 898 | if (pinned != nr_pages) { |
901 | if (pinned < 0) { | 899 | if (pinned < 0) { |
902 | rmcd_error("get_user_pages err=%ld", pinned); | 900 | rmcd_error("get_user_pages_unlocked err=%ld", |
901 | pinned); | ||
903 | nr_pages = 0; | 902 | nr_pages = 0; |
904 | } else | 903 | } else |
905 | rmcd_error("pinned %ld out of %ld pages", | 904 | rmcd_error("pinned %ld out of %ld pages", |
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 137d22d3a005..838347c44f32 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -1630,7 +1630,7 @@ static int aac_acquire_resources(struct aac_dev *dev) | |||
1630 | 1630 | ||
1631 | if (!dev->sync_mode) { | 1631 | if (!dev->sync_mode) { |
1632 | /* After EEH recovery or suspend resume, max_msix count | 1632 | /* After EEH recovery or suspend resume, max_msix count |
1633 | * may change, therfore updating in init as well. | 1633 | * may change, therefore updating in init as well. |
1634 | */ | 1634 | */ |
1635 | dev->init->r7.no_of_msix_vectors = cpu_to_le32(dev->max_msix); | 1635 | dev->init->r7.no_of_msix_vectors = cpu_to_le32(dev->max_msix); |
1636 | aac_adapter_start(dev); | 1636 | aac_adapter_start(dev); |
diff --git a/drivers/scsi/bfa/bfi_ms.h b/drivers/scsi/bfa/bfi_ms.h index ae5bfe039fcc..ccbd9e31a5de 100644 --- a/drivers/scsi/bfa/bfi_ms.h +++ b/drivers/scsi/bfa/bfi_ms.h | |||
@@ -680,7 +680,7 @@ struct bfi_ioim_req_s { | |||
680 | 680 | ||
681 | /* | 681 | /* |
682 | * SG elements array within the IO request must be double word | 682 | * SG elements array within the IO request must be double word |
683 | * aligned. This aligment is required to optimize SGM setup for the IO. | 683 | * aligned. This alignment is required to optimize SGM setup for the IO. |
684 | */ | 684 | */ |
685 | struct bfi_sge_s sges[BFI_SGE_INLINE_MAX]; | 685 | struct bfi_sge_s sges[BFI_SGE_INLINE_MAX]; |
686 | u8 io_timeout; | 686 | u8 io_timeout; |
diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c index cea57e27e713..656463ff9ccb 100644 --- a/drivers/scsi/fcoe/fcoe_ctlr.c +++ b/drivers/scsi/fcoe/fcoe_ctlr.c | |||
@@ -1387,7 +1387,7 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip, | |||
1387 | /* | 1387 | /* |
1388 | * Actually need to subtract 'sizeof(*mp) - sizeof(*wp)' from 'rlen' | 1388 | * Actually need to subtract 'sizeof(*mp) - sizeof(*wp)' from 'rlen' |
1389 | * before determining max Vx_Port descriptor but a buggy FCF could have | 1389 | * before determining max Vx_Port descriptor but a buggy FCF could have |
1390 | * omited either or both MAC Address and Name Identifier descriptors | 1390 | * omitted either or both MAC Address and Name Identifier descriptors |
1391 | */ | 1391 | */ |
1392 | num_vlink_desc = rlen / sizeof(*vp); | 1392 | num_vlink_desc = rlen / sizeof(*vp); |
1393 | if (num_vlink_desc) | 1393 | if (num_vlink_desc) |
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 835c59c777f2..b29afafc2885 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -9330,7 +9330,7 @@ static pci_ers_result_t ipr_pci_error_detected(struct pci_dev *pdev, | |||
9330 | * ipr_probe_ioa_part2 - Initializes IOAs found in ipr_probe_ioa(..) | 9330 | * ipr_probe_ioa_part2 - Initializes IOAs found in ipr_probe_ioa(..) |
9331 | * @ioa_cfg: ioa cfg struct | 9331 | * @ioa_cfg: ioa cfg struct |
9332 | * | 9332 | * |
9333 | * Description: This is the second phase of adapter intialization | 9333 | * Description: This is the second phase of adapter initialization |
9334 | * This function takes care of initilizing the adapter to the point | 9334 | * This function takes care of initilizing the adapter to the point |
9335 | * where it can accept new commands. | 9335 | * where it can accept new commands. |
9336 | 9336 | ||
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 50cf402dea29..03cb05abc821 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c | |||
@@ -3329,7 +3329,7 @@ static DEVICE_ATTR(lpfc_static_vport, S_IRUGO, | |||
3329 | * @buf: Data buffer. | 3329 | * @buf: Data buffer. |
3330 | * @count: Size of the data buffer. | 3330 | * @count: Size of the data buffer. |
3331 | * | 3331 | * |
3332 | * This function get called when an user write to the lpfc_stat_data_ctrl | 3332 | * This function get called when a user write to the lpfc_stat_data_ctrl |
3333 | * sysfs file. This function parse the command written to the sysfs file | 3333 | * sysfs file. This function parse the command written to the sysfs file |
3334 | * and take appropriate action. These commands are used for controlling | 3334 | * and take appropriate action. These commands are used for controlling |
3335 | * driver statistical data collection. | 3335 | * driver statistical data collection. |
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index d977a472f89f..8e886caf2454 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -4510,7 +4510,7 @@ lpfc_sli4_rb_setup(struct lpfc_hba *phba) | |||
4510 | * @phba: Pointer to HBA context object. | 4510 | * @phba: Pointer to HBA context object. |
4511 | * @sli_mode: sli mode - 2/3 | 4511 | * @sli_mode: sli mode - 2/3 |
4512 | * | 4512 | * |
4513 | * This function is called by the sli intialization code path | 4513 | * This function is called by the sli initialization code path |
4514 | * to issue config_port mailbox command. This function restarts the | 4514 | * to issue config_port mailbox command. This function restarts the |
4515 | * HBA firmware and issues a config_port mailbox command to configure | 4515 | * HBA firmware and issues a config_port mailbox command to configure |
4516 | * the SLI interface in the sli mode specified by sli_mode | 4516 | * the SLI interface in the sli mode specified by sli_mode |
@@ -4650,11 +4650,11 @@ do_prep_failed: | |||
4650 | 4650 | ||
4651 | 4651 | ||
4652 | /** | 4652 | /** |
4653 | * lpfc_sli_hba_setup - SLI intialization function | 4653 | * lpfc_sli_hba_setup - SLI initialization function |
4654 | * @phba: Pointer to HBA context object. | 4654 | * @phba: Pointer to HBA context object. |
4655 | * | 4655 | * |
4656 | * This function is the main SLI intialization function. This function | 4656 | * This function is the main SLI initialization function. This function |
4657 | * is called by the HBA intialization code, HBA reset code and HBA | 4657 | * is called by the HBA initialization code, HBA reset code and HBA |
4658 | * error attention handler code. Caller is not required to hold any | 4658 | * error attention handler code. Caller is not required to hold any |
4659 | * locks. This function issues config_port mailbox command to configure | 4659 | * locks. This function issues config_port mailbox command to configure |
4660 | * the SLI, setup iocb rings and HBQ rings. In the end the function | 4660 | * the SLI, setup iocb rings and HBQ rings. In the end the function |
@@ -6324,11 +6324,11 @@ lpfc_set_host_data(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox) | |||
6324 | } | 6324 | } |
6325 | 6325 | ||
6326 | /** | 6326 | /** |
6327 | * lpfc_sli4_hba_setup - SLI4 device intialization PCI function | 6327 | * lpfc_sli4_hba_setup - SLI4 device initialization PCI function |
6328 | * @phba: Pointer to HBA context object. | 6328 | * @phba: Pointer to HBA context object. |
6329 | * | 6329 | * |
6330 | * This function is the main SLI4 device intialization PCI function. This | 6330 | * This function is the main SLI4 device initialization PCI function. This |
6331 | * function is called by the HBA intialization code, HBA reset code and | 6331 | * function is called by the HBA initialization code, HBA reset code and |
6332 | * HBA error attention handler code. Caller is not required to hold any | 6332 | * HBA error attention handler code. Caller is not required to hold any |
6333 | * locks. | 6333 | * locks. |
6334 | **/ | 6334 | **/ |
@@ -12079,7 +12079,7 @@ lpfc_sli4_sp_handle_els_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq, | |||
12079 | * @phba: Pointer to HBA context object. | 12079 | * @phba: Pointer to HBA context object. |
12080 | * @wcqe: Pointer to work-queue completion queue entry. | 12080 | * @wcqe: Pointer to work-queue completion queue entry. |
12081 | * | 12081 | * |
12082 | * This routine handles slow-path WQ entry comsumed event by invoking the | 12082 | * This routine handles slow-path WQ entry consumed event by invoking the |
12083 | * proper WQ release routine to the slow-path WQ. | 12083 | * proper WQ release routine to the slow-path WQ. |
12084 | **/ | 12084 | **/ |
12085 | static void | 12085 | static void |
@@ -12451,7 +12451,7 @@ lpfc_sli4_fp_handle_fcp_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq, | |||
12451 | * @cq: Pointer to completion queue. | 12451 | * @cq: Pointer to completion queue. |
12452 | * @wcqe: Pointer to work-queue completion queue entry. | 12452 | * @wcqe: Pointer to work-queue completion queue entry. |
12453 | * | 12453 | * |
12454 | * This routine handles an fast-path WQ entry comsumed event by invoking the | 12454 | * This routine handles an fast-path WQ entry consumed event by invoking the |
12455 | * proper WQ release routine to the slow-path WQ. | 12455 | * proper WQ release routine to the slow-path WQ. |
12456 | **/ | 12456 | **/ |
12457 | static void | 12457 | static void |
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c index 02fe1c4aae2f..bdffb692bded 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c +++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c | |||
@@ -1925,7 +1925,7 @@ mpt3sas_send_diag_release(struct MPT3SAS_ADAPTER *ioc, u8 buffer_type, | |||
1925 | * | 1925 | * |
1926 | * This allows ownership of the specified buffer to returned to the driver, | 1926 | * This allows ownership of the specified buffer to returned to the driver, |
1927 | * allowing an application to read the buffer without fear that firmware is | 1927 | * allowing an application to read the buffer without fear that firmware is |
1928 | * overwritting information in the buffer. | 1928 | * overwriting information in the buffer. |
1929 | */ | 1929 | */ |
1930 | static long | 1930 | static long |
1931 | _ctl_diag_release(struct MPT3SAS_ADAPTER *ioc, void __user *arg) | 1931 | _ctl_diag_release(struct MPT3SAS_ADAPTER *ioc, void __user *arg) |
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.h b/drivers/scsi/mpt3sas/mpt3sas_ctl.h index f3e17a8c1b07..a44046cff0f3 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.h +++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.h | |||
@@ -390,7 +390,7 @@ struct mpt3_diag_query { | |||
390 | * | 390 | * |
391 | * This allows ownership of the specified buffer to returned to the driver, | 391 | * This allows ownership of the specified buffer to returned to the driver, |
392 | * allowing an application to read the buffer without fear that firmware is | 392 | * allowing an application to read the buffer without fear that firmware is |
393 | * overwritting information in the buffer. | 393 | * overwriting information in the buffer. |
394 | */ | 394 | */ |
395 | struct mpt3_diag_release { | 395 | struct mpt3_diag_release { |
396 | struct mpt3_ioctl_header hdr; | 396 | struct mpt3_ioctl_header hdr; |
diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c index 30b905080c61..6903f03c88af 100644 --- a/drivers/scsi/osd/osd_initiator.c +++ b/drivers/scsi/osd/osd_initiator.c | |||
@@ -1290,7 +1290,7 @@ int osd_req_add_get_attr_list(struct osd_request *or, | |||
1290 | or->enc_get_attr.total_bytes = total_bytes; | 1290 | or->enc_get_attr.total_bytes = total_bytes; |
1291 | 1291 | ||
1292 | OSD_DEBUG( | 1292 | OSD_DEBUG( |
1293 | "get_attr.total_bytes=%u(%u) enc_get_attr.total_bytes=%u(%Zu)\n", | 1293 | "get_attr.total_bytes=%u(%u) enc_get_attr.total_bytes=%u(%zu)\n", |
1294 | or->get_attr.total_bytes, | 1294 | or->get_attr.total_bytes, |
1295 | or->get_attr.total_bytes - _osd_req_sizeof_alist_header(or), | 1295 | or->get_attr.total_bytes - _osd_req_sizeof_alist_header(or), |
1296 | or->enc_get_attr.total_bytes, | 1296 | or->enc_get_attr.total_bytes, |
@@ -1677,7 +1677,7 @@ int osd_finalize_request(struct osd_request *or, | |||
1677 | } | 1677 | } |
1678 | } else { | 1678 | } else { |
1679 | /* TODO: I think that for the GET_ATTR command these 2 should | 1679 | /* TODO: I think that for the GET_ATTR command these 2 should |
1680 | * be reversed to keep them in execution order (for embeded | 1680 | * be reversed to keep them in execution order (for embedded |
1681 | * targets with low memory footprint) | 1681 | * targets with low memory footprint) |
1682 | */ | 1682 | */ |
1683 | ret = _osd_req_finalize_set_attr_list(or); | 1683 | ret = _osd_req_finalize_set_attr_list(or); |
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index 451de6c5e3c9..75ac662793a3 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c | |||
@@ -3435,7 +3435,7 @@ static ssize_t osst_write(struct file * filp, const char __user * buf, size_t co | |||
3435 | 3435 | ||
3436 | /* Write must be integral number of blocks */ | 3436 | /* Write must be integral number of blocks */ |
3437 | if (STp->block_size != 0 && (count % STp->block_size) != 0) { | 3437 | if (STp->block_size != 0 && (count % STp->block_size) != 0) { |
3438 | printk(KERN_ERR "%s:E: Write (%Zd bytes) not multiple of tape block size (%d%c).\n", | 3438 | printk(KERN_ERR "%s:E: Write (%zd bytes) not multiple of tape block size (%d%c).\n", |
3439 | name, count, STp->block_size<1024? | 3439 | name, count, STp->block_size<1024? |
3440 | STp->block_size:STp->block_size/1024, STp->block_size<1024?'b':'k'); | 3440 | STp->block_size:STp->block_size/1024, STp->block_size<1024?'b':'k'); |
3441 | retval = (-EINVAL); | 3441 | retval = (-EINVAL); |
@@ -3756,7 +3756,7 @@ static ssize_t osst_read(struct file * filp, char __user * buf, size_t count, lo | |||
3756 | 3756 | ||
3757 | if ((count % STp->block_size) != 0) { | 3757 | if ((count % STp->block_size) != 0) { |
3758 | printk(KERN_WARNING | 3758 | printk(KERN_WARNING |
3759 | "%s:W: Read (%Zd bytes) not multiple of tape block size (%d%c).\n", name, count, | 3759 | "%s:W: Read (%zd bytes) not multiple of tape block size (%d%c).\n", name, count, |
3760 | STp->block_size<1024?STp->block_size:STp->block_size/1024, STp->block_size<1024?'b':'k'); | 3760 | STp->block_size<1024?STp->block_size:STp->block_size/1024, STp->block_size<1024?'b':'k'); |
3761 | } | 3761 | } |
3762 | 3762 | ||
@@ -3815,7 +3815,7 @@ static ssize_t osst_read(struct file * filp, char __user * buf, size_t count, lo | |||
3815 | 3815 | ||
3816 | if (transfer == 0) { | 3816 | if (transfer == 0) { |
3817 | printk(KERN_WARNING | 3817 | printk(KERN_WARNING |
3818 | "%s:W: Nothing can be transferred, requested %Zd, tape block size (%d%c).\n", | 3818 | "%s:W: Nothing can be transferred, requested %zd, tape block size (%d%c).\n", |
3819 | name, count, STp->block_size < 1024? | 3819 | name, count, STp->block_size < 1024? |
3820 | STp->block_size:STp->block_size/1024, | 3820 | STp->block_size:STp->block_size/1024, |
3821 | STp->block_size<1024?'b':'k'); | 3821 | STp->block_size<1024?'b':'k'); |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 7b6317c8c2e9..265e1395bdb8 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -5669,7 +5669,7 @@ qla2x00_load_risc(scsi_qla_host_t *vha, uint32_t *srisc_addr) | |||
5669 | /* Validate firmware image by checking version. */ | 5669 | /* Validate firmware image by checking version. */ |
5670 | if (blob->fw->size < 8 * sizeof(uint16_t)) { | 5670 | if (blob->fw->size < 8 * sizeof(uint16_t)) { |
5671 | ql_log(ql_log_fatal, vha, 0x0085, | 5671 | ql_log(ql_log_fatal, vha, 0x0085, |
5672 | "Unable to verify integrity of firmware image (%Zd).\n", | 5672 | "Unable to verify integrity of firmware image (%zd).\n", |
5673 | blob->fw->size); | 5673 | blob->fw->size); |
5674 | goto fail_fw_integrity; | 5674 | goto fail_fw_integrity; |
5675 | } | 5675 | } |
@@ -5697,7 +5697,7 @@ qla2x00_load_risc(scsi_qla_host_t *vha, uint32_t *srisc_addr) | |||
5697 | if (blob->fw->size < fwclen) { | 5697 | if (blob->fw->size < fwclen) { |
5698 | ql_log(ql_log_fatal, vha, 0x0088, | 5698 | ql_log(ql_log_fatal, vha, 0x0088, |
5699 | "Unable to verify integrity of firmware image " | 5699 | "Unable to verify integrity of firmware image " |
5700 | "(%Zd).\n", blob->fw->size); | 5700 | "(%zd).\n", blob->fw->size); |
5701 | goto fail_fw_integrity; | 5701 | goto fail_fw_integrity; |
5702 | } | 5702 | } |
5703 | 5703 | ||
@@ -5778,7 +5778,7 @@ qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr) | |||
5778 | /* Validate firmware image by checking version. */ | 5778 | /* Validate firmware image by checking version. */ |
5779 | if (blob->fw->size < 8 * sizeof(uint32_t)) { | 5779 | if (blob->fw->size < 8 * sizeof(uint32_t)) { |
5780 | ql_log(ql_log_fatal, vha, 0x0093, | 5780 | ql_log(ql_log_fatal, vha, 0x0093, |
5781 | "Unable to verify integrity of firmware image (%Zd).\n", | 5781 | "Unable to verify integrity of firmware image (%zd).\n", |
5782 | blob->fw->size); | 5782 | blob->fw->size); |
5783 | return QLA_FUNCTION_FAILED; | 5783 | return QLA_FUNCTION_FAILED; |
5784 | } | 5784 | } |
@@ -5789,7 +5789,7 @@ qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr) | |||
5789 | (dcode[0] == 0 && dcode[1] == 0 && dcode[2] == 0 && | 5789 | (dcode[0] == 0 && dcode[1] == 0 && dcode[2] == 0 && |
5790 | dcode[3] == 0)) { | 5790 | dcode[3] == 0)) { |
5791 | ql_log(ql_log_fatal, vha, 0x0094, | 5791 | ql_log(ql_log_fatal, vha, 0x0094, |
5792 | "Unable to verify integrity of firmware image (%Zd).\n", | 5792 | "Unable to verify integrity of firmware image (%zd).\n", |
5793 | blob->fw->size); | 5793 | blob->fw->size); |
5794 | ql_log(ql_log_fatal, vha, 0x0095, | 5794 | ql_log(ql_log_fatal, vha, 0x0095, |
5795 | "Firmware data: %08x %08x %08x %08x.\n", | 5795 | "Firmware data: %08x %08x %08x %08x.\n", |
@@ -5807,7 +5807,7 @@ qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr) | |||
5807 | if (blob->fw->size < fwclen) { | 5807 | if (blob->fw->size < fwclen) { |
5808 | ql_log(ql_log_fatal, vha, 0x0096, | 5808 | ql_log(ql_log_fatal, vha, 0x0096, |
5809 | "Unable to verify integrity of firmware image " | 5809 | "Unable to verify integrity of firmware image " |
5810 | "(%Zd).\n", blob->fw->size); | 5810 | "(%zd).\n", blob->fw->size); |
5811 | return QLA_FUNCTION_FAILED; | 5811 | return QLA_FUNCTION_FAILED; |
5812 | } | 5812 | } |
5813 | 5813 | ||
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index f94535130a34..cdbb293aca08 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c | |||
@@ -1475,7 +1475,7 @@ static void sas_end_device_release(struct device *dev) | |||
1475 | } | 1475 | } |
1476 | 1476 | ||
1477 | /** | 1477 | /** |
1478 | * sas_rphy_initialize - common rphy intialization | 1478 | * sas_rphy_initialize - common rphy initialization |
1479 | * @rphy: rphy to initialise | 1479 | * @rphy: rphy to initialise |
1480 | * | 1480 | * |
1481 | * Used by both sas_end_device_alloc() and sas_expander_alloc() to | 1481 | * Used by both sas_end_device_alloc() and sas_expander_alloc() to |
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 585e54f6512c..638e5f427c90 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c | |||
@@ -280,7 +280,7 @@ static const struct vmstor_protocol vmstor_protocols[] = { | |||
280 | 280 | ||
281 | 281 | ||
282 | /* | 282 | /* |
283 | * This structure is sent during the intialization phase to get the different | 283 | * This structure is sent during the initialization phase to get the different |
284 | * properties of the channel. | 284 | * properties of the channel. |
285 | */ | 285 | */ |
286 | 286 | ||
diff --git a/drivers/staging/gs_fpgaboot/gs_fpgaboot.h b/drivers/staging/gs_fpgaboot/gs_fpgaboot.h index 7b8cc3a25214..cd1eb2c4c940 100644 --- a/drivers/staging/gs_fpgaboot/gs_fpgaboot.h +++ b/drivers/staging/gs_fpgaboot/gs_fpgaboot.h | |||
@@ -39,7 +39,7 @@ struct fpgaimage { | |||
39 | const struct firmware *fw_entry; | 39 | const struct firmware *fw_entry; |
40 | 40 | ||
41 | /* | 41 | /* |
42 | * the followings can be read from bitstream, | 42 | * the following can be read from bitstream, |
43 | * but other image format should have as well | 43 | * but other image format should have as well |
44 | */ | 44 | */ |
45 | char filename[MAX_STR]; | 45 | char filename[MAX_STR]; |
diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h index b0eb80d70c23..60b827eeefe2 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | |||
@@ -1704,7 +1704,7 @@ struct ost_lvb { | |||
1704 | * lquota data structures | 1704 | * lquota data structures |
1705 | */ | 1705 | */ |
1706 | 1706 | ||
1707 | /* The lquota_id structure is an union of all the possible identifier types that | 1707 | /* The lquota_id structure is a union of all the possible identifier types that |
1708 | * can be used with quota, this includes: | 1708 | * can be used with quota, this includes: |
1709 | * - 64-bit user ID | 1709 | * - 64-bit user ID |
1710 | * - 64-bit group ID | 1710 | * - 64-bit group ID |
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 0d247058bce4..097147071df0 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h | |||
@@ -1953,7 +1953,7 @@ struct ieee80211_device { | |||
1953 | 1953 | ||
1954 | /* ask to the driver to retune the radio . | 1954 | /* ask to the driver to retune the radio . |
1955 | * This function can sleep. the driver should ensure | 1955 | * This function can sleep. the driver should ensure |
1956 | * the radio has been swithced before return. | 1956 | * the radio has been switched before return. |
1957 | */ | 1957 | */ |
1958 | void (*set_chan)(struct net_device *dev, short ch); | 1958 | void (*set_chan)(struct net_device *dev, short ch); |
1959 | 1959 | ||
@@ -1964,7 +1964,7 @@ struct ieee80211_device { | |||
1964 | * The syncro version is similar to the start_scan but | 1964 | * The syncro version is similar to the start_scan but |
1965 | * does not return until all channels has been scanned. | 1965 | * does not return until all channels has been scanned. |
1966 | * this is called in user context and should sleep, | 1966 | * this is called in user context and should sleep, |
1967 | * it is called in a work_queue when swithcing to ad-hoc mode | 1967 | * it is called in a work_queue when switching to ad-hoc mode |
1968 | * or in behalf of iwlist scan when the card is associated | 1968 | * or in behalf of iwlist scan when the card is associated |
1969 | * and root user ask for a scan. | 1969 | * and root user ask for a scan. |
1970 | * the function stop_scan should stop both the syncro and | 1970 | * the function stop_scan should stop both the syncro and |
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index 1bff0e91cc0c..0ea90aae4283 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | |||
@@ -2364,7 +2364,7 @@ static void ieee80211_start_ibss_wq(struct work_struct *work) | |||
2364 | // if((IS_DOT11D_ENABLE(ieee)) && (ieee->state == IEEE80211_NOLINK)) | 2364 | // if((IS_DOT11D_ENABLE(ieee)) && (ieee->state == IEEE80211_NOLINK)) |
2365 | if (ieee->state == IEEE80211_NOLINK) | 2365 | if (ieee->state == IEEE80211_NOLINK) |
2366 | ieee->current_network.channel = 6; | 2366 | ieee->current_network.channel = 6; |
2367 | /* if not then the state is not linked. Maybe the user swithced to | 2367 | /* if not then the state is not linked. Maybe the user switched to |
2368 | * ad-hoc mode just after being in monitor mode, or just after | 2368 | * ad-hoc mode just after being in monitor mode, or just after |
2369 | * being very few time in managed mode (so the card have had no | 2369 | * being very few time in managed mode (so the card have had no |
2370 | * time to scan all the chans..) or we have just run up the iface | 2370 | * time to scan all the chans..) or we have just run up the iface |
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index 1dc8627e65b0..cb0b7ca36b1e 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | |||
@@ -1875,8 +1875,8 @@ vchiq_arm_init_state(VCHIQ_STATE_T *state, VCHIQ_ARM_STATE_T *arm_state) | |||
1875 | ** | 1875 | ** |
1876 | ** VC_RESUME_IDLE - Initialise the resume completion at the same time. The | 1876 | ** VC_RESUME_IDLE - Initialise the resume completion at the same time. The |
1877 | ** resume completion is in it's 'done' state whenever | 1877 | ** resume completion is in it's 'done' state whenever |
1878 | ** videcore is running. Therfore, the VC_RESUME_IDLE state | 1878 | ** videcore is running. Therefore, the VC_RESUME_IDLE |
1879 | ** implies that videocore is suspended. | 1879 | ** state implies that videocore is suspended. |
1880 | ** Hence, any thread which needs to wait until videocore is | 1880 | ** Hence, any thread which needs to wait until videocore is |
1881 | ** running can wait on this completion - it will only block | 1881 | ** running can wait on this completion - it will only block |
1882 | ** if videocore is suspended. | 1882 | ** if videocore is suspended. |
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 9ab43935869e..2eebc6215cac 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c | |||
@@ -213,7 +213,7 @@ static void deinit_irq(struct net_device *dev) | |||
213 | vif = netdev_priv(dev); | 213 | vif = netdev_priv(dev); |
214 | wilc = vif->wilc; | 214 | wilc = vif->wilc; |
215 | 215 | ||
216 | /* Deintialize IRQ */ | 216 | /* Deinitialize IRQ */ |
217 | if (wilc->dev_irq_num) { | 217 | if (wilc->dev_irq_num) { |
218 | free_irq(wilc->dev_irq_num, wilc); | 218 | free_irq(wilc->dev_irq_num, wilc); |
219 | gpio_free(wilc->gpio); | 219 | gpio_free(wilc->gpio); |
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index f7ce47cac2aa..7961d1c56847 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | |||
@@ -2357,7 +2357,7 @@ int wilc_deinit_host_int(struct net_device *net) | |||
2357 | del_timer_sync(&wilc_during_ip_timer); | 2357 | del_timer_sync(&wilc_during_ip_timer); |
2358 | 2358 | ||
2359 | if (s32Error) | 2359 | if (s32Error) |
2360 | netdev_err(net, "Error while deintializing host interface\n"); | 2360 | netdev_err(net, "Error while deinitializing host interface\n"); |
2361 | 2361 | ||
2362 | return s32Error; | 2362 | return s32Error; |
2363 | } | 2363 | } |
diff --git a/drivers/tty/n_hdlc.c b/drivers/tty/n_hdlc.c index eb278832f5ce..1bacbc3b19a0 100644 --- a/drivers/tty/n_hdlc.c +++ b/drivers/tty/n_hdlc.c | |||
@@ -667,7 +667,7 @@ static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file, | |||
667 | struct n_hdlc_buf *tbuf; | 667 | struct n_hdlc_buf *tbuf; |
668 | 668 | ||
669 | if (debuglevel >= DEBUG_LEVEL_INFO) | 669 | if (debuglevel >= DEBUG_LEVEL_INFO) |
670 | printk("%s(%d)n_hdlc_tty_write() called count=%Zd\n", | 670 | printk("%s(%d)n_hdlc_tty_write() called count=%zd\n", |
671 | __FILE__,__LINE__,count); | 671 | __FILE__,__LINE__,count); |
672 | 672 | ||
673 | /* Verify pointers */ | 673 | /* Verify pointers */ |
diff --git a/drivers/tty/serial/ioc4_serial.c b/drivers/tty/serial/ioc4_serial.c index 6ad26f802b51..f96bcf9bee25 100644 --- a/drivers/tty/serial/ioc4_serial.c +++ b/drivers/tty/serial/ioc4_serial.c | |||
@@ -210,7 +210,7 @@ | |||
210 | #define IOC4_SSCR_PAUSE_STATE 0x40000000 /* Sets when PAUSE takes effect */ | 210 | #define IOC4_SSCR_PAUSE_STATE 0x40000000 /* Sets when PAUSE takes effect */ |
211 | #define IOC4_SSCR_RESET 0x80000000 /* Reset DMA channels */ | 211 | #define IOC4_SSCR_RESET 0x80000000 /* Reset DMA channels */ |
212 | 212 | ||
213 | /* All producer/comsumer pointers are the same bitfield */ | 213 | /* All producer/consumer pointers are the same bitfield */ |
214 | #define IOC4_PROD_CONS_PTR_4K 0x00000ff8 /* For 4K buffers */ | 214 | #define IOC4_PROD_CONS_PTR_4K 0x00000ff8 /* For 4K buffers */ |
215 | #define IOC4_PROD_CONS_PTR_1K 0x000003f8 /* For 1K buffers */ | 215 | #define IOC4_PROD_CONS_PTR_1K 0x000003f8 /* For 1K buffers */ |
216 | #define IOC4_PROD_CONS_PTR_OFF 3 | 216 | #define IOC4_PROD_CONS_PTR_OFF 3 |
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 52747b6ac89a..ca425e8099ea 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c | |||
@@ -2335,7 +2335,7 @@ static int proc_drop_privileges(struct usb_dev_state *ps, void __user *arg) | |||
2335 | if (copy_from_user(&data, arg, sizeof(data))) | 2335 | if (copy_from_user(&data, arg, sizeof(data))) |
2336 | return -EFAULT; | 2336 | return -EFAULT; |
2337 | 2337 | ||
2338 | /* This is an one way operation. Once privileges are | 2338 | /* This is a one way operation. Once privileges are |
2339 | * dropped, you cannot regain them. You may however reissue | 2339 | * dropped, you cannot regain them. You may however reissue |
2340 | * this ioctl to shrink the allowed interfaces mask. | 2340 | * this ioctl to shrink the allowed interfaces mask. |
2341 | */ | 2341 | */ |
diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c index 6bde4396927c..a2615d64d07c 100644 --- a/drivers/usb/gadget/legacy/inode.c +++ b/drivers/usb/gadget/legacy/inode.c | |||
@@ -1848,7 +1848,7 @@ dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr) | |||
1848 | 1848 | ||
1849 | fail: | 1849 | fail: |
1850 | spin_unlock_irq (&dev->lock); | 1850 | spin_unlock_irq (&dev->lock); |
1851 | pr_debug ("%s: %s fail %Zd, %p\n", shortname, __func__, value, dev); | 1851 | pr_debug ("%s: %s fail %zd, %p\n", shortname, __func__, value, dev); |
1852 | kfree (dev->buf); | 1852 | kfree (dev->buf); |
1853 | dev->buf = NULL; | 1853 | dev->buf = NULL; |
1854 | return value; | 1854 | return value; |
diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c index 2e41ef36b944..b76fcdb763a0 100644 --- a/drivers/usb/gadget/udc/fsl_udc_core.c +++ b/drivers/usb/gadget/udc/fsl_udc_core.c | |||
@@ -520,7 +520,7 @@ static void struct_ep_qh_setup(struct fsl_udc *udc, unsigned char ep_num, | |||
520 | /* Setup qh structure and ep register for ep0. */ | 520 | /* Setup qh structure and ep register for ep0. */ |
521 | static void ep0_setup(struct fsl_udc *udc) | 521 | static void ep0_setup(struct fsl_udc *udc) |
522 | { | 522 | { |
523 | /* the intialization of an ep includes: fields in QH, Regs, | 523 | /* the initialization of an ep includes: fields in QH, Regs, |
524 | * fsl_ep struct */ | 524 | * fsl_ep struct */ |
525 | struct_ep_qh_setup(udc, 0, USB_RECV, USB_ENDPOINT_XFER_CONTROL, | 525 | struct_ep_qh_setup(udc, 0, USB_RECV, USB_ENDPOINT_XFER_CONTROL, |
526 | USB_MAX_CTRL_PAYLOAD, 0, 0); | 526 | USB_MAX_CTRL_PAYLOAD, 0, 0); |
@@ -2349,7 +2349,7 @@ static int struct_ep_setup(struct fsl_udc *udc, unsigned char index, | |||
2349 | } | 2349 | } |
2350 | 2350 | ||
2351 | /* Driver probe function | 2351 | /* Driver probe function |
2352 | * all intialization operations implemented here except enabling usb_intr reg | 2352 | * all initialization operations implemented here except enabling usb_intr reg |
2353 | * board setup should have been done in the platform code | 2353 | * board setup should have been done in the platform code |
2354 | */ | 2354 | */ |
2355 | static int fsl_udc_probe(struct platform_device *pdev) | 2355 | static int fsl_udc_probe(struct platform_device *pdev) |
diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c index fb8fc34827ab..2218f91e92a6 100644 --- a/drivers/usb/gadget/udc/renesas_usb3.c +++ b/drivers/usb/gadget/udc/renesas_usb3.c | |||
@@ -1791,7 +1791,7 @@ static int renesas_usb3_init_ep(struct renesas_usb3 *usb3, struct device *dev, | |||
1791 | 1791 | ||
1792 | dev_dbg(dev, "%s: num_usb3_eps = %d\n", __func__, usb3->num_usb3_eps); | 1792 | dev_dbg(dev, "%s: num_usb3_eps = %d\n", __func__, usb3->num_usb3_eps); |
1793 | /* | 1793 | /* |
1794 | * This driver prepares pipes as the followings: | 1794 | * This driver prepares pipes as follows: |
1795 | * - odd pipes = IN pipe | 1795 | * - odd pipes = IN pipe |
1796 | * - even pipes = OUT pipe (except pipe 0) | 1796 | * - even pipes = OUT pipe (except pipe 0) |
1797 | */ | 1797 | */ |
@@ -1841,7 +1841,7 @@ static void renesas_usb3_init_ram(struct renesas_usb3 *usb3, struct device *dev, | |||
1841 | memset(basead, 0, sizeof(basead)); | 1841 | memset(basead, 0, sizeof(basead)); |
1842 | 1842 | ||
1843 | /* | 1843 | /* |
1844 | * This driver prepares pipes as the followings: | 1844 | * This driver prepares pipes as follows: |
1845 | * - all pipes = the same size as "ramsize_per_pipe" | 1845 | * - all pipes = the same size as "ramsize_per_pipe" |
1846 | * Please refer to the "Method of Specifying RAM Mapping" | 1846 | * Please refer to the "Method of Specifying RAM Mapping" |
1847 | */ | 1847 | */ |
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 063064801ceb..ac2c4eab478d 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -1322,7 +1322,7 @@ static int __init ehci_hcd_init(void) | |||
1322 | printk(KERN_WARNING "Warning! ehci_hcd should always be loaded" | 1322 | printk(KERN_WARNING "Warning! ehci_hcd should always be loaded" |
1323 | " before uhci_hcd and ohci_hcd, not after\n"); | 1323 | " before uhci_hcd and ohci_hcd, not after\n"); |
1324 | 1324 | ||
1325 | pr_debug("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n", | 1325 | pr_debug("%s: block sizes: qh %zd qtd %zd itd %zd sitd %zd\n", |
1326 | hcd_name, | 1326 | hcd_name, |
1327 | sizeof(struct ehci_qh), sizeof(struct ehci_qtd), | 1327 | sizeof(struct ehci_qh), sizeof(struct ehci_qtd), |
1328 | sizeof(struct ehci_itd), sizeof(struct ehci_sitd)); | 1328 | sizeof(struct ehci_itd), sizeof(struct ehci_sitd)); |
diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c index 9d0b0518290a..1c5b34b74860 100644 --- a/drivers/usb/host/fotg210-hcd.c +++ b/drivers/usb/host/fotg210-hcd.c | |||
@@ -5697,7 +5697,7 @@ static int __init fotg210_hcd_init(void) | |||
5697 | test_bit(USB_OHCI_LOADED, &usb_hcds_loaded)) | 5697 | test_bit(USB_OHCI_LOADED, &usb_hcds_loaded)) |
5698 | pr_warn("Warning! fotg210_hcd should always be loaded before uhci_hcd and ohci_hcd, not after\n"); | 5698 | pr_warn("Warning! fotg210_hcd should always be loaded before uhci_hcd and ohci_hcd, not after\n"); |
5699 | 5699 | ||
5700 | pr_debug("%s: block sizes: qh %Zd qtd %Zd itd %Zd\n", | 5700 | pr_debug("%s: block sizes: qh %zd qtd %zd itd %zd\n", |
5701 | hcd_name, sizeof(struct fotg210_qh), | 5701 | hcd_name, sizeof(struct fotg210_qh), |
5702 | sizeof(struct fotg210_qtd), | 5702 | sizeof(struct fotg210_qtd), |
5703 | sizeof(struct fotg210_itd)); | 5703 | sizeof(struct fotg210_itd)); |
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 8685cf3e6292..b6daf2e69989 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
@@ -1252,7 +1252,7 @@ static int __init ohci_hcd_mod_init(void) | |||
1252 | return -ENODEV; | 1252 | return -ENODEV; |
1253 | 1253 | ||
1254 | printk(KERN_INFO "%s: " DRIVER_DESC "\n", hcd_name); | 1254 | printk(KERN_INFO "%s: " DRIVER_DESC "\n", hcd_name); |
1255 | pr_debug ("%s: block sizes: ed %Zd td %Zd\n", hcd_name, | 1255 | pr_debug ("%s: block sizes: ed %zd td %zd\n", hcd_name, |
1256 | sizeof (struct ed), sizeof (struct td)); | 1256 | sizeof (struct ed), sizeof (struct td)); |
1257 | set_bit(USB_OHCI_LOADED, &usb_hcds_loaded); | 1257 | set_bit(USB_OHCI_LOADED, &usb_hcds_loaded); |
1258 | 1258 | ||
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c index a540e4f206c4..c5fa584d8f0a 100644 --- a/drivers/usb/misc/adutux.c +++ b/drivers/usb/misc/adutux.c | |||
@@ -563,20 +563,20 @@ static ssize_t adu_write(struct file *file, const __user char *buffer, | |||
563 | } | 563 | } |
564 | 564 | ||
565 | dev_dbg(&dev->udev->dev, | 565 | dev_dbg(&dev->udev->dev, |
566 | "%s : in progress, count = %Zd\n", | 566 | "%s : in progress, count = %zd\n", |
567 | __func__, count); | 567 | __func__, count); |
568 | } else { | 568 | } else { |
569 | spin_unlock_irqrestore(&dev->buflock, flags); | 569 | spin_unlock_irqrestore(&dev->buflock, flags); |
570 | set_current_state(TASK_RUNNING); | 570 | set_current_state(TASK_RUNNING); |
571 | remove_wait_queue(&dev->write_wait, &waita); | 571 | remove_wait_queue(&dev->write_wait, &waita); |
572 | dev_dbg(&dev->udev->dev, "%s : sending, count = %Zd\n", | 572 | dev_dbg(&dev->udev->dev, "%s : sending, count = %zd\n", |
573 | __func__, count); | 573 | __func__, count); |
574 | 574 | ||
575 | /* write the data into interrupt_out_buffer from userspace */ | 575 | /* write the data into interrupt_out_buffer from userspace */ |
576 | buffer_size = usb_endpoint_maxp(dev->interrupt_out_endpoint); | 576 | buffer_size = usb_endpoint_maxp(dev->interrupt_out_endpoint); |
577 | bytes_to_write = count > buffer_size ? buffer_size : count; | 577 | bytes_to_write = count > buffer_size ? buffer_size : count; |
578 | dev_dbg(&dev->udev->dev, | 578 | dev_dbg(&dev->udev->dev, |
579 | "%s : buffer_size = %Zd, count = %Zd, bytes_to_write = %Zd\n", | 579 | "%s : buffer_size = %zd, count = %zd, bytes_to_write = %zd\n", |
580 | __func__, buffer_size, count, bytes_to_write); | 580 | __func__, buffer_size, count, bytes_to_write); |
581 | 581 | ||
582 | if (copy_from_user(dev->interrupt_out_buffer, buffer, bytes_to_write) != 0) { | 582 | if (copy_from_user(dev->interrupt_out_buffer, buffer, bytes_to_write) != 0) { |
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c index b10e26c74a90..322a042d6e59 100644 --- a/drivers/usb/misc/legousbtower.c +++ b/drivers/usb/misc/legousbtower.c | |||
@@ -673,7 +673,7 @@ static ssize_t tower_write (struct file *file, const char __user *buffer, size_t | |||
673 | 673 | ||
674 | /* write the data into interrupt_out_buffer from userspace */ | 674 | /* write the data into interrupt_out_buffer from userspace */ |
675 | bytes_to_write = min_t(int, count, write_buffer_size); | 675 | bytes_to_write = min_t(int, count, write_buffer_size); |
676 | dev_dbg(&dev->udev->dev, "%s: count = %Zd, bytes_to_write = %Zd\n", | 676 | dev_dbg(&dev->udev->dev, "%s: count = %zd, bytes_to_write = %zd\n", |
677 | __func__, count, bytes_to_write); | 677 | __func__, count, bytes_to_write); |
678 | 678 | ||
679 | if (copy_from_user (dev->interrupt_out_buffer, buffer, bytes_to_write)) { | 679 | if (copy_from_user (dev->interrupt_out_buffer, buffer, bytes_to_write)) { |
diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c index 356d312add57..0a643fa74cab 100644 --- a/drivers/usb/misc/uss720.c +++ b/drivers/usb/misc/uss720.c | |||
@@ -526,7 +526,7 @@ static size_t parport_uss720_epp_write_data(struct parport *pp, const void *buf, | |||
526 | return 0; | 526 | return 0; |
527 | i = usb_bulk_msg(usbdev, usb_sndbulkpipe(usbdev, 1), (void *)buf, length, &rlen, 20000); | 527 | i = usb_bulk_msg(usbdev, usb_sndbulkpipe(usbdev, 1), (void *)buf, length, &rlen, 20000); |
528 | if (i) | 528 | if (i) |
529 | printk(KERN_ERR "uss720: sendbulk ep 1 buf %p len %Zu rlen %u\n", buf, length, rlen); | 529 | printk(KERN_ERR "uss720: sendbulk ep 1 buf %p len %zu rlen %u\n", buf, length, rlen); |
530 | change_mode(pp, ECR_PS2); | 530 | change_mode(pp, ECR_PS2); |
531 | return rlen; | 531 | return rlen; |
532 | #endif | 532 | #endif |
@@ -587,7 +587,7 @@ static size_t parport_uss720_ecp_write_data(struct parport *pp, const void *buff | |||
587 | return 0; | 587 | return 0; |
588 | i = usb_bulk_msg(usbdev, usb_sndbulkpipe(usbdev, 1), (void *)buffer, len, &rlen, 20000); | 588 | i = usb_bulk_msg(usbdev, usb_sndbulkpipe(usbdev, 1), (void *)buffer, len, &rlen, 20000); |
589 | if (i) | 589 | if (i) |
590 | printk(KERN_ERR "uss720: sendbulk ep 1 buf %p len %Zu rlen %u\n", buffer, len, rlen); | 590 | printk(KERN_ERR "uss720: sendbulk ep 1 buf %p len %zu rlen %u\n", buffer, len, rlen); |
591 | change_mode(pp, ECR_PS2); | 591 | change_mode(pp, ECR_PS2); |
592 | return rlen; | 592 | return rlen; |
593 | } | 593 | } |
@@ -605,7 +605,7 @@ static size_t parport_uss720_ecp_read_data(struct parport *pp, void *buffer, siz | |||
605 | return 0; | 605 | return 0; |
606 | i = usb_bulk_msg(usbdev, usb_rcvbulkpipe(usbdev, 2), buffer, len, &rlen, 20000); | 606 | i = usb_bulk_msg(usbdev, usb_rcvbulkpipe(usbdev, 2), buffer, len, &rlen, 20000); |
607 | if (i) | 607 | if (i) |
608 | printk(KERN_ERR "uss720: recvbulk ep 2 buf %p len %Zu rlen %u\n", buffer, len, rlen); | 608 | printk(KERN_ERR "uss720: recvbulk ep 2 buf %p len %zu rlen %u\n", buffer, len, rlen); |
609 | change_mode(pp, ECR_PS2); | 609 | change_mode(pp, ECR_PS2); |
610 | return rlen; | 610 | return rlen; |
611 | } | 611 | } |
@@ -638,7 +638,7 @@ static size_t parport_uss720_write_compat(struct parport *pp, const void *buffer | |||
638 | return 0; | 638 | return 0; |
639 | i = usb_bulk_msg(usbdev, usb_sndbulkpipe(usbdev, 1), (void *)buffer, len, &rlen, 20000); | 639 | i = usb_bulk_msg(usbdev, usb_sndbulkpipe(usbdev, 1), (void *)buffer, len, &rlen, 20000); |
640 | if (i) | 640 | if (i) |
641 | printk(KERN_ERR "uss720: sendbulk ep 1 buf %p len %Zu rlen %u\n", buffer, len, rlen); | 641 | printk(KERN_ERR "uss720: sendbulk ep 1 buf %p len %zu rlen %u\n", buffer, len, rlen); |
642 | change_mode(pp, ECR_PS2); | 642 | change_mode(pp, ECR_PS2); |
643 | return rlen; | 643 | return rlen; |
644 | } | 644 | } |
diff --git a/drivers/usb/usbip/usbip_common.c b/drivers/usb/usbip/usbip_common.c index 8b232290be6b..1a6f78d7d027 100644 --- a/drivers/usb/usbip/usbip_common.c +++ b/drivers/usb/usbip/usbip_common.c | |||
@@ -707,7 +707,7 @@ void usbip_pad_iso(struct usbip_device *ud, struct urb *urb) | |||
707 | return; | 707 | return; |
708 | 708 | ||
709 | /* | 709 | /* |
710 | * loop over all packets from last to first (to prevent overwritting | 710 | * loop over all packets from last to first (to prevent overwriting |
711 | * memory when padding) and move them into the proper place | 711 | * memory when padding) and move them into the proper place |
712 | */ | 712 | */ |
713 | for (i = np-1; i > 0; i--) { | 713 | for (i = np-1; i > 0; i--) { |
diff --git a/drivers/video/fbdev/aty/radeon_monitor.c b/drivers/video/fbdev/aty/radeon_monitor.c index 278b421ab3fe..dd823f5fe4c9 100644 --- a/drivers/video/fbdev/aty/radeon_monitor.c +++ b/drivers/video/fbdev/aty/radeon_monitor.c | |||
@@ -646,7 +646,7 @@ void radeon_probe_screens(struct radeonfb_info *rinfo, | |||
646 | 646 | ||
647 | 647 | ||
648 | /* | 648 | /* |
649 | * This functions applyes any arch/model/machine specific fixups | 649 | * This function applies any arch/model/machine specific fixups |
650 | * to the panel info. It may eventually alter EDID block as | 650 | * to the panel info. It may eventually alter EDID block as |
651 | * well or whatever is specific to a given model and not probed | 651 | * well or whatever is specific to a given model and not probed |
652 | * properly by the default code | 652 | * properly by the default code |
diff --git a/drivers/video/fbdev/metronomefb.c b/drivers/video/fbdev/metronomefb.c index abb6bbf226d5..9085e9525341 100644 --- a/drivers/video/fbdev/metronomefb.c +++ b/drivers/video/fbdev/metronomefb.c | |||
@@ -187,7 +187,7 @@ static int load_waveform(u8 *mem, size_t size, int m, int t, | |||
187 | epd_frame_table[par->dt].wfm_size = user_wfm_size; | 187 | epd_frame_table[par->dt].wfm_size = user_wfm_size; |
188 | 188 | ||
189 | if (size != epd_frame_table[par->dt].wfm_size) { | 189 | if (size != epd_frame_table[par->dt].wfm_size) { |
190 | dev_err(dev, "Error: unexpected size %Zd != %d\n", size, | 190 | dev_err(dev, "Error: unexpected size %zd != %d\n", size, |
191 | epd_frame_table[par->dt].wfm_size); | 191 | epd_frame_table[par->dt].wfm_size); |
192 | return -EINVAL; | 192 | return -EINVAL; |
193 | } | 193 | } |
diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c index 496f6c106bb1..b339e0e67b4c 100644 --- a/drivers/watchdog/bcm2835_wdt.c +++ b/drivers/watchdog/bcm2835_wdt.c | |||
@@ -36,9 +36,9 @@ | |||
36 | #define PM_RSTC_RESET 0x00000102 | 36 | #define PM_RSTC_RESET 0x00000102 |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * The Raspberry Pi firmware uses the RSTS register to know which partiton | 39 | * The Raspberry Pi firmware uses the RSTS register to know which partition |
40 | * to boot from. The partiton value is spread into bits 0, 2, 4, 6, 8, 10. | 40 | * to boot from. The partition value is spread into bits 0, 2, 4, 6, 8, 10. |
41 | * Partiton 63 is a special partition used by the firmware to indicate halt. | 41 | * Partition 63 is a special partition used by the firmware to indicate halt. |
42 | */ | 42 | */ |
43 | #define PM_RSTS_RASPBERRYPI_HALT 0x555 | 43 | #define PM_RSTS_RASPBERRYPI_HALT 0x555 |
44 | 44 | ||
diff --git a/fs/affs/affs.h b/fs/affs/affs.h index 2f088773f1c0..2f8bab390d13 100644 --- a/fs/affs/affs.h +++ b/fs/affs/affs.h | |||
@@ -138,9 +138,9 @@ extern int affs_remove_hash(struct inode *dir, struct buffer_head *rem_bh); | |||
138 | extern int affs_remove_header(struct dentry *dentry); | 138 | extern int affs_remove_header(struct dentry *dentry); |
139 | extern u32 affs_checksum_block(struct super_block *sb, struct buffer_head *bh); | 139 | extern u32 affs_checksum_block(struct super_block *sb, struct buffer_head *bh); |
140 | extern void affs_fix_checksum(struct super_block *sb, struct buffer_head *bh); | 140 | extern void affs_fix_checksum(struct super_block *sb, struct buffer_head *bh); |
141 | extern void secs_to_datestamp(time64_t secs, struct affs_date *ds); | 141 | extern void affs_secs_to_datestamp(time64_t secs, struct affs_date *ds); |
142 | extern umode_t prot_to_mode(u32 prot); | 142 | extern umode_t affs_prot_to_mode(u32 prot); |
143 | extern void mode_to_prot(struct inode *inode); | 143 | extern void affs_mode_to_prot(struct inode *inode); |
144 | __printf(3, 4) | 144 | __printf(3, 4) |
145 | extern void affs_error(struct super_block *sb, const char *function, | 145 | extern void affs_error(struct super_block *sb, const char *function, |
146 | const char *fmt, ...); | 146 | const char *fmt, ...); |
@@ -162,6 +162,7 @@ extern void affs_free_bitmap(struct super_block *sb); | |||
162 | 162 | ||
163 | /* namei.c */ | 163 | /* namei.c */ |
164 | 164 | ||
165 | extern const struct export_operations affs_export_ops; | ||
165 | extern int affs_hash_name(struct super_block *sb, const u8 *name, unsigned int len); | 166 | extern int affs_hash_name(struct super_block *sb, const u8 *name, unsigned int len); |
166 | extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry, unsigned int); | 167 | extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry, unsigned int); |
167 | extern int affs_unlink(struct inode *dir, struct dentry *dentry); | 168 | extern int affs_unlink(struct inode *dir, struct dentry *dentry); |
@@ -178,7 +179,6 @@ extern int affs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
178 | 179 | ||
179 | /* inode.c */ | 180 | /* inode.c */ |
180 | 181 | ||
181 | extern unsigned long affs_parent_ino(struct inode *dir); | ||
182 | extern struct inode *affs_new_inode(struct inode *dir); | 182 | extern struct inode *affs_new_inode(struct inode *dir); |
183 | extern int affs_notify_change(struct dentry *dentry, struct iattr *attr); | 183 | extern int affs_notify_change(struct dentry *dentry, struct iattr *attr); |
184 | extern void affs_evict_inode(struct inode *inode); | 184 | extern void affs_evict_inode(struct inode *inode); |
@@ -213,6 +213,12 @@ extern const struct address_space_operations affs_aops_ofs; | |||
213 | extern const struct dentry_operations affs_dentry_operations; | 213 | extern const struct dentry_operations affs_dentry_operations; |
214 | extern const struct dentry_operations affs_intl_dentry_operations; | 214 | extern const struct dentry_operations affs_intl_dentry_operations; |
215 | 215 | ||
216 | static inline bool affs_validblock(struct super_block *sb, int block) | ||
217 | { | ||
218 | return(block >= AFFS_SB(sb)->s_reserved && | ||
219 | block < AFFS_SB(sb)->s_partition_size); | ||
220 | } | ||
221 | |||
216 | static inline void | 222 | static inline void |
217 | affs_set_blocksize(struct super_block *sb, int size) | 223 | affs_set_blocksize(struct super_block *sb, int size) |
218 | { | 224 | { |
@@ -222,7 +228,7 @@ static inline struct buffer_head * | |||
222 | affs_bread(struct super_block *sb, int block) | 228 | affs_bread(struct super_block *sb, int block) |
223 | { | 229 | { |
224 | pr_debug("%s: %d\n", __func__, block); | 230 | pr_debug("%s: %d\n", __func__, block); |
225 | if (block >= AFFS_SB(sb)->s_reserved && block < AFFS_SB(sb)->s_partition_size) | 231 | if (affs_validblock(sb, block)) |
226 | return sb_bread(sb, block); | 232 | return sb_bread(sb, block); |
227 | return NULL; | 233 | return NULL; |
228 | } | 234 | } |
@@ -230,7 +236,7 @@ static inline struct buffer_head * | |||
230 | affs_getblk(struct super_block *sb, int block) | 236 | affs_getblk(struct super_block *sb, int block) |
231 | { | 237 | { |
232 | pr_debug("%s: %d\n", __func__, block); | 238 | pr_debug("%s: %d\n", __func__, block); |
233 | if (block >= AFFS_SB(sb)->s_reserved && block < AFFS_SB(sb)->s_partition_size) | 239 | if (affs_validblock(sb, block)) |
234 | return sb_getblk(sb, block); | 240 | return sb_getblk(sb, block); |
235 | return NULL; | 241 | return NULL; |
236 | } | 242 | } |
@@ -239,7 +245,7 @@ affs_getzeroblk(struct super_block *sb, int block) | |||
239 | { | 245 | { |
240 | struct buffer_head *bh; | 246 | struct buffer_head *bh; |
241 | pr_debug("%s: %d\n", __func__, block); | 247 | pr_debug("%s: %d\n", __func__, block); |
242 | if (block >= AFFS_SB(sb)->s_reserved && block < AFFS_SB(sb)->s_partition_size) { | 248 | if (affs_validblock(sb, block)) { |
243 | bh = sb_getblk(sb, block); | 249 | bh = sb_getblk(sb, block); |
244 | lock_buffer(bh); | 250 | lock_buffer(bh); |
245 | memset(bh->b_data, 0 , sb->s_blocksize); | 251 | memset(bh->b_data, 0 , sb->s_blocksize); |
@@ -254,7 +260,7 @@ affs_getemptyblk(struct super_block *sb, int block) | |||
254 | { | 260 | { |
255 | struct buffer_head *bh; | 261 | struct buffer_head *bh; |
256 | pr_debug("%s: %d\n", __func__, block); | 262 | pr_debug("%s: %d\n", __func__, block); |
257 | if (block >= AFFS_SB(sb)->s_reserved && block < AFFS_SB(sb)->s_partition_size) { | 263 | if (affs_validblock(sb, block)) { |
258 | bh = sb_getblk(sb, block); | 264 | bh = sb_getblk(sb, block); |
259 | wait_on_buffer(bh); | 265 | wait_on_buffer(bh); |
260 | set_buffer_uptodate(bh); | 266 | set_buffer_uptodate(bh); |
diff --git a/fs/affs/amigaffs.c b/fs/affs/amigaffs.c index 0ec65c133b93..b573c3b9a328 100644 --- a/fs/affs/amigaffs.c +++ b/fs/affs/amigaffs.c | |||
@@ -367,7 +367,7 @@ affs_fix_checksum(struct super_block *sb, struct buffer_head *bh) | |||
367 | } | 367 | } |
368 | 368 | ||
369 | void | 369 | void |
370 | secs_to_datestamp(time64_t secs, struct affs_date *ds) | 370 | affs_secs_to_datestamp(time64_t secs, struct affs_date *ds) |
371 | { | 371 | { |
372 | u32 days; | 372 | u32 days; |
373 | u32 minute; | 373 | u32 minute; |
@@ -386,55 +386,55 @@ secs_to_datestamp(time64_t secs, struct affs_date *ds) | |||
386 | } | 386 | } |
387 | 387 | ||
388 | umode_t | 388 | umode_t |
389 | prot_to_mode(u32 prot) | 389 | affs_prot_to_mode(u32 prot) |
390 | { | 390 | { |
391 | umode_t mode = 0; | 391 | umode_t mode = 0; |
392 | 392 | ||
393 | if (!(prot & FIBF_NOWRITE)) | 393 | if (!(prot & FIBF_NOWRITE)) |
394 | mode |= S_IWUSR; | 394 | mode |= 0200; |
395 | if (!(prot & FIBF_NOREAD)) | 395 | if (!(prot & FIBF_NOREAD)) |
396 | mode |= S_IRUSR; | 396 | mode |= 0400; |
397 | if (!(prot & FIBF_NOEXECUTE)) | 397 | if (!(prot & FIBF_NOEXECUTE)) |
398 | mode |= S_IXUSR; | 398 | mode |= 0100; |
399 | if (prot & FIBF_GRP_WRITE) | 399 | if (prot & FIBF_GRP_WRITE) |
400 | mode |= S_IWGRP; | 400 | mode |= 0020; |
401 | if (prot & FIBF_GRP_READ) | 401 | if (prot & FIBF_GRP_READ) |
402 | mode |= S_IRGRP; | 402 | mode |= 0040; |
403 | if (prot & FIBF_GRP_EXECUTE) | 403 | if (prot & FIBF_GRP_EXECUTE) |
404 | mode |= S_IXGRP; | 404 | mode |= 0010; |
405 | if (prot & FIBF_OTR_WRITE) | 405 | if (prot & FIBF_OTR_WRITE) |
406 | mode |= S_IWOTH; | 406 | mode |= 0002; |
407 | if (prot & FIBF_OTR_READ) | 407 | if (prot & FIBF_OTR_READ) |
408 | mode |= S_IROTH; | 408 | mode |= 0004; |
409 | if (prot & FIBF_OTR_EXECUTE) | 409 | if (prot & FIBF_OTR_EXECUTE) |
410 | mode |= S_IXOTH; | 410 | mode |= 0001; |
411 | 411 | ||
412 | return mode; | 412 | return mode; |
413 | } | 413 | } |
414 | 414 | ||
415 | void | 415 | void |
416 | mode_to_prot(struct inode *inode) | 416 | affs_mode_to_prot(struct inode *inode) |
417 | { | 417 | { |
418 | u32 prot = AFFS_I(inode)->i_protect; | 418 | u32 prot = AFFS_I(inode)->i_protect; |
419 | umode_t mode = inode->i_mode; | 419 | umode_t mode = inode->i_mode; |
420 | 420 | ||
421 | if (!(mode & S_IXUSR)) | 421 | if (!(mode & 0100)) |
422 | prot |= FIBF_NOEXECUTE; | 422 | prot |= FIBF_NOEXECUTE; |
423 | if (!(mode & S_IRUSR)) | 423 | if (!(mode & 0400)) |
424 | prot |= FIBF_NOREAD; | 424 | prot |= FIBF_NOREAD; |
425 | if (!(mode & S_IWUSR)) | 425 | if (!(mode & 0200)) |
426 | prot |= FIBF_NOWRITE; | 426 | prot |= FIBF_NOWRITE; |
427 | if (mode & S_IXGRP) | 427 | if (mode & 0010) |
428 | prot |= FIBF_GRP_EXECUTE; | 428 | prot |= FIBF_GRP_EXECUTE; |
429 | if (mode & S_IRGRP) | 429 | if (mode & 0040) |
430 | prot |= FIBF_GRP_READ; | 430 | prot |= FIBF_GRP_READ; |
431 | if (mode & S_IWGRP) | 431 | if (mode & 0020) |
432 | prot |= FIBF_GRP_WRITE; | 432 | prot |= FIBF_GRP_WRITE; |
433 | if (mode & S_IXOTH) | 433 | if (mode & 0001) |
434 | prot |= FIBF_OTR_EXECUTE; | 434 | prot |= FIBF_OTR_EXECUTE; |
435 | if (mode & S_IROTH) | 435 | if (mode & 0004) |
436 | prot |= FIBF_OTR_READ; | 436 | prot |= FIBF_OTR_READ; |
437 | if (mode & S_IWOTH) | 437 | if (mode & 0002) |
438 | prot |= FIBF_OTR_WRITE; | 438 | prot |= FIBF_OTR_WRITE; |
439 | 439 | ||
440 | AFFS_I(inode)->i_protect = prot; | 440 | AFFS_I(inode)->i_protect = prot; |
diff --git a/fs/affs/inode.c b/fs/affs/inode.c index fe4e1290dbb5..a5e6097eb5a9 100644 --- a/fs/affs/inode.c +++ b/fs/affs/inode.c | |||
@@ -69,7 +69,7 @@ struct inode *affs_iget(struct super_block *sb, unsigned long ino) | |||
69 | if (affs_test_opt(sbi->s_flags, SF_SETMODE)) | 69 | if (affs_test_opt(sbi->s_flags, SF_SETMODE)) |
70 | inode->i_mode = sbi->s_mode; | 70 | inode->i_mode = sbi->s_mode; |
71 | else | 71 | else |
72 | inode->i_mode = prot_to_mode(prot); | 72 | inode->i_mode = affs_prot_to_mode(prot); |
73 | 73 | ||
74 | id = be16_to_cpu(tail->uid); | 74 | id = be16_to_cpu(tail->uid); |
75 | if (id == 0 || affs_test_opt(sbi->s_flags, SF_SETUID)) | 75 | if (id == 0 || affs_test_opt(sbi->s_flags, SF_SETUID)) |
@@ -184,11 +184,12 @@ affs_write_inode(struct inode *inode, struct writeback_control *wbc) | |||
184 | } | 184 | } |
185 | tail = AFFS_TAIL(sb, bh); | 185 | tail = AFFS_TAIL(sb, bh); |
186 | if (tail->stype == cpu_to_be32(ST_ROOT)) { | 186 | if (tail->stype == cpu_to_be32(ST_ROOT)) { |
187 | secs_to_datestamp(inode->i_mtime.tv_sec,&AFFS_ROOT_TAIL(sb, bh)->root_change); | 187 | affs_secs_to_datestamp(inode->i_mtime.tv_sec, |
188 | &AFFS_ROOT_TAIL(sb, bh)->root_change); | ||
188 | } else { | 189 | } else { |
189 | tail->protect = cpu_to_be32(AFFS_I(inode)->i_protect); | 190 | tail->protect = cpu_to_be32(AFFS_I(inode)->i_protect); |
190 | tail->size = cpu_to_be32(inode->i_size); | 191 | tail->size = cpu_to_be32(inode->i_size); |
191 | secs_to_datestamp(inode->i_mtime.tv_sec,&tail->change); | 192 | affs_secs_to_datestamp(inode->i_mtime.tv_sec, &tail->change); |
192 | if (!(inode->i_ino == AFFS_SB(sb)->s_root_block)) { | 193 | if (!(inode->i_ino == AFFS_SB(sb)->s_root_block)) { |
193 | uid = i_uid_read(inode); | 194 | uid = i_uid_read(inode); |
194 | gid = i_gid_read(inode); | 195 | gid = i_gid_read(inode); |
@@ -249,7 +250,7 @@ affs_notify_change(struct dentry *dentry, struct iattr *attr) | |||
249 | mark_inode_dirty(inode); | 250 | mark_inode_dirty(inode); |
250 | 251 | ||
251 | if (attr->ia_valid & ATTR_MODE) | 252 | if (attr->ia_valid & ATTR_MODE) |
252 | mode_to_prot(inode); | 253 | affs_mode_to_prot(inode); |
253 | out: | 254 | out: |
254 | return error; | 255 | return error; |
255 | } | 256 | } |
diff --git a/fs/affs/namei.c b/fs/affs/namei.c index 29186d29a3b6..96dd1d09a273 100644 --- a/fs/affs/namei.c +++ b/fs/affs/namei.c | |||
@@ -9,29 +9,10 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include "affs.h" | 11 | #include "affs.h" |
12 | #include <linux/exportfs.h> | ||
12 | 13 | ||
13 | typedef int (*toupper_t)(int); | 14 | typedef int (*toupper_t)(int); |
14 | 15 | ||
15 | static int affs_toupper(int ch); | ||
16 | static int affs_hash_dentry(const struct dentry *, struct qstr *); | ||
17 | static int affs_compare_dentry(const struct dentry *dentry, | ||
18 | unsigned int len, const char *str, const struct qstr *name); | ||
19 | static int affs_intl_toupper(int ch); | ||
20 | static int affs_intl_hash_dentry(const struct dentry *, struct qstr *); | ||
21 | static int affs_intl_compare_dentry(const struct dentry *dentry, | ||
22 | unsigned int len, const char *str, const struct qstr *name); | ||
23 | |||
24 | const struct dentry_operations affs_dentry_operations = { | ||
25 | .d_hash = affs_hash_dentry, | ||
26 | .d_compare = affs_compare_dentry, | ||
27 | }; | ||
28 | |||
29 | const struct dentry_operations affs_intl_dentry_operations = { | ||
30 | .d_hash = affs_intl_hash_dentry, | ||
31 | .d_compare = affs_intl_compare_dentry, | ||
32 | }; | ||
33 | |||
34 | |||
35 | /* Simple toupper() for DOS\1 */ | 16 | /* Simple toupper() for DOS\1 */ |
36 | 17 | ||
37 | static int | 18 | static int |
@@ -271,7 +252,7 @@ affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl) | |||
271 | return -ENOSPC; | 252 | return -ENOSPC; |
272 | 253 | ||
273 | inode->i_mode = mode; | 254 | inode->i_mode = mode; |
274 | mode_to_prot(inode); | 255 | affs_mode_to_prot(inode); |
275 | mark_inode_dirty(inode); | 256 | mark_inode_dirty(inode); |
276 | 257 | ||
277 | inode->i_op = &affs_file_inode_operations; | 258 | inode->i_op = &affs_file_inode_operations; |
@@ -301,7 +282,7 @@ affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) | |||
301 | return -ENOSPC; | 282 | return -ENOSPC; |
302 | 283 | ||
303 | inode->i_mode = S_IFDIR | mode; | 284 | inode->i_mode = S_IFDIR | mode; |
304 | mode_to_prot(inode); | 285 | affs_mode_to_prot(inode); |
305 | 286 | ||
306 | inode->i_op = &affs_dir_inode_operations; | 287 | inode->i_op = &affs_dir_inode_operations; |
307 | inode->i_fop = &affs_dir_operations; | 288 | inode->i_fop = &affs_dir_operations; |
@@ -347,7 +328,7 @@ affs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) | |||
347 | inode_nohighmem(inode); | 328 | inode_nohighmem(inode); |
348 | inode->i_data.a_ops = &affs_symlink_aops; | 329 | inode->i_data.a_ops = &affs_symlink_aops; |
349 | inode->i_mode = S_IFLNK | 0777; | 330 | inode->i_mode = S_IFLNK | 0777; |
350 | mode_to_prot(inode); | 331 | affs_mode_to_prot(inode); |
351 | 332 | ||
352 | error = -EIO; | 333 | error = -EIO; |
353 | bh = affs_bread(sb, inode->i_ino); | 334 | bh = affs_bread(sb, inode->i_ino); |
@@ -465,3 +446,71 @@ done: | |||
465 | affs_brelse(bh); | 446 | affs_brelse(bh); |
466 | return retval; | 447 | return retval; |
467 | } | 448 | } |
449 | |||
450 | static struct dentry *affs_get_parent(struct dentry *child) | ||
451 | { | ||
452 | struct inode *parent; | ||
453 | struct buffer_head *bh; | ||
454 | |||
455 | bh = affs_bread(child->d_sb, d_inode(child)->i_ino); | ||
456 | if (!bh) | ||
457 | return ERR_PTR(-EIO); | ||
458 | |||
459 | parent = affs_iget(child->d_sb, | ||
460 | be32_to_cpu(AFFS_TAIL(child->d_sb, bh)->parent)); | ||
461 | brelse(bh); | ||
462 | if (IS_ERR(parent)) | ||
463 | return ERR_CAST(parent); | ||
464 | |||
465 | return d_obtain_alias(parent); | ||
466 | } | ||
467 | |||
468 | static struct inode *affs_nfs_get_inode(struct super_block *sb, u64 ino, | ||
469 | u32 generation) | ||
470 | { | ||
471 | struct inode *inode; | ||
472 | |||
473 | if (!affs_validblock(sb, ino)) | ||
474 | return ERR_PTR(-ESTALE); | ||
475 | |||
476 | inode = affs_iget(sb, ino); | ||
477 | if (IS_ERR(inode)) | ||
478 | return ERR_CAST(inode); | ||
479 | |||
480 | if (generation && inode->i_generation != generation) { | ||
481 | iput(inode); | ||
482 | return ERR_PTR(-ESTALE); | ||
483 | } | ||
484 | |||
485 | return inode; | ||
486 | } | ||
487 | |||
488 | static struct dentry *affs_fh_to_dentry(struct super_block *sb, struct fid *fid, | ||
489 | int fh_len, int fh_type) | ||
490 | { | ||
491 | return generic_fh_to_dentry(sb, fid, fh_len, fh_type, | ||
492 | affs_nfs_get_inode); | ||
493 | } | ||
494 | |||
495 | static struct dentry *affs_fh_to_parent(struct super_block *sb, struct fid *fid, | ||
496 | int fh_len, int fh_type) | ||
497 | { | ||
498 | return generic_fh_to_parent(sb, fid, fh_len, fh_type, | ||
499 | affs_nfs_get_inode); | ||
500 | } | ||
501 | |||
502 | const struct export_operations affs_export_ops = { | ||
503 | .fh_to_dentry = affs_fh_to_dentry, | ||
504 | .fh_to_parent = affs_fh_to_parent, | ||
505 | .get_parent = affs_get_parent, | ||
506 | }; | ||
507 | |||
508 | const struct dentry_operations affs_dentry_operations = { | ||
509 | .d_hash = affs_hash_dentry, | ||
510 | .d_compare = affs_compare_dentry, | ||
511 | }; | ||
512 | |||
513 | const struct dentry_operations affs_intl_dentry_operations = { | ||
514 | .d_hash = affs_intl_hash_dentry, | ||
515 | .d_compare = affs_intl_compare_dentry, | ||
516 | }; | ||
diff --git a/fs/affs/super.c b/fs/affs/super.c index d6384863192c..37532538e8ab 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c | |||
@@ -32,7 +32,7 @@ affs_commit_super(struct super_block *sb, int wait) | |||
32 | struct affs_root_tail *tail = AFFS_ROOT_TAIL(sb, bh); | 32 | struct affs_root_tail *tail = AFFS_ROOT_TAIL(sb, bh); |
33 | 33 | ||
34 | lock_buffer(bh); | 34 | lock_buffer(bh); |
35 | secs_to_datestamp(ktime_get_real_seconds(), &tail->disk_change); | 35 | affs_secs_to_datestamp(ktime_get_real_seconds(), &tail->disk_change); |
36 | affs_fix_checksum(sb, bh); | 36 | affs_fix_checksum(sb, bh); |
37 | unlock_buffer(bh); | 37 | unlock_buffer(bh); |
38 | 38 | ||
@@ -507,6 +507,7 @@ got_root: | |||
507 | return -ENOMEM; | 507 | return -ENOMEM; |
508 | } | 508 | } |
509 | 509 | ||
510 | sb->s_export_op = &affs_export_ops; | ||
510 | pr_debug("s_flags=%lX\n", sb->s_flags); | 511 | pr_debug("s_flags=%lX\n", sb->s_flags); |
511 | return 0; | 512 | return 0; |
512 | } | 513 | } |
diff --git a/fs/afs/dir.c b/fs/afs/dir.c index 51a241e09fbb..949f960337f5 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c | |||
@@ -252,7 +252,7 @@ static int afs_dir_iterate_block(struct dir_context *ctx, | |||
252 | /* skip entries marked unused in the bitmap */ | 252 | /* skip entries marked unused in the bitmap */ |
253 | if (!(block->pagehdr.bitmap[offset / 8] & | 253 | if (!(block->pagehdr.bitmap[offset / 8] & |
254 | (1 << (offset % 8)))) { | 254 | (1 << (offset % 8)))) { |
255 | _debug("ENT[%Zu.%u]: unused", | 255 | _debug("ENT[%zu.%u]: unused", |
256 | blkoff / sizeof(union afs_dir_block), offset); | 256 | blkoff / sizeof(union afs_dir_block), offset); |
257 | if (offset >= curr) | 257 | if (offset >= curr) |
258 | ctx->pos = blkoff + | 258 | ctx->pos = blkoff + |
@@ -266,7 +266,7 @@ static int afs_dir_iterate_block(struct dir_context *ctx, | |||
266 | sizeof(*block) - | 266 | sizeof(*block) - |
267 | offset * sizeof(union afs_dirent)); | 267 | offset * sizeof(union afs_dirent)); |
268 | 268 | ||
269 | _debug("ENT[%Zu.%u]: %s %Zu \"%s\"", | 269 | _debug("ENT[%zu.%u]: %s %zu \"%s\"", |
270 | blkoff / sizeof(union afs_dir_block), offset, | 270 | blkoff / sizeof(union afs_dir_block), offset, |
271 | (offset < curr ? "skip" : "fill"), | 271 | (offset < curr ? "skip" : "fill"), |
272 | nlen, dire->u.name); | 272 | nlen, dire->u.name); |
@@ -274,23 +274,23 @@ static int afs_dir_iterate_block(struct dir_context *ctx, | |||
274 | /* work out where the next possible entry is */ | 274 | /* work out where the next possible entry is */ |
275 | for (tmp = nlen; tmp > 15; tmp -= sizeof(union afs_dirent)) { | 275 | for (tmp = nlen; tmp > 15; tmp -= sizeof(union afs_dirent)) { |
276 | if (next >= AFS_DIRENT_PER_BLOCK) { | 276 | if (next >= AFS_DIRENT_PER_BLOCK) { |
277 | _debug("ENT[%Zu.%u]:" | 277 | _debug("ENT[%zu.%u]:" |
278 | " %u travelled beyond end dir block" | 278 | " %u travelled beyond end dir block" |
279 | " (len %u/%Zu)", | 279 | " (len %u/%zu)", |
280 | blkoff / sizeof(union afs_dir_block), | 280 | blkoff / sizeof(union afs_dir_block), |
281 | offset, next, tmp, nlen); | 281 | offset, next, tmp, nlen); |
282 | return -EIO; | 282 | return -EIO; |
283 | } | 283 | } |
284 | if (!(block->pagehdr.bitmap[next / 8] & | 284 | if (!(block->pagehdr.bitmap[next / 8] & |
285 | (1 << (next % 8)))) { | 285 | (1 << (next % 8)))) { |
286 | _debug("ENT[%Zu.%u]:" | 286 | _debug("ENT[%zu.%u]:" |
287 | " %u unmarked extension (len %u/%Zu)", | 287 | " %u unmarked extension (len %u/%zu)", |
288 | blkoff / sizeof(union afs_dir_block), | 288 | blkoff / sizeof(union afs_dir_block), |
289 | offset, next, tmp, nlen); | 289 | offset, next, tmp, nlen); |
290 | return -EIO; | 290 | return -EIO; |
291 | } | 291 | } |
292 | 292 | ||
293 | _debug("ENT[%Zu.%u]: ext %u/%Zu", | 293 | _debug("ENT[%zu.%u]: ext %u/%zu", |
294 | blkoff / sizeof(union afs_dir_block), | 294 | blkoff / sizeof(union afs_dir_block), |
295 | next, tmp, nlen); | 295 | next, tmp, nlen); |
296 | next++; | 296 | next++; |
diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index 6f48d670c941..806df746f1a9 100644 --- a/fs/autofs4/dev-ioctl.c +++ b/fs/autofs4/dev-ioctl.c | |||
@@ -38,8 +38,6 @@ | |||
38 | * which have been left busy at at service shutdown. | 38 | * which have been left busy at at service shutdown. |
39 | */ | 39 | */ |
40 | 40 | ||
41 | #define AUTOFS_DEV_IOCTL_SIZE sizeof(struct autofs_dev_ioctl) | ||
42 | |||
43 | typedef int (*ioctl_fn)(struct file *, struct autofs_sb_info *, | 41 | typedef int (*ioctl_fn)(struct file *, struct autofs_sb_info *, |
44 | struct autofs_dev_ioctl *); | 42 | struct autofs_dev_ioctl *); |
45 | 43 | ||
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index 82e8f6edfb48..d79ced925861 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c | |||
@@ -281,8 +281,8 @@ static int autofs4_mount_wait(const struct path *path, bool rcu_walk) | |||
281 | pr_debug("waiting for mount name=%pd\n", path->dentry); | 281 | pr_debug("waiting for mount name=%pd\n", path->dentry); |
282 | status = autofs4_wait(sbi, path, NFY_MOUNT); | 282 | status = autofs4_wait(sbi, path, NFY_MOUNT); |
283 | pr_debug("mount wait done status=%d\n", status); | 283 | pr_debug("mount wait done status=%d\n", status); |
284 | ino->last_used = jiffies; | ||
284 | } | 285 | } |
285 | ino->last_used = jiffies; | ||
286 | return status; | 286 | return status; |
287 | } | 287 | } |
288 | 288 | ||
@@ -321,16 +321,21 @@ static struct dentry *autofs4_mountpoint_changed(struct path *path) | |||
321 | */ | 321 | */ |
322 | if (autofs_type_indirect(sbi->type) && d_unhashed(dentry)) { | 322 | if (autofs_type_indirect(sbi->type) && d_unhashed(dentry)) { |
323 | struct dentry *parent = dentry->d_parent; | 323 | struct dentry *parent = dentry->d_parent; |
324 | struct autofs_info *ino; | ||
325 | struct dentry *new; | 324 | struct dentry *new; |
326 | 325 | ||
327 | new = d_lookup(parent, &dentry->d_name); | 326 | new = d_lookup(parent, &dentry->d_name); |
328 | if (!new) | 327 | if (!new) |
329 | return NULL; | 328 | return NULL; |
330 | ino = autofs4_dentry_ino(new); | 329 | if (new == dentry) |
331 | ino->last_used = jiffies; | 330 | dput(new); |
332 | dput(path->dentry); | 331 | else { |
333 | path->dentry = new; | 332 | struct autofs_info *ino; |
333 | |||
334 | ino = autofs4_dentry_ino(new); | ||
335 | ino->last_used = jiffies; | ||
336 | dput(path->dentry); | ||
337 | path->dentry = new; | ||
338 | } | ||
334 | } | 339 | } |
335 | return path->dentry; | 340 | return path->dentry; |
336 | } | 341 | } |
diff --git a/fs/block_dev.c b/fs/block_dev.c index 1c62845a72c7..77c30f15a02c 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -989,7 +989,7 @@ struct block_device *bdget(dev_t dev) | |||
989 | bdev->bd_super = NULL; | 989 | bdev->bd_super = NULL; |
990 | bdev->bd_inode = inode; | 990 | bdev->bd_inode = inode; |
991 | bdev->bd_bdi = &noop_backing_dev_info; | 991 | bdev->bd_bdi = &noop_backing_dev_info; |
992 | bdev->bd_block_size = (1 << inode->i_blkbits); | 992 | bdev->bd_block_size = i_blocksize(inode); |
993 | bdev->bd_part_count = 0; | 993 | bdev->bd_part_count = 0; |
994 | bdev->bd_invalidated = 0; | 994 | bdev->bd_invalidated = 0; |
995 | inode->i_mode = S_IFBLK; | 995 | inode->i_mode = S_IFBLK; |
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 18e5146df864..c1d2a07205da 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -2875,7 +2875,7 @@ static long btrfs_fallocate(struct file *file, int mode, | |||
2875 | if (!ret) | 2875 | if (!ret) |
2876 | ret = btrfs_prealloc_file_range(inode, mode, | 2876 | ret = btrfs_prealloc_file_range(inode, mode, |
2877 | range->start, | 2877 | range->start, |
2878 | range->len, 1 << inode->i_blkbits, | 2878 | range->len, i_blocksize(inode), |
2879 | offset + len, &alloc_hint); | 2879 | offset + len, &alloc_hint); |
2880 | else | 2880 | else |
2881 | btrfs_free_reserved_data_space(inode, range->start, | 2881 | btrfs_free_reserved_data_space(inode, range->start, |
diff --git a/fs/buffer.c b/fs/buffer.c index 0e87401cf335..28484b3ebc98 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -2395,7 +2395,7 @@ static int cont_expand_zero(struct file *file, struct address_space *mapping, | |||
2395 | loff_t pos, loff_t *bytes) | 2395 | loff_t pos, loff_t *bytes) |
2396 | { | 2396 | { |
2397 | struct inode *inode = mapping->host; | 2397 | struct inode *inode = mapping->host; |
2398 | unsigned blocksize = 1 << inode->i_blkbits; | 2398 | unsigned int blocksize = i_blocksize(inode); |
2399 | struct page *page; | 2399 | struct page *page; |
2400 | void *fsdata; | 2400 | void *fsdata; |
2401 | pgoff_t index, curidx; | 2401 | pgoff_t index, curidx; |
@@ -2475,8 +2475,8 @@ int cont_write_begin(struct file *file, struct address_space *mapping, | |||
2475 | get_block_t *get_block, loff_t *bytes) | 2475 | get_block_t *get_block, loff_t *bytes) |
2476 | { | 2476 | { |
2477 | struct inode *inode = mapping->host; | 2477 | struct inode *inode = mapping->host; |
2478 | unsigned blocksize = 1 << inode->i_blkbits; | 2478 | unsigned int blocksize = i_blocksize(inode); |
2479 | unsigned zerofrom; | 2479 | unsigned int zerofrom; |
2480 | int err; | 2480 | int err; |
2481 | 2481 | ||
2482 | err = cont_expand_zero(file, mapping, pos, bytes); | 2482 | err = cont_expand_zero(file, mapping, pos, bytes); |
@@ -2838,7 +2838,7 @@ int nobh_truncate_page(struct address_space *mapping, | |||
2838 | struct buffer_head map_bh; | 2838 | struct buffer_head map_bh; |
2839 | int err; | 2839 | int err; |
2840 | 2840 | ||
2841 | blocksize = 1 << inode->i_blkbits; | 2841 | blocksize = i_blocksize(inode); |
2842 | length = offset & (blocksize - 1); | 2842 | length = offset & (blocksize - 1); |
2843 | 2843 | ||
2844 | /* Block boundary? Nothing to do */ | 2844 | /* Block boundary? Nothing to do */ |
@@ -2916,7 +2916,7 @@ int block_truncate_page(struct address_space *mapping, | |||
2916 | struct buffer_head *bh; | 2916 | struct buffer_head *bh; |
2917 | int err; | 2917 | int err; |
2918 | 2918 | ||
2919 | blocksize = 1 << inode->i_blkbits; | 2919 | blocksize = i_blocksize(inode); |
2920 | length = offset & (blocksize - 1); | 2920 | length = offset & (blocksize - 1); |
2921 | 2921 | ||
2922 | /* Block boundary? Nothing to do */ | 2922 | /* Block boundary? Nothing to do */ |
@@ -3028,7 +3028,7 @@ sector_t generic_block_bmap(struct address_space *mapping, sector_t block, | |||
3028 | struct inode *inode = mapping->host; | 3028 | struct inode *inode = mapping->host; |
3029 | tmp.b_state = 0; | 3029 | tmp.b_state = 0; |
3030 | tmp.b_blocknr = 0; | 3030 | tmp.b_blocknr = 0; |
3031 | tmp.b_size = 1 << inode->i_blkbits; | 3031 | tmp.b_size = i_blocksize(inode); |
3032 | get_block(inode, block, &tmp, 0); | 3032 | get_block(inode, block, &tmp, 0); |
3033 | return tmp.b_blocknr; | 3033 | return tmp.b_blocknr; |
3034 | } | 3034 | } |
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 09860c0ec7c1..7ce35aec8c76 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c | |||
@@ -751,7 +751,7 @@ static int ceph_writepages_start(struct address_space *mapping, | |||
751 | struct pagevec pvec; | 751 | struct pagevec pvec; |
752 | int done = 0; | 752 | int done = 0; |
753 | int rc = 0; | 753 | int rc = 0; |
754 | unsigned wsize = 1 << inode->i_blkbits; | 754 | unsigned int wsize = i_blocksize(inode); |
755 | struct ceph_osd_request *req = NULL; | 755 | struct ceph_osd_request *req = NULL; |
756 | int do_sync = 0; | 756 | int do_sync = 0; |
757 | loff_t snap_size, i_size; | 757 | loff_t snap_size, i_size; |
@@ -1436,7 +1436,8 @@ out: | |||
1436 | return result; | 1436 | return result; |
1437 | } | 1437 | } |
1438 | #else | 1438 | #else |
1439 | static int dax_iomap_pmd_fault(struct vm_fault *vmf, struct iomap_ops *ops) | 1439 | static int dax_iomap_pmd_fault(struct vm_fault *vmf, |
1440 | const struct iomap_ops *ops) | ||
1440 | { | 1441 | { |
1441 | return VM_FAULT_FALLBACK; | 1442 | return VM_FAULT_FALLBACK; |
1442 | } | 1443 | } |
diff --git a/fs/direct-io.c b/fs/direct-io.c index c87bae4376b8..a04ebea77de8 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c | |||
@@ -587,7 +587,7 @@ static int dio_set_defer_completion(struct dio *dio) | |||
587 | /* | 587 | /* |
588 | * Call into the fs to map some more disk blocks. We record the current number | 588 | * Call into the fs to map some more disk blocks. We record the current number |
589 | * of available blocks at sdio->blocks_available. These are in units of the | 589 | * of available blocks at sdio->blocks_available. These are in units of the |
590 | * fs blocksize, (1 << inode->i_blkbits). | 590 | * fs blocksize, i_blocksize(inode). |
591 | * | 591 | * |
592 | * The fs is allowed to map lots of blocks at once. If it wants to do that, | 592 | * The fs is allowed to map lots of blocks at once. If it wants to do that, |
593 | * it uses the passed inode-relative block number as the file offset, as usual. | 593 | * it uses the passed inode-relative block number as the file offset, as usual. |
diff --git a/fs/ecryptfs/kthread.c b/fs/ecryptfs/kthread.c index 866bb18efefe..e00d45af84ea 100644 --- a/fs/ecryptfs/kthread.c +++ b/fs/ecryptfs/kthread.c | |||
@@ -123,7 +123,7 @@ void ecryptfs_destroy_kthread(void) | |||
123 | * @lower_dentry: Lower dentry for file to open | 123 | * @lower_dentry: Lower dentry for file to open |
124 | * @lower_mnt: Lower vfsmount for file to open | 124 | * @lower_mnt: Lower vfsmount for file to open |
125 | * | 125 | * |
126 | * This function gets a r/w file opened againt the lower dentry. | 126 | * This function gets a r/w file opened against the lower dentry. |
127 | * | 127 | * |
128 | * Returns zero on success; non-zero otherwise | 128 | * Returns zero on success; non-zero otherwise |
129 | */ | 129 | */ |
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index bcb68fcc8445..5ec16313da1a 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c | |||
@@ -1895,7 +1895,7 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd, | |||
1895 | * so EPOLLEXCLUSIVE is not allowed for a EPOLL_CTL_MOD operation. | 1895 | * so EPOLLEXCLUSIVE is not allowed for a EPOLL_CTL_MOD operation. |
1896 | * Also, we do not currently supported nested exclusive wakeups. | 1896 | * Also, we do not currently supported nested exclusive wakeups. |
1897 | */ | 1897 | */ |
1898 | if (epds.events & EPOLLEXCLUSIVE) { | 1898 | if (ep_op_has_event(op) && (epds.events & EPOLLEXCLUSIVE)) { |
1899 | if (op == EPOLL_CTL_MOD) | 1899 | if (op == EPOLL_CTL_MOD) |
1900 | goto error_tgt_fput; | 1900 | goto error_tgt_fput; |
1901 | if (op == EPOLL_CTL_ADD && (is_file_epoll(tf.file) || | 1901 | if (op == EPOLL_CTL_ADD && (is_file_epoll(tf.file) || |
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c index 37e059202cd2..e7f12a204cbc 100644 --- a/fs/ext4/extents_status.c +++ b/fs/ext4/extents_status.c | |||
@@ -84,7 +84,7 @@ | |||
84 | * -- writeout | 84 | * -- writeout |
85 | * Writeout looks up whole page cache to see if a buffer is | 85 | * Writeout looks up whole page cache to see if a buffer is |
86 | * mapped, If there are not very many delayed buffers, then it is | 86 | * mapped, If there are not very many delayed buffers, then it is |
87 | * time comsuming. | 87 | * time consuming. |
88 | * | 88 | * |
89 | * With extent status tree implementation, FIEMAP, SEEK_HOLE/DATA, | 89 | * With extent status tree implementation, FIEMAP, SEEK_HOLE/DATA, |
90 | * bigalloc and writeout can figure out if a block or a range of | 90 | * bigalloc and writeout can figure out if a block or a range of |
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 41d8e53e5a7f..971f66342080 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -2221,7 +2221,7 @@ static int mpage_process_page_bufs(struct mpage_da_data *mpd, | |||
2221 | { | 2221 | { |
2222 | struct inode *inode = mpd->inode; | 2222 | struct inode *inode = mpd->inode; |
2223 | int err; | 2223 | int err; |
2224 | ext4_lblk_t blocks = (i_size_read(inode) + (1 << inode->i_blkbits) - 1) | 2224 | ext4_lblk_t blocks = (i_size_read(inode) + i_blocksize(inode) - 1) |
2225 | >> inode->i_blkbits; | 2225 | >> inode->i_blkbits; |
2226 | 2226 | ||
2227 | do { | 2227 | do { |
@@ -3577,7 +3577,7 @@ static ssize_t ext4_direct_IO_write(struct kiocb *iocb, struct iov_iter *iter) | |||
3577 | if (overwrite) | 3577 | if (overwrite) |
3578 | get_block_func = ext4_dio_get_block_overwrite; | 3578 | get_block_func = ext4_dio_get_block_overwrite; |
3579 | else if (!ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS) || | 3579 | else if (!ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS) || |
3580 | round_down(offset, 1 << inode->i_blkbits) >= inode->i_size) { | 3580 | round_down(offset, i_blocksize(inode)) >= inode->i_size) { |
3581 | get_block_func = ext4_dio_get_block; | 3581 | get_block_func = ext4_dio_get_block; |
3582 | dio_flags = DIO_LOCKING | DIO_SKIP_HOLES; | 3582 | dio_flags = DIO_LOCKING | DIO_SKIP_HOLES; |
3583 | } else if (is_sync_kiocb(iocb)) { | 3583 | } else if (is_sync_kiocb(iocb)) { |
@@ -5179,7 +5179,7 @@ static void ext4_wait_for_tail_page_commit(struct inode *inode) | |||
5179 | * do. We do the check mainly to optimize the common PAGE_SIZE == | 5179 | * do. We do the check mainly to optimize the common PAGE_SIZE == |
5180 | * blocksize case | 5180 | * blocksize case |
5181 | */ | 5181 | */ |
5182 | if (offset > PAGE_SIZE - (1 << inode->i_blkbits)) | 5182 | if (offset > PAGE_SIZE - i_blocksize(inode)) |
5183 | return; | 5183 | return; |
5184 | while (1) { | 5184 | while (1) { |
5185 | page = find_lock_page(inode->i_mapping, | 5185 | page = find_lock_page(inode->i_mapping, |
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 10c62de642c6..354dc1a894c2 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -838,7 +838,7 @@ static int ext4_mb_init_cache(struct page *page, char *incore, gfp_t gfp) | |||
838 | inode = page->mapping->host; | 838 | inode = page->mapping->host; |
839 | sb = inode->i_sb; | 839 | sb = inode->i_sb; |
840 | ngroups = ext4_get_groups_count(sb); | 840 | ngroups = ext4_get_groups_count(sb); |
841 | blocksize = 1 << inode->i_blkbits; | 841 | blocksize = i_blocksize(inode); |
842 | blocks_per_page = PAGE_SIZE / blocksize; | 842 | blocks_per_page = PAGE_SIZE / blocksize; |
843 | 843 | ||
844 | groups_per_page = blocks_per_page >> 1; | 844 | groups_per_page = blocks_per_page >> 1; |
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index 6fc14def0c70..578f8c33fb44 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c | |||
@@ -187,7 +187,7 @@ mext_page_mkuptodate(struct page *page, unsigned from, unsigned to) | |||
187 | if (PageUptodate(page)) | 187 | if (PageUptodate(page)) |
188 | return 0; | 188 | return 0; |
189 | 189 | ||
190 | blocksize = 1 << inode->i_blkbits; | 190 | blocksize = i_blocksize(inode); |
191 | if (!page_has_buffers(page)) | 191 | if (!page_has_buffers(page)) |
192 | create_empty_buffers(page, blocksize, 0); | 192 | create_empty_buffers(page, blocksize, 0); |
193 | 193 | ||
diff --git a/fs/hfs/mdb.c b/fs/hfs/mdb.c index a3ec3ae7d347..482081bcdf70 100644 --- a/fs/hfs/mdb.c +++ b/fs/hfs/mdb.c | |||
@@ -38,7 +38,7 @@ static int hfs_get_last_session(struct super_block *sb, | |||
38 | 38 | ||
39 | /* default values */ | 39 | /* default values */ |
40 | *start = 0; | 40 | *start = 0; |
41 | *size = sb->s_bdev->bd_inode->i_size >> 9; | 41 | *size = i_size_read(sb->s_bdev->bd_inode) >> 9; |
42 | 42 | ||
43 | if (HFS_SB(sb)->session >= 0) { | 43 | if (HFS_SB(sb)->session >= 0) { |
44 | te.cdte_track = HFS_SB(sb)->session; | 44 | te.cdte_track = HFS_SB(sb)->session; |
diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c index ebb85e5f6549..e254fa0f0697 100644 --- a/fs/hfsplus/wrapper.c +++ b/fs/hfsplus/wrapper.c | |||
@@ -132,7 +132,7 @@ static int hfsplus_get_last_session(struct super_block *sb, | |||
132 | 132 | ||
133 | /* default values */ | 133 | /* default values */ |
134 | *start = 0; | 134 | *start = 0; |
135 | *size = sb->s_bdev->bd_inode->i_size >> 9; | 135 | *size = i_size_read(sb->s_bdev->bd_inode) >> 9; |
136 | 136 | ||
137 | if (HFSPLUS_SB(sb)->session >= 0) { | 137 | if (HFSPLUS_SB(sb)->session >= 0) { |
138 | te.cdte_track = HFSPLUS_SB(sb)->session; | 138 | te.cdte_track = HFSPLUS_SB(sb)->session; |
diff --git a/fs/iomap.c b/fs/iomap.c index d209f42cdcb8..0f85f2410605 100644 --- a/fs/iomap.c +++ b/fs/iomap.c | |||
@@ -420,8 +420,8 @@ int | |||
420 | iomap_truncate_page(struct inode *inode, loff_t pos, bool *did_zero, | 420 | iomap_truncate_page(struct inode *inode, loff_t pos, bool *did_zero, |
421 | const struct iomap_ops *ops) | 421 | const struct iomap_ops *ops) |
422 | { | 422 | { |
423 | unsigned blocksize = (1 << inode->i_blkbits); | 423 | unsigned int blocksize = i_blocksize(inode); |
424 | unsigned off = pos & (blocksize - 1); | 424 | unsigned int off = pos & (blocksize - 1); |
425 | 425 | ||
426 | /* Block boundary? Nothing to do */ | 426 | /* Block boundary? Nothing to do */ |
427 | if (!off) | 427 | if (!off) |
@@ -735,9 +735,9 @@ iomap_dio_actor(struct inode *inode, loff_t pos, loff_t length, | |||
735 | void *data, struct iomap *iomap) | 735 | void *data, struct iomap *iomap) |
736 | { | 736 | { |
737 | struct iomap_dio *dio = data; | 737 | struct iomap_dio *dio = data; |
738 | unsigned blkbits = blksize_bits(bdev_logical_block_size(iomap->bdev)); | 738 | unsigned int blkbits = blksize_bits(bdev_logical_block_size(iomap->bdev)); |
739 | unsigned fs_block_size = (1 << inode->i_blkbits), pad; | 739 | unsigned int fs_block_size = i_blocksize(inode), pad; |
740 | unsigned align = iov_iter_alignment(dio->submit.iter); | 740 | unsigned int align = iov_iter_alignment(dio->submit.iter); |
741 | struct iov_iter iter; | 741 | struct iov_iter iter; |
742 | struct bio *bio; | 742 | struct bio *bio; |
743 | bool need_zeroout = false; | 743 | bool need_zeroout = false; |
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 2be7c9ce6663..c64c2574a0aa 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -758,7 +758,7 @@ static ssize_t jfs_quota_read(struct super_block *sb, int type, char *data, | |||
758 | sb->s_blocksize - offset : toread; | 758 | sb->s_blocksize - offset : toread; |
759 | 759 | ||
760 | tmp_bh.b_state = 0; | 760 | tmp_bh.b_state = 0; |
761 | tmp_bh.b_size = 1 << inode->i_blkbits; | 761 | tmp_bh.b_size = i_blocksize(inode); |
762 | err = jfs_get_block(inode, blk, &tmp_bh, 0); | 762 | err = jfs_get_block(inode, blk, &tmp_bh, 0); |
763 | if (err) | 763 | if (err) |
764 | return err; | 764 | return err; |
@@ -798,7 +798,7 @@ static ssize_t jfs_quota_write(struct super_block *sb, int type, | |||
798 | sb->s_blocksize - offset : towrite; | 798 | sb->s_blocksize - offset : towrite; |
799 | 799 | ||
800 | tmp_bh.b_state = 0; | 800 | tmp_bh.b_state = 0; |
801 | tmp_bh.b_size = 1 << inode->i_blkbits; | 801 | tmp_bh.b_size = i_blocksize(inode); |
802 | err = jfs_get_block(inode, blk, &tmp_bh, 1); | 802 | err = jfs_get_block(inode, blk, &tmp_bh, 1); |
803 | if (err) | 803 | if (err) |
804 | goto out; | 804 | goto out; |
diff --git a/fs/mpage.c b/fs/mpage.c index 28af984a3d96..baff8f820c29 100644 --- a/fs/mpage.c +++ b/fs/mpage.c | |||
@@ -115,7 +115,7 @@ map_buffer_to_page(struct page *page, struct buffer_head *bh, int page_block) | |||
115 | SetPageUptodate(page); | 115 | SetPageUptodate(page); |
116 | return; | 116 | return; |
117 | } | 117 | } |
118 | create_empty_buffers(page, 1 << inode->i_blkbits, 0); | 118 | create_empty_buffers(page, i_blocksize(inode), 0); |
119 | } | 119 | } |
120 | head = page_buffers(page); | 120 | head = page_buffers(page); |
121 | page_bh = head; | 121 | page_bh = head; |
diff --git a/fs/ncpfs/sock.c b/fs/ncpfs/sock.c index f32f272ee501..97b111d79489 100644 --- a/fs/ncpfs/sock.c +++ b/fs/ncpfs/sock.c | |||
@@ -525,7 +525,7 @@ static int do_tcp_rcv(struct ncp_server *server, void *buffer, size_t len) | |||
525 | return result; | 525 | return result; |
526 | } | 526 | } |
527 | if (result > len) { | 527 | if (result > len) { |
528 | pr_err("tcp: bug in recvmsg (%u > %Zu)\n", result, len); | 528 | pr_err("tcp: bug in recvmsg (%u > %zu)\n", result, len); |
529 | return -EIO; | 529 | return -EIO; |
530 | } | 530 | } |
531 | return result; | 531 | return result; |
@@ -619,7 +619,7 @@ skipdata:; | |||
619 | goto skipdata2; | 619 | goto skipdata2; |
620 | } | 620 | } |
621 | if (datalen > req->datalen + 8) { | 621 | if (datalen > req->datalen + 8) { |
622 | pr_err("tcp: Unexpected reply len %d (expected at most %Zd)\n", datalen, req->datalen + 8); | 622 | pr_err("tcp: Unexpected reply len %d (expected at most %zd)\n", datalen, req->datalen + 8); |
623 | server->rcv.state = 3; | 623 | server->rcv.state = 3; |
624 | goto skipdata; | 624 | goto skipdata; |
625 | } | 625 | } |
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c index 2905479f214a..0ca370d23ddb 100644 --- a/fs/nfs/blocklayout/blocklayout.c +++ b/fs/nfs/blocklayout/blocklayout.c | |||
@@ -381,7 +381,7 @@ bl_write_pagelist(struct nfs_pgio_header *header, int sync) | |||
381 | struct blk_plug plug; | 381 | struct blk_plug plug; |
382 | int i; | 382 | int i; |
383 | 383 | ||
384 | dprintk("%s enter, %Zu@%lld\n", __func__, count, offset); | 384 | dprintk("%s enter, %zu@%lld\n", __func__, count, offset); |
385 | 385 | ||
386 | /* At this point, header->page_aray is a (sequential) list of nfs_pages. | 386 | /* At this point, header->page_aray is a (sequential) list of nfs_pages. |
387 | * We want to write each, and if there is an error set pnfs_error | 387 | * We want to write each, and if there is an error set pnfs_error |
diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c index a3fc48ba4931..18f98e08544d 100644 --- a/fs/nfs/filelayout/filelayout.c +++ b/fs/nfs/filelayout/filelayout.c | |||
@@ -482,7 +482,7 @@ filelayout_read_pagelist(struct nfs_pgio_header *hdr) | |||
482 | u32 j, idx; | 482 | u32 j, idx; |
483 | struct nfs_fh *fh; | 483 | struct nfs_fh *fh; |
484 | 484 | ||
485 | dprintk("--> %s ino %lu pgbase %u req %Zu@%llu\n", | 485 | dprintk("--> %s ino %lu pgbase %u req %zu@%llu\n", |
486 | __func__, hdr->inode->i_ino, | 486 | __func__, hdr->inode->i_ino, |
487 | hdr->args.pgbase, (size_t)hdr->args.count, offset); | 487 | hdr->args.pgbase, (size_t)hdr->args.count, offset); |
488 | 488 | ||
@@ -540,7 +540,7 @@ filelayout_write_pagelist(struct nfs_pgio_header *hdr, int sync) | |||
540 | if (IS_ERR(ds_clnt)) | 540 | if (IS_ERR(ds_clnt)) |
541 | return PNFS_NOT_ATTEMPTED; | 541 | return PNFS_NOT_ATTEMPTED; |
542 | 542 | ||
543 | dprintk("%s ino %lu sync %d req %Zu@%llu DS: %s cl_count %d\n", | 543 | dprintk("%s ino %lu sync %d req %zu@%llu DS: %s cl_count %d\n", |
544 | __func__, hdr->inode->i_ino, sync, (size_t) hdr->args.count, | 544 | __func__, hdr->inode->i_ino, sync, (size_t) hdr->args.count, |
545 | offset, ds->ds_remotestr, atomic_read(&ds->ds_clp->cl_count)); | 545 | offset, ds->ds_remotestr, atomic_read(&ds->ds_clp->cl_count)); |
546 | 546 | ||
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index 0ca4af8cca5d..d6acc688df7e 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c | |||
@@ -1751,7 +1751,7 @@ ff_layout_read_pagelist(struct nfs_pgio_header *hdr) | |||
1751 | int vers; | 1751 | int vers; |
1752 | struct nfs_fh *fh; | 1752 | struct nfs_fh *fh; |
1753 | 1753 | ||
1754 | dprintk("--> %s ino %lu pgbase %u req %Zu@%llu\n", | 1754 | dprintk("--> %s ino %lu pgbase %u req %zu@%llu\n", |
1755 | __func__, hdr->inode->i_ino, | 1755 | __func__, hdr->inode->i_ino, |
1756 | hdr->args.pgbase, (size_t)hdr->args.count, offset); | 1756 | hdr->args.pgbase, (size_t)hdr->args.count, offset); |
1757 | 1757 | ||
@@ -1828,7 +1828,7 @@ ff_layout_write_pagelist(struct nfs_pgio_header *hdr, int sync) | |||
1828 | 1828 | ||
1829 | vers = nfs4_ff_layout_ds_version(lseg, idx); | 1829 | vers = nfs4_ff_layout_ds_version(lseg, idx); |
1830 | 1830 | ||
1831 | dprintk("%s ino %lu sync %d req %Zu@%llu DS: %s cl_count %d vers %d\n", | 1831 | dprintk("%s ino %lu sync %d req %zu@%llu DS: %s cl_count %d vers %d\n", |
1832 | __func__, hdr->inode->i_ino, sync, (size_t) hdr->args.count, | 1832 | __func__, hdr->inode->i_ino, sync, (size_t) hdr->args.count, |
1833 | offset, ds->ds_remotestr, atomic_read(&ds->ds_clp->cl_count), | 1833 | offset, ds->ds_remotestr, atomic_read(&ds->ds_clp->cl_count), |
1834 | vers); | 1834 | vers); |
diff --git a/fs/nfs/objlayout/objlayout.c b/fs/nfs/objlayout/objlayout.c index 2a4cdce939a0..8f3d2acb81c3 100644 --- a/fs/nfs/objlayout/objlayout.c +++ b/fs/nfs/objlayout/objlayout.c | |||
@@ -291,7 +291,7 @@ objlayout_read_pagelist(struct nfs_pgio_header *hdr) | |||
291 | &hdr->args.pgbase, | 291 | &hdr->args.pgbase, |
292 | hdr->args.offset, hdr->args.count); | 292 | hdr->args.offset, hdr->args.count); |
293 | 293 | ||
294 | dprintk("%s: inode(%lx) offset 0x%llx count 0x%Zx eof=%d\n", | 294 | dprintk("%s: inode(%lx) offset 0x%llx count 0x%zx eof=%d\n", |
295 | __func__, inode->i_ino, offset, count, hdr->res.eof); | 295 | __func__, inode->i_ino, offset, count, hdr->res.eof); |
296 | 296 | ||
297 | err = objio_read_pagelist(hdr); | 297 | err = objio_read_pagelist(hdr); |
diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c index a06115e31612..92b4b41d19d2 100644 --- a/fs/nfsd/blocklayout.c +++ b/fs/nfsd/blocklayout.c | |||
@@ -24,7 +24,7 @@ nfsd4_block_proc_layoutget(struct inode *inode, const struct svc_fh *fhp, | |||
24 | { | 24 | { |
25 | struct nfsd4_layout_seg *seg = &args->lg_seg; | 25 | struct nfsd4_layout_seg *seg = &args->lg_seg; |
26 | struct super_block *sb = inode->i_sb; | 26 | struct super_block *sb = inode->i_sb; |
27 | u32 block_size = (1 << inode->i_blkbits); | 27 | u32 block_size = i_blocksize(inode); |
28 | struct pnfs_block_extent *bex; | 28 | struct pnfs_block_extent *bex; |
29 | struct iomap iomap; | 29 | struct iomap iomap; |
30 | u32 device_generation = 0; | 30 | u32 device_generation = 0; |
@@ -181,7 +181,7 @@ nfsd4_block_proc_layoutcommit(struct inode *inode, | |||
181 | int nr_iomaps; | 181 | int nr_iomaps; |
182 | 182 | ||
183 | nr_iomaps = nfsd4_block_decode_layoutupdate(lcp->lc_up_layout, | 183 | nr_iomaps = nfsd4_block_decode_layoutupdate(lcp->lc_up_layout, |
184 | lcp->lc_up_len, &iomaps, 1 << inode->i_blkbits); | 184 | lcp->lc_up_len, &iomaps, i_blocksize(inode)); |
185 | if (nr_iomaps < 0) | 185 | if (nr_iomaps < 0) |
186 | return nfserrno(nr_iomaps); | 186 | return nfserrno(nr_iomaps); |
187 | 187 | ||
@@ -375,7 +375,7 @@ nfsd4_scsi_proc_layoutcommit(struct inode *inode, | |||
375 | int nr_iomaps; | 375 | int nr_iomaps; |
376 | 376 | ||
377 | nr_iomaps = nfsd4_scsi_decode_layoutupdate(lcp->lc_up_layout, | 377 | nr_iomaps = nfsd4_scsi_decode_layoutupdate(lcp->lc_up_layout, |
378 | lcp->lc_up_len, &iomaps, 1 << inode->i_blkbits); | 378 | lcp->lc_up_len, &iomaps, i_blocksize(inode)); |
379 | if (nr_iomaps < 0) | 379 | if (nr_iomaps < 0) |
380 | return nfserrno(nr_iomaps); | 380 | return nfserrno(nr_iomaps); |
381 | 381 | ||
diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c index d6b97b424ad1..96fd15979cbd 100644 --- a/fs/nfsd/nfscache.c +++ b/fs/nfsd/nfscache.c | |||
@@ -578,7 +578,7 @@ nfsd_cache_append(struct svc_rqst *rqstp, struct kvec *data) | |||
578 | struct kvec *vec = &rqstp->rq_res.head[0]; | 578 | struct kvec *vec = &rqstp->rq_res.head[0]; |
579 | 579 | ||
580 | if (vec->iov_len + data->iov_len > PAGE_SIZE) { | 580 | if (vec->iov_len + data->iov_len > PAGE_SIZE) { |
581 | printk(KERN_WARNING "nfsd: cached reply too large (%Zd).\n", | 581 | printk(KERN_WARNING "nfsd: cached reply too large (%zd).\n", |
582 | data->iov_len); | 582 | data->iov_len); |
583 | return 0; | 583 | return 0; |
584 | } | 584 | } |
diff --git a/fs/nilfs2/alloc.c b/fs/nilfs2/alloc.c index 2c90e285d7c6..03b8ba933eb2 100644 --- a/fs/nilfs2/alloc.c +++ b/fs/nilfs2/alloc.c | |||
@@ -34,7 +34,7 @@ | |||
34 | static inline unsigned long | 34 | static inline unsigned long |
35 | nilfs_palloc_groups_per_desc_block(const struct inode *inode) | 35 | nilfs_palloc_groups_per_desc_block(const struct inode *inode) |
36 | { | 36 | { |
37 | return (1UL << inode->i_blkbits) / | 37 | return i_blocksize(inode) / |
38 | sizeof(struct nilfs_palloc_group_desc); | 38 | sizeof(struct nilfs_palloc_group_desc); |
39 | } | 39 | } |
40 | 40 | ||
diff --git a/fs/nilfs2/btnode.c b/fs/nilfs2/btnode.c index d5c23da43513..c21e0b4454a6 100644 --- a/fs/nilfs2/btnode.c +++ b/fs/nilfs2/btnode.c | |||
@@ -50,7 +50,7 @@ nilfs_btnode_create_block(struct address_space *btnc, __u64 blocknr) | |||
50 | brelse(bh); | 50 | brelse(bh); |
51 | BUG(); | 51 | BUG(); |
52 | } | 52 | } |
53 | memset(bh->b_data, 0, 1 << inode->i_blkbits); | 53 | memset(bh->b_data, 0, i_blocksize(inode)); |
54 | bh->b_bdev = inode->i_sb->s_bdev; | 54 | bh->b_bdev = inode->i_sb->s_bdev; |
55 | bh->b_blocknr = blocknr; | 55 | bh->b_blocknr = blocknr; |
56 | set_buffer_mapped(bh); | 56 | set_buffer_mapped(bh); |
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c index 2e315f9f2e51..06ffa135dfa6 100644 --- a/fs/nilfs2/btree.c +++ b/fs/nilfs2/btree.c | |||
@@ -119,7 +119,7 @@ nilfs_btree_node_set_nchildren(struct nilfs_btree_node *node, int nchildren) | |||
119 | 119 | ||
120 | static int nilfs_btree_node_size(const struct nilfs_bmap *btree) | 120 | static int nilfs_btree_node_size(const struct nilfs_bmap *btree) |
121 | { | 121 | { |
122 | return 1 << btree->b_inode->i_blkbits; | 122 | return i_blocksize(btree->b_inode); |
123 | } | 123 | } |
124 | 124 | ||
125 | static int nilfs_btree_nchildren_per_block(const struct nilfs_bmap *btree) | 125 | static int nilfs_btree_nchildren_per_block(const struct nilfs_bmap *btree) |
@@ -1870,7 +1870,7 @@ int nilfs_btree_convert_and_insert(struct nilfs_bmap *btree, | |||
1870 | di = &dreq; | 1870 | di = &dreq; |
1871 | ni = NULL; | 1871 | ni = NULL; |
1872 | } else if ((n + 1) <= NILFS_BTREE_NODE_NCHILDREN_MAX( | 1872 | } else if ((n + 1) <= NILFS_BTREE_NODE_NCHILDREN_MAX( |
1873 | 1 << btree->b_inode->i_blkbits)) { | 1873 | nilfs_btree_node_size(btree))) { |
1874 | di = &dreq; | 1874 | di = &dreq; |
1875 | ni = &nreq; | 1875 | ni = &nreq; |
1876 | } else { | 1876 | } else { |
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index c7f4fef9ebf5..7ffe71a8dfb9 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c | |||
@@ -51,7 +51,7 @@ void nilfs_inode_add_blocks(struct inode *inode, int n) | |||
51 | { | 51 | { |
52 | struct nilfs_root *root = NILFS_I(inode)->i_root; | 52 | struct nilfs_root *root = NILFS_I(inode)->i_root; |
53 | 53 | ||
54 | inode_add_bytes(inode, (1 << inode->i_blkbits) * n); | 54 | inode_add_bytes(inode, i_blocksize(inode) * n); |
55 | if (root) | 55 | if (root) |
56 | atomic64_add(n, &root->blocks_count); | 56 | atomic64_add(n, &root->blocks_count); |
57 | } | 57 | } |
@@ -60,7 +60,7 @@ void nilfs_inode_sub_blocks(struct inode *inode, int n) | |||
60 | { | 60 | { |
61 | struct nilfs_root *root = NILFS_I(inode)->i_root; | 61 | struct nilfs_root *root = NILFS_I(inode)->i_root; |
62 | 62 | ||
63 | inode_sub_bytes(inode, (1 << inode->i_blkbits) * n); | 63 | inode_sub_bytes(inode, i_blocksize(inode) * n); |
64 | if (root) | 64 | if (root) |
65 | atomic64_sub(n, &root->blocks_count); | 65 | atomic64_sub(n, &root->blocks_count); |
66 | } | 66 | } |
diff --git a/fs/nilfs2/mdt.c b/fs/nilfs2/mdt.c index d56d3a5bea88..98835ed6bef4 100644 --- a/fs/nilfs2/mdt.c +++ b/fs/nilfs2/mdt.c | |||
@@ -57,7 +57,7 @@ nilfs_mdt_insert_new_block(struct inode *inode, unsigned long block, | |||
57 | set_buffer_mapped(bh); | 57 | set_buffer_mapped(bh); |
58 | 58 | ||
59 | kaddr = kmap_atomic(bh->b_page); | 59 | kaddr = kmap_atomic(bh->b_page); |
60 | memset(kaddr + bh_offset(bh), 0, 1 << inode->i_blkbits); | 60 | memset(kaddr + bh_offset(bh), 0, i_blocksize(inode)); |
61 | if (init_block) | 61 | if (init_block) |
62 | init_block(inode, bh, kaddr); | 62 | init_block(inode, bh, kaddr); |
63 | flush_dcache_page(bh->b_page); | 63 | flush_dcache_page(bh->b_page); |
@@ -501,7 +501,7 @@ void nilfs_mdt_set_entry_size(struct inode *inode, unsigned int entry_size, | |||
501 | struct nilfs_mdt_info *mi = NILFS_MDT(inode); | 501 | struct nilfs_mdt_info *mi = NILFS_MDT(inode); |
502 | 502 | ||
503 | mi->mi_entry_size = entry_size; | 503 | mi->mi_entry_size = entry_size; |
504 | mi->mi_entries_per_block = (1 << inode->i_blkbits) / entry_size; | 504 | mi->mi_entries_per_block = i_blocksize(inode) / entry_size; |
505 | mi->mi_first_entry_offset = DIV_ROUND_UP(header_size, entry_size); | 505 | mi->mi_first_entry_offset = DIV_ROUND_UP(header_size, entry_size); |
506 | } | 506 | } |
507 | 507 | ||
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index bedcae2c28e6..7d18d62e8e07 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c | |||
@@ -723,7 +723,7 @@ static size_t nilfs_lookup_dirty_data_buffers(struct inode *inode, | |||
723 | 723 | ||
724 | lock_page(page); | 724 | lock_page(page); |
725 | if (!page_has_buffers(page)) | 725 | if (!page_has_buffers(page)) |
726 | create_empty_buffers(page, 1 << inode->i_blkbits, 0); | 726 | create_empty_buffers(page, i_blocksize(inode), 0); |
727 | unlock_page(page); | 727 | unlock_page(page); |
728 | 728 | ||
729 | bh = head = page_buffers(page); | 729 | bh = head = page_buffers(page); |
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 11556b7d93ec..88a31e9340a0 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -608,7 +608,7 @@ int ocfs2_map_page_blocks(struct page *page, u64 *p_blkno, | |||
608 | int ret = 0; | 608 | int ret = 0; |
609 | struct buffer_head *head, *bh, *wait[2], **wait_bh = wait; | 609 | struct buffer_head *head, *bh, *wait[2], **wait_bh = wait; |
610 | unsigned int block_end, block_start; | 610 | unsigned int block_end, block_start; |
611 | unsigned int bsize = 1 << inode->i_blkbits; | 611 | unsigned int bsize = i_blocksize(inode); |
612 | 612 | ||
613 | if (!page_has_buffers(page)) | 613 | if (!page_has_buffers(page)) |
614 | create_empty_buffers(page, bsize, 0); | 614 | create_empty_buffers(page, bsize, 0); |
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index 7025d8c27999..3e04279446e8 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c | |||
@@ -2924,7 +2924,7 @@ again: | |||
2924 | /* | 2924 | /* |
2925 | * if target is down, we need to clear DLM_LOCK_RES_BLOCK_DIRTY for | 2925 | * if target is down, we need to clear DLM_LOCK_RES_BLOCK_DIRTY for |
2926 | * another try; otherwise, we are sure the MIGRATING state is there, | 2926 | * another try; otherwise, we are sure the MIGRATING state is there, |
2927 | * drop the unneded state which blocked threads trying to DIRTY | 2927 | * drop the unneeded state which blocked threads trying to DIRTY |
2928 | */ | 2928 | */ |
2929 | spin_lock(&res->spinlock); | 2929 | spin_lock(&res->spinlock); |
2930 | BUG_ON(!(res->state & DLM_LOCK_RES_BLOCK_DIRTY)); | 2930 | BUG_ON(!(res->state & DLM_LOCK_RES_BLOCK_DIRTY)); |
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 7b6a146327d7..8836305eb378 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -808,7 +808,7 @@ static int ocfs2_write_zero_page(struct inode *inode, u64 abs_from, | |||
808 | /* We know that zero_from is block aligned */ | 808 | /* We know that zero_from is block aligned */ |
809 | for (block_start = zero_from; block_start < zero_to; | 809 | for (block_start = zero_from; block_start < zero_to; |
810 | block_start = block_end) { | 810 | block_start = block_end) { |
811 | block_end = block_start + (1 << inode->i_blkbits); | 811 | block_end = block_start + i_blocksize(inode); |
812 | 812 | ||
813 | /* | 813 | /* |
814 | * block_start is block-aligned. Bump it by one to force | 814 | * block_start is block-aligned. Bump it by one to force |
diff --git a/fs/orangefs/orangefs-utils.c b/fs/orangefs/orangefs-utils.c index 06af81f71e10..9b96b99539d6 100644 --- a/fs/orangefs/orangefs-utils.c +++ b/fs/orangefs/orangefs-utils.c | |||
@@ -306,7 +306,7 @@ int orangefs_inode_getattr(struct inode *inode, int new, int bypass) | |||
306 | break; | 306 | break; |
307 | case S_IFDIR: | 307 | case S_IFDIR: |
308 | inode->i_size = PAGE_SIZE; | 308 | inode->i_size = PAGE_SIZE; |
309 | orangefs_inode->blksize = (1 << inode->i_blkbits); | 309 | orangefs_inode->blksize = i_blocksize(inode); |
310 | spin_lock(&inode->i_lock); | 310 | spin_lock(&inode->i_lock); |
311 | inode_set_bytes(inode, inode->i_size); | 311 | inode_set_bytes(inode, inode->i_size); |
312 | spin_unlock(&inode->i_lock); | 312 | spin_unlock(&inode->i_lock); |
@@ -316,7 +316,7 @@ int orangefs_inode_getattr(struct inode *inode, int new, int bypass) | |||
316 | if (new) { | 316 | if (new) { |
317 | inode->i_size = (loff_t)strlen(new_op-> | 317 | inode->i_size = (loff_t)strlen(new_op-> |
318 | downcall.resp.getattr.link_target); | 318 | downcall.resp.getattr.link_target); |
319 | orangefs_inode->blksize = (1 << inode->i_blkbits); | 319 | orangefs_inode->blksize = i_blocksize(inode); |
320 | ret = strscpy(orangefs_inode->link_target, | 320 | ret = strscpy(orangefs_inode->link_target, |
321 | new_op->downcall.resp.getattr.link_target, | 321 | new_op->downcall.resp.getattr.link_target, |
322 | ORANGEFS_NAME_MAX); | 322 | ORANGEFS_NAME_MAX); |
diff --git a/fs/proc/base.c b/fs/proc/base.c index b8f06273353e..1e1e182d571b 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -766,7 +766,7 @@ struct mm_struct *proc_mem_open(struct inode *inode, unsigned int mode) | |||
766 | 766 | ||
767 | if (!IS_ERR_OR_NULL(mm)) { | 767 | if (!IS_ERR_OR_NULL(mm)) { |
768 | /* ensure this mm_struct can't be freed */ | 768 | /* ensure this mm_struct can't be freed */ |
769 | atomic_inc(&mm->mm_count); | 769 | mmgrab(mm); |
770 | /* but do not pin its memory */ | 770 | /* but do not pin its memory */ |
771 | mmput(mm); | 771 | mmput(mm); |
772 | } | 772 | } |
@@ -813,7 +813,7 @@ static ssize_t mem_rw(struct file *file, char __user *buf, | |||
813 | return -ENOMEM; | 813 | return -ENOMEM; |
814 | 814 | ||
815 | copied = 0; | 815 | copied = 0; |
816 | if (!atomic_inc_not_zero(&mm->mm_users)) | 816 | if (!mmget_not_zero(mm)) |
817 | goto free; | 817 | goto free; |
818 | 818 | ||
819 | /* Maybe we should limit FOLL_FORCE to actual ptrace users? */ | 819 | /* Maybe we should limit FOLL_FORCE to actual ptrace users? */ |
@@ -921,7 +921,7 @@ static ssize_t environ_read(struct file *file, char __user *buf, | |||
921 | return -ENOMEM; | 921 | return -ENOMEM; |
922 | 922 | ||
923 | ret = 0; | 923 | ret = 0; |
924 | if (!atomic_inc_not_zero(&mm->mm_users)) | 924 | if (!mmget_not_zero(mm)) |
925 | goto free; | 925 | goto free; |
926 | 926 | ||
927 | down_read(&mm->mmap_sem); | 927 | down_read(&mm->mmap_sem); |
@@ -1064,7 +1064,7 @@ static int __set_oom_adj(struct file *file, int oom_adj, bool legacy) | |||
1064 | if (p) { | 1064 | if (p) { |
1065 | if (atomic_read(&p->mm->mm_users) > 1) { | 1065 | if (atomic_read(&p->mm->mm_users) > 1) { |
1066 | mm = p->mm; | 1066 | mm = p->mm; |
1067 | atomic_inc(&mm->mm_count); | 1067 | mmgrab(mm); |
1068 | } | 1068 | } |
1069 | task_unlock(p); | 1069 | task_unlock(p); |
1070 | } | 1070 | } |
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index 0b80ad87b4d6..ea9f3d1ae830 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c | |||
@@ -373,7 +373,10 @@ static void elf_kcore_store_hdr(char *bufp, int nphdr, int dataoff) | |||
373 | phdr->p_flags = PF_R|PF_W|PF_X; | 373 | phdr->p_flags = PF_R|PF_W|PF_X; |
374 | phdr->p_offset = kc_vaddr_to_offset(m->addr) + dataoff; | 374 | phdr->p_offset = kc_vaddr_to_offset(m->addr) + dataoff; |
375 | phdr->p_vaddr = (size_t)m->addr; | 375 | phdr->p_vaddr = (size_t)m->addr; |
376 | phdr->p_paddr = 0; | 376 | if (m->type == KCORE_RAM || m->type == KCORE_TEXT) |
377 | phdr->p_paddr = __pa(m->addr); | ||
378 | else | ||
379 | phdr->p_paddr = (elf_addr_t)-1; | ||
377 | phdr->p_filesz = phdr->p_memsz = m->size; | 380 | phdr->p_filesz = phdr->p_memsz = m->size; |
378 | phdr->p_align = PAGE_SIZE; | 381 | phdr->p_align = PAGE_SIZE; |
379 | } | 382 | } |
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 8f96a49178d0..ee3efb229ef6 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -167,7 +167,7 @@ static void *m_start(struct seq_file *m, loff_t *ppos) | |||
167 | return ERR_PTR(-ESRCH); | 167 | return ERR_PTR(-ESRCH); |
168 | 168 | ||
169 | mm = priv->mm; | 169 | mm = priv->mm; |
170 | if (!mm || !atomic_inc_not_zero(&mm->mm_users)) | 170 | if (!mm || !mmget_not_zero(mm)) |
171 | return NULL; | 171 | return NULL; |
172 | 172 | ||
173 | down_read(&mm->mmap_sem); | 173 | down_read(&mm->mmap_sem); |
@@ -1352,7 +1352,7 @@ static ssize_t pagemap_read(struct file *file, char __user *buf, | |||
1352 | unsigned long end_vaddr; | 1352 | unsigned long end_vaddr; |
1353 | int ret = 0, copied = 0; | 1353 | int ret = 0, copied = 0; |
1354 | 1354 | ||
1355 | if (!mm || !atomic_inc_not_zero(&mm->mm_users)) | 1355 | if (!mm || !mmget_not_zero(mm)) |
1356 | goto out; | 1356 | goto out; |
1357 | 1357 | ||
1358 | ret = -EINVAL; | 1358 | ret = -EINVAL; |
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c index 37175621e890..1ef97cfcf422 100644 --- a/fs/proc/task_nommu.c +++ b/fs/proc/task_nommu.c | |||
@@ -219,7 +219,7 @@ static void *m_start(struct seq_file *m, loff_t *pos) | |||
219 | return ERR_PTR(-ESRCH); | 219 | return ERR_PTR(-ESRCH); |
220 | 220 | ||
221 | mm = priv->mm; | 221 | mm = priv->mm; |
222 | if (!mm || !atomic_inc_not_zero(&mm->mm_users)) | 222 | if (!mm || !mmget_not_zero(mm)) |
223 | return NULL; | 223 | return NULL; |
224 | 224 | ||
225 | down_read(&mm->mmap_sem); | 225 | down_read(&mm->mmap_sem); |
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c index 2f8c5c9bdaf6..b396eb09f288 100644 --- a/fs/reiserfs/file.c +++ b/fs/reiserfs/file.c | |||
@@ -189,7 +189,7 @@ int reiserfs_commit_page(struct inode *inode, struct page *page, | |||
189 | int ret = 0; | 189 | int ret = 0; |
190 | 190 | ||
191 | th.t_trans_id = 0; | 191 | th.t_trans_id = 0; |
192 | blocksize = 1 << inode->i_blkbits; | 192 | blocksize = i_blocksize(inode); |
193 | 193 | ||
194 | if (logit) { | 194 | if (logit) { |
195 | reiserfs_write_lock(s); | 195 | reiserfs_write_lock(s); |
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index cfeae9b0a2b7..a6ab9d64ea1b 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -525,7 +525,7 @@ static int reiserfs_get_blocks_direct_io(struct inode *inode, | |||
525 | * referenced in convert_tail_for_hole() that may be called from | 525 | * referenced in convert_tail_for_hole() that may be called from |
526 | * reiserfs_get_block() | 526 | * reiserfs_get_block() |
527 | */ | 527 | */ |
528 | bh_result->b_size = (1 << inode->i_blkbits); | 528 | bh_result->b_size = i_blocksize(inode); |
529 | 529 | ||
530 | ret = reiserfs_get_block(inode, iblock, bh_result, | 530 | ret = reiserfs_get_block(inode, iblock, bh_result, |
531 | create | GET_BLOCK_NO_DANGLE); | 531 | create | GET_BLOCK_NO_DANGLE); |
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index e314cb30a181..feabcde0290d 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -1166,7 +1166,7 @@ static int reiserfs_parse_options(struct super_block *s, | |||
1166 | if (!strcmp(arg, "auto")) { | 1166 | if (!strcmp(arg, "auto")) { |
1167 | /* From JFS code, to auto-get the size. */ | 1167 | /* From JFS code, to auto-get the size. */ |
1168 | *blocks = | 1168 | *blocks = |
1169 | s->s_bdev->bd_inode->i_size >> s-> | 1169 | i_size_read(s->s_bdev->bd_inode) >> s-> |
1170 | s_blocksize_bits; | 1170 | s_blocksize_bits; |
1171 | } else { | 1171 | } else { |
1172 | *blocks = simple_strtoul(arg, &p, 0); | 1172 | *blocks = simple_strtoul(arg, &p, 0); |
@@ -31,7 +31,7 @@ void generic_fillattr(struct inode *inode, struct kstat *stat) | |||
31 | stat->atime = inode->i_atime; | 31 | stat->atime = inode->i_atime; |
32 | stat->mtime = inode->i_mtime; | 32 | stat->mtime = inode->i_mtime; |
33 | stat->ctime = inode->i_ctime; | 33 | stat->ctime = inode->i_ctime; |
34 | stat->blksize = (1 << inode->i_blkbits); | 34 | stat->blksize = i_blocksize(inode); |
35 | stat->blocks = inode->i_blocks; | 35 | stat->blocks = inode->i_blocks; |
36 | } | 36 | } |
37 | 37 | ||
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index 8ec6b3df0bc7..a8d8f71ef8bd 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c | |||
@@ -1193,7 +1193,7 @@ int udf_setsize(struct inode *inode, loff_t newsize) | |||
1193 | { | 1193 | { |
1194 | int err; | 1194 | int err; |
1195 | struct udf_inode_info *iinfo; | 1195 | struct udf_inode_info *iinfo; |
1196 | int bsize = 1 << inode->i_blkbits; | 1196 | int bsize = i_blocksize(inode); |
1197 | 1197 | ||
1198 | if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || | 1198 | if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
1199 | S_ISLNK(inode->i_mode))) | 1199 | S_ISLNK(inode->i_mode))) |
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c index 625b7285a37b..3c421d06a18e 100644 --- a/fs/userfaultfd.c +++ b/fs/userfaultfd.c | |||
@@ -1807,17 +1807,17 @@ static void init_once_userfaultfd_ctx(void *mem) | |||
1807 | } | 1807 | } |
1808 | 1808 | ||
1809 | /** | 1809 | /** |
1810 | * userfaultfd_file_create - Creates an userfaultfd file pointer. | 1810 | * userfaultfd_file_create - Creates a userfaultfd file pointer. |
1811 | * @flags: Flags for the userfaultfd file. | 1811 | * @flags: Flags for the userfaultfd file. |
1812 | * | 1812 | * |
1813 | * This function creates an userfaultfd file pointer, w/out installing | 1813 | * This function creates a userfaultfd file pointer, w/out installing |
1814 | * it into the fd table. This is useful when the userfaultfd file is | 1814 | * it into the fd table. This is useful when the userfaultfd file is |
1815 | * used during the initialization of data structures that require | 1815 | * used during the initialization of data structures that require |
1816 | * extra setup after the userfaultfd creation. So the userfaultfd | 1816 | * extra setup after the userfaultfd creation. So the userfaultfd |
1817 | * creation is split into the file pointer creation phase, and the | 1817 | * creation is split into the file pointer creation phase, and the |
1818 | * file descriptor installation phase. In this way races with | 1818 | * file descriptor installation phase. In this way races with |
1819 | * userspace closing the newly installed file descriptor can be | 1819 | * userspace closing the newly installed file descriptor can be |
1820 | * avoided. Returns an userfaultfd file pointer, or a proper error | 1820 | * avoided. Returns a userfaultfd file pointer, or a proper error |
1821 | * pointer. | 1821 | * pointer. |
1822 | */ | 1822 | */ |
1823 | static struct file *userfaultfd_file_create(int flags) | 1823 | static struct file *userfaultfd_file_create(int flags) |
@@ -1847,7 +1847,7 @@ static struct file *userfaultfd_file_create(int flags) | |||
1847 | ctx->released = false; | 1847 | ctx->released = false; |
1848 | ctx->mm = current->mm; | 1848 | ctx->mm = current->mm; |
1849 | /* prevent the mm struct to be freed */ | 1849 | /* prevent the mm struct to be freed */ |
1850 | atomic_inc(&ctx->mm->mm_count); | 1850 | mmgrab(ctx->mm); |
1851 | 1851 | ||
1852 | file = anon_inode_getfile("[userfaultfd]", &userfaultfd_fops, ctx, | 1852 | file = anon_inode_getfile("[userfaultfd]", &userfaultfd_fops, ctx, |
1853 | O_RDWR | (flags & UFFD_SHARED_FCNTL_FLAGS)); | 1853 | O_RDWR | (flags & UFFD_SHARED_FCNTL_FLAGS)); |
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 1ff9df7a3ce8..bf65a9ea8642 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c | |||
@@ -103,9 +103,9 @@ xfs_finish_page_writeback( | |||
103 | unsigned int bsize; | 103 | unsigned int bsize; |
104 | 104 | ||
105 | ASSERT(bvec->bv_offset < PAGE_SIZE); | 105 | ASSERT(bvec->bv_offset < PAGE_SIZE); |
106 | ASSERT((bvec->bv_offset & ((1 << inode->i_blkbits) - 1)) == 0); | 106 | ASSERT((bvec->bv_offset & (i_blocksize(inode) - 1)) == 0); |
107 | ASSERT(end < PAGE_SIZE); | 107 | ASSERT(end < PAGE_SIZE); |
108 | ASSERT((bvec->bv_len & ((1 << inode->i_blkbits) - 1)) == 0); | 108 | ASSERT((bvec->bv_len & (i_blocksize(inode) - 1)) == 0); |
109 | 109 | ||
110 | bh = head = page_buffers(bvec->bv_page); | 110 | bh = head = page_buffers(bvec->bv_page); |
111 | 111 | ||
@@ -349,7 +349,7 @@ xfs_map_blocks( | |||
349 | { | 349 | { |
350 | struct xfs_inode *ip = XFS_I(inode); | 350 | struct xfs_inode *ip = XFS_I(inode); |
351 | struct xfs_mount *mp = ip->i_mount; | 351 | struct xfs_mount *mp = ip->i_mount; |
352 | ssize_t count = 1 << inode->i_blkbits; | 352 | ssize_t count = i_blocksize(inode); |
353 | xfs_fileoff_t offset_fsb, end_fsb; | 353 | xfs_fileoff_t offset_fsb, end_fsb; |
354 | int error = 0; | 354 | int error = 0; |
355 | int bmapi_flags = XFS_BMAPI_ENTIRE; | 355 | int bmapi_flags = XFS_BMAPI_ENTIRE; |
@@ -758,7 +758,7 @@ xfs_aops_discard_page( | |||
758 | break; | 758 | break; |
759 | } | 759 | } |
760 | next_buffer: | 760 | next_buffer: |
761 | offset += 1 << inode->i_blkbits; | 761 | offset += i_blocksize(inode); |
762 | 762 | ||
763 | } while ((bh = bh->b_this_page) != head); | 763 | } while ((bh = bh->b_this_page) != head); |
764 | 764 | ||
@@ -846,7 +846,7 @@ xfs_writepage_map( | |||
846 | LIST_HEAD(submit_list); | 846 | LIST_HEAD(submit_list); |
847 | struct xfs_ioend *ioend, *next; | 847 | struct xfs_ioend *ioend, *next; |
848 | struct buffer_head *bh, *head; | 848 | struct buffer_head *bh, *head; |
849 | ssize_t len = 1 << inode->i_blkbits; | 849 | ssize_t len = i_blocksize(inode); |
850 | int error = 0; | 850 | int error = 0; |
851 | int count = 0; | 851 | int count = 0; |
852 | int uptodate = 1; | 852 | int uptodate = 1; |
@@ -1210,7 +1210,7 @@ xfs_map_trim_size( | |||
1210 | offset + mapping_size >= i_size_read(inode)) { | 1210 | offset + mapping_size >= i_size_read(inode)) { |
1211 | /* limit mapping to block that spans EOF */ | 1211 | /* limit mapping to block that spans EOF */ |
1212 | mapping_size = roundup_64(i_size_read(inode) - offset, | 1212 | mapping_size = roundup_64(i_size_read(inode) - offset, |
1213 | 1 << inode->i_blkbits); | 1213 | i_blocksize(inode)); |
1214 | } | 1214 | } |
1215 | if (mapping_size > LONG_MAX) | 1215 | if (mapping_size > LONG_MAX) |
1216 | mapping_size = LONG_MAX; | 1216 | mapping_size = LONG_MAX; |
@@ -1241,7 +1241,7 @@ xfs_get_blocks( | |||
1241 | return -EIO; | 1241 | return -EIO; |
1242 | 1242 | ||
1243 | offset = (xfs_off_t)iblock << inode->i_blkbits; | 1243 | offset = (xfs_off_t)iblock << inode->i_blkbits; |
1244 | ASSERT(bh_result->b_size >= (1 << inode->i_blkbits)); | 1244 | ASSERT(bh_result->b_size >= i_blocksize(inode)); |
1245 | size = bh_result->b_size; | 1245 | size = bh_result->b_size; |
1246 | 1246 | ||
1247 | if (offset >= i_size_read(inode)) | 1247 | if (offset >= i_size_read(inode)) |
@@ -1389,7 +1389,7 @@ xfs_vm_set_page_dirty( | |||
1389 | if (offset < end_offset) | 1389 | if (offset < end_offset) |
1390 | set_buffer_dirty(bh); | 1390 | set_buffer_dirty(bh); |
1391 | bh = bh->b_this_page; | 1391 | bh = bh->b_this_page; |
1392 | offset += 1 << inode->i_blkbits; | 1392 | offset += i_blocksize(inode); |
1393 | } while (bh != head); | 1393 | } while (bh != head); |
1394 | } | 1394 | } |
1395 | /* | 1395 | /* |
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index a50eca676670..35703a801372 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c | |||
@@ -754,7 +754,7 @@ xfs_file_fallocate( | |||
754 | if (error) | 754 | if (error) |
755 | goto out_unlock; | 755 | goto out_unlock; |
756 | } else if (mode & FALLOC_FL_COLLAPSE_RANGE) { | 756 | } else if (mode & FALLOC_FL_COLLAPSE_RANGE) { |
757 | unsigned blksize_mask = (1 << inode->i_blkbits) - 1; | 757 | unsigned int blksize_mask = i_blocksize(inode) - 1; |
758 | 758 | ||
759 | if (offset & blksize_mask || len & blksize_mask) { | 759 | if (offset & blksize_mask || len & blksize_mask) { |
760 | error = -EINVAL; | 760 | error = -EINVAL; |
@@ -776,7 +776,7 @@ xfs_file_fallocate( | |||
776 | if (error) | 776 | if (error) |
777 | goto out_unlock; | 777 | goto out_unlock; |
778 | } else if (mode & FALLOC_FL_INSERT_RANGE) { | 778 | } else if (mode & FALLOC_FL_INSERT_RANGE) { |
779 | unsigned blksize_mask = (1 << inode->i_blkbits) - 1; | 779 | unsigned int blksize_mask = i_blocksize(inode) - 1; |
780 | 780 | ||
781 | new_size = i_size_read(inode) + len; | 781 | new_size = i_size_read(inode) + len; |
782 | if (offset & blksize_mask || len & blksize_mask) { | 782 | if (offset & blksize_mask || len & blksize_mask) { |
diff --git a/include/asm-generic/kprobes.h b/include/asm-generic/kprobes.h new file mode 100644 index 000000000000..57af9f21d148 --- /dev/null +++ b/include/asm-generic/kprobes.h | |||
@@ -0,0 +1,25 @@ | |||
1 | #ifndef _ASM_GENERIC_KPROBES_H | ||
2 | #define _ASM_GENERIC_KPROBES_H | ||
3 | |||
4 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) | ||
5 | #ifdef CONFIG_KPROBES | ||
6 | /* | ||
7 | * Blacklist ganerating macro. Specify functions which is not probed | ||
8 | * by using this macro. | ||
9 | */ | ||
10 | # define __NOKPROBE_SYMBOL(fname) \ | ||
11 | static unsigned long __used \ | ||
12 | __attribute__((__section__("_kprobe_blacklist"))) \ | ||
13 | _kbl_addr_##fname = (unsigned long)fname; | ||
14 | # define NOKPROBE_SYMBOL(fname) __NOKPROBE_SYMBOL(fname) | ||
15 | /* Use this to forbid a kprobes attach on very low level functions */ | ||
16 | # define __kprobes __attribute__((__section__(".kprobes.text"))) | ||
17 | # define nokprobe_inline __always_inline | ||
18 | #else | ||
19 | # define NOKPROBE_SYMBOL(fname) | ||
20 | # define __kprobes | ||
21 | # define nokprobe_inline inline | ||
22 | #endif | ||
23 | #endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */ | ||
24 | |||
25 | #endif /* _ASM_GENERIC_KPROBES_H */ | ||
diff --git a/include/linux/compat.h b/include/linux/compat.h index 9e40be522793..aef47be2a5c1 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -711,8 +711,10 @@ int __compat_save_altstack(compat_stack_t __user *, unsigned long); | |||
711 | compat_stack_t __user *__uss = uss; \ | 711 | compat_stack_t __user *__uss = uss; \ |
712 | struct task_struct *t = current; \ | 712 | struct task_struct *t = current; \ |
713 | put_user_ex(ptr_to_compat((void __user *)t->sas_ss_sp), &__uss->ss_sp); \ | 713 | put_user_ex(ptr_to_compat((void __user *)t->sas_ss_sp), &__uss->ss_sp); \ |
714 | put_user_ex(sas_ss_flags(sp), &__uss->ss_flags); \ | 714 | put_user_ex(t->sas_ss_flags, &__uss->ss_flags); \ |
715 | put_user_ex(t->sas_ss_size, &__uss->ss_size); \ | 715 | put_user_ex(t->sas_ss_size, &__uss->ss_size); \ |
716 | if (t->sas_ss_flags & SS_AUTODISARM) \ | ||
717 | sas_ss_reset(t); \ | ||
716 | } while (0); | 718 | } while (0); |
717 | 719 | ||
718 | asmlinkage long compat_sys_sched_rr_get_interval(compat_pid_t pid, | 720 | asmlinkage long compat_sys_sched_rr_get_interval(compat_pid_t pid, |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 627e697e5d25..f8110051188f 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -577,12 +577,4 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s | |||
577 | (_________p1); \ | 577 | (_________p1); \ |
578 | }) | 578 | }) |
579 | 579 | ||
580 | /* Ignore/forbid kprobes attach on very low level functions marked by this attribute: */ | ||
581 | #ifdef CONFIG_KPROBES | ||
582 | # define __kprobes __attribute__((__section__(".kprobes.text"))) | ||
583 | # define nokprobe_inline __always_inline | ||
584 | #else | ||
585 | # define __kprobes | ||
586 | # define nokprobe_inline inline | ||
587 | #endif | ||
588 | #endif /* __LINUX_COMPILER_H */ | 580 | #endif /* __LINUX_COMPILER_H */ |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index c965e4469499..591b6c16f9c1 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -562,7 +562,7 @@ static inline struct dentry *d_backing_dentry(struct dentry *upper) | |||
562 | * @inode: inode to select the dentry from multiple layers (can be NULL) | 562 | * @inode: inode to select the dentry from multiple layers (can be NULL) |
563 | * @flags: open flags to control copy-up behavior | 563 | * @flags: open flags to control copy-up behavior |
564 | * | 564 | * |
565 | * If dentry is on an union/overlay, then return the underlying, real dentry. | 565 | * If dentry is on a union/overlay, then return the underlying, real dentry. |
566 | * Otherwise return the dentry itself. | 566 | * Otherwise return the dentry itself. |
567 | * | 567 | * |
568 | * See also: Documentation/filesystems/vfs.txt | 568 | * See also: Documentation/filesystems/vfs.txt |
@@ -581,7 +581,7 @@ static inline struct dentry *d_real(struct dentry *dentry, | |||
581 | * d_real_inode - Return the real inode | 581 | * d_real_inode - Return the real inode |
582 | * @dentry: The dentry to query | 582 | * @dentry: The dentry to query |
583 | * | 583 | * |
584 | * If dentry is on an union/overlay, then return the underlying, real inode. | 584 | * If dentry is on a union/overlay, then return the underlying, real inode. |
585 | * Otherwise return d_inode(). | 585 | * Otherwise return d_inode(). |
586 | */ | 586 | */ |
587 | static inline struct inode *d_real_inode(const struct dentry *dentry) | 587 | static inline struct inode *d_real_inode(const struct dentry *dentry) |
diff --git a/include/linux/fs.h b/include/linux/fs.h index c930cbc19342..c64f2cb7d364 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -655,6 +655,11 @@ struct inode { | |||
655 | void *i_private; /* fs or device private pointer */ | 655 | void *i_private; /* fs or device private pointer */ |
656 | }; | 656 | }; |
657 | 657 | ||
658 | static inline unsigned int i_blocksize(const struct inode *node) | ||
659 | { | ||
660 | return (1 << node->i_blkbits); | ||
661 | } | ||
662 | |||
658 | static inline int inode_unhashed(struct inode *inode) | 663 | static inline int inode_unhashed(struct inode *inode) |
659 | { | 664 | { |
660 | return hlist_unhashed(&inode->i_hash); | 665 | return hlist_unhashed(&inode->i_hash); |
diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index 8f2e059e4d45..4d748603e818 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | /* | 9 | /* |
10 | * The use of "&&" / "||" is limited in certain expressions. | 10 | * The use of "&&" / "||" is limited in certain expressions. |
11 | * The followings enable to calculate "and" / "or" with macro expansion only. | 11 | * The following enable to calculate "and" / "or" with macro expansion only. |
12 | */ | 12 | */ |
13 | #define __and(x, y) ___and(x, y) | 13 | #define __and(x, y) ___and(x, y) |
14 | #define ___and(x, y) ____and(__ARG_PLACEHOLDER_##x, y) | 14 | #define ___and(x, y) ____and(__ARG_PLACEHOLDER_##x, y) |
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 16ddfb8b304a..c328e4f7dcad 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -29,7 +29,7 @@ | |||
29 | * <jkenisto@us.ibm.com> and Prasanna S Panchamukhi | 29 | * <jkenisto@us.ibm.com> and Prasanna S Panchamukhi |
30 | * <prasanna@in.ibm.com> added function-return probes. | 30 | * <prasanna@in.ibm.com> added function-return probes. |
31 | */ | 31 | */ |
32 | #include <linux/compiler.h> /* for __kprobes */ | 32 | #include <linux/compiler.h> |
33 | #include <linux/linkage.h> | 33 | #include <linux/linkage.h> |
34 | #include <linux/list.h> | 34 | #include <linux/list.h> |
35 | #include <linux/notifier.h> | 35 | #include <linux/notifier.h> |
@@ -40,9 +40,9 @@ | |||
40 | #include <linux/rcupdate.h> | 40 | #include <linux/rcupdate.h> |
41 | #include <linux/mutex.h> | 41 | #include <linux/mutex.h> |
42 | #include <linux/ftrace.h> | 42 | #include <linux/ftrace.h> |
43 | #include <asm/kprobes.h> | ||
43 | 44 | ||
44 | #ifdef CONFIG_KPROBES | 45 | #ifdef CONFIG_KPROBES |
45 | #include <asm/kprobes.h> | ||
46 | 46 | ||
47 | /* kprobe_status settings */ | 47 | /* kprobe_status settings */ |
48 | #define KPROBE_HIT_ACTIVE 0x00000001 | 48 | #define KPROBE_HIT_ACTIVE 0x00000001 |
@@ -51,6 +51,7 @@ | |||
51 | #define KPROBE_HIT_SSDONE 0x00000008 | 51 | #define KPROBE_HIT_SSDONE 0x00000008 |
52 | 52 | ||
53 | #else /* CONFIG_KPROBES */ | 53 | #else /* CONFIG_KPROBES */ |
54 | #include <asm-generic/kprobes.h> | ||
54 | typedef int kprobe_opcode_t; | 55 | typedef int kprobe_opcode_t; |
55 | struct arch_specific_insn { | 56 | struct arch_specific_insn { |
56 | int dummy; | 57 | int dummy; |
@@ -509,18 +510,4 @@ static inline bool is_kprobe_optinsn_slot(unsigned long addr) | |||
509 | } | 510 | } |
510 | #endif | 511 | #endif |
511 | 512 | ||
512 | #ifdef CONFIG_KPROBES | ||
513 | /* | ||
514 | * Blacklist ganerating macro. Specify functions which is not probed | ||
515 | * by using this macro. | ||
516 | */ | ||
517 | #define __NOKPROBE_SYMBOL(fname) \ | ||
518 | static unsigned long __used \ | ||
519 | __attribute__((section("_kprobe_blacklist"))) \ | ||
520 | _kbl_addr_##fname = (unsigned long)fname; | ||
521 | #define NOKPROBE_SYMBOL(fname) __NOKPROBE_SYMBOL(fname) | ||
522 | #else | ||
523 | #define NOKPROBE_SYMBOL(fname) | ||
524 | #endif | ||
525 | |||
526 | #endif /* _LINUX_KPROBES_H */ | 513 | #endif /* _LINUX_KPROBES_H */ |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 808751d7b737..4f6d440ad785 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -407,8 +407,27 @@ struct mm_struct { | |||
407 | unsigned long task_size; /* size of task vm space */ | 407 | unsigned long task_size; /* size of task vm space */ |
408 | unsigned long highest_vm_end; /* highest vma end address */ | 408 | unsigned long highest_vm_end; /* highest vma end address */ |
409 | pgd_t * pgd; | 409 | pgd_t * pgd; |
410 | atomic_t mm_users; /* How many users with user space? */ | 410 | |
411 | atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */ | 411 | /** |
412 | * @mm_users: The number of users including userspace. | ||
413 | * | ||
414 | * Use mmget()/mmget_not_zero()/mmput() to modify. When this drops | ||
415 | * to 0 (i.e. when the task exits and there are no other temporary | ||
416 | * reference holders), we also release a reference on @mm_count | ||
417 | * (which may then free the &struct mm_struct if @mm_count also | ||
418 | * drops to 0). | ||
419 | */ | ||
420 | atomic_t mm_users; | ||
421 | |||
422 | /** | ||
423 | * @mm_count: The number of references to &struct mm_struct | ||
424 | * (@mm_users count as 1). | ||
425 | * | ||
426 | * Use mmgrab()/mmdrop() to modify. When this drops to 0, the | ||
427 | * &struct mm_struct is freed. | ||
428 | */ | ||
429 | atomic_t mm_count; | ||
430 | |||
412 | atomic_long_t nr_ptes; /* PTE page table pages */ | 431 | atomic_long_t nr_ptes; /* PTE page table pages */ |
413 | #if CONFIG_PGTABLE_LEVELS > 2 | 432 | #if CONFIG_PGTABLE_LEVELS > 2 |
414 | atomic_long_t nr_pmds; /* PMD page table pages */ | 433 | atomic_long_t nr_pmds; /* PMD page table pages */ |
diff --git a/include/linux/mtd/qinfo.h b/include/linux/mtd/qinfo.h index 7b3d487d8b3f..b532ce524dae 100644 --- a/include/linux/mtd/qinfo.h +++ b/include/linux/mtd/qinfo.h | |||
@@ -14,7 +14,7 @@ | |||
14 | * @DevId - Chip Device ID | 14 | * @DevId - Chip Device ID |
15 | * @qinfo - pointer to qinfo records describing the chip | 15 | * @qinfo - pointer to qinfo records describing the chip |
16 | * @numchips - number of chips including virual RWW partitions | 16 | * @numchips - number of chips including virual RWW partitions |
17 | * @chipshift - Chip/partiton size 2^chipshift | 17 | * @chipshift - Chip/partition size 2^chipshift |
18 | * @chips - per-chip data structure | 18 | * @chips - per-chip data structure |
19 | */ | 19 | */ |
20 | struct lpddr_private { | 20 | struct lpddr_private { |
diff --git a/include/linux/pid.h b/include/linux/pid.h index 23705a53abba..298ead5512e5 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -191,10 +191,10 @@ pid_t pid_vnr(struct pid *pid); | |||
191 | #define do_each_pid_thread(pid, type, task) \ | 191 | #define do_each_pid_thread(pid, type, task) \ |
192 | do_each_pid_task(pid, type, task) { \ | 192 | do_each_pid_task(pid, type, task) { \ |
193 | struct task_struct *tg___ = task; \ | 193 | struct task_struct *tg___ = task; \ |
194 | do { | 194 | for_each_thread(tg___, task) { |
195 | 195 | ||
196 | #define while_each_pid_thread(pid, type, task) \ | 196 | #define while_each_pid_thread(pid, type, task) \ |
197 | } while_each_thread(tg___, task); \ | 197 | } \ |
198 | task = tg___; \ | 198 | task = tg___; \ |
199 | } while_each_pid_task(pid, type, task) | 199 | } while_each_pid_task(pid, type, task) |
200 | #endif /* _LINUX_PID_H */ | 200 | #endif /* _LINUX_PID_H */ |
diff --git a/include/linux/rodata_test.h b/include/linux/rodata_test.h new file mode 100644 index 000000000000..ea05f6c51413 --- /dev/null +++ b/include/linux/rodata_test.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * rodata_test.h: functional test for mark_rodata_ro function | ||
3 | * | ||
4 | * (C) Copyright 2008 Intel Corporation | ||
5 | * Author: Arjan van de Ven <arjan@linux.intel.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; version 2 | ||
10 | * of the License. | ||
11 | */ | ||
12 | |||
13 | #ifndef _RODATA_TEST_H | ||
14 | #define _RODATA_TEST_H | ||
15 | |||
16 | #ifdef CONFIG_DEBUG_RODATA_TEST | ||
17 | extern const int rodata_test_data; | ||
18 | void rodata_test(void); | ||
19 | #else | ||
20 | static inline void rodata_test(void) {} | ||
21 | #endif | ||
22 | |||
23 | #endif /* _RODATA_TEST_H */ | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 451e241f32c5..4a28deb5f210 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -2904,6 +2904,28 @@ static inline unsigned long sigsp(unsigned long sp, struct ksignal *ksig) | |||
2904 | */ | 2904 | */ |
2905 | extern struct mm_struct * mm_alloc(void); | 2905 | extern struct mm_struct * mm_alloc(void); |
2906 | 2906 | ||
2907 | /** | ||
2908 | * mmgrab() - Pin a &struct mm_struct. | ||
2909 | * @mm: The &struct mm_struct to pin. | ||
2910 | * | ||
2911 | * Make sure that @mm will not get freed even after the owning task | ||
2912 | * exits. This doesn't guarantee that the associated address space | ||
2913 | * will still exist later on and mmget_not_zero() has to be used before | ||
2914 | * accessing it. | ||
2915 | * | ||
2916 | * This is a preferred way to to pin @mm for a longer/unbounded amount | ||
2917 | * of time. | ||
2918 | * | ||
2919 | * Use mmdrop() to release the reference acquired by mmgrab(). | ||
2920 | * | ||
2921 | * See also <Documentation/vm/active_mm.txt> for an in-depth explanation | ||
2922 | * of &mm_struct.mm_count vs &mm_struct.mm_users. | ||
2923 | */ | ||
2924 | static inline void mmgrab(struct mm_struct *mm) | ||
2925 | { | ||
2926 | atomic_inc(&mm->mm_count); | ||
2927 | } | ||
2928 | |||
2907 | /* mmdrop drops the mm and the page tables */ | 2929 | /* mmdrop drops the mm and the page tables */ |
2908 | extern void __mmdrop(struct mm_struct *); | 2930 | extern void __mmdrop(struct mm_struct *); |
2909 | static inline void mmdrop(struct mm_struct *mm) | 2931 | static inline void mmdrop(struct mm_struct *mm) |
@@ -2926,6 +2948,27 @@ static inline void mmdrop_async(struct mm_struct *mm) | |||
2926 | } | 2948 | } |
2927 | } | 2949 | } |
2928 | 2950 | ||
2951 | /** | ||
2952 | * mmget() - Pin the address space associated with a &struct mm_struct. | ||
2953 | * @mm: The address space to pin. | ||
2954 | * | ||
2955 | * Make sure that the address space of the given &struct mm_struct doesn't | ||
2956 | * go away. This does not protect against parts of the address space being | ||
2957 | * modified or freed, however. | ||
2958 | * | ||
2959 | * Never use this function to pin this address space for an | ||
2960 | * unbounded/indefinite amount of time. | ||
2961 | * | ||
2962 | * Use mmput() to release the reference acquired by mmget(). | ||
2963 | * | ||
2964 | * See also <Documentation/vm/active_mm.txt> for an in-depth explanation | ||
2965 | * of &mm_struct.mm_count vs &mm_struct.mm_users. | ||
2966 | */ | ||
2967 | static inline void mmget(struct mm_struct *mm) | ||
2968 | { | ||
2969 | atomic_inc(&mm->mm_users); | ||
2970 | } | ||
2971 | |||
2929 | static inline bool mmget_not_zero(struct mm_struct *mm) | 2972 | static inline bool mmget_not_zero(struct mm_struct *mm) |
2930 | { | 2973 | { |
2931 | return atomic_inc_not_zero(&mm->mm_users); | 2974 | return atomic_inc_not_zero(&mm->mm_users); |
diff --git a/include/linux/sem.h b/include/linux/sem.h index d0efd6e6c20a..4fc222f8755d 100644 --- a/include/linux/sem.h +++ b/include/linux/sem.h | |||
@@ -21,7 +21,7 @@ struct sem_array { | |||
21 | struct list_head list_id; /* undo requests on this array */ | 21 | struct list_head list_id; /* undo requests on this array */ |
22 | int sem_nsems; /* no. of semaphores in array */ | 22 | int sem_nsems; /* no. of semaphores in array */ |
23 | int complex_count; /* pending complex operations */ | 23 | int complex_count; /* pending complex operations */ |
24 | bool complex_mode; /* no parallel simple ops */ | 24 | unsigned int use_global_lock;/* >0: global lock required */ |
25 | }; | 25 | }; |
26 | 26 | ||
27 | #ifdef CONFIG_SYSVIPC | 27 | #ifdef CONFIG_SYSVIPC |
diff --git a/include/linux/spi/flash.h b/include/linux/spi/flash.h index 3f22932e67a4..f4199e758f97 100644 --- a/include/linux/spi/flash.h +++ b/include/linux/spi/flash.h | |||
@@ -7,7 +7,7 @@ struct mtd_partition; | |||
7 | * struct flash_platform_data: board-specific flash data | 7 | * struct flash_platform_data: board-specific flash data |
8 | * @name: optional flash device name (eg, as used with mtdparts=) | 8 | * @name: optional flash device name (eg, as used with mtdparts=) |
9 | * @parts: optional array of mtd_partitions for static partitioning | 9 | * @parts: optional array of mtd_partitions for static partitioning |
10 | * @nr_parts: number of mtd_partitions for static partitoning | 10 | * @nr_parts: number of mtd_partitions for static partitioning |
11 | * @type: optional flash device type (e.g. m25p80 vs m25p64), for use | 11 | * @type: optional flash device type (e.g. m25p80 vs m25p64), for use |
12 | * with chips that can't be queried for JEDEC or other IDs | 12 | * with chips that can't be queried for JEDEC or other IDs |
13 | * | 13 | * |
diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h index e1006b391cdc..bee1404391dd 100644 --- a/include/media/v4l2-ctrls.h +++ b/include/media/v4l2-ctrls.h | |||
@@ -174,10 +174,10 @@ typedef void (*v4l2_ctrl_notify_fnc)(struct v4l2_ctrl *ctrl, void *priv); | |||
174 | * not freed when the control is deleted. Should this be needed | 174 | * not freed when the control is deleted. Should this be needed |
175 | * then a new internal bitfield can be added to tell the framework | 175 | * then a new internal bitfield can be added to tell the framework |
176 | * to free this pointer. | 176 | * to free this pointer. |
177 | * @p_cur: The control's current value represented via an union with | 177 | * @p_cur: The control's current value represented via a union with |
178 | * provides a standard way of accessing control types | 178 | * provides a standard way of accessing control types |
179 | * through a pointer. | 179 | * through a pointer. |
180 | * @p_new: The control's new value represented via an union with provides | 180 | * @p_new: The control's new value represented via a union with provides |
181 | * a standard way of accessing control types | 181 | * a standard way of accessing control types |
182 | * through a pointer. | 182 | * through a pointer. |
183 | */ | 183 | */ |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index c92dc03c8528..ead1aa6d003e 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -1948,7 +1948,7 @@ struct cfg80211_deauth_request { | |||
1948 | * struct cfg80211_disassoc_request - Disassociation request data | 1948 | * struct cfg80211_disassoc_request - Disassociation request data |
1949 | * | 1949 | * |
1950 | * This structure provides information needed to complete IEEE 802.11 | 1950 | * This structure provides information needed to complete IEEE 802.11 |
1951 | * disassocation. | 1951 | * disassociation. |
1952 | * | 1952 | * |
1953 | * @bss: the BSS to disassociate from | 1953 | * @bss: the BSS to disassociate from |
1954 | * @ie: Extra IEs to add to Disassociation frame or %NULL | 1954 | * @ie: Extra IEs to add to Disassociation frame or %NULL |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index b9a08cd1d97d..a3bab3c5ecfb 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -3392,7 +3392,7 @@ enum ieee80211_reconfig_type { | |||
3392 | * since there won't be any time to beacon before the switch anyway. | 3392 | * since there won't be any time to beacon before the switch anyway. |
3393 | * @pre_channel_switch: This is an optional callback that is called | 3393 | * @pre_channel_switch: This is an optional callback that is called |
3394 | * before a channel switch procedure is started (ie. when a STA | 3394 | * before a channel switch procedure is started (ie. when a STA |
3395 | * gets a CSA or an userspace initiated channel-switch), allowing | 3395 | * gets a CSA or a userspace initiated channel-switch), allowing |
3396 | * the driver to prepare for the channel switch. | 3396 | * the driver to prepare for the channel switch. |
3397 | * @post_channel_switch: This is an optional callback that is called | 3397 | * @post_channel_switch: This is an optional callback that is called |
3398 | * after a channel switch procedure is completed, allowing the | 3398 | * after a channel switch procedure is completed, allowing the |
diff --git a/include/uapi/linux/auto_dev-ioctl.h b/include/uapi/linux/auto_dev-ioctl.h index 021ed331dd71..744b3d060968 100644 --- a/include/uapi/linux/auto_dev-ioctl.h +++ b/include/uapi/linux/auto_dev-ioctl.h | |||
@@ -113,17 +113,13 @@ struct autofs_dev_ioctl { | |||
113 | 113 | ||
114 | static inline void init_autofs_dev_ioctl(struct autofs_dev_ioctl *in) | 114 | static inline void init_autofs_dev_ioctl(struct autofs_dev_ioctl *in) |
115 | { | 115 | { |
116 | memset(in, 0, sizeof(struct autofs_dev_ioctl)); | 116 | memset(in, 0, AUTOFS_DEV_IOCTL_SIZE); |
117 | in->ver_major = AUTOFS_DEV_IOCTL_VERSION_MAJOR; | 117 | in->ver_major = AUTOFS_DEV_IOCTL_VERSION_MAJOR; |
118 | in->ver_minor = AUTOFS_DEV_IOCTL_VERSION_MINOR; | 118 | in->ver_minor = AUTOFS_DEV_IOCTL_VERSION_MINOR; |
119 | in->size = sizeof(struct autofs_dev_ioctl); | 119 | in->size = AUTOFS_DEV_IOCTL_SIZE; |
120 | in->ioctlfd = -1; | 120 | in->ioctlfd = -1; |
121 | } | 121 | } |
122 | 122 | ||
123 | /* | ||
124 | * If you change this make sure you make the corresponding change | ||
125 | * to autofs-dev-ioctl.c:lookup_ioctl() | ||
126 | */ | ||
127 | enum { | 123 | enum { |
128 | /* Get various version info */ | 124 | /* Get various version info */ |
129 | AUTOFS_DEV_IOCTL_VERSION_CMD = 0x71, | 125 | AUTOFS_DEV_IOCTL_VERSION_CMD = 0x71, |
@@ -160,8 +156,6 @@ enum { | |||
160 | AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD, | 156 | AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD, |
161 | }; | 157 | }; |
162 | 158 | ||
163 | #define AUTOFS_IOCTL 0x93 | ||
164 | |||
165 | #define AUTOFS_DEV_IOCTL_VERSION \ | 159 | #define AUTOFS_DEV_IOCTL_VERSION \ |
166 | _IOWR(AUTOFS_IOCTL, \ | 160 | _IOWR(AUTOFS_IOCTL, \ |
167 | AUTOFS_DEV_IOCTL_VERSION_CMD, struct autofs_dev_ioctl) | 161 | AUTOFS_DEV_IOCTL_VERSION_CMD, struct autofs_dev_ioctl) |
diff --git a/include/uapi/linux/auto_fs.h b/include/uapi/linux/auto_fs.h index 1bfc3ed8b284..aa63451ef20a 100644 --- a/include/uapi/linux/auto_fs.h +++ b/include/uapi/linux/auto_fs.h | |||
@@ -61,12 +61,23 @@ struct autofs_packet_expire { | |||
61 | char name[NAME_MAX+1]; | 61 | char name[NAME_MAX+1]; |
62 | }; | 62 | }; |
63 | 63 | ||
64 | #define AUTOFS_IOC_READY _IO(0x93, 0x60) | 64 | #define AUTOFS_IOCTL 0x93 |
65 | #define AUTOFS_IOC_FAIL _IO(0x93, 0x61) | 65 | |
66 | #define AUTOFS_IOC_CATATONIC _IO(0x93, 0x62) | 66 | enum { |
67 | #define AUTOFS_IOC_PROTOVER _IOR(0x93, 0x63, int) | 67 | AUTOFS_IOC_READY_CMD = 0x60, |
68 | #define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93, 0x64, compat_ulong_t) | 68 | AUTOFS_IOC_FAIL_CMD, |
69 | #define AUTOFS_IOC_SETTIMEOUT _IOWR(0x93, 0x64, unsigned long) | 69 | AUTOFS_IOC_CATATONIC_CMD, |
70 | #define AUTOFS_IOC_EXPIRE _IOR(0x93, 0x65, struct autofs_packet_expire) | 70 | AUTOFS_IOC_PROTOVER_CMD, |
71 | AUTOFS_IOC_SETTIMEOUT_CMD, | ||
72 | AUTOFS_IOC_EXPIRE_CMD, | ||
73 | }; | ||
74 | |||
75 | #define AUTOFS_IOC_READY _IO(AUTOFS_IOCTL, AUTOFS_IOC_READY_CMD) | ||
76 | #define AUTOFS_IOC_FAIL _IO(AUTOFS_IOCTL, AUTOFS_IOC_FAIL_CMD) | ||
77 | #define AUTOFS_IOC_CATATONIC _IO(AUTOFS_IOCTL, AUTOFS_IOC_CATATONIC_CMD) | ||
78 | #define AUTOFS_IOC_PROTOVER _IOR(AUTOFS_IOCTL, AUTOFS_IOC_PROTOVER_CMD, int) | ||
79 | #define AUTOFS_IOC_SETTIMEOUT32 _IOWR(AUTOFS_IOCTL, AUTOFS_IOC_SETTIMEOUT_CMD, compat_ulong_t) | ||
80 | #define AUTOFS_IOC_SETTIMEOUT _IOWR(AUTOFS_IOCTL, AUTOFS_IOC_SETTIMEOUT_CMD, unsigned long) | ||
81 | #define AUTOFS_IOC_EXPIRE _IOR(AUTOFS_IOCTL, AUTOFS_IOC_EXPIRE_CMD, struct autofs_packet_expire) | ||
71 | 82 | ||
72 | #endif /* _UAPI_LINUX_AUTO_FS_H */ | 83 | #endif /* _UAPI_LINUX_AUTO_FS_H */ |
diff --git a/include/uapi/linux/auto_fs4.h b/include/uapi/linux/auto_fs4.h index 8f8f1bdcca8c..7c6da423d54e 100644 --- a/include/uapi/linux/auto_fs4.h +++ b/include/uapi/linux/auto_fs4.h | |||
@@ -148,10 +148,16 @@ union autofs_v5_packet_union { | |||
148 | autofs_packet_expire_direct_t expire_direct; | 148 | autofs_packet_expire_direct_t expire_direct; |
149 | }; | 149 | }; |
150 | 150 | ||
151 | #define AUTOFS_IOC_EXPIRE_MULTI _IOW(0x93, 0x66, int) | 151 | enum { |
152 | #define AUTOFS_IOC_EXPIRE_INDIRECT AUTOFS_IOC_EXPIRE_MULTI | 152 | AUTOFS_IOC_EXPIRE_MULTI_CMD = 0x66, /* AUTOFS_IOC_EXPIRE_CMD + 1 */ |
153 | #define AUTOFS_IOC_EXPIRE_DIRECT AUTOFS_IOC_EXPIRE_MULTI | 153 | AUTOFS_IOC_PROTOSUBVER_CMD, |
154 | #define AUTOFS_IOC_PROTOSUBVER _IOR(0x93, 0x67, int) | 154 | AUTOFS_IOC_ASKUMOUNT_CMD = 0x70, /* AUTOFS_DEV_IOCTL_VERSION_CMD - 1 */ |
155 | #define AUTOFS_IOC_ASKUMOUNT _IOR(0x93, 0x70, int) | 155 | }; |
156 | |||
157 | #define AUTOFS_IOC_EXPIRE_MULTI _IOW(AUTOFS_IOCTL, AUTOFS_IOC_EXPIRE_MULTI_CMD, int) | ||
158 | #define AUTOFS_IOC_EXPIRE_INDIRECT AUTOFS_IOC_EXPIRE_MULTI | ||
159 | #define AUTOFS_IOC_EXPIRE_DIRECT AUTOFS_IOC_EXPIRE_MULTI | ||
160 | #define AUTOFS_IOC_PROTOSUBVER _IOR(AUTOFS_IOCTL, AUTOFS_IOC_PROTOSUBVER_CMD, int) | ||
161 | #define AUTOFS_IOC_ASKUMOUNT _IOR(AUTOFS_IOCTL, AUTOFS_IOC_ASKUMOUNT_CMD, int) | ||
156 | 162 | ||
157 | #endif /* _LINUX_AUTO_FS4_H */ | 163 | #endif /* _LINUX_AUTO_FS4_H */ |
diff --git a/include/xen/interface/grant_table.h b/include/xen/interface/grant_table.h index 56806bc90c2f..7fb7112d667c 100644 --- a/include/xen/interface/grant_table.h +++ b/include/xen/interface/grant_table.h | |||
@@ -181,7 +181,7 @@ struct grant_entry_header { | |||
181 | }; | 181 | }; |
182 | 182 | ||
183 | /* | 183 | /* |
184 | * Version 2 of the grant entry structure, here is an union because three | 184 | * Version 2 of the grant entry structure, here is a union because three |
185 | * different types are suppotted: full_page, sub_page and transitive. | 185 | * different types are suppotted: full_page, sub_page and transitive. |
186 | */ | 186 | */ |
187 | union grant_entry_v2 { | 187 | union grant_entry_v2 { |
diff --git a/init/initramfs.c b/init/initramfs.c index b32ad7d97ac9..981f286c1d16 100644 --- a/init/initramfs.c +++ b/init/initramfs.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/dirent.h> | 18 | #include <linux/dirent.h> |
19 | #include <linux/syscalls.h> | 19 | #include <linux/syscalls.h> |
20 | #include <linux/utime.h> | 20 | #include <linux/utime.h> |
21 | #include <linux/file.h> | ||
21 | 22 | ||
22 | static ssize_t __init xwrite(int fd, const char *p, size_t count) | 23 | static ssize_t __init xwrite(int fd, const char *p, size_t count) |
23 | { | 24 | { |
@@ -647,6 +648,7 @@ static int __init populate_rootfs(void) | |||
647 | printk(KERN_EMERG "Initramfs unpacking failed: %s\n", err); | 648 | printk(KERN_EMERG "Initramfs unpacking failed: %s\n", err); |
648 | free_initrd(); | 649 | free_initrd(); |
649 | #endif | 650 | #endif |
651 | flush_delayed_fput(); | ||
650 | /* | 652 | /* |
651 | * Try loading default modules from initramfs. This gives | 653 | * Try loading default modules from initramfs. This gives |
652 | * us a chance to load before device_initcalls. | 654 | * us a chance to load before device_initcalls. |
diff --git a/init/main.c b/init/main.c index 24ea48745061..47ea22d181ef 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -71,7 +71,6 @@ | |||
71 | #include <linux/shmem_fs.h> | 71 | #include <linux/shmem_fs.h> |
72 | #include <linux/slab.h> | 72 | #include <linux/slab.h> |
73 | #include <linux/perf_event.h> | 73 | #include <linux/perf_event.h> |
74 | #include <linux/file.h> | ||
75 | #include <linux/ptrace.h> | 74 | #include <linux/ptrace.h> |
76 | #include <linux/blkdev.h> | 75 | #include <linux/blkdev.h> |
77 | #include <linux/elevator.h> | 76 | #include <linux/elevator.h> |
@@ -83,6 +82,7 @@ | |||
83 | #include <linux/proc_ns.h> | 82 | #include <linux/proc_ns.h> |
84 | #include <linux/io.h> | 83 | #include <linux/io.h> |
85 | #include <linux/cache.h> | 84 | #include <linux/cache.h> |
85 | #include <linux/rodata_test.h> | ||
86 | 86 | ||
87 | #include <asm/io.h> | 87 | #include <asm/io.h> |
88 | #include <asm/bugs.h> | 88 | #include <asm/bugs.h> |
@@ -936,9 +936,10 @@ __setup("rodata=", set_debug_rodata); | |||
936 | #ifdef CONFIG_STRICT_KERNEL_RWX | 936 | #ifdef CONFIG_STRICT_KERNEL_RWX |
937 | static void mark_readonly(void) | 937 | static void mark_readonly(void) |
938 | { | 938 | { |
939 | if (rodata_enabled) | 939 | if (rodata_enabled) { |
940 | mark_rodata_ro(); | 940 | mark_rodata_ro(); |
941 | else | 941 | rodata_test(); |
942 | } else | ||
942 | pr_info("Kernel memory protection disabled.\n"); | 943 | pr_info("Kernel memory protection disabled.\n"); |
943 | } | 944 | } |
944 | #else | 945 | #else |
@@ -960,8 +961,6 @@ static int __ref kernel_init(void *unused) | |||
960 | system_state = SYSTEM_RUNNING; | 961 | system_state = SYSTEM_RUNNING; |
961 | numa_default_policy(); | 962 | numa_default_policy(); |
962 | 963 | ||
963 | flush_delayed_fput(); | ||
964 | |||
965 | rcu_end_inkernel_boot(); | 964 | rcu_end_inkernel_boot(); |
966 | 965 | ||
967 | if (ramdisk_execute_command) { | 966 | if (ramdisk_execute_command) { |
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 7a2d8f0c8ae5..4fdd97031431 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -558,6 +558,7 @@ static void wq_add(struct mqueue_inode_info *info, int sr, | |||
558 | */ | 558 | */ |
559 | static int wq_sleep(struct mqueue_inode_info *info, int sr, | 559 | static int wq_sleep(struct mqueue_inode_info *info, int sr, |
560 | ktime_t *timeout, struct ext_wait_queue *ewp) | 560 | ktime_t *timeout, struct ext_wait_queue *ewp) |
561 | __releases(&info->lock) | ||
561 | { | 562 | { |
562 | int retval; | 563 | int retval; |
563 | signed long time; | 564 | signed long time; |
@@ -159,22 +159,42 @@ static int sysvipc_sem_proc_show(struct seq_file *s, void *it); | |||
159 | #define SEMOPM_FAST 64 /* ~ 372 bytes on stack */ | 159 | #define SEMOPM_FAST 64 /* ~ 372 bytes on stack */ |
160 | 160 | ||
161 | /* | 161 | /* |
162 | * Switching from the mode suitable for simple ops | ||
163 | * to the mode for complex ops is costly. Therefore: | ||
164 | * use some hysteresis | ||
165 | */ | ||
166 | #define USE_GLOBAL_LOCK_HYSTERESIS 10 | ||
167 | |||
168 | /* | ||
162 | * Locking: | 169 | * Locking: |
163 | * a) global sem_lock() for read/write | 170 | * a) global sem_lock() for read/write |
164 | * sem_undo.id_next, | 171 | * sem_undo.id_next, |
165 | * sem_array.complex_count, | 172 | * sem_array.complex_count, |
166 | * sem_array.complex_mode | ||
167 | * sem_array.pending{_alter,_const}, | 173 | * sem_array.pending{_alter,_const}, |
168 | * sem_array.sem_undo | 174 | * sem_array.sem_undo |
169 | * | 175 | * |
170 | * b) global or semaphore sem_lock() for read/write: | 176 | * b) global or semaphore sem_lock() for read/write: |
171 | * sem_array.sem_base[i].pending_{const,alter}: | 177 | * sem_array.sem_base[i].pending_{const,alter}: |
172 | * sem_array.complex_mode (for read) | ||
173 | * | 178 | * |
174 | * c) special: | 179 | * c) special: |
175 | * sem_undo_list.list_proc: | 180 | * sem_undo_list.list_proc: |
176 | * * undo_list->lock for write | 181 | * * undo_list->lock for write |
177 | * * rcu for read | 182 | * * rcu for read |
183 | * use_global_lock: | ||
184 | * * global sem_lock() for write | ||
185 | * * either local or global sem_lock() for read. | ||
186 | * | ||
187 | * Memory ordering: | ||
188 | * Most ordering is enforced by using spin_lock() and spin_unlock(). | ||
189 | * The special case is use_global_lock: | ||
190 | * Setting it from non-zero to 0 is a RELEASE, this is ensured by | ||
191 | * using smp_store_release(). | ||
192 | * Testing if it is non-zero is an ACQUIRE, this is ensured by using | ||
193 | * smp_load_acquire(). | ||
194 | * Setting it from 0 to non-zero must be ordered with regards to | ||
195 | * this smp_load_acquire(), this is guaranteed because the smp_load_acquire() | ||
196 | * is inside a spin_lock() and after a write from 0 to non-zero a | ||
197 | * spin_lock()+spin_unlock() is done. | ||
178 | */ | 198 | */ |
179 | 199 | ||
180 | #define sc_semmsl sem_ctls[0] | 200 | #define sc_semmsl sem_ctls[0] |
@@ -273,29 +293,22 @@ static void complexmode_enter(struct sem_array *sma) | |||
273 | int i; | 293 | int i; |
274 | struct sem *sem; | 294 | struct sem *sem; |
275 | 295 | ||
276 | if (sma->complex_mode) { | 296 | if (sma->use_global_lock > 0) { |
277 | /* We are already in complex_mode. Nothing to do */ | 297 | /* |
298 | * We are already in global lock mode. | ||
299 | * Nothing to do, just reset the | ||
300 | * counter until we return to simple mode. | ||
301 | */ | ||
302 | sma->use_global_lock = USE_GLOBAL_LOCK_HYSTERESIS; | ||
278 | return; | 303 | return; |
279 | } | 304 | } |
280 | 305 | sma->use_global_lock = USE_GLOBAL_LOCK_HYSTERESIS; | |
281 | /* We need a full barrier after seting complex_mode: | ||
282 | * The write to complex_mode must be visible | ||
283 | * before we read the first sem->lock spinlock state. | ||
284 | */ | ||
285 | smp_store_mb(sma->complex_mode, true); | ||
286 | 306 | ||
287 | for (i = 0; i < sma->sem_nsems; i++) { | 307 | for (i = 0; i < sma->sem_nsems; i++) { |
288 | sem = sma->sem_base + i; | 308 | sem = sma->sem_base + i; |
289 | spin_unlock_wait(&sem->lock); | 309 | spin_lock(&sem->lock); |
310 | spin_unlock(&sem->lock); | ||
290 | } | 311 | } |
291 | /* | ||
292 | * spin_unlock_wait() is not a memory barriers, it is only a | ||
293 | * control barrier. The code must pair with spin_unlock(&sem->lock), | ||
294 | * thus just the control barrier is insufficient. | ||
295 | * | ||
296 | * smp_rmb() is sufficient, as writes cannot pass the control barrier. | ||
297 | */ | ||
298 | smp_rmb(); | ||
299 | } | 312 | } |
300 | 313 | ||
301 | /* | 314 | /* |
@@ -310,13 +323,17 @@ static void complexmode_tryleave(struct sem_array *sma) | |||
310 | */ | 323 | */ |
311 | return; | 324 | return; |
312 | } | 325 | } |
313 | /* | 326 | if (sma->use_global_lock == 1) { |
314 | * Immediately after setting complex_mode to false, | 327 | /* |
315 | * a simple op can start. Thus: all memory writes | 328 | * Immediately after setting use_global_lock to 0, |
316 | * performed by the current operation must be visible | 329 | * a simple op can start. Thus: all memory writes |
317 | * before we set complex_mode to false. | 330 | * performed by the current operation must be visible |
318 | */ | 331 | * before we set use_global_lock to 0. |
319 | smp_store_release(&sma->complex_mode, false); | 332 | */ |
333 | smp_store_release(&sma->use_global_lock, 0); | ||
334 | } else { | ||
335 | sma->use_global_lock--; | ||
336 | } | ||
320 | } | 337 | } |
321 | 338 | ||
322 | #define SEM_GLOBAL_LOCK (-1) | 339 | #define SEM_GLOBAL_LOCK (-1) |
@@ -346,30 +363,23 @@ static inline int sem_lock(struct sem_array *sma, struct sembuf *sops, | |||
346 | * Optimized locking is possible if no complex operation | 363 | * Optimized locking is possible if no complex operation |
347 | * is either enqueued or processed right now. | 364 | * is either enqueued or processed right now. |
348 | * | 365 | * |
349 | * Both facts are tracked by complex_mode. | 366 | * Both facts are tracked by use_global_mode. |
350 | */ | 367 | */ |
351 | sem = sma->sem_base + sops->sem_num; | 368 | sem = sma->sem_base + sops->sem_num; |
352 | 369 | ||
353 | /* | 370 | /* |
354 | * Initial check for complex_mode. Just an optimization, | 371 | * Initial check for use_global_lock. Just an optimization, |
355 | * no locking, no memory barrier. | 372 | * no locking, no memory barrier. |
356 | */ | 373 | */ |
357 | if (!sma->complex_mode) { | 374 | if (!sma->use_global_lock) { |
358 | /* | 375 | /* |
359 | * It appears that no complex operation is around. | 376 | * It appears that no complex operation is around. |
360 | * Acquire the per-semaphore lock. | 377 | * Acquire the per-semaphore lock. |
361 | */ | 378 | */ |
362 | spin_lock(&sem->lock); | 379 | spin_lock(&sem->lock); |
363 | 380 | ||
364 | /* | 381 | /* pairs with smp_store_release() */ |
365 | * See 51d7d5205d33 | 382 | if (!smp_load_acquire(&sma->use_global_lock)) { |
366 | * ("powerpc: Add smp_mb() to arch_spin_is_locked()"): | ||
367 | * A full barrier is required: the write of sem->lock | ||
368 | * must be visible before the read is executed | ||
369 | */ | ||
370 | smp_mb(); | ||
371 | |||
372 | if (!smp_load_acquire(&sma->complex_mode)) { | ||
373 | /* fast path successful! */ | 383 | /* fast path successful! */ |
374 | return sops->sem_num; | 384 | return sops->sem_num; |
375 | } | 385 | } |
@@ -379,19 +389,26 @@ static inline int sem_lock(struct sem_array *sma, struct sembuf *sops, | |||
379 | /* slow path: acquire the full lock */ | 389 | /* slow path: acquire the full lock */ |
380 | ipc_lock_object(&sma->sem_perm); | 390 | ipc_lock_object(&sma->sem_perm); |
381 | 391 | ||
382 | if (sma->complex_count == 0) { | 392 | if (sma->use_global_lock == 0) { |
383 | /* False alarm: | 393 | /* |
384 | * There is no complex operation, thus we can switch | 394 | * The use_global_lock mode ended while we waited for |
385 | * back to the fast path. | 395 | * sma->sem_perm.lock. Thus we must switch to locking |
396 | * with sem->lock. | ||
397 | * Unlike in the fast path, there is no need to recheck | ||
398 | * sma->use_global_lock after we have acquired sem->lock: | ||
399 | * We own sma->sem_perm.lock, thus use_global_lock cannot | ||
400 | * change. | ||
386 | */ | 401 | */ |
387 | spin_lock(&sem->lock); | 402 | spin_lock(&sem->lock); |
403 | |||
388 | ipc_unlock_object(&sma->sem_perm); | 404 | ipc_unlock_object(&sma->sem_perm); |
389 | return sops->sem_num; | 405 | return sops->sem_num; |
390 | } else { | 406 | } else { |
391 | /* Not a false alarm, thus complete the sequence for a | 407 | /* |
392 | * full lock. | 408 | * Not a false alarm, thus continue to use the global lock |
409 | * mode. No need for complexmode_enter(), this was done by | ||
410 | * the caller that has set use_global_mode to non-zero. | ||
393 | */ | 411 | */ |
394 | complexmode_enter(sma); | ||
395 | return SEM_GLOBAL_LOCK; | 412 | return SEM_GLOBAL_LOCK; |
396 | } | 413 | } |
397 | } | 414 | } |
@@ -495,7 +512,7 @@ static int newary(struct ipc_namespace *ns, struct ipc_params *params) | |||
495 | } | 512 | } |
496 | 513 | ||
497 | sma->complex_count = 0; | 514 | sma->complex_count = 0; |
498 | sma->complex_mode = true; /* dropped by sem_unlock below */ | 515 | sma->use_global_lock = USE_GLOBAL_LOCK_HYSTERESIS; |
499 | INIT_LIST_HEAD(&sma->pending_alter); | 516 | INIT_LIST_HEAD(&sma->pending_alter); |
500 | INIT_LIST_HEAD(&sma->pending_const); | 517 | INIT_LIST_HEAD(&sma->pending_const); |
501 | INIT_LIST_HEAD(&sma->list_id); | 518 | INIT_LIST_HEAD(&sma->list_id); |
@@ -1091,8 +1091,8 @@ out_unlock1: | |||
1091 | * "raddr" thing points to kernel space, and there has to be a wrapper around | 1091 | * "raddr" thing points to kernel space, and there has to be a wrapper around |
1092 | * this. | 1092 | * this. |
1093 | */ | 1093 | */ |
1094 | long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, | 1094 | long do_shmat(int shmid, char __user *shmaddr, int shmflg, |
1095 | unsigned long shmlba) | 1095 | ulong *raddr, unsigned long shmlba) |
1096 | { | 1096 | { |
1097 | struct shmid_kernel *shp; | 1097 | struct shmid_kernel *shp; |
1098 | unsigned long addr; | 1098 | unsigned long addr; |
@@ -1113,8 +1113,13 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, | |||
1113 | goto out; | 1113 | goto out; |
1114 | else if ((addr = (ulong)shmaddr)) { | 1114 | else if ((addr = (ulong)shmaddr)) { |
1115 | if (addr & (shmlba - 1)) { | 1115 | if (addr & (shmlba - 1)) { |
1116 | if (shmflg & SHM_RND) | 1116 | /* |
1117 | addr &= ~(shmlba - 1); /* round down */ | 1117 | * Round down to the nearest multiple of shmlba. |
1118 | * For sane do_mmap_pgoff() parameters, avoid | ||
1119 | * round downs that trigger nil-page and MAP_FIXED. | ||
1120 | */ | ||
1121 | if ((shmflg & SHM_RND) && addr >= shmlba) | ||
1122 | addr &= ~(shmlba - 1); | ||
1118 | else | 1123 | else |
1119 | #ifndef __ARCH_FORCE_SHMLBA | 1124 | #ifndef __ARCH_FORCE_SHMLBA |
1120 | if (addr & ~PAGE_MASK) | 1125 | if (addr & ~PAGE_MASK) |
diff --git a/kernel/configs/android-base.config b/kernel/configs/android-base.config index 1a8f34f63601..26a06e09a5bd 100644 --- a/kernel/configs/android-base.config +++ b/kernel/configs/android-base.config | |||
@@ -21,6 +21,7 @@ CONFIG_CP15_BARRIER_EMULATION=y | |||
21 | CONFIG_DEFAULT_SECURITY_SELINUX=y | 21 | CONFIG_DEFAULT_SECURITY_SELINUX=y |
22 | CONFIG_EMBEDDED=y | 22 | CONFIG_EMBEDDED=y |
23 | CONFIG_FB=y | 23 | CONFIG_FB=y |
24 | CONFIG_HARDENED_USERCOPY=y | ||
24 | CONFIG_HIGH_RES_TIMERS=y | 25 | CONFIG_HIGH_RES_TIMERS=y |
25 | CONFIG_INET6_AH=y | 26 | CONFIG_INET6_AH=y |
26 | CONFIG_INET6_ESP=y | 27 | CONFIG_INET6_ESP=y |
@@ -129,6 +130,7 @@ CONFIG_PPP_DEFLATE=y | |||
129 | CONFIG_PPP_MPPE=y | 130 | CONFIG_PPP_MPPE=y |
130 | CONFIG_PREEMPT=y | 131 | CONFIG_PREEMPT=y |
131 | CONFIG_QUOTA=y | 132 | CONFIG_QUOTA=y |
133 | CONFIG_RANDOMIZE_BASE=y | ||
132 | CONFIG_RTC_CLASS=y | 134 | CONFIG_RTC_CLASS=y |
133 | CONFIG_RT_GROUP_SCHED=y | 135 | CONFIG_RT_GROUP_SCHED=y |
134 | CONFIG_SECCOMP=y | 136 | CONFIG_SECCOMP=y |
diff --git a/kernel/configs/android-recommended.config b/kernel/configs/android-recommended.config index 99127edc5204..28ee064b6744 100644 --- a/kernel/configs/android-recommended.config +++ b/kernel/configs/android-recommended.config | |||
@@ -1,4 +1,5 @@ | |||
1 | # KEEP ALPHABETICALLY SORTED | 1 | # KEEP ALPHABETICALLY SORTED |
2 | # CONFIG_AIO is not set | ||
2 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 3 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
3 | # CONFIG_INPUT_MOUSE is not set | 4 | # CONFIG_INPUT_MOUSE is not set |
4 | # CONFIG_LEGACY_PTYS is not set | 5 | # CONFIG_LEGACY_PTYS is not set |
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index 18c6b23edd3c..d630f8ac4d2f 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c | |||
@@ -747,7 +747,7 @@ build_map_info(struct address_space *mapping, loff_t offset, bool is_register) | |||
747 | continue; | 747 | continue; |
748 | } | 748 | } |
749 | 749 | ||
750 | if (!atomic_inc_not_zero(&vma->vm_mm->mm_users)) | 750 | if (!mmget_not_zero(vma->vm_mm)) |
751 | continue; | 751 | continue; |
752 | 752 | ||
753 | info = prev; | 753 | info = prev; |
diff --git a/kernel/exit.c b/kernel/exit.c index 90b09ca35c84..8a768a3672a5 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -539,7 +539,7 @@ static void exit_mm(void) | |||
539 | __set_current_state(TASK_RUNNING); | 539 | __set_current_state(TASK_RUNNING); |
540 | down_read(&mm->mmap_sem); | 540 | down_read(&mm->mmap_sem); |
541 | } | 541 | } |
542 | atomic_inc(&mm->mm_count); | 542 | mmgrab(mm); |
543 | BUG_ON(mm != current->active_mm); | 543 | BUG_ON(mm != current->active_mm); |
544 | /* more a memory barrier than a real lock */ | 544 | /* more a memory barrier than a real lock */ |
545 | task_lock(current); | 545 | task_lock(current); |
diff --git a/kernel/fork.c b/kernel/fork.c index 348fe73155bc..246bf9aaf9df 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1000,7 +1000,7 @@ struct mm_struct *get_task_mm(struct task_struct *task) | |||
1000 | if (task->flags & PF_KTHREAD) | 1000 | if (task->flags & PF_KTHREAD) |
1001 | mm = NULL; | 1001 | mm = NULL; |
1002 | else | 1002 | else |
1003 | atomic_inc(&mm->mm_users); | 1003 | mmget(mm); |
1004 | } | 1004 | } |
1005 | task_unlock(task); | 1005 | task_unlock(task); |
1006 | return mm; | 1006 | return mm; |
@@ -1188,7 +1188,7 @@ static int copy_mm(unsigned long clone_flags, struct task_struct *tsk) | |||
1188 | vmacache_flush(tsk); | 1188 | vmacache_flush(tsk); |
1189 | 1189 | ||
1190 | if (clone_flags & CLONE_VM) { | 1190 | if (clone_flags & CLONE_VM) { |
1191 | atomic_inc(&oldmm->mm_users); | 1191 | mmget(oldmm); |
1192 | mm = oldmm; | 1192 | mm = oldmm; |
1193 | goto good_mm; | 1193 | goto good_mm; |
1194 | } | 1194 | } |
diff --git a/kernel/futex.c b/kernel/futex.c index cdf365036141..b687cb22301c 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -338,7 +338,7 @@ static inline bool should_fail_futex(bool fshared) | |||
338 | 338 | ||
339 | static inline void futex_get_mm(union futex_key *key) | 339 | static inline void futex_get_mm(union futex_key *key) |
340 | { | 340 | { |
341 | atomic_inc(&key->private.mm->mm_count); | 341 | mmgrab(key->private.mm); |
342 | /* | 342 | /* |
343 | * Ensure futex_get_mm() implies a full barrier such that | 343 | * Ensure futex_get_mm() implies a full barrier such that |
344 | * get_futex_key() implies a full barrier. This is relied upon | 344 | * get_futex_key() implies a full barrier. This is relied upon |
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 6b669593e7eb..944d068b6c48 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -353,7 +353,7 @@ static int setup_affinity(struct irq_desc *desc, struct cpumask *mask) | |||
353 | return 0; | 353 | return 0; |
354 | 354 | ||
355 | /* | 355 | /* |
356 | * Preserve the managed affinity setting and an userspace affinity | 356 | * Preserve the managed affinity setting and a userspace affinity |
357 | * setup, but make sure that one of the targets is online. | 357 | * setup, but make sure that one of the targets is online. |
358 | */ | 358 | */ |
359 | if (irqd_affinity_is_managed(&desc->irq_data) || | 359 | if (irqd_affinity_is_managed(&desc->irq_data) || |
diff --git a/kernel/relay.c b/kernel/relay.c index 8f8dc91db680..0e413d9eec8a 100644 --- a/kernel/relay.c +++ b/kernel/relay.c | |||
@@ -847,7 +847,7 @@ void relay_close(struct rchan *chan) | |||
847 | 847 | ||
848 | if (chan->last_toobig) | 848 | if (chan->last_toobig) |
849 | printk(KERN_WARNING "relay: one or more items not logged " | 849 | printk(KERN_WARNING "relay: one or more items not logged " |
850 | "[item size (%Zd) > sub-buffer size (%Zd)]\n", | 850 | "[item size (%zd) > sub-buffer size (%zd)]\n", |
851 | chan->last_toobig, chan->subbuf_size); | 851 | chan->last_toobig, chan->subbuf_size); |
852 | 852 | ||
853 | list_del(&chan->list); | 853 | list_del(&chan->list); |
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index e1ae6ac15eac..6ea1925ac5c0 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -2847,7 +2847,7 @@ context_switch(struct rq *rq, struct task_struct *prev, | |||
2847 | 2847 | ||
2848 | if (!mm) { | 2848 | if (!mm) { |
2849 | next->active_mm = oldmm; | 2849 | next->active_mm = oldmm; |
2850 | atomic_inc(&oldmm->mm_count); | 2850 | mmgrab(oldmm); |
2851 | enter_lazy_tlb(oldmm, next); | 2851 | enter_lazy_tlb(oldmm, next); |
2852 | } else | 2852 | } else |
2853 | switch_mm_irqs_off(oldmm, mm, next); | 2853 | switch_mm_irqs_off(oldmm, mm, next); |
@@ -6098,7 +6098,7 @@ void __init sched_init(void) | |||
6098 | /* | 6098 | /* |
6099 | * The boot idle thread does lazy MMU switching as well: | 6099 | * The boot idle thread does lazy MMU switching as well: |
6100 | */ | 6100 | */ |
6101 | atomic_inc(&init_mm.mm_count); | 6101 | mmgrab(&init_mm); |
6102 | enter_lazy_tlb(&init_mm, current); | 6102 | enter_lazy_tlb(&init_mm, current); |
6103 | 6103 | ||
6104 | /* | 6104 | /* |
diff --git a/kernel/signal.c b/kernel/signal.c index 13f9def8b24a..214a8feeb771 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -3239,10 +3239,17 @@ int compat_restore_altstack(const compat_stack_t __user *uss) | |||
3239 | 3239 | ||
3240 | int __compat_save_altstack(compat_stack_t __user *uss, unsigned long sp) | 3240 | int __compat_save_altstack(compat_stack_t __user *uss, unsigned long sp) |
3241 | { | 3241 | { |
3242 | int err; | ||
3242 | struct task_struct *t = current; | 3243 | struct task_struct *t = current; |
3243 | return __put_user(ptr_to_compat((void __user *)t->sas_ss_sp), &uss->ss_sp) | | 3244 | err = __put_user(ptr_to_compat((void __user *)t->sas_ss_sp), |
3244 | __put_user(sas_ss_flags(sp), &uss->ss_flags) | | 3245 | &uss->ss_sp) | |
3246 | __put_user(t->sas_ss_flags, &uss->ss_flags) | | ||
3245 | __put_user(t->sas_ss_size, &uss->ss_size); | 3247 | __put_user(t->sas_ss_size, &uss->ss_size); |
3248 | if (err) | ||
3249 | return err; | ||
3250 | if (t->sas_ss_flags & SS_AUTODISARM) | ||
3251 | sas_ss_reset(t); | ||
3252 | return 0; | ||
3246 | } | 3253 | } |
3247 | #endif | 3254 | #endif |
3248 | 3255 | ||
diff --git a/kernel/torture.c b/kernel/torture.c index 0d887eb62856..01a99976f072 100644 --- a/kernel/torture.c +++ b/kernel/torture.c | |||
@@ -311,7 +311,7 @@ EXPORT_SYMBOL_GPL(torture_random); | |||
311 | /* | 311 | /* |
312 | * Variables for shuffling. The idea is to ensure that each CPU stays | 312 | * Variables for shuffling. The idea is to ensure that each CPU stays |
313 | * idle for an extended period to test interactions with dyntick idle, | 313 | * idle for an extended period to test interactions with dyntick idle, |
314 | * as well as interactions with any per-CPU varibles. | 314 | * as well as interactions with any per-CPU variables. |
315 | */ | 315 | */ |
316 | struct shuffle_task { | 316 | struct shuffle_task { |
317 | struct list_head st_l; | 317 | struct list_head st_l; |
diff --git a/lib/fonts/Kconfig b/lib/fonts/Kconfig index e77dfe00de36..8fa0791e8a1e 100644 --- a/lib/fonts/Kconfig +++ b/lib/fonts/Kconfig | |||
@@ -87,6 +87,14 @@ config FONT_6x10 | |||
87 | embedded devices with a 320x240 screen, to get a reasonable number | 87 | embedded devices with a 320x240 screen, to get a reasonable number |
88 | of characters (53x24) that are still at a readable size. | 88 | of characters (53x24) that are still at a readable size. |
89 | 89 | ||
90 | config FONT_10x18 | ||
91 | bool "console 10x18 font (not supported by all drivers)" if FONTS | ||
92 | depends on FRAMEBUFFER_CONSOLE | ||
93 | help | ||
94 | This is a high resolution console font for machines with very | ||
95 | big letters. It fits between the sun 12x22 and the normal 8x16 font. | ||
96 | If other fonts are too big or too small for you, say Y, otherwise say N. | ||
97 | |||
90 | config FONT_SUN8x16 | 98 | config FONT_SUN8x16 |
91 | bool "Sparc console 8x16 font" | 99 | bool "Sparc console 8x16 font" |
92 | depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC) | 100 | depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC) |
@@ -101,14 +109,6 @@ config FONT_SUN12x22 | |||
101 | big letters (like the letters used in the SPARC PROM). If the | 109 | big letters (like the letters used in the SPARC PROM). If the |
102 | standard font is unreadable for you, say Y, otherwise say N. | 110 | standard font is unreadable for you, say Y, otherwise say N. |
103 | 111 | ||
104 | config FONT_10x18 | ||
105 | bool "console 10x18 font (not supported by all drivers)" if FONTS | ||
106 | depends on FRAMEBUFFER_CONSOLE | ||
107 | help | ||
108 | This is a high resolution console font for machines with very | ||
109 | big letters. It fits between the sun 12x22 and the normal 8x16 font. | ||
110 | If other fonts are too big or too small for you, say Y, otherwise say N. | ||
111 | |||
112 | config FONT_AUTOSELECT | 112 | config FONT_AUTOSELECT |
113 | def_bool y | 113 | def_bool y |
114 | depends on !FONT_8x8 | 114 | depends on !FONT_8x8 |
diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 004fc70fc56a..c6cf82242d65 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c | |||
@@ -651,7 +651,6 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, | |||
651 | { | 651 | { |
652 | unsigned int offset = 0; | 652 | unsigned int offset = 0; |
653 | struct sg_mapping_iter miter; | 653 | struct sg_mapping_iter miter; |
654 | unsigned long flags; | ||
655 | unsigned int sg_flags = SG_MITER_ATOMIC; | 654 | unsigned int sg_flags = SG_MITER_ATOMIC; |
656 | 655 | ||
657 | if (to_buffer) | 656 | if (to_buffer) |
@@ -664,9 +663,7 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, | |||
664 | if (!sg_miter_skip(&miter, skip)) | 663 | if (!sg_miter_skip(&miter, skip)) |
665 | return false; | 664 | return false; |
666 | 665 | ||
667 | local_irq_save(flags); | 666 | while ((offset < buflen) && sg_miter_next(&miter)) { |
668 | |||
669 | while (sg_miter_next(&miter) && offset < buflen) { | ||
670 | unsigned int len; | 667 | unsigned int len; |
671 | 668 | ||
672 | len = min(miter.length, buflen - offset); | 669 | len = min(miter.length, buflen - offset); |
@@ -681,7 +678,6 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, | |||
681 | 678 | ||
682 | sg_miter_stop(&miter); | 679 | sg_miter_stop(&miter); |
683 | 680 | ||
684 | local_irq_restore(flags); | ||
685 | return offset; | 681 | return offset; |
686 | } | 682 | } |
687 | EXPORT_SYMBOL(sg_copy_buffer); | 683 | EXPORT_SYMBOL(sg_copy_buffer); |
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 0967771d8f7f..e3bf4e0f10b5 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
@@ -1739,6 +1739,7 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, | |||
1739 | * 'h', 'l', or 'L' for integer fields | 1739 | * 'h', 'l', or 'L' for integer fields |
1740 | * 'z' support added 23/7/1999 S.H. | 1740 | * 'z' support added 23/7/1999 S.H. |
1741 | * 'z' changed to 'Z' --davidm 1/25/99 | 1741 | * 'z' changed to 'Z' --davidm 1/25/99 |
1742 | * 'Z' changed to 'z' --adobriyan 2017-01-25 | ||
1742 | * 't' added for ptrdiff_t | 1743 | * 't' added for ptrdiff_t |
1743 | * | 1744 | * |
1744 | * @fmt: the format string | 1745 | * @fmt: the format string |
@@ -1838,7 +1839,7 @@ qualifier: | |||
1838 | /* get the conversion qualifier */ | 1839 | /* get the conversion qualifier */ |
1839 | qualifier = 0; | 1840 | qualifier = 0; |
1840 | if (*fmt == 'h' || _tolower(*fmt) == 'l' || | 1841 | if (*fmt == 'h' || _tolower(*fmt) == 'l' || |
1841 | _tolower(*fmt) == 'z' || *fmt == 't') { | 1842 | *fmt == 'z' || *fmt == 't') { |
1842 | qualifier = *fmt++; | 1843 | qualifier = *fmt++; |
1843 | if (unlikely(qualifier == *fmt)) { | 1844 | if (unlikely(qualifier == *fmt)) { |
1844 | if (qualifier == 'l') { | 1845 | if (qualifier == 'l') { |
@@ -1907,7 +1908,7 @@ qualifier: | |||
1907 | else if (qualifier == 'l') { | 1908 | else if (qualifier == 'l') { |
1908 | BUILD_BUG_ON(FORMAT_TYPE_ULONG + SIGN != FORMAT_TYPE_LONG); | 1909 | BUILD_BUG_ON(FORMAT_TYPE_ULONG + SIGN != FORMAT_TYPE_LONG); |
1909 | spec->type = FORMAT_TYPE_ULONG + (spec->flags & SIGN); | 1910 | spec->type = FORMAT_TYPE_ULONG + (spec->flags & SIGN); |
1910 | } else if (_tolower(qualifier) == 'z') { | 1911 | } else if (qualifier == 'z') { |
1911 | spec->type = FORMAT_TYPE_SIZE_T; | 1912 | spec->type = FORMAT_TYPE_SIZE_T; |
1912 | } else if (qualifier == 't') { | 1913 | } else if (qualifier == 't') { |
1913 | spec->type = FORMAT_TYPE_PTRDIFF; | 1914 | spec->type = FORMAT_TYPE_PTRDIFF; |
@@ -2657,7 +2658,7 @@ int vsscanf(const char *buf, const char *fmt, va_list args) | |||
2657 | /* get conversion qualifier */ | 2658 | /* get conversion qualifier */ |
2658 | qualifier = -1; | 2659 | qualifier = -1; |
2659 | if (*fmt == 'h' || _tolower(*fmt) == 'l' || | 2660 | if (*fmt == 'h' || _tolower(*fmt) == 'l' || |
2660 | _tolower(*fmt) == 'z') { | 2661 | *fmt == 'z') { |
2661 | qualifier = *fmt++; | 2662 | qualifier = *fmt++; |
2662 | if (unlikely(qualifier == *fmt)) { | 2663 | if (unlikely(qualifier == *fmt)) { |
2663 | if (qualifier == 'h') { | 2664 | if (qualifier == 'h') { |
@@ -2851,7 +2852,6 @@ int vsscanf(const char *buf, const char *fmt, va_list args) | |||
2851 | else | 2852 | else |
2852 | *va_arg(args, unsigned long long *) = val.u; | 2853 | *va_arg(args, unsigned long long *) = val.u; |
2853 | break; | 2854 | break; |
2854 | case 'Z': | ||
2855 | case 'z': | 2855 | case 'z': |
2856 | *va_arg(args, size_t *) = val.u; | 2856 | *va_arg(args, size_t *) = val.u; |
2857 | break; | 2857 | break; |
diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug index afcc550877ff..79d0fd13b5b3 100644 --- a/mm/Kconfig.debug +++ b/mm/Kconfig.debug | |||
@@ -90,3 +90,9 @@ config DEBUG_PAGE_REF | |||
90 | careful when enabling this feature because it adds about 30 KB to the | 90 | careful when enabling this feature because it adds about 30 KB to the |
91 | kernel code. However the runtime performance overhead is virtually | 91 | kernel code. However the runtime performance overhead is virtually |
92 | nil until the tracepoints are actually enabled. | 92 | nil until the tracepoints are actually enabled. |
93 | |||
94 | config DEBUG_RODATA_TEST | ||
95 | bool "Testcase for the marking rodata read-only" | ||
96 | depends on STRICT_KERNEL_RWX | ||
97 | ---help--- | ||
98 | This option enables a testcase for the setting rodata read-only. | ||
diff --git a/mm/Makefile b/mm/Makefile index aa0aa17cb413..026f6a828a50 100644 --- a/mm/Makefile +++ b/mm/Makefile | |||
@@ -85,6 +85,7 @@ obj-$(CONFIG_MEMORY_FAILURE) += memory-failure.o | |||
85 | obj-$(CONFIG_HWPOISON_INJECT) += hwpoison-inject.o | 85 | obj-$(CONFIG_HWPOISON_INJECT) += hwpoison-inject.o |
86 | obj-$(CONFIG_DEBUG_KMEMLEAK) += kmemleak.o | 86 | obj-$(CONFIG_DEBUG_KMEMLEAK) += kmemleak.o |
87 | obj-$(CONFIG_DEBUG_KMEMLEAK_TEST) += kmemleak-test.o | 87 | obj-$(CONFIG_DEBUG_KMEMLEAK_TEST) += kmemleak-test.o |
88 | obj-$(CONFIG_DEBUG_RODATA_TEST) += rodata_test.o | ||
88 | obj-$(CONFIG_PAGE_OWNER) += page_owner.o | 89 | obj-$(CONFIG_PAGE_OWNER) += page_owner.o |
89 | obj-$(CONFIG_CLEANCACHE) += cleancache.o | 90 | obj-$(CONFIG_CLEANCACHE) += cleancache.o |
90 | obj-$(CONFIG_MEMORY_ISOLATION) += page_isolation.o | 91 | obj-$(CONFIG_MEMORY_ISOLATION) += page_isolation.o |
diff --git a/mm/dmapool.c b/mm/dmapool.c index cef82b8a9291..4d90a64b2fdc 100644 --- a/mm/dmapool.c +++ b/mm/dmapool.c | |||
@@ -93,7 +93,7 @@ show_pools(struct device *dev, struct device_attribute *attr, char *buf) | |||
93 | spin_unlock_irq(&pool->lock); | 93 | spin_unlock_irq(&pool->lock); |
94 | 94 | ||
95 | /* per-pool info, no real statistics yet */ | 95 | /* per-pool info, no real statistics yet */ |
96 | temp = scnprintf(next, size, "%-16s %4u %4Zu %4Zu %2u\n", | 96 | temp = scnprintf(next, size, "%-16s %4u %4zu %4zu %2u\n", |
97 | pool->name, blocks, | 97 | pool->name, blocks, |
98 | pages * (pool->allocation / pool->size), | 98 | pages * (pool->allocation / pool->size), |
99 | pool->size, pages); | 99 | pool->size, pages); |
diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 77ae3239c3de..34bce5c308e3 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c | |||
@@ -420,7 +420,7 @@ int __khugepaged_enter(struct mm_struct *mm) | |||
420 | list_add_tail(&mm_slot->mm_node, &khugepaged_scan.mm_head); | 420 | list_add_tail(&mm_slot->mm_node, &khugepaged_scan.mm_head); |
421 | spin_unlock(&khugepaged_mm_lock); | 421 | spin_unlock(&khugepaged_mm_lock); |
422 | 422 | ||
423 | atomic_inc(&mm->mm_count); | 423 | mmgrab(mm); |
424 | if (wakeup) | 424 | if (wakeup) |
425 | wake_up_interruptible(&khugepaged_wait); | 425 | wake_up_interruptible(&khugepaged_wait); |
426 | 426 | ||
@@ -1854,7 +1854,7 @@ int __ksm_enter(struct mm_struct *mm) | |||
1854 | spin_unlock(&ksm_mmlist_lock); | 1854 | spin_unlock(&ksm_mmlist_lock); |
1855 | 1855 | ||
1856 | set_bit(MMF_VM_MERGEABLE, &mm->flags); | 1856 | set_bit(MMF_VM_MERGEABLE, &mm->flags); |
1857 | atomic_inc(&mm->mm_count); | 1857 | mmgrab(mm); |
1858 | 1858 | ||
1859 | if (needs_wakeup) | 1859 | if (needs_wakeup) |
1860 | wake_up_interruptible(&ksm_thread_wait); | 1860 | wake_up_interruptible(&ksm_thread_wait); |
diff --git a/mm/mmu_context.c b/mm/mmu_context.c index 6f4d27c5bb32..daf67bb02b4a 100644 --- a/mm/mmu_context.c +++ b/mm/mmu_context.c | |||
@@ -25,7 +25,7 @@ void use_mm(struct mm_struct *mm) | |||
25 | task_lock(tsk); | 25 | task_lock(tsk); |
26 | active_mm = tsk->active_mm; | 26 | active_mm = tsk->active_mm; |
27 | if (active_mm != mm) { | 27 | if (active_mm != mm) { |
28 | atomic_inc(&mm->mm_count); | 28 | mmgrab(mm); |
29 | tsk->active_mm = mm; | 29 | tsk->active_mm = mm; |
30 | } | 30 | } |
31 | tsk->mm = mm; | 31 | tsk->mm = mm; |
diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c index f4259e496f83..32bc9f2ff7eb 100644 --- a/mm/mmu_notifier.c +++ b/mm/mmu_notifier.c | |||
@@ -275,7 +275,7 @@ static int do_mmu_notifier_register(struct mmu_notifier *mn, | |||
275 | mm->mmu_notifier_mm = mmu_notifier_mm; | 275 | mm->mmu_notifier_mm = mmu_notifier_mm; |
276 | mmu_notifier_mm = NULL; | 276 | mmu_notifier_mm = NULL; |
277 | } | 277 | } |
278 | atomic_inc(&mm->mm_count); | 278 | mmgrab(mm); |
279 | 279 | ||
280 | /* | 280 | /* |
281 | * Serialize the update against mmu_notifier_unregister. A | 281 | * Serialize the update against mmu_notifier_unregister. A |
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 578321f1c070..51c091849dcb 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -653,7 +653,7 @@ static void mark_oom_victim(struct task_struct *tsk) | |||
653 | 653 | ||
654 | /* oom_mm is bound to the signal struct life time. */ | 654 | /* oom_mm is bound to the signal struct life time. */ |
655 | if (!cmpxchg(&tsk->signal->oom_mm, NULL, mm)) | 655 | if (!cmpxchg(&tsk->signal->oom_mm, NULL, mm)) |
656 | atomic_inc(&tsk->signal->oom_mm->mm_count); | 656 | mmgrab(tsk->signal->oom_mm); |
657 | 657 | ||
658 | /* | 658 | /* |
659 | * Make sure that the task is woken up from uninterruptible sleep | 659 | * Make sure that the task is woken up from uninterruptible sleep |
@@ -870,7 +870,7 @@ static void oom_kill_process(struct oom_control *oc, const char *message) | |||
870 | 870 | ||
871 | /* Get a reference to safely compare mm after task_unlock(victim) */ | 871 | /* Get a reference to safely compare mm after task_unlock(victim) */ |
872 | mm = victim->mm; | 872 | mm = victim->mm; |
873 | atomic_inc(&mm->mm_count); | 873 | mmgrab(mm); |
874 | /* | 874 | /* |
875 | * We should send SIGKILL before setting TIF_MEMDIE in order to prevent | 875 | * We should send SIGKILL before setting TIF_MEMDIE in order to prevent |
876 | * the OOM victim from depleting the memory reserves from the user | 876 | * the OOM victim from depleting the memory reserves from the user |
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index ae6e601f0a58..26a60818a8fc 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -1797,7 +1797,7 @@ pause: | |||
1797 | * pages exceeds dirty_thresh, give the other good wb's a pipe | 1797 | * pages exceeds dirty_thresh, give the other good wb's a pipe |
1798 | * to go through, so that tasks on them still remain responsive. | 1798 | * to go through, so that tasks on them still remain responsive. |
1799 | * | 1799 | * |
1800 | * In theory 1 page is enough to keep the comsumer-producer | 1800 | * In theory 1 page is enough to keep the consumer-producer |
1801 | * pipe going: the flusher cleans 1 page => the task dirties 1 | 1801 | * pipe going: the flusher cleans 1 page => the task dirties 1 |
1802 | * more page. However wb_dirty has accounting errors. So use | 1802 | * more page. However wb_dirty has accounting errors. So use |
1803 | * the larger and more IO friendly wb_stat_error. | 1803 | * the larger and more IO friendly wb_stat_error. |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 9f9623d690d6..a7a6aac95a6d 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -5925,7 +5925,7 @@ static unsigned long __paginginit calc_memmap_size(unsigned long spanned_pages, | |||
5925 | * the zone and SPARSEMEM is in use. If there are holes within the | 5925 | * the zone and SPARSEMEM is in use. If there are holes within the |
5926 | * zone, each populated memory region may cost us one or two extra | 5926 | * zone, each populated memory region may cost us one or two extra |
5927 | * memmap pages due to alignment because memmap pages for each | 5927 | * memmap pages due to alignment because memmap pages for each |
5928 | * populated regions may not naturally algined on page boundary. | 5928 | * populated regions may not be naturally aligned on page boundary. |
5929 | * So the (present_pages >> 4) heuristic is a tradeoff for that. | 5929 | * So the (present_pages >> 4) heuristic is a tradeoff for that. |
5930 | */ | 5930 | */ |
5931 | if (spanned_pages > present_pages + (present_pages >> 4) && | 5931 | if (spanned_pages > present_pages + (present_pages >> 4) && |
diff --git a/mm/percpu.c b/mm/percpu.c index 0686f566d347..5696039b5c07 100644 --- a/mm/percpu.c +++ b/mm/percpu.c | |||
@@ -43,7 +43,7 @@ | |||
43 | * Chunks can be determined from the address using the index field | 43 | * Chunks can be determined from the address using the index field |
44 | * in the page struct. The index field contains a pointer to the chunk. | 44 | * in the page struct. The index field contains a pointer to the chunk. |
45 | * | 45 | * |
46 | * To use this allocator, arch code should do the followings. | 46 | * To use this allocator, arch code should do the following: |
47 | * | 47 | * |
48 | * - define __addr_to_pcpu_ptr() and __pcpu_ptr_to_addr() to translate | 48 | * - define __addr_to_pcpu_ptr() and __pcpu_ptr_to_addr() to translate |
49 | * regular address to percpu pointer and back if they need to be | 49 | * regular address to percpu pointer and back if they need to be |
diff --git a/mm/rodata_test.c b/mm/rodata_test.c new file mode 100644 index 000000000000..0fd21670b513 --- /dev/null +++ b/mm/rodata_test.c | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * rodata_test.c: functional test for mark_rodata_ro function | ||
3 | * | ||
4 | * (C) Copyright 2008 Intel Corporation | ||
5 | * Author: Arjan van de Ven <arjan@linux.intel.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; version 2 | ||
10 | * of the License. | ||
11 | */ | ||
12 | #include <linux/uaccess.h> | ||
13 | #include <asm/sections.h> | ||
14 | |||
15 | const int rodata_test_data = 0xC3; | ||
16 | EXPORT_SYMBOL_GPL(rodata_test_data); | ||
17 | |||
18 | void rodata_test(void) | ||
19 | { | ||
20 | unsigned long start, end; | ||
21 | int zero = 0; | ||
22 | |||
23 | /* test 1: read the value */ | ||
24 | /* If this test fails, some previous testrun has clobbered the state */ | ||
25 | if (!rodata_test_data) { | ||
26 | pr_err("rodata_test: test 1 fails (start data)\n"); | ||
27 | return; | ||
28 | } | ||
29 | |||
30 | /* test 2: write to the variable; this should fault */ | ||
31 | if (!probe_kernel_write((void *)&rodata_test_data, | ||
32 | (void *)&zero, sizeof(zero))) { | ||
33 | pr_err("rodata_test: test data was not read only\n"); | ||
34 | return; | ||
35 | } | ||
36 | |||
37 | /* test 3: check the value hasn't changed */ | ||
38 | if (rodata_test_data == zero) { | ||
39 | pr_err("rodata_test: test data was changed\n"); | ||
40 | return; | ||
41 | } | ||
42 | |||
43 | /* test 4: check if the rodata section is PAGE_SIZE aligned */ | ||
44 | start = (unsigned long)__start_rodata; | ||
45 | end = (unsigned long)__end_rodata; | ||
46 | if (start & (PAGE_SIZE - 1)) { | ||
47 | pr_err("rodata_test: start of .rodata is not page size aligned\n"); | ||
48 | return; | ||
49 | } | ||
50 | if (end & (PAGE_SIZE - 1)) { | ||
51 | pr_err("rodata_test: end of .rodata is not page size aligned\n"); | ||
52 | return; | ||
53 | } | ||
54 | |||
55 | pr_info("rodata_test: all tests were successful\n"); | ||
56 | } | ||
diff --git a/mm/swapfile.c b/mm/swapfile.c index 2cac12cc9abe..fadc6a1c0da0 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
@@ -1671,7 +1671,7 @@ int try_to_unuse(unsigned int type, bool frontswap, | |||
1671 | * that. | 1671 | * that. |
1672 | */ | 1672 | */ |
1673 | start_mm = &init_mm; | 1673 | start_mm = &init_mm; |
1674 | atomic_inc(&init_mm.mm_users); | 1674 | mmget(&init_mm); |
1675 | 1675 | ||
1676 | /* | 1676 | /* |
1677 | * Keep on scanning until all entries have gone. Usually, | 1677 | * Keep on scanning until all entries have gone. Usually, |
@@ -1720,7 +1720,7 @@ int try_to_unuse(unsigned int type, bool frontswap, | |||
1720 | if (atomic_read(&start_mm->mm_users) == 1) { | 1720 | if (atomic_read(&start_mm->mm_users) == 1) { |
1721 | mmput(start_mm); | 1721 | mmput(start_mm); |
1722 | start_mm = &init_mm; | 1722 | start_mm = &init_mm; |
1723 | atomic_inc(&init_mm.mm_users); | 1723 | mmget(&init_mm); |
1724 | } | 1724 | } |
1725 | 1725 | ||
1726 | /* | 1726 | /* |
@@ -1757,13 +1757,13 @@ int try_to_unuse(unsigned int type, bool frontswap, | |||
1757 | struct mm_struct *prev_mm = start_mm; | 1757 | struct mm_struct *prev_mm = start_mm; |
1758 | struct mm_struct *mm; | 1758 | struct mm_struct *mm; |
1759 | 1759 | ||
1760 | atomic_inc(&new_start_mm->mm_users); | 1760 | mmget(new_start_mm); |
1761 | atomic_inc(&prev_mm->mm_users); | 1761 | mmget(prev_mm); |
1762 | spin_lock(&mmlist_lock); | 1762 | spin_lock(&mmlist_lock); |
1763 | while (swap_count(*swap_map) && !retval && | 1763 | while (swap_count(*swap_map) && !retval && |
1764 | (p = p->next) != &start_mm->mmlist) { | 1764 | (p = p->next) != &start_mm->mmlist) { |
1765 | mm = list_entry(p, struct mm_struct, mmlist); | 1765 | mm = list_entry(p, struct mm_struct, mmlist); |
1766 | if (!atomic_inc_not_zero(&mm->mm_users)) | 1766 | if (!mmget_not_zero(mm)) |
1767 | continue; | 1767 | continue; |
1768 | spin_unlock(&mmlist_lock); | 1768 | spin_unlock(&mmlist_lock); |
1769 | mmput(prev_mm); | 1769 | mmput(prev_mm); |
@@ -1781,7 +1781,7 @@ int try_to_unuse(unsigned int type, bool frontswap, | |||
1781 | 1781 | ||
1782 | if (set_start_mm && *swap_map < swcount) { | 1782 | if (set_start_mm && *swap_map < swcount) { |
1783 | mmput(new_start_mm); | 1783 | mmput(new_start_mm); |
1784 | atomic_inc(&mm->mm_users); | 1784 | mmget(mm); |
1785 | new_start_mm = mm; | 1785 | new_start_mm = mm; |
1786 | set_start_mm = 0; | 1786 | set_start_mm = 0; |
1787 | } | 1787 | } |
diff --git a/mm/truncate.c b/mm/truncate.c index f2db67465495..6263affdef88 100644 --- a/mm/truncate.c +++ b/mm/truncate.c | |||
@@ -786,7 +786,7 @@ EXPORT_SYMBOL(truncate_setsize); | |||
786 | */ | 786 | */ |
787 | void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to) | 787 | void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to) |
788 | { | 788 | { |
789 | int bsize = 1 << inode->i_blkbits; | 789 | int bsize = i_blocksize(inode); |
790 | loff_t rounded_from; | 790 | loff_t rounded_from; |
791 | struct page *page; | 791 | struct page *page; |
792 | pgoff_t index; | 792 | pgoff_t index; |
diff --git a/mm/zswap.c b/mm/zswap.c index cabf09e0128b..eedc27894b10 100644 --- a/mm/zswap.c +++ b/mm/zswap.c | |||
@@ -76,6 +76,8 @@ static u64 zswap_duplicate_entry; | |||
76 | * tunables | 76 | * tunables |
77 | **********************************/ | 77 | **********************************/ |
78 | 78 | ||
79 | #define ZSWAP_PARAM_UNSET "" | ||
80 | |||
79 | /* Enable/disable zswap (disabled by default) */ | 81 | /* Enable/disable zswap (disabled by default) */ |
80 | static bool zswap_enabled; | 82 | static bool zswap_enabled; |
81 | static int zswap_enabled_param_set(const char *, | 83 | static int zswap_enabled_param_set(const char *, |
@@ -185,6 +187,9 @@ static bool zswap_init_started; | |||
185 | /* fatal error during init */ | 187 | /* fatal error during init */ |
186 | static bool zswap_init_failed; | 188 | static bool zswap_init_failed; |
187 | 189 | ||
190 | /* init completed, but couldn't create the initial pool */ | ||
191 | static bool zswap_has_pool; | ||
192 | |||
188 | /********************************* | 193 | /********************************* |
189 | * helpers and fwd declarations | 194 | * helpers and fwd declarations |
190 | **********************************/ | 195 | **********************************/ |
@@ -424,7 +429,8 @@ static struct zswap_pool *__zswap_pool_current(void) | |||
424 | struct zswap_pool *pool; | 429 | struct zswap_pool *pool; |
425 | 430 | ||
426 | pool = list_first_or_null_rcu(&zswap_pools, typeof(*pool), list); | 431 | pool = list_first_or_null_rcu(&zswap_pools, typeof(*pool), list); |
427 | WARN_ON(!pool); | 432 | WARN_ONCE(!pool && zswap_has_pool, |
433 | "%s: no page storage pool!\n", __func__); | ||
428 | 434 | ||
429 | return pool; | 435 | return pool; |
430 | } | 436 | } |
@@ -443,7 +449,7 @@ static struct zswap_pool *zswap_pool_current_get(void) | |||
443 | rcu_read_lock(); | 449 | rcu_read_lock(); |
444 | 450 | ||
445 | pool = __zswap_pool_current(); | 451 | pool = __zswap_pool_current(); |
446 | if (!pool || !zswap_pool_get(pool)) | 452 | if (!zswap_pool_get(pool)) |
447 | pool = NULL; | 453 | pool = NULL; |
448 | 454 | ||
449 | rcu_read_unlock(); | 455 | rcu_read_unlock(); |
@@ -459,7 +465,9 @@ static struct zswap_pool *zswap_pool_last_get(void) | |||
459 | 465 | ||
460 | list_for_each_entry_rcu(pool, &zswap_pools, list) | 466 | list_for_each_entry_rcu(pool, &zswap_pools, list) |
461 | last = pool; | 467 | last = pool; |
462 | if (!WARN_ON(!last) && !zswap_pool_get(last)) | 468 | WARN_ONCE(!last && zswap_has_pool, |
469 | "%s: no page storage pool!\n", __func__); | ||
470 | if (!zswap_pool_get(last)) | ||
463 | last = NULL; | 471 | last = NULL; |
464 | 472 | ||
465 | rcu_read_unlock(); | 473 | rcu_read_unlock(); |
@@ -495,6 +503,17 @@ static struct zswap_pool *zswap_pool_create(char *type, char *compressor) | |||
495 | gfp_t gfp = __GFP_NORETRY | __GFP_NOWARN | __GFP_KSWAPD_RECLAIM; | 503 | gfp_t gfp = __GFP_NORETRY | __GFP_NOWARN | __GFP_KSWAPD_RECLAIM; |
496 | int ret; | 504 | int ret; |
497 | 505 | ||
506 | if (!zswap_has_pool) { | ||
507 | /* if either are unset, pool initialization failed, and we | ||
508 | * need both params to be set correctly before trying to | ||
509 | * create a pool. | ||
510 | */ | ||
511 | if (!strcmp(type, ZSWAP_PARAM_UNSET)) | ||
512 | return NULL; | ||
513 | if (!strcmp(compressor, ZSWAP_PARAM_UNSET)) | ||
514 | return NULL; | ||
515 | } | ||
516 | |||
498 | pool = kzalloc(sizeof(*pool), GFP_KERNEL); | 517 | pool = kzalloc(sizeof(*pool), GFP_KERNEL); |
499 | if (!pool) { | 518 | if (!pool) { |
500 | pr_err("pool alloc failed\n"); | 519 | pr_err("pool alloc failed\n"); |
@@ -544,29 +563,41 @@ error: | |||
544 | 563 | ||
545 | static __init struct zswap_pool *__zswap_pool_create_fallback(void) | 564 | static __init struct zswap_pool *__zswap_pool_create_fallback(void) |
546 | { | 565 | { |
547 | if (!crypto_has_comp(zswap_compressor, 0, 0)) { | 566 | bool has_comp, has_zpool; |
548 | if (!strcmp(zswap_compressor, ZSWAP_COMPRESSOR_DEFAULT)) { | 567 | |
549 | pr_err("default compressor %s not available\n", | 568 | has_comp = crypto_has_comp(zswap_compressor, 0, 0); |
550 | zswap_compressor); | 569 | if (!has_comp && strcmp(zswap_compressor, ZSWAP_COMPRESSOR_DEFAULT)) { |
551 | return NULL; | ||
552 | } | ||
553 | pr_err("compressor %s not available, using default %s\n", | 570 | pr_err("compressor %s not available, using default %s\n", |
554 | zswap_compressor, ZSWAP_COMPRESSOR_DEFAULT); | 571 | zswap_compressor, ZSWAP_COMPRESSOR_DEFAULT); |
555 | param_free_charp(&zswap_compressor); | 572 | param_free_charp(&zswap_compressor); |
556 | zswap_compressor = ZSWAP_COMPRESSOR_DEFAULT; | 573 | zswap_compressor = ZSWAP_COMPRESSOR_DEFAULT; |
574 | has_comp = crypto_has_comp(zswap_compressor, 0, 0); | ||
557 | } | 575 | } |
558 | if (!zpool_has_pool(zswap_zpool_type)) { | 576 | if (!has_comp) { |
559 | if (!strcmp(zswap_zpool_type, ZSWAP_ZPOOL_DEFAULT)) { | 577 | pr_err("default compressor %s not available\n", |
560 | pr_err("default zpool %s not available\n", | 578 | zswap_compressor); |
561 | zswap_zpool_type); | 579 | param_free_charp(&zswap_compressor); |
562 | return NULL; | 580 | zswap_compressor = ZSWAP_PARAM_UNSET; |
563 | } | 581 | } |
582 | |||
583 | has_zpool = zpool_has_pool(zswap_zpool_type); | ||
584 | if (!has_zpool && strcmp(zswap_zpool_type, ZSWAP_ZPOOL_DEFAULT)) { | ||
564 | pr_err("zpool %s not available, using default %s\n", | 585 | pr_err("zpool %s not available, using default %s\n", |
565 | zswap_zpool_type, ZSWAP_ZPOOL_DEFAULT); | 586 | zswap_zpool_type, ZSWAP_ZPOOL_DEFAULT); |
566 | param_free_charp(&zswap_zpool_type); | 587 | param_free_charp(&zswap_zpool_type); |
567 | zswap_zpool_type = ZSWAP_ZPOOL_DEFAULT; | 588 | zswap_zpool_type = ZSWAP_ZPOOL_DEFAULT; |
589 | has_zpool = zpool_has_pool(zswap_zpool_type); | ||
590 | } | ||
591 | if (!has_zpool) { | ||
592 | pr_err("default zpool %s not available\n", | ||
593 | zswap_zpool_type); | ||
594 | param_free_charp(&zswap_zpool_type); | ||
595 | zswap_zpool_type = ZSWAP_PARAM_UNSET; | ||
568 | } | 596 | } |
569 | 597 | ||
598 | if (!has_comp || !has_zpool) | ||
599 | return NULL; | ||
600 | |||
570 | return zswap_pool_create(zswap_zpool_type, zswap_compressor); | 601 | return zswap_pool_create(zswap_zpool_type, zswap_compressor); |
571 | } | 602 | } |
572 | 603 | ||
@@ -582,6 +613,9 @@ static void zswap_pool_destroy(struct zswap_pool *pool) | |||
582 | 613 | ||
583 | static int __must_check zswap_pool_get(struct zswap_pool *pool) | 614 | static int __must_check zswap_pool_get(struct zswap_pool *pool) |
584 | { | 615 | { |
616 | if (!pool) | ||
617 | return 0; | ||
618 | |||
585 | return kref_get_unless_zero(&pool->kref); | 619 | return kref_get_unless_zero(&pool->kref); |
586 | } | 620 | } |
587 | 621 | ||
@@ -639,7 +673,7 @@ static int __zswap_param_set(const char *val, const struct kernel_param *kp, | |||
639 | } | 673 | } |
640 | 674 | ||
641 | /* no change required */ | 675 | /* no change required */ |
642 | if (!strcmp(s, *(char **)kp->arg)) | 676 | if (!strcmp(s, *(char **)kp->arg) && zswap_has_pool) |
643 | return 0; | 677 | return 0; |
644 | 678 | ||
645 | /* if this is load-time (pre-init) param setting, | 679 | /* if this is load-time (pre-init) param setting, |
@@ -670,21 +704,26 @@ static int __zswap_param_set(const char *val, const struct kernel_param *kp, | |||
670 | pool = zswap_pool_find_get(type, compressor); | 704 | pool = zswap_pool_find_get(type, compressor); |
671 | if (pool) { | 705 | if (pool) { |
672 | zswap_pool_debug("using existing", pool); | 706 | zswap_pool_debug("using existing", pool); |
707 | WARN_ON(pool == zswap_pool_current()); | ||
673 | list_del_rcu(&pool->list); | 708 | list_del_rcu(&pool->list); |
674 | } else { | ||
675 | spin_unlock(&zswap_pools_lock); | ||
676 | pool = zswap_pool_create(type, compressor); | ||
677 | spin_lock(&zswap_pools_lock); | ||
678 | } | 709 | } |
679 | 710 | ||
711 | spin_unlock(&zswap_pools_lock); | ||
712 | |||
713 | if (!pool) | ||
714 | pool = zswap_pool_create(type, compressor); | ||
715 | |||
680 | if (pool) | 716 | if (pool) |
681 | ret = param_set_charp(s, kp); | 717 | ret = param_set_charp(s, kp); |
682 | else | 718 | else |
683 | ret = -EINVAL; | 719 | ret = -EINVAL; |
684 | 720 | ||
721 | spin_lock(&zswap_pools_lock); | ||
722 | |||
685 | if (!ret) { | 723 | if (!ret) { |
686 | put_pool = zswap_pool_current(); | 724 | put_pool = zswap_pool_current(); |
687 | list_add_rcu(&pool->list, &zswap_pools); | 725 | list_add_rcu(&pool->list, &zswap_pools); |
726 | zswap_has_pool = true; | ||
688 | } else if (pool) { | 727 | } else if (pool) { |
689 | /* add the possibly pre-existing pool to the end of the pools | 728 | /* add the possibly pre-existing pool to the end of the pools |
690 | * list; if it's new (and empty) then it'll be removed and | 729 | * list; if it's new (and empty) then it'll be removed and |
@@ -696,6 +735,17 @@ static int __zswap_param_set(const char *val, const struct kernel_param *kp, | |||
696 | 735 | ||
697 | spin_unlock(&zswap_pools_lock); | 736 | spin_unlock(&zswap_pools_lock); |
698 | 737 | ||
738 | if (!zswap_has_pool && !pool) { | ||
739 | /* if initial pool creation failed, and this pool creation also | ||
740 | * failed, maybe both compressor and zpool params were bad. | ||
741 | * Allow changing this param, so pool creation will succeed | ||
742 | * when the other param is changed. We already verified this | ||
743 | * param is ok in the zpool_has_pool() or crypto_has_comp() | ||
744 | * checks above. | ||
745 | */ | ||
746 | ret = param_set_charp(s, kp); | ||
747 | } | ||
748 | |||
699 | /* drop the ref from either the old current pool, | 749 | /* drop the ref from either the old current pool, |
700 | * or the new pool we failed to add | 750 | * or the new pool we failed to add |
701 | */ | 751 | */ |
@@ -724,6 +774,10 @@ static int zswap_enabled_param_set(const char *val, | |||
724 | pr_err("can't enable, initialization failed\n"); | 774 | pr_err("can't enable, initialization failed\n"); |
725 | return -ENODEV; | 775 | return -ENODEV; |
726 | } | 776 | } |
777 | if (!zswap_has_pool && zswap_init_started) { | ||
778 | pr_err("can't enable, no pool configured\n"); | ||
779 | return -ENODEV; | ||
780 | } | ||
727 | 781 | ||
728 | return param_set_bool(val, kp); | 782 | return param_set_bool(val, kp); |
729 | } | 783 | } |
@@ -1205,22 +1259,21 @@ static int __init init_zswap(void) | |||
1205 | goto hp_fail; | 1259 | goto hp_fail; |
1206 | 1260 | ||
1207 | pool = __zswap_pool_create_fallback(); | 1261 | pool = __zswap_pool_create_fallback(); |
1208 | if (!pool) { | 1262 | if (pool) { |
1263 | pr_info("loaded using pool %s/%s\n", pool->tfm_name, | ||
1264 | zpool_get_type(pool->zpool)); | ||
1265 | list_add(&pool->list, &zswap_pools); | ||
1266 | zswap_has_pool = true; | ||
1267 | } else { | ||
1209 | pr_err("pool creation failed\n"); | 1268 | pr_err("pool creation failed\n"); |
1210 | goto pool_fail; | 1269 | zswap_enabled = false; |
1211 | } | 1270 | } |
1212 | pr_info("loaded using pool %s/%s\n", pool->tfm_name, | ||
1213 | zpool_get_type(pool->zpool)); | ||
1214 | |||
1215 | list_add(&pool->list, &zswap_pools); | ||
1216 | 1271 | ||
1217 | frontswap_register_ops(&zswap_frontswap_ops); | 1272 | frontswap_register_ops(&zswap_frontswap_ops); |
1218 | if (zswap_debugfs_init()) | 1273 | if (zswap_debugfs_init()) |
1219 | pr_warn("debugfs initialization failed\n"); | 1274 | pr_warn("debugfs initialization failed\n"); |
1220 | return 0; | 1275 | return 0; |
1221 | 1276 | ||
1222 | pool_fail: | ||
1223 | cpuhp_remove_state_nocalls(CPUHP_MM_ZSWP_POOL_PREPARE); | ||
1224 | hp_fail: | 1277 | hp_fail: |
1225 | cpuhp_remove_state(CPUHP_MM_ZSWP_MEM_PREPARE); | 1278 | cpuhp_remove_state(CPUHP_MM_ZSWP_MEM_PREPARE); |
1226 | dstmem_fail: | 1279 | dstmem_fail: |
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 10d2bdce686e..465cc24b41e5 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c | |||
@@ -1656,7 +1656,7 @@ static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, size_t len) | |||
1656 | ddp->deh_dport = usat->sat_port; | 1656 | ddp->deh_dport = usat->sat_port; |
1657 | ddp->deh_sport = at->src_port; | 1657 | ddp->deh_sport = at->src_port; |
1658 | 1658 | ||
1659 | SOCK_DEBUG(sk, "SK %p: Copy user data (%Zd bytes).\n", sk, len); | 1659 | SOCK_DEBUG(sk, "SK %p: Copy user data (%zd bytes).\n", sk, len); |
1660 | 1660 | ||
1661 | err = memcpy_from_msg(skb_put(skb, len), msg, len); | 1661 | err = memcpy_from_msg(skb_put(skb, len), msg, len); |
1662 | if (err) { | 1662 | if (err) { |
@@ -1720,7 +1720,7 @@ static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, size_t len) | |||
1720 | */ | 1720 | */ |
1721 | aarp_send_ddp(dev, skb, &usat->sat_addr, NULL); | 1721 | aarp_send_ddp(dev, skb, &usat->sat_addr, NULL); |
1722 | } | 1722 | } |
1723 | SOCK_DEBUG(sk, "SK %p: Done write (%Zd).\n", sk, len); | 1723 | SOCK_DEBUG(sk, "SK %p: Done write (%zd).\n", sk, len); |
1724 | 1724 | ||
1725 | out: | 1725 | out: |
1726 | release_sock(sk); | 1726 | release_sock(sk); |
diff --git a/net/atm/mpc.c b/net/atm/mpc.c index 3b3b1a292ec8..a190800572bd 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c | |||
@@ -451,7 +451,7 @@ static void lane2_assoc_ind(struct net_device *dev, const u8 *mac_addr, | |||
451 | return; | 451 | return; |
452 | } | 452 | } |
453 | if (end_of_tlvs - tlvs != 0) | 453 | if (end_of_tlvs - tlvs != 0) |
454 | pr_info("(%s) ignoring %Zd bytes of trailing TLV garbage\n", | 454 | pr_info("(%s) ignoring %zd bytes of trailing TLV garbage\n", |
455 | dev->name, end_of_tlvs - tlvs); | 455 | dev->name, end_of_tlvs - tlvs); |
456 | } | 456 | } |
457 | 457 | ||
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 48f9471e7c85..f64d6566021f 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c | |||
@@ -851,7 +851,7 @@ static int hci_sock_release(struct socket *sock) | |||
851 | 851 | ||
852 | if (hdev) { | 852 | if (hdev) { |
853 | if (hci_pi(sk)->channel == HCI_CHANNEL_USER) { | 853 | if (hci_pi(sk)->channel == HCI_CHANNEL_USER) { |
854 | /* When releasing an user channel exclusive access, | 854 | /* When releasing a user channel exclusive access, |
855 | * call hci_dev_do_close directly instead of calling | 855 | * call hci_dev_do_close directly instead of calling |
856 | * hci_dev_close to ensure the exclusive access will | 856 | * hci_dev_close to ensure the exclusive access will |
857 | * be released and the controller brought back down. | 857 | * be released and the controller brought back down. |
@@ -1172,7 +1172,7 @@ static int hci_sock_bind(struct socket *sock, struct sockaddr *addr, | |||
1172 | /* In case the transport is already up and | 1172 | /* In case the transport is already up and |
1173 | * running, clear the error here. | 1173 | * running, clear the error here. |
1174 | * | 1174 | * |
1175 | * This can happen when opening an user | 1175 | * This can happen when opening a user |
1176 | * channel and HCI_AUTO_OFF grace period | 1176 | * channel and HCI_AUTO_OFF grace period |
1177 | * is still active. | 1177 | * is still active. |
1178 | */ | 1178 | */ |
@@ -1190,7 +1190,7 @@ static int hci_sock_bind(struct socket *sock, struct sockaddr *addr, | |||
1190 | if (!hci_sock_gen_cookie(sk)) { | 1190 | if (!hci_sock_gen_cookie(sk)) { |
1191 | /* In the case when a cookie has already been assigned, | 1191 | /* In the case when a cookie has already been assigned, |
1192 | * this socket will transition from a raw socket into | 1192 | * this socket will transition from a raw socket into |
1193 | * an user channel socket. For a clean transition, send | 1193 | * a user channel socket. For a clean transition, send |
1194 | * the close notification first. | 1194 | * the close notification first. |
1195 | */ | 1195 | */ |
1196 | skb = create_monitor_ctrl_close(sk); | 1196 | skb = create_monitor_ctrl_close(sk); |
diff --git a/net/bridge/netfilter/ebt_among.c b/net/bridge/netfilter/ebt_among.c index 9024283d2bca..279527f8b1fe 100644 --- a/net/bridge/netfilter/ebt_among.c +++ b/net/bridge/netfilter/ebt_among.c | |||
@@ -187,7 +187,7 @@ static int ebt_among_mt_check(const struct xt_mtchk_param *par) | |||
187 | expected_length += ebt_mac_wormhash_size(wh_src); | 187 | expected_length += ebt_mac_wormhash_size(wh_src); |
188 | 188 | ||
189 | if (em->match_size != EBT_ALIGN(expected_length)) { | 189 | if (em->match_size != EBT_ALIGN(expected_length)) { |
190 | pr_info("wrong size: %d against expected %d, rounded to %Zd\n", | 190 | pr_info("wrong size: %d against expected %d, rounded to %zd\n", |
191 | em->match_size, expected_length, | 191 | em->match_size, expected_length, |
192 | EBT_ALIGN(expected_length)); | 192 | EBT_ALIGN(expected_length)); |
193 | return -EINVAL; | 193 | return -EINVAL; |
diff --git a/net/ieee802154/socket.c b/net/ieee802154/socket.c index e0bd013a1e5e..eedba7670b51 100644 --- a/net/ieee802154/socket.c +++ b/net/ieee802154/socket.c | |||
@@ -279,7 +279,7 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size) | |||
279 | pr_debug("name = %s, mtu = %u\n", dev->name, mtu); | 279 | pr_debug("name = %s, mtu = %u\n", dev->name, mtu); |
280 | 280 | ||
281 | if (size > mtu) { | 281 | if (size > mtu) { |
282 | pr_debug("size = %Zu, mtu = %u\n", size, mtu); | 282 | pr_debug("size = %zu, mtu = %u\n", size, mtu); |
283 | err = -EMSGSIZE; | 283 | err = -EMSGSIZE; |
284 | goto out_dev; | 284 | goto out_dev; |
285 | } | 285 | } |
@@ -645,7 +645,7 @@ static int dgram_sendmsg(struct sock *sk, struct msghdr *msg, size_t size) | |||
645 | pr_debug("name = %s, mtu = %u\n", dev->name, mtu); | 645 | pr_debug("name = %s, mtu = %u\n", dev->name, mtu); |
646 | 646 | ||
647 | if (size > mtu) { | 647 | if (size > mtu) { |
648 | pr_debug("size = %Zu, mtu = %u\n", size, mtu); | 648 | pr_debug("size = %zu, mtu = %u\n", size, mtu); |
649 | err = -EMSGSIZE; | 649 | err = -EMSGSIZE; |
650 | goto out_dev; | 650 | goto out_dev; |
651 | } | 651 | } |
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index d8cea210af0e..2f0d8233950f 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -2388,7 +2388,7 @@ static int fib_triestat_seq_show(struct seq_file *seq, void *v) | |||
2388 | 2388 | ||
2389 | seq_printf(seq, | 2389 | seq_printf(seq, |
2390 | "Basic info: size of leaf:" | 2390 | "Basic info: size of leaf:" |
2391 | " %Zd bytes, size of tnode: %Zd bytes.\n", | 2391 | " %zd bytes, size of tnode: %zd bytes.\n", |
2392 | LEAF_SIZE, TNODE_SIZE(0)); | 2392 | LEAF_SIZE, TNODE_SIZE(0)); |
2393 | 2393 | ||
2394 | for (h = 0; h < FIB_TABLE_HASHSZ; h++) { | 2394 | for (h = 0; h < FIB_TABLE_HASHSZ; h++) { |
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index beacd028848c..c0317c940bcd 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -2596,7 +2596,7 @@ static int ipmr_vif_seq_show(struct seq_file *seq, void *v) | |||
2596 | const char *name = vif->dev ? vif->dev->name : "none"; | 2596 | const char *name = vif->dev ? vif->dev->name : "none"; |
2597 | 2597 | ||
2598 | seq_printf(seq, | 2598 | seq_printf(seq, |
2599 | "%2Zd %-10s %8ld %7ld %8ld %7ld %05X %08X %08X\n", | 2599 | "%2zd %-10s %8ld %7ld %8ld %7ld %05X %08X %08X\n", |
2600 | vif - mrt->vif_table, | 2600 | vif - mrt->vif_table, |
2601 | name, vif->bytes_in, vif->pkt_in, | 2601 | name, vif->bytes_in, vif->pkt_in, |
2602 | vif->bytes_out, vif->pkt_out, | 2602 | vif->bytes_out, vif->pkt_out, |
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c index fcfd071f4705..bc1486f2c064 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | |||
@@ -235,7 +235,7 @@ getorigdst(struct sock *sk, int optval, void __user *user, int *len) | |||
235 | } | 235 | } |
236 | 236 | ||
237 | if ((unsigned int) *len < sizeof(struct sockaddr_in)) { | 237 | if ((unsigned int) *len < sizeof(struct sockaddr_in)) { |
238 | pr_debug("SO_ORIGINAL_DST: len %d not %Zu\n", | 238 | pr_debug("SO_ORIGINAL_DST: len %d not %zu\n", |
239 | *len, sizeof(struct sockaddr_in)); | 239 | *len, sizeof(struct sockaddr_in)); |
240 | return -EINVAL; | 240 | return -EINVAL; |
241 | } | 241 | } |
diff --git a/net/ipv4/netfilter/nf_log_arp.c b/net/ipv4/netfilter/nf_log_arp.c index f6f713376e6e..2f3895ddc275 100644 --- a/net/ipv4/netfilter/nf_log_arp.c +++ b/net/ipv4/netfilter/nf_log_arp.c | |||
@@ -69,7 +69,7 @@ static void dump_arp_packet(struct nf_log_buf *m, | |||
69 | 69 | ||
70 | ap = skb_header_pointer(skb, sizeof(_arph), sizeof(_arpp), &_arpp); | 70 | ap = skb_header_pointer(skb, sizeof(_arph), sizeof(_arpp), &_arpp); |
71 | if (ap == NULL) { | 71 | if (ap == NULL) { |
72 | nf_log_buf_add(m, " INCOMPLETE [%Zu bytes]", | 72 | nf_log_buf_add(m, " INCOMPLETE [%zu bytes]", |
73 | skb->len - sizeof(_arph)); | 73 | skb->len - sizeof(_arph)); |
74 | return; | 74 | return; |
75 | } | 75 | } |
diff --git a/net/ipv6/netfilter/nf_log_ipv6.c b/net/ipv6/netfilter/nf_log_ipv6.c index 055c51b80f5d..97c724224da7 100644 --- a/net/ipv6/netfilter/nf_log_ipv6.c +++ b/net/ipv6/netfilter/nf_log_ipv6.c | |||
@@ -64,7 +64,7 @@ static void dump_ipv6_packet(struct nf_log_buf *m, | |||
64 | nf_log_buf_add(m, "SRC=%pI6 DST=%pI6 ", &ih->saddr, &ih->daddr); | 64 | nf_log_buf_add(m, "SRC=%pI6 DST=%pI6 ", &ih->saddr, &ih->daddr); |
65 | 65 | ||
66 | /* Max length: 44 "LEN=65535 TC=255 HOPLIMIT=255 FLOWLBL=FFFFF " */ | 66 | /* Max length: 44 "LEN=65535 TC=255 HOPLIMIT=255 FLOWLBL=FFFFF " */ |
67 | nf_log_buf_add(m, "LEN=%Zu TC=%u HOPLIMIT=%u FLOWLBL=%u ", | 67 | nf_log_buf_add(m, "LEN=%zu TC=%u HOPLIMIT=%u FLOWLBL=%u ", |
68 | ntohs(ih->payload_len) + sizeof(struct ipv6hdr), | 68 | ntohs(ih->payload_len) + sizeof(struct ipv6hdr), |
69 | (ntohl(*(__be32 *)ih) & 0x0ff00000) >> 20, | 69 | (ntohl(*(__be32 *)ih) & 0x0ff00000) >> 20, |
70 | ih->hop_limit, | 70 | ih->hop_limit, |
diff --git a/net/irda/irnet/irnet_ppp.c b/net/irda/irnet/irnet_ppp.c index 1215693fdd22..35dbf3dc3d28 100644 --- a/net/irda/irnet/irnet_ppp.c +++ b/net/irda/irnet/irnet_ppp.c | |||
@@ -51,7 +51,7 @@ irnet_ctrl_write(irnet_socket * ap, | |||
51 | char * next; /* Next command to process */ | 51 | char * next; /* Next command to process */ |
52 | int length; /* Length of current command */ | 52 | int length; /* Length of current command */ |
53 | 53 | ||
54 | DENTER(CTRL_TRACE, "(ap=0x%p, count=%Zd)\n", ap, count); | 54 | DENTER(CTRL_TRACE, "(ap=0x%p, count=%zd)\n", ap, count); |
55 | 55 | ||
56 | /* Check for overflow... */ | 56 | /* Check for overflow... */ |
57 | DABORT(count >= IRNET_MAX_COMMAND, -ENOMEM, | 57 | DABORT(count >= IRNET_MAX_COMMAND, -ENOMEM, |
@@ -66,7 +66,7 @@ irnet_ctrl_write(irnet_socket * ap, | |||
66 | 66 | ||
67 | /* Safe terminate the string */ | 67 | /* Safe terminate the string */ |
68 | command[count] = '\0'; | 68 | command[count] = '\0'; |
69 | DEBUG(CTRL_INFO, "Command line received is ``%s'' (%Zd).\n", | 69 | DEBUG(CTRL_INFO, "Command line received is ``%s'' (%zd).\n", |
70 | command, count); | 70 | command, count); |
71 | 71 | ||
72 | /* Check every commands in the command line */ | 72 | /* Check every commands in the command line */ |
@@ -285,7 +285,7 @@ irnet_ctrl_read(irnet_socket * ap, | |||
285 | char event[75]; | 285 | char event[75]; |
286 | ssize_t ret = 0; | 286 | ssize_t ret = 0; |
287 | 287 | ||
288 | DENTER(CTRL_TRACE, "(ap=0x%p, count=%Zd)\n", ap, count); | 288 | DENTER(CTRL_TRACE, "(ap=0x%p, count=%zd)\n", ap, count); |
289 | 289 | ||
290 | #ifdef INITIAL_DISCOVERY | 290 | #ifdef INITIAL_DISCOVERY |
291 | /* Check if we have read the log */ | 291 | /* Check if we have read the log */ |
@@ -328,7 +328,7 @@ irnet_ctrl_read(irnet_socket * ap, | |||
328 | if(ret != 0) | 328 | if(ret != 0) |
329 | { | 329 | { |
330 | /* No, return the error code */ | 330 | /* No, return the error code */ |
331 | DEXIT(CTRL_TRACE, " - ret %Zd\n", ret); | 331 | DEXIT(CTRL_TRACE, " - ret %zd\n", ret); |
332 | return ret; | 332 | return ret; |
333 | } | 333 | } |
334 | 334 | ||
@@ -568,7 +568,7 @@ dev_irnet_write(struct file * file, | |||
568 | { | 568 | { |
569 | irnet_socket * ap = file->private_data; | 569 | irnet_socket * ap = file->private_data; |
570 | 570 | ||
571 | DPASS(FS_TRACE, "(file=0x%p, ap=0x%p, count=%Zd)\n", | 571 | DPASS(FS_TRACE, "(file=0x%p, ap=0x%p, count=%zd)\n", |
572 | file, ap, count); | 572 | file, ap, count); |
573 | DABORT(ap == NULL, -ENXIO, FS_ERROR, "ap is NULL !!!\n"); | 573 | DABORT(ap == NULL, -ENXIO, FS_ERROR, "ap is NULL !!!\n"); |
574 | 574 | ||
@@ -592,7 +592,7 @@ dev_irnet_read(struct file * file, | |||
592 | { | 592 | { |
593 | irnet_socket * ap = file->private_data; | 593 | irnet_socket * ap = file->private_data; |
594 | 594 | ||
595 | DPASS(FS_TRACE, "(file=0x%p, ap=0x%p, count=%Zd)\n", | 595 | DPASS(FS_TRACE, "(file=0x%p, ap=0x%p, count=%zd)\n", |
596 | file, ap, count); | 596 | file, ap, count); |
597 | DABORT(ap == NULL, -ENXIO, FS_ERROR, "ap is NULL !!!\n"); | 597 | DABORT(ap == NULL, -ENXIO, FS_ERROR, "ap is NULL !!!\n"); |
598 | 598 | ||
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c index b58000efee73..8adab6335ced 100644 --- a/net/l2tp/l2tp_core.c +++ b/net/l2tp/l2tp_core.c | |||
@@ -1058,10 +1058,10 @@ static int l2tp_xmit_core(struct l2tp_session *session, struct sk_buff *skb, | |||
1058 | 1058 | ||
1059 | /* Debug */ | 1059 | /* Debug */ |
1060 | if (session->send_seq) | 1060 | if (session->send_seq) |
1061 | l2tp_dbg(session, L2TP_MSG_DATA, "%s: send %Zd bytes, ns=%u\n", | 1061 | l2tp_dbg(session, L2TP_MSG_DATA, "%s: send %zd bytes, ns=%u\n", |
1062 | session->name, data_len, session->ns - 1); | 1062 | session->name, data_len, session->ns - 1); |
1063 | else | 1063 | else |
1064 | l2tp_dbg(session, L2TP_MSG_DATA, "%s: send %Zd bytes\n", | 1064 | l2tp_dbg(session, L2TP_MSG_DATA, "%s: send %zd bytes\n", |
1065 | session->name, data_len); | 1065 | session->name, data_len); |
1066 | 1066 | ||
1067 | if (session->debug & L2TP_MSG_DATA) { | 1067 | if (session->debug & L2TP_MSG_DATA) { |
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index c28b0af9c1f2..6e7b6a07b7d5 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -681,7 +681,7 @@ ieee80211_mesh_build_beacon(struct ieee80211_if_mesh *ifmsh) | |||
681 | 2 + /* NULL SSID */ | 681 | 2 + /* NULL SSID */ |
682 | /* Channel Switch Announcement */ | 682 | /* Channel Switch Announcement */ |
683 | 2 + sizeof(struct ieee80211_channel_sw_ie) + | 683 | 2 + sizeof(struct ieee80211_channel_sw_ie) + |
684 | /* Mesh Channel Swith Parameters */ | 684 | /* Mesh Channel Switch Parameters */ |
685 | 2 + sizeof(struct ieee80211_mesh_chansw_params_ie) + | 685 | 2 + sizeof(struct ieee80211_mesh_chansw_params_ie) + |
686 | 2 + 8 + /* supported rates */ | 686 | 2 + 8 + /* supported rates */ |
687 | 2 + 3; /* DS params */ | 687 | 2 + 3; /* DS params */ |
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c index 096a45103f14..e6a2753dff9e 100644 --- a/net/netfilter/ipvs/ip_vs_conn.c +++ b/net/netfilter/ipvs/ip_vs_conn.c | |||
@@ -1429,7 +1429,7 @@ int __init ip_vs_conn_init(void) | |||
1429 | "(size=%d, memory=%ldKbytes)\n", | 1429 | "(size=%d, memory=%ldKbytes)\n", |
1430 | ip_vs_conn_tab_size, | 1430 | ip_vs_conn_tab_size, |
1431 | (long)(ip_vs_conn_tab_size*sizeof(struct list_head))/1024); | 1431 | (long)(ip_vs_conn_tab_size*sizeof(struct list_head))/1024); |
1432 | IP_VS_DBG(0, "Each connection entry needs %Zd bytes at least\n", | 1432 | IP_VS_DBG(0, "Each connection entry needs %zd bytes at least\n", |
1433 | sizeof(struct ip_vs_conn)); | 1433 | sizeof(struct ip_vs_conn)); |
1434 | 1434 | ||
1435 | for (idx = 0; idx < ip_vs_conn_tab_size; idx++) | 1435 | for (idx = 0; idx < ip_vs_conn_tab_size; idx++) |
diff --git a/net/netfilter/ipvs/ip_vs_dh.c b/net/netfilter/ipvs/ip_vs_dh.c index 6be5c538b71e..75f798f8e83b 100644 --- a/net/netfilter/ipvs/ip_vs_dh.c +++ b/net/netfilter/ipvs/ip_vs_dh.c | |||
@@ -163,7 +163,7 @@ static int ip_vs_dh_init_svc(struct ip_vs_service *svc) | |||
163 | return -ENOMEM; | 163 | return -ENOMEM; |
164 | 164 | ||
165 | svc->sched_data = s; | 165 | svc->sched_data = s; |
166 | IP_VS_DBG(6, "DH hash table (memory=%Zdbytes) allocated for " | 166 | IP_VS_DBG(6, "DH hash table (memory=%zdbytes) allocated for " |
167 | "current service\n", | 167 | "current service\n", |
168 | sizeof(struct ip_vs_dh_bucket)*IP_VS_DH_TAB_SIZE); | 168 | sizeof(struct ip_vs_dh_bucket)*IP_VS_DH_TAB_SIZE); |
169 | 169 | ||
@@ -183,7 +183,7 @@ static void ip_vs_dh_done_svc(struct ip_vs_service *svc) | |||
183 | 183 | ||
184 | /* release the table itself */ | 184 | /* release the table itself */ |
185 | kfree_rcu(s, rcu_head); | 185 | kfree_rcu(s, rcu_head); |
186 | IP_VS_DBG(6, "DH hash table (memory=%Zdbytes) released\n", | 186 | IP_VS_DBG(6, "DH hash table (memory=%zdbytes) released\n", |
187 | sizeof(struct ip_vs_dh_bucket)*IP_VS_DH_TAB_SIZE); | 187 | sizeof(struct ip_vs_dh_bucket)*IP_VS_DH_TAB_SIZE); |
188 | } | 188 | } |
189 | 189 | ||
diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c index cccf4d637412..5824927cf8e0 100644 --- a/net/netfilter/ipvs/ip_vs_lblc.c +++ b/net/netfilter/ipvs/ip_vs_lblc.c | |||
@@ -356,7 +356,7 @@ static int ip_vs_lblc_init_svc(struct ip_vs_service *svc) | |||
356 | return -ENOMEM; | 356 | return -ENOMEM; |
357 | 357 | ||
358 | svc->sched_data = tbl; | 358 | svc->sched_data = tbl; |
359 | IP_VS_DBG(6, "LBLC hash table (memory=%Zdbytes) allocated for " | 359 | IP_VS_DBG(6, "LBLC hash table (memory=%zdbytes) allocated for " |
360 | "current service\n", sizeof(*tbl)); | 360 | "current service\n", sizeof(*tbl)); |
361 | 361 | ||
362 | /* | 362 | /* |
@@ -393,7 +393,7 @@ static void ip_vs_lblc_done_svc(struct ip_vs_service *svc) | |||
393 | 393 | ||
394 | /* release the table itself */ | 394 | /* release the table itself */ |
395 | kfree_rcu(tbl, rcu_head); | 395 | kfree_rcu(tbl, rcu_head); |
396 | IP_VS_DBG(6, "LBLC hash table (memory=%Zdbytes) released\n", | 396 | IP_VS_DBG(6, "LBLC hash table (memory=%zdbytes) released\n", |
397 | sizeof(*tbl)); | 397 | sizeof(*tbl)); |
398 | } | 398 | } |
399 | 399 | ||
diff --git a/net/netfilter/ipvs/ip_vs_lblcr.c b/net/netfilter/ipvs/ip_vs_lblcr.c index 796d70e47ddd..703f11877bee 100644 --- a/net/netfilter/ipvs/ip_vs_lblcr.c +++ b/net/netfilter/ipvs/ip_vs_lblcr.c | |||
@@ -519,7 +519,7 @@ static int ip_vs_lblcr_init_svc(struct ip_vs_service *svc) | |||
519 | return -ENOMEM; | 519 | return -ENOMEM; |
520 | 520 | ||
521 | svc->sched_data = tbl; | 521 | svc->sched_data = tbl; |
522 | IP_VS_DBG(6, "LBLCR hash table (memory=%Zdbytes) allocated for " | 522 | IP_VS_DBG(6, "LBLCR hash table (memory=%zdbytes) allocated for " |
523 | "current service\n", sizeof(*tbl)); | 523 | "current service\n", sizeof(*tbl)); |
524 | 524 | ||
525 | /* | 525 | /* |
@@ -556,7 +556,7 @@ static void ip_vs_lblcr_done_svc(struct ip_vs_service *svc) | |||
556 | 556 | ||
557 | /* release the table itself */ | 557 | /* release the table itself */ |
558 | kfree_rcu(tbl, rcu_head); | 558 | kfree_rcu(tbl, rcu_head); |
559 | IP_VS_DBG(6, "LBLCR hash table (memory=%Zdbytes) released\n", | 559 | IP_VS_DBG(6, "LBLCR hash table (memory=%zdbytes) released\n", |
560 | sizeof(*tbl)); | 560 | sizeof(*tbl)); |
561 | } | 561 | } |
562 | 562 | ||
diff --git a/net/netfilter/ipvs/ip_vs_sh.c b/net/netfilter/ipvs/ip_vs_sh.c index 1e373a5e44e3..16aaac6eedc9 100644 --- a/net/netfilter/ipvs/ip_vs_sh.c +++ b/net/netfilter/ipvs/ip_vs_sh.c | |||
@@ -239,7 +239,7 @@ static int ip_vs_sh_init_svc(struct ip_vs_service *svc) | |||
239 | return -ENOMEM; | 239 | return -ENOMEM; |
240 | 240 | ||
241 | svc->sched_data = s; | 241 | svc->sched_data = s; |
242 | IP_VS_DBG(6, "SH hash table (memory=%Zdbytes) allocated for " | 242 | IP_VS_DBG(6, "SH hash table (memory=%zdbytes) allocated for " |
243 | "current service\n", | 243 | "current service\n", |
244 | sizeof(struct ip_vs_sh_bucket)*IP_VS_SH_TAB_SIZE); | 244 | sizeof(struct ip_vs_sh_bucket)*IP_VS_SH_TAB_SIZE); |
245 | 245 | ||
@@ -259,7 +259,7 @@ static void ip_vs_sh_done_svc(struct ip_vs_service *svc) | |||
259 | 259 | ||
260 | /* release the table itself */ | 260 | /* release the table itself */ |
261 | kfree_rcu(s, rcu_head); | 261 | kfree_rcu(s, rcu_head); |
262 | IP_VS_DBG(6, "SH hash table (memory=%Zdbytes) released\n", | 262 | IP_VS_DBG(6, "SH hash table (memory=%zdbytes) released\n", |
263 | sizeof(struct ip_vs_sh_bucket)*IP_VS_SH_TAB_SIZE); | 263 | sizeof(struct ip_vs_sh_bucket)*IP_VS_SH_TAB_SIZE); |
264 | } | 264 | } |
265 | 265 | ||
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c index 9350530c16c1..b03c28084f81 100644 --- a/net/netfilter/ipvs/ip_vs_sync.c +++ b/net/netfilter/ipvs/ip_vs_sync.c | |||
@@ -1791,7 +1791,7 @@ int start_sync_thread(struct netns_ipvs *ipvs, struct ipvs_sync_daemon_cfg *c, | |||
1791 | u16 mtu, min_mtu; | 1791 | u16 mtu, min_mtu; |
1792 | 1792 | ||
1793 | IP_VS_DBG(7, "%s(): pid %d\n", __func__, task_pid_nr(current)); | 1793 | IP_VS_DBG(7, "%s(): pid %d\n", __func__, task_pid_nr(current)); |
1794 | IP_VS_DBG(7, "Each ip_vs_sync_conn entry needs %Zd bytes\n", | 1794 | IP_VS_DBG(7, "Each ip_vs_sync_conn entry needs %zd bytes\n", |
1795 | sizeof(struct ip_vs_sync_conn_v0)); | 1795 | sizeof(struct ip_vs_sync_conn_v0)); |
1796 | 1796 | ||
1797 | if (!ipvs->sync_state) { | 1797 | if (!ipvs->sync_state) { |
diff --git a/net/netfilter/nf_conntrack_ftp.c b/net/netfilter/nf_conntrack_ftp.c index e3ed20060878..4aecef4a89fb 100644 --- a/net/netfilter/nf_conntrack_ftp.c +++ b/net/netfilter/nf_conntrack_ftp.c | |||
@@ -300,7 +300,7 @@ static int find_pattern(const char *data, size_t dlen, | |||
300 | { | 300 | { |
301 | size_t i = plen; | 301 | size_t i = plen; |
302 | 302 | ||
303 | pr_debug("find_pattern `%s': dlen = %Zu\n", pattern, dlen); | 303 | pr_debug("find_pattern `%s': dlen = %zu\n", pattern, dlen); |
304 | 304 | ||
305 | if (dlen <= plen) { | 305 | if (dlen <= plen) { |
306 | /* Short packet: try for partial? */ | 306 | /* Short packet: try for partial? */ |
diff --git a/net/netfilter/nfnetlink_cthelper.c b/net/netfilter/nfnetlink_cthelper.c index 3b79f34b5095..de8782345c86 100644 --- a/net/netfilter/nfnetlink_cthelper.c +++ b/net/netfilter/nfnetlink_cthelper.c | |||
@@ -48,7 +48,7 @@ nfnl_userspace_cthelper(struct sk_buff *skb, unsigned int protoff, | |||
48 | if (helper == NULL) | 48 | if (helper == NULL) |
49 | return NF_DROP; | 49 | return NF_DROP; |
50 | 50 | ||
51 | /* This is an user-space helper not yet configured, skip. */ | 51 | /* This is a user-space helper not yet configured, skip. */ |
52 | if ((helper->flags & | 52 | if ((helper->flags & |
53 | (NF_CT_HELPER_F_USERSPACE | NF_CT_HELPER_F_CONFIGURED)) == | 53 | (NF_CT_HELPER_F_USERSPACE | NF_CT_HELPER_F_CONFIGURED)) == |
54 | NF_CT_HELPER_F_USERSPACE) | 54 | NF_CT_HELPER_F_USERSPACE) |
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 016db6be94b9..14857afc9937 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c | |||
@@ -667,7 +667,7 @@ int xt_compat_check_entry_offsets(const void *base, const char *elems, | |||
667 | COMPAT_XT_ALIGN(target_offset + sizeof(struct compat_xt_standard_target)) != next_offset) | 667 | COMPAT_XT_ALIGN(target_offset + sizeof(struct compat_xt_standard_target)) != next_offset) |
668 | return -EINVAL; | 668 | return -EINVAL; |
669 | 669 | ||
670 | /* compat_xt_entry match has less strict aligment requirements, | 670 | /* compat_xt_entry match has less strict alignment requirements, |
671 | * otherwise they are identical. In case of padding differences | 671 | * otherwise they are identical. In case of padding differences |
672 | * we need to add compat version of xt_check_entry_match. | 672 | * we need to add compat version of xt_check_entry_match. |
673 | */ | 673 | */ |
diff --git a/net/sctp/output.c b/net/sctp/output.c index 85406d5f8f41..71ce6b945dcb 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
@@ -177,7 +177,7 @@ sctp_xmit_t sctp_packet_transmit_chunk(struct sctp_packet *packet, | |||
177 | { | 177 | { |
178 | sctp_xmit_t retval; | 178 | sctp_xmit_t retval; |
179 | 179 | ||
180 | pr_debug("%s: packet:%p size:%Zu chunk:%p size:%d\n", __func__, | 180 | pr_debug("%s: packet:%p size:%zu chunk:%p size:%d\n", __func__, |
181 | packet, packet->size, chunk, chunk->skb ? chunk->skb->len : -1); | 181 | packet, packet->size, chunk, chunk->skb ? chunk->skb->len : -1); |
182 | 182 | ||
183 | switch ((retval = (sctp_packet_append_chunk(packet, chunk)))) { | 183 | switch ((retval = (sctp_packet_append_chunk(packet, chunk)))) { |
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 5b63ceb3bf37..3379668af368 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -643,9 +643,7 @@ void sctp_transport_reset(struct sctp_transport *t) | |||
643 | t->srtt = 0; | 643 | t->srtt = 0; |
644 | t->rttvar = 0; | 644 | t->rttvar = 0; |
645 | 645 | ||
646 | /* Reset these additional varibles so that we have a clean | 646 | /* Reset these additional variables so that we have a clean slate. */ |
647 | * slate. | ||
648 | */ | ||
649 | t->partial_bytes_acked = 0; | 647 | t->partial_bytes_acked = 0; |
650 | t->flight_size = 0; | 648 | t->flight_size = 0; |
651 | t->error_count = 0; | 649 | t->error_count = 0; |
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index cdeb1d814833..4f16953e4954 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -763,7 +763,7 @@ err_put_ctx: | |||
763 | err: | 763 | err: |
764 | kfree(buf); | 764 | kfree(buf); |
765 | out: | 765 | out: |
766 | dprintk("RPC: %s returning %Zd\n", __func__, err); | 766 | dprintk("RPC: %s returning %zd\n", __func__, err); |
767 | return err; | 767 | return err; |
768 | } | 768 | } |
769 | 769 | ||
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 75f290bddca1..2e22889a8837 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -1260,7 +1260,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv) | |||
1260 | return 0; | 1260 | return 0; |
1261 | 1261 | ||
1262 | err_short_len: | 1262 | err_short_len: |
1263 | svc_printk(rqstp, "short len %Zd, dropping request\n", | 1263 | svc_printk(rqstp, "short len %zd, dropping request\n", |
1264 | argv->iov_len); | 1264 | argv->iov_len); |
1265 | goto close; | 1265 | goto close; |
1266 | 1266 | ||
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index de066acdb34e..d227d97f7ad4 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -278,7 +278,7 @@ static int svc_sendto(struct svc_rqst *rqstp, struct xdr_buf *xdr) | |||
278 | rqstp->rq_respages[0], tailoff); | 278 | rqstp->rq_respages[0], tailoff); |
279 | 279 | ||
280 | out: | 280 | out: |
281 | dprintk("svc: socket %p sendto([%p %Zu... ], %d) = %d (addr %s)\n", | 281 | dprintk("svc: socket %p sendto([%p %zu... ], %d) = %d (addr %s)\n", |
282 | svsk, xdr->head[0].iov_base, xdr->head[0].iov_len, | 282 | svsk, xdr->head[0].iov_base, xdr->head[0].iov_len, |
283 | xdr->len, len, svc_print_addr(rqstp, buf, sizeof(buf))); | 283 | xdr->len, len, svc_print_addr(rqstp, buf, sizeof(buf))); |
284 | 284 | ||
@@ -346,7 +346,7 @@ static int svc_recvfrom(struct svc_rqst *rqstp, struct kvec *iov, int nr, | |||
346 | if (len == buflen) | 346 | if (len == buflen) |
347 | set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); | 347 | set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); |
348 | 348 | ||
349 | dprintk("svc: socket %p recvfrom(%p, %Zu) = %d\n", | 349 | dprintk("svc: socket %p recvfrom(%p, %zu) = %d\n", |
350 | svsk, iov[0].iov_base, iov[0].iov_len, len); | 350 | svsk, iov[0].iov_base, iov[0].iov_len, len); |
351 | return len; | 351 | return len; |
352 | } | 352 | } |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index af392d9b9cec..956c7bce80d1 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -1188,7 +1188,7 @@ static inline void xs_tcp_read_xid(struct sock_xprt *transport, struct xdr_skb_r | |||
1188 | char *p; | 1188 | char *p; |
1189 | 1189 | ||
1190 | len = sizeof(transport->tcp_xid) - transport->tcp_offset; | 1190 | len = sizeof(transport->tcp_xid) - transport->tcp_offset; |
1191 | dprintk("RPC: reading XID (%Zu bytes)\n", len); | 1191 | dprintk("RPC: reading XID (%zu bytes)\n", len); |
1192 | p = ((char *) &transport->tcp_xid) + transport->tcp_offset; | 1192 | p = ((char *) &transport->tcp_xid) + transport->tcp_offset; |
1193 | used = xdr_skb_read_bits(desc, p, len); | 1193 | used = xdr_skb_read_bits(desc, p, len); |
1194 | transport->tcp_offset += used; | 1194 | transport->tcp_offset += used; |
@@ -1219,7 +1219,7 @@ static inline void xs_tcp_read_calldir(struct sock_xprt *transport, | |||
1219 | */ | 1219 | */ |
1220 | offset = transport->tcp_offset - sizeof(transport->tcp_xid); | 1220 | offset = transport->tcp_offset - sizeof(transport->tcp_xid); |
1221 | len = sizeof(transport->tcp_calldir) - offset; | 1221 | len = sizeof(transport->tcp_calldir) - offset; |
1222 | dprintk("RPC: reading CALL/REPLY flag (%Zu bytes)\n", len); | 1222 | dprintk("RPC: reading CALL/REPLY flag (%zu bytes)\n", len); |
1223 | p = ((char *) &transport->tcp_calldir) + offset; | 1223 | p = ((char *) &transport->tcp_calldir) + offset; |
1224 | used = xdr_skb_read_bits(desc, p, len); | 1224 | used = xdr_skb_read_bits(desc, p, len); |
1225 | transport->tcp_offset += used; | 1225 | transport->tcp_offset += used; |
@@ -1310,7 +1310,7 @@ static inline void xs_tcp_read_common(struct rpc_xprt *xprt, | |||
1310 | return; | 1310 | return; |
1311 | } | 1311 | } |
1312 | 1312 | ||
1313 | dprintk("RPC: XID %08x read %Zd bytes\n", | 1313 | dprintk("RPC: XID %08x read %zd bytes\n", |
1314 | ntohl(transport->tcp_xid), r); | 1314 | ntohl(transport->tcp_xid), r); |
1315 | dprintk("RPC: xprt = %p, tcp_copied = %lu, tcp_offset = %u, " | 1315 | dprintk("RPC: xprt = %p, tcp_copied = %lu, tcp_offset = %u, " |
1316 | "tcp_reclen = %u\n", xprt, transport->tcp_copied, | 1316 | "tcp_reclen = %u\n", xprt, transport->tcp_copied, |
@@ -1456,7 +1456,7 @@ static inline void xs_tcp_read_discard(struct sock_xprt *transport, struct xdr_s | |||
1456 | desc->count -= len; | 1456 | desc->count -= len; |
1457 | desc->offset += len; | 1457 | desc->offset += len; |
1458 | transport->tcp_offset += len; | 1458 | transport->tcp_offset += len; |
1459 | dprintk("RPC: discarded %Zu bytes\n", len); | 1459 | dprintk("RPC: discarded %zu bytes\n", len); |
1460 | xs_tcp_check_fraghdr(transport); | 1460 | xs_tcp_check_fraghdr(transport); |
1461 | } | 1461 | } |
1462 | 1462 | ||
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 918259a55f65..baa3c7be04ad 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -1848,6 +1848,8 @@ my $prefix = ''; | |||
1848 | sub show_type { | 1848 | sub show_type { |
1849 | my ($type) = @_; | 1849 | my ($type) = @_; |
1850 | 1850 | ||
1851 | $type =~ tr/[a-z]/[A-Z]/; | ||
1852 | |||
1851 | return defined $use_type{$type} if (scalar keys %use_type > 0); | 1853 | return defined $use_type{$type} if (scalar keys %use_type > 0); |
1852 | 1854 | ||
1853 | return !defined $ignore_type{$type}; | 1855 | return !defined $ignore_type{$type}; |
@@ -5204,18 +5206,27 @@ sub process { | |||
5204 | "Consecutive strings are generally better as a single string\n" . $herecurr); | 5206 | "Consecutive strings are generally better as a single string\n" . $herecurr); |
5205 | } | 5207 | } |
5206 | 5208 | ||
5207 | # check for %L{u,d,i} and 0x%[udi] in strings | 5209 | # check for non-standard and hex prefixed decimal printf formats |
5208 | my $string; | 5210 | my $show_L = 1; #don't show the same defect twice |
5211 | my $show_Z = 1; | ||
5209 | while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) { | 5212 | while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) { |
5210 | $string = substr($rawline, $-[1], $+[1] - $-[1]); | 5213 | my $string = substr($rawline, $-[1], $+[1] - $-[1]); |
5211 | $string =~ s/%%/__/g; | 5214 | $string =~ s/%%/__/g; |
5212 | if ($string =~ /(?<!%)%[\*\d\.\$]*L[udi]/) { | 5215 | # check for %L |
5216 | if ($show_L && $string =~ /%[\*\d\.\$]*L([diouxX])/) { | ||
5213 | WARN("PRINTF_L", | 5217 | WARN("PRINTF_L", |
5214 | "\%Ld/%Lu are not-standard C, use %lld/%llu\n" . $herecurr); | 5218 | "\%L$1 is non-standard C, use %ll$1\n" . $herecurr); |
5215 | last; | 5219 | $show_L = 0; |
5216 | } | 5220 | } |
5217 | if ($string =~ /0x%[\*\d\.\$\Llzth]*[udi]/) { | 5221 | # check for %Z |
5218 | ERROR("PRINTF_0xDECIMAL", | 5222 | if ($show_Z && $string =~ /%[\*\d\.\$]*Z([diouxX])/) { |
5223 | WARN("PRINTF_Z", | ||
5224 | "%Z$1 is non-standard C, use %z$1\n" . $herecurr); | ||
5225 | $show_Z = 0; | ||
5226 | } | ||
5227 | # check for 0x<decimal> | ||
5228 | if ($string =~ /0x%[\*\d\.\$\Llzth]*[diou]/) { | ||
5229 | ERROR("PRINTF_0XDECIMAL", | ||
5219 | "Prefixing 0x with decimal output is defective\n" . $herecurr); | 5230 | "Prefixing 0x with decimal output is defective\n" . $herecurr); |
5220 | } | 5231 | } |
5221 | } | 5232 | } |
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index faac4b10d8ea..0b6002b36f20 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl | |||
@@ -318,7 +318,7 @@ if ($arch eq "x86_64") { | |||
318 | # instruction or the addiu one. herein, we record the address of the | 318 | # instruction or the addiu one. herein, we record the address of the |
319 | # first one, and then we can replace this instruction by a branch | 319 | # first one, and then we can replace this instruction by a branch |
320 | # instruction to jump over the profiling function to filter the | 320 | # instruction to jump over the profiling function to filter the |
321 | # indicated functions, or swith back to the lui instruction to trace | 321 | # indicated functions, or switch back to the lui instruction to trace |
322 | # them, which means dynamic tracing. | 322 | # them, which means dynamic tracing. |
323 | # | 323 | # |
324 | # c: 3c030000 lui v1,0x0 | 324 | # c: 3c030000 lui v1,0x0 |
diff --git a/scripts/spelling.txt b/scripts/spelling.txt index b3a1994b5df7..0458b037c8a1 100644 --- a/scripts/spelling.txt +++ b/scripts/spelling.txt | |||
@@ -62,15 +62,19 @@ adress||address | |||
62 | adresses||addresses | 62 | adresses||addresses |
63 | adviced||advised | 63 | adviced||advised |
64 | afecting||affecting | 64 | afecting||affecting |
65 | againt||against | ||
65 | agaist||against | 66 | agaist||against |
66 | albumns||albums | 67 | albumns||albums |
67 | alegorical||allegorical | 68 | alegorical||allegorical |
69 | algined||aligned | ||
68 | algorith||algorithm | 70 | algorith||algorithm |
69 | algorithmical||algorithmically | 71 | algorithmical||algorithmically |
70 | algoritm||algorithm | 72 | algoritm||algorithm |
71 | algoritms||algorithms | 73 | algoritms||algorithms |
72 | algorrithm||algorithm | 74 | algorrithm||algorithm |
73 | algorritm||algorithm | 75 | algorritm||algorithm |
76 | aligment||alignment | ||
77 | alignement||alignment | ||
74 | allign||align | 78 | allign||align |
75 | allocatrd||allocated | 79 | allocatrd||allocated |
76 | allocte||allocate | 80 | allocte||allocate |
@@ -86,6 +90,10 @@ alue||value | |||
86 | ambigious||ambiguous | 90 | ambigious||ambiguous |
87 | amoung||among | 91 | amoung||among |
88 | amout||amount | 92 | amout||amount |
93 | an union||a union | ||
94 | an user||a user | ||
95 | an userspace||a userspace | ||
96 | an one||a one | ||
89 | analysator||analyzer | 97 | analysator||analyzer |
90 | ang||and | 98 | ang||and |
91 | anniversery||anniversary | 99 | anniversery||anniversary |
@@ -98,6 +106,7 @@ appearence||appearance | |||
98 | applicaion||application | 106 | applicaion||application |
99 | appliction||application | 107 | appliction||application |
100 | applictions||applications | 108 | applictions||applications |
109 | applys||applies | ||
101 | appplications||applications | 110 | appplications||applications |
102 | appropiate||appropriate | 111 | appropiate||appropriate |
103 | appropriatly||appropriately | 112 | appropriatly||appropriately |
@@ -237,6 +246,9 @@ commited||committed | |||
237 | commiting||committing | 246 | commiting||committing |
238 | committ||commit | 247 | committ||commit |
239 | commoditiy||commodity | 248 | commoditiy||commodity |
249 | comsume||consume | ||
250 | comsumer||consumer | ||
251 | comsuming||consuming | ||
240 | compability||compatibility | 252 | compability||compatibility |
241 | compaibility||compatibility | 253 | compaibility||compatibility |
242 | compatability||compatibility | 254 | compatability||compatibility |
@@ -258,6 +270,7 @@ comunication||communication | |||
258 | conbination||combination | 270 | conbination||combination |
259 | conditionaly||conditionally | 271 | conditionaly||conditionally |
260 | conected||connected | 272 | conected||connected |
273 | configuartion||configuration | ||
261 | configuratoin||configuration | 274 | configuratoin||configuration |
262 | configuraton||configuration | 275 | configuraton||configuration |
263 | configuretion||configuration | 276 | configuretion||configuration |
@@ -310,6 +323,9 @@ defintion||definition | |||
310 | defintions||definitions | 323 | defintions||definitions |
311 | defualt||default | 324 | defualt||default |
312 | defult||default | 325 | defult||default |
326 | deintializing||deinitializing | ||
327 | deintialize||deinitialize | ||
328 | deintialized||deinitialized | ||
313 | deivce||device | 329 | deivce||device |
314 | delared||declared | 330 | delared||declared |
315 | delare||declare | 331 | delare||declare |
@@ -352,6 +368,7 @@ differrence||difference | |||
352 | difinition||definition | 368 | difinition||definition |
353 | diplay||display | 369 | diplay||display |
354 | direectly||directly | 370 | direectly||directly |
371 | disassocation||disassociation | ||
355 | disapear||disappear | 372 | disapear||disappear |
356 | disapeared||disappeared | 373 | disapeared||disappeared |
357 | disappared||disappeared | 374 | disappared||disappeared |
@@ -375,10 +392,12 @@ easilly||easily | |||
375 | ecspecially||especially | 392 | ecspecially||especially |
376 | edditable||editable | 393 | edditable||editable |
377 | editting||editing | 394 | editting||editing |
395 | efective||effective | ||
378 | efficently||efficiently | 396 | efficently||efficiently |
379 | ehther||ether | 397 | ehther||ether |
380 | eigth||eight | 398 | eigth||eight |
381 | eletronic||electronic | 399 | eletronic||electronic |
400 | embeded||embedded | ||
382 | enabledi||enabled | 401 | enabledi||enabled |
383 | enchanced||enhanced | 402 | enchanced||enhanced |
384 | encorporating||incorporating | 403 | encorporating||incorporating |
@@ -414,6 +433,7 @@ expecially||especially | |||
414 | explicite||explicit | 433 | explicite||explicit |
415 | explicitely||explicitly | 434 | explicitely||explicitly |
416 | explict||explicit | 435 | explict||explicit |
436 | explictely||explicitly | ||
417 | explictly||explicitly | 437 | explictly||explicitly |
418 | expresion||expression | 438 | expresion||expression |
419 | exprimental||experimental | 439 | exprimental||experimental |
@@ -445,6 +465,7 @@ finsih||finish | |||
445 | flusing||flushing | 465 | flusing||flushing |
446 | folloing||following | 466 | folloing||following |
447 | followign||following | 467 | followign||following |
468 | followings||following | ||
448 | follwing||following | 469 | follwing||following |
449 | forseeable||foreseeable | 470 | forseeable||foreseeable |
450 | forse||force | 471 | forse||force |
@@ -537,6 +558,7 @@ initalise||initialize | |||
537 | initalize||initialize | 558 | initalize||initialize |
538 | initation||initiation | 559 | initation||initiation |
539 | initators||initiators | 560 | initators||initiators |
561 | initialiazation||initialization | ||
540 | initializiation||initialization | 562 | initializiation||initialization |
541 | initialzed||initialized | 563 | initialzed||initialized |
542 | initilization||initialization | 564 | initilization||initialization |
@@ -566,6 +588,7 @@ interruptted||interrupted | |||
566 | interupted||interrupted | 588 | interupted||interrupted |
567 | interupt||interrupt | 589 | interupt||interrupt |
568 | intial||initial | 590 | intial||initial |
591 | intialization||initialization | ||
569 | intialized||initialized | 592 | intialized||initialized |
570 | intialize||initialize | 593 | intialize||initialize |
571 | intregral||integral | 594 | intregral||integral |
@@ -666,6 +689,7 @@ neccecary||necessary | |||
666 | neccesary||necessary | 689 | neccesary||necessary |
667 | neccessary||necessary | 690 | neccessary||necessary |
668 | necesary||necessary | 691 | necesary||necessary |
692 | neded||needed | ||
669 | negaive||negative | 693 | negaive||negative |
670 | negoitation||negotiation | 694 | negoitation||negotiation |
671 | negotation||negotiation | 695 | negotation||negotiation |
@@ -688,6 +712,8 @@ occure||occurred | |||
688 | occured||occurred | 712 | occured||occurred |
689 | occuring||occurring | 713 | occuring||occurring |
690 | offet||offset | 714 | offet||offset |
715 | omited||omitted | ||
716 | omiting||omitting | ||
691 | omitt||omit | 717 | omitt||omit |
692 | ommiting||omitting | 718 | ommiting||omitting |
693 | ommitted||omitted | 719 | ommitted||omitted |
@@ -706,8 +732,11 @@ oustanding||outstanding | |||
706 | overaall||overall | 732 | overaall||overall |
707 | overhread||overhead | 733 | overhread||overhead |
708 | overlaping||overlapping | 734 | overlaping||overlapping |
735 | overrided||overridden | ||
709 | overriden||overridden | 736 | overriden||overridden |
710 | overun||overrun | 737 | overun||overrun |
738 | overwritting||overwriting | ||
739 | overwriten||overwritten | ||
711 | pacakge||package | 740 | pacakge||package |
712 | pachage||package | 741 | pachage||package |
713 | packacge||package | 742 | packacge||package |
@@ -718,6 +747,7 @@ pakage||package | |||
718 | pallette||palette | 747 | pallette||palette |
719 | paln||plan | 748 | paln||plan |
720 | paramameters||parameters | 749 | paramameters||parameters |
750 | paramaters||parameters | ||
721 | paramater||parameter | 751 | paramater||parameter |
722 | parametes||parameters | 752 | parametes||parameters |
723 | parametised||parametrised | 753 | parametised||parametrised |
@@ -962,6 +992,7 @@ straming||streaming | |||
962 | struc||struct | 992 | struc||struct |
963 | structres||structures | 993 | structres||structures |
964 | stuct||struct | 994 | stuct||struct |
995 | strucuture||structure | ||
965 | stucture||structure | 996 | stucture||structure |
966 | sturcture||structure | 997 | sturcture||structure |
967 | subdirectoires||subdirectories | 998 | subdirectoires||subdirectories |
@@ -991,6 +1022,13 @@ suspeneded||suspended | |||
991 | suspicously||suspiciously | 1022 | suspicously||suspiciously |
992 | swaping||swapping | 1023 | swaping||swapping |
993 | switchs||switches | 1024 | switchs||switches |
1025 | swith||switch | ||
1026 | swithable||switchable | ||
1027 | swithc||switch | ||
1028 | swithced||switched | ||
1029 | swithcing||switching | ||
1030 | swithed||switched | ||
1031 | swithing||switching | ||
994 | symetric||symmetric | 1032 | symetric||symmetric |
995 | synax||syntax | 1033 | synax||syntax |
996 | synchonized||synchronized | 1034 | synchonized||synchronized |
@@ -1007,6 +1045,7 @@ targetting||targeting | |||
1007 | teh||the | 1045 | teh||the |
1008 | temorary||temporary | 1046 | temorary||temporary |
1009 | temproarily||temporarily | 1047 | temproarily||temporarily |
1048 | therfore||therefore | ||
1010 | thier||their | 1049 | thier||their |
1011 | threds||threads | 1050 | threds||threads |
1012 | threshhold||threshold | 1051 | threshhold||threshold |
@@ -1050,6 +1089,7 @@ unkmown||unknown | |||
1050 | unknonw||unknown | 1089 | unknonw||unknown |
1051 | unknow||unknown | 1090 | unknow||unknown |
1052 | unkown||unknown | 1091 | unkown||unknown |
1092 | unneded||unneeded | ||
1053 | unneedingly||unnecessarily | 1093 | unneedingly||unnecessarily |
1054 | unnsupported||unsupported | 1094 | unnsupported||unsupported |
1055 | unmached||unmatched | 1095 | unmached||unmatched |
@@ -1078,6 +1118,7 @@ vaid||valid | |||
1078 | vaild||valid | 1118 | vaild||valid |
1079 | valide||valid | 1119 | valide||valid |
1080 | variantions||variations | 1120 | variantions||variations |
1121 | varible||variable | ||
1081 | varient||variant | 1122 | varient||variant |
1082 | vaule||value | 1123 | vaule||value |
1083 | verbse||verbose | 1124 | verbse||verbose |
diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c index 7d10e5d418bb..9db4709a6877 100644 --- a/security/selinux/ss/ebitmap.c +++ b/security/selinux/ss/ebitmap.c | |||
@@ -360,7 +360,7 @@ int ebitmap_read(struct ebitmap *e, void *fp) | |||
360 | 360 | ||
361 | if (mapunit != BITS_PER_U64) { | 361 | if (mapunit != BITS_PER_U64) { |
362 | printk(KERN_ERR "SELinux: ebitmap: map size %u does not " | 362 | printk(KERN_ERR "SELinux: ebitmap: map size %u does not " |
363 | "match my size %Zd (high bit was %d)\n", | 363 | "match my size %zd (high bit was %d)\n", |
364 | mapunit, BITS_PER_U64, e->highbit); | 364 | mapunit, BITS_PER_U64, e->highbit); |
365 | goto bad; | 365 | goto bad; |
366 | } | 366 | } |
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index d719db4219cd..9c92f29a38ea 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c | |||
@@ -2266,7 +2266,7 @@ int policydb_read(struct policydb *p, void *fp) | |||
2266 | len = le32_to_cpu(buf[1]); | 2266 | len = le32_to_cpu(buf[1]); |
2267 | if (len != strlen(POLICYDB_STRING)) { | 2267 | if (len != strlen(POLICYDB_STRING)) { |
2268 | printk(KERN_ERR "SELinux: policydb string length %d does not " | 2268 | printk(KERN_ERR "SELinux: policydb string length %d does not " |
2269 | "match expected length %Zu\n", | 2269 | "match expected length %zu\n", |
2270 | len, strlen(POLICYDB_STRING)); | 2270 | len, strlen(POLICYDB_STRING)); |
2271 | goto bad; | 2271 | goto bad; |
2272 | } | 2272 | } |
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index f4234edb878c..8cf0dc7a07a4 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c | |||
@@ -3093,7 +3093,7 @@ static int patch_cm9739(struct snd_ac97 * ac97) | |||
3093 | /* set-up multi channel */ | 3093 | /* set-up multi channel */ |
3094 | /* bit 14: 0 = SPDIF, 1 = EAPD */ | 3094 | /* bit 14: 0 = SPDIF, 1 = EAPD */ |
3095 | /* bit 13: enable internal vref output for mic */ | 3095 | /* bit 13: enable internal vref output for mic */ |
3096 | /* bit 12: disable center/lfe (swithable) */ | 3096 | /* bit 12: disable center/lfe (switchable) */ |
3097 | /* bit 10: disable surround/line (switchable) */ | 3097 | /* bit 10: disable surround/line (switchable) */ |
3098 | /* bit 9: mix 2 surround off */ | 3098 | /* bit 9: mix 2 surround off */ |
3099 | /* bit 4: undocumented; 0 mutes the CM9739A, which defaults to 1 */ | 3099 | /* bit 4: undocumented; 0 mutes the CM9739A, which defaults to 1 */ |
diff --git a/sound/pci/cs46xx/cs46xx_dsp_task_types.h b/sound/pci/cs46xx/cs46xx_dsp_task_types.h index 5cf920bfda27..be5694718546 100644 --- a/sound/pci/cs46xx/cs46xx_dsp_task_types.h +++ b/sound/pci/cs46xx/cs46xx_dsp_task_types.h | |||
@@ -203,7 +203,7 @@ struct dsp_task_tree_context_block { | |||
203 | 203 | ||
204 | u32 saverfe; | 204 | u32 saverfe; |
205 | 205 | ||
206 | /* Value may be overwriten by stack save algorithm. | 206 | /* Value may be overwritten by stack save algorithm. |
207 | Retain the size of the stack data saved here if used */ | 207 | Retain the size of the stack data saved here if used */ |
208 | ___DSP_DUAL_16BIT_ALLOC( | 208 | ___DSP_DUAL_16BIT_ALLOC( |
209 | reserved1, | 209 | reserved1, |
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index 9ec4dba8a793..07a9deb17477 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c | |||
@@ -2866,7 +2866,7 @@ static unsigned int ca0132_capture_pcm_delay(struct hda_pcm_stream *info, | |||
2866 | #define CA0132_CODEC_MUTE(xname, nid, dir) \ | 2866 | #define CA0132_CODEC_MUTE(xname, nid, dir) \ |
2867 | CA0132_CODEC_MUTE_MONO(xname, nid, 3, dir) | 2867 | CA0132_CODEC_MUTE_MONO(xname, nid, 3, dir) |
2868 | 2868 | ||
2869 | /* The followings are for tuning of products */ | 2869 | /* The following are for tuning of products */ |
2870 | #ifdef ENABLE_TUNING_CONTROLS | 2870 | #ifdef ENABLE_TUNING_CONTROLS |
2871 | 2871 | ||
2872 | static unsigned int voice_focus_vals_lookup[] = { | 2872 | static unsigned int voice_focus_vals_lookup[] = { |
diff --git a/sound/pci/ice1712/wm8766.c b/sound/pci/ice1712/wm8766.c index f7ac8d5e862c..27c03e40c9b1 100644 --- a/sound/pci/ice1712/wm8766.c +++ b/sound/pci/ice1712/wm8766.c | |||
@@ -254,7 +254,7 @@ static int snd_wm8766_ctl_put(struct snd_kcontrol *kcontrol, | |||
254 | int n = kcontrol->private_value; | 254 | int n = kcontrol->private_value; |
255 | u16 val, regval1, regval2; | 255 | u16 val, regval1, regval2; |
256 | 256 | ||
257 | /* this also works for enum because value is an union */ | 257 | /* this also works for enum because value is a union */ |
258 | regval1 = ucontrol->value.integer.value[0]; | 258 | regval1 = ucontrol->value.integer.value[0]; |
259 | regval2 = ucontrol->value.integer.value[1]; | 259 | regval2 = ucontrol->value.integer.value[1]; |
260 | if (wm->ctl[n].flags & WM8766_FLAG_INVERT) { | 260 | if (wm->ctl[n].flags & WM8766_FLAG_INVERT) { |
diff --git a/sound/pci/ice1712/wm8776.c b/sound/pci/ice1712/wm8776.c index ebd2fe4b4a57..553669b103c2 100644 --- a/sound/pci/ice1712/wm8776.c +++ b/sound/pci/ice1712/wm8776.c | |||
@@ -528,7 +528,7 @@ static int snd_wm8776_ctl_put(struct snd_kcontrol *kcontrol, | |||
528 | int n = kcontrol->private_value; | 528 | int n = kcontrol->private_value; |
529 | u16 val, regval1, regval2; | 529 | u16 val, regval1, regval2; |
530 | 530 | ||
531 | /* this also works for enum because value is an union */ | 531 | /* this also works for enum because value is a union */ |
532 | regval1 = ucontrol->value.integer.value[0]; | 532 | regval1 = ucontrol->value.integer.value[0]; |
533 | regval2 = ucontrol->value.integer.value[1]; | 533 | regval2 = ucontrol->value.integer.value[1]; |
534 | if (wm->ctl[n].flags & WM8776_FLAG_INVERT) { | 534 | if (wm->ctl[n].flags & WM8776_FLAG_INVERT) { |
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index 565f7f55c3ca..1e25095fd144 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c | |||
@@ -2051,7 +2051,7 @@ static void snd_korg1212_proc_read(struct snd_info_entry *entry, | |||
2051 | snd_iprintf(buffer, korg1212->card->longname); | 2051 | snd_iprintf(buffer, korg1212->card->longname); |
2052 | snd_iprintf(buffer, " (index #%d)\n", korg1212->card->number + 1); | 2052 | snd_iprintf(buffer, " (index #%d)\n", korg1212->card->number + 1); |
2053 | snd_iprintf(buffer, "\nGeneral settings\n"); | 2053 | snd_iprintf(buffer, "\nGeneral settings\n"); |
2054 | snd_iprintf(buffer, " period size: %Zd bytes\n", K1212_PERIOD_BYTES); | 2054 | snd_iprintf(buffer, " period size: %zd bytes\n", K1212_PERIOD_BYTES); |
2055 | snd_iprintf(buffer, " clock mode: %s\n", clockSourceName[korg1212->clkSrcRate] ); | 2055 | snd_iprintf(buffer, " clock mode: %s\n", clockSourceName[korg1212->clkSrcRate] ); |
2056 | snd_iprintf(buffer, " left ADC Sens: %d\n", korg1212->leftADCInSens ); | 2056 | snd_iprintf(buffer, " left ADC Sens: %d\n", korg1212->leftADCInSens ); |
2057 | snd_iprintf(buffer, " right ADC Sens: %d\n", korg1212->rightADCInSens ); | 2057 | snd_iprintf(buffer, " right ADC Sens: %d\n", korg1212->rightADCInSens ); |
@@ -2276,7 +2276,7 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci, | |||
2276 | 2276 | ||
2277 | if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), | 2277 | if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), |
2278 | sizeof(struct KorgSharedBuffer), &korg1212->dma_shared) < 0) { | 2278 | sizeof(struct KorgSharedBuffer), &korg1212->dma_shared) < 0) { |
2279 | snd_printk(KERN_ERR "korg1212: can not allocate shared buffer memory (%Zd bytes)\n", sizeof(struct KorgSharedBuffer)); | 2279 | snd_printk(KERN_ERR "korg1212: can not allocate shared buffer memory (%zd bytes)\n", sizeof(struct KorgSharedBuffer)); |
2280 | snd_korg1212_free(korg1212); | 2280 | snd_korg1212_free(korg1212); |
2281 | return -ENOMEM; | 2281 | return -ENOMEM; |
2282 | } | 2282 | } |
diff --git a/sound/pci/pcxhr/pcxhr_hwdep.c b/sound/pci/pcxhr/pcxhr_hwdep.c index 80633055e17e..a99808ab01fe 100644 --- a/sound/pci/pcxhr/pcxhr_hwdep.c +++ b/sound/pci/pcxhr/pcxhr_hwdep.c | |||
@@ -292,7 +292,7 @@ static int pcxhr_dsp_load(struct pcxhr_mgr *mgr, int index, | |||
292 | int err, card_index; | 292 | int err, card_index; |
293 | 293 | ||
294 | dev_dbg(&mgr->pci->dev, | 294 | dev_dbg(&mgr->pci->dev, |
295 | "loading dsp [%d] size = %Zd\n", index, dsp->size); | 295 | "loading dsp [%d] size = %zd\n", index, dsp->size); |
296 | 296 | ||
297 | switch (index) { | 297 | switch (index) { |
298 | case PCXHR_FIRMWARE_XLX_INT_INDEX: | 298 | case PCXHR_FIRMWARE_XLX_INT_INDEX: |
diff --git a/sound/pcmcia/vx/vxp_ops.c b/sound/pcmcia/vx/vxp_ops.c index 56aa1ba73ccc..5f97791f00d7 100644 --- a/sound/pcmcia/vx/vxp_ops.c +++ b/sound/pcmcia/vx/vxp_ops.c | |||
@@ -201,7 +201,7 @@ static int vxp_load_xilinx_binary(struct vx_core *_chip, const struct firmware * | |||
201 | c |= (int)vx_inb(chip, RXM) << 8; | 201 | c |= (int)vx_inb(chip, RXM) << 8; |
202 | c |= vx_inb(chip, RXL); | 202 | c |= vx_inb(chip, RXL); |
203 | 203 | ||
204 | snd_printdd(KERN_DEBUG "xilinx: dsp size received 0x%x, orig 0x%Zx\n", c, fw->size); | 204 | snd_printdd(KERN_DEBUG "xilinx: dsp size received 0x%x, orig 0x%zx\n", c, fw->size); |
205 | 205 | ||
206 | vx_outb(chip, ICR, ICR_HF0); | 206 | vx_outb(chip, ICR, ICR_HF0); |
207 | 207 | ||
diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c index b84d7d34f188..cdd44abfc9e0 100644 --- a/sound/ppc/snd_ps3.c +++ b/sound/ppc/snd_ps3.c | |||
@@ -883,7 +883,7 @@ static void snd_ps3_audio_set_base_addr(uint64_t ioaddr_start) | |||
883 | static void snd_ps3_audio_fixup(struct snd_ps3_card_info *card) | 883 | static void snd_ps3_audio_fixup(struct snd_ps3_card_info *card) |
884 | { | 884 | { |
885 | /* | 885 | /* |
886 | * avsetting driver seems to never change the followings | 886 | * avsetting driver seems to never change the following |
887 | * so, init them here once | 887 | * so, init them here once |
888 | */ | 888 | */ |
889 | 889 | ||
diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index 818b052377f3..ec1067a679da 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c | |||
@@ -506,7 +506,7 @@ static int acp_init(void __iomem *acp_mmio) | |||
506 | return 0; | 506 | return 0; |
507 | } | 507 | } |
508 | 508 | ||
509 | /* Deintialize ACP */ | 509 | /* Deinitialize ACP */ |
510 | static int acp_deinit(void __iomem *acp_mmio) | 510 | static int acp_deinit(void __iomem *acp_mmio) |
511 | { | 511 | { |
512 | u32 val; | 512 | u32 val; |
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index 624b3b9cb079..63b2745f8169 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c | |||
@@ -1269,7 +1269,7 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec, | |||
1269 | break; | 1269 | break; |
1270 | 1270 | ||
1271 | case SND_SOC_BIAS_ON: | 1271 | case SND_SOC_BIAS_ON: |
1272 | /* Turn off any unneded single ended outputs */ | 1272 | /* Turn off any unneeded single ended outputs */ |
1273 | val = 0; | 1273 | val = 0; |
1274 | mask = 0; | 1274 | mask = 0; |
1275 | 1275 | ||
diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index 1d82f68305c3..8cfffa70c144 100644 --- a/sound/soc/fsl/fsl_asrc.c +++ b/sound/soc/fsl/fsl_asrc.c | |||
@@ -368,7 +368,7 @@ static int fsl_asrc_config_pair(struct fsl_asrc_pair *pair) | |||
368 | fsl_asrc_set_watermarks(pair, ASRC_INPUTFIFO_THRESHOLD, | 368 | fsl_asrc_set_watermarks(pair, ASRC_INPUTFIFO_THRESHOLD, |
369 | ASRC_INPUTFIFO_THRESHOLD); | 369 | ASRC_INPUTFIFO_THRESHOLD); |
370 | 370 | ||
371 | /* Configure the followings only for Ideal Ratio mode */ | 371 | /* Configure the following only for Ideal Ratio mode */ |
372 | if (!ideal) | 372 | if (!ideal) |
373 | return 0; | 373 | return 0; |
374 | 374 | ||
diff --git a/sound/soc/qcom/lpass.h b/sound/soc/qcom/lpass.h index 924971b6ded5..9b031352ea3c 100644 --- a/sound/soc/qcom/lpass.h +++ b/sound/soc/qcom/lpass.h | |||
@@ -82,7 +82,7 @@ struct lpass_variant { | |||
82 | **/ | 82 | **/ |
83 | u32 dmactl_audif_start; | 83 | u32 dmactl_audif_start; |
84 | u32 wrdma_channel_start; | 84 | u32 wrdma_channel_start; |
85 | /* SOC specific intialization like clocks */ | 85 | /* SOC specific initialization like clocks */ |
86 | int (*init)(struct platform_device *pdev); | 86 | int (*init)(struct platform_device *pdev); |
87 | int (*exit)(struct platform_device *pdev); | 87 | int (*exit)(struct platform_device *pdev); |
88 | int (*alloc_dma_channel)(struct lpass_data *data, int direction); | 88 | int (*alloc_dma_channel)(struct lpass_data *data, int direction); |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index a110d3987d4a..6dca408faae3 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -3041,7 +3041,7 @@ static int snd_soc_register_dais(struct snd_soc_component *component, | |||
3041 | unsigned int i; | 3041 | unsigned int i; |
3042 | int ret; | 3042 | int ret; |
3043 | 3043 | ||
3044 | dev_dbg(dev, "ASoC: dai register %s #%Zu\n", dev_name(dev), count); | 3044 | dev_dbg(dev, "ASoC: dai register %s #%zu\n", dev_name(dev), count); |
3045 | 3045 | ||
3046 | component->dai_drv = dai_drv; | 3046 | component->dai_drv = dai_drv; |
3047 | 3047 | ||
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index aff3d8129ac9..3e9b1c0bb1ce 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c | |||
@@ -344,7 +344,7 @@ static int soc_tplg_widget_load(struct soc_tplg *tplg, | |||
344 | return 0; | 344 | return 0; |
345 | } | 345 | } |
346 | 346 | ||
347 | /* pass DAI configurations to component driver for extra intialization */ | 347 | /* pass DAI configurations to component driver for extra initialization */ |
348 | static int soc_tplg_dai_load(struct soc_tplg *tplg, | 348 | static int soc_tplg_dai_load(struct soc_tplg *tplg, |
349 | struct snd_soc_dai_driver *dai_drv) | 349 | struct snd_soc_dai_driver *dai_drv) |
350 | { | 350 | { |
@@ -354,7 +354,7 @@ static int soc_tplg_dai_load(struct soc_tplg *tplg, | |||
354 | return 0; | 354 | return 0; |
355 | } | 355 | } |
356 | 356 | ||
357 | /* pass link configurations to component driver for extra intialization */ | 357 | /* pass link configurations to component driver for extra initialization */ |
358 | static int soc_tplg_dai_link_load(struct soc_tplg *tplg, | 358 | static int soc_tplg_dai_link_load(struct soc_tplg *tplg, |
359 | struct snd_soc_dai_link *link) | 359 | struct snd_soc_dai_link *link) |
360 | { | 360 | { |
diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c index d48b70ceb25a..207c2eeddab0 100644 --- a/tools/lib/bpf/bpf.c +++ b/tools/lib/bpf/bpf.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "bpf.h" | 27 | #include "bpf.h" |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * When building perf, unistd.h is overrided. __NR_bpf is | 30 | * When building perf, unistd.h is overridden. __NR_bpf is |
31 | * required to be defined explicitly. | 31 | * required to be defined explicitly. |
32 | */ | 32 | */ |
33 | #ifndef __NR_bpf | 33 | #ifndef __NR_bpf |
diff --git a/tools/perf/Documentation/tips.txt b/tools/perf/Documentation/tips.txt index 8a6479c0eac9..170b0289a7bc 100644 --- a/tools/perf/Documentation/tips.txt +++ b/tools/perf/Documentation/tips.txt | |||
@@ -22,7 +22,7 @@ If you have debuginfo enabled, try: perf report -s sym,srcline | |||
22 | For memory address profiling, try: perf mem record / perf mem report | 22 | For memory address profiling, try: perf mem record / perf mem report |
23 | For tracepoint events, try: perf report -s trace_fields | 23 | For tracepoint events, try: perf report -s trace_fields |
24 | To record callchains for each sample: perf record -g | 24 | To record callchains for each sample: perf record -g |
25 | To record every process run by an user: perf record -u <user> | 25 | To record every process run by a user: perf record -u <user> |
26 | Skip collecing build-id when recording: perf record -B | 26 | Skip collecing build-id when recording: perf record -B |
27 | To change sampling frequency to 100 Hz: perf record -F 100 | 27 | To change sampling frequency to 100 Hz: perf record -F 100 |
28 | See assembly instructions with percentage: perf annotate <symbol> | 28 | See assembly instructions with percentage: perf annotate <symbol> |
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index 28d41e709128..3abe3373ce90 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c | |||
@@ -951,7 +951,7 @@ static struct dso *__dso__findlink_by_longname(struct rb_root *root, | |||
951 | if (rc == 0) { | 951 | if (rc == 0) { |
952 | /* | 952 | /* |
953 | * In case the new DSO is a duplicate of an existing | 953 | * In case the new DSO is a duplicate of an existing |
954 | * one, print an one-time warning & put the new entry | 954 | * one, print a one-time warning & put the new entry |
955 | * at the end of the list of duplicates. | 955 | * at the end of the list of duplicates. |
956 | */ | 956 | */ |
957 | if (!dso || (dso == this)) | 957 | if (!dso || (dso == this)) |
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 0d9d6e0803b8..57cd268d4275 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c | |||
@@ -464,7 +464,7 @@ static int convert_variable_fields(Dwarf_Die *vr_die, const char *varname, | |||
464 | /* Verify it is a data structure */ | 464 | /* Verify it is a data structure */ |
465 | tag = dwarf_tag(&type); | 465 | tag = dwarf_tag(&type); |
466 | if (tag != DW_TAG_structure_type && tag != DW_TAG_union_type) { | 466 | if (tag != DW_TAG_structure_type && tag != DW_TAG_union_type) { |
467 | pr_warning("%s is not a data structure nor an union.\n", | 467 | pr_warning("%s is not a data structure nor a union.\n", |
468 | varname); | 468 | varname); |
469 | return -EINVAL; | 469 | return -EINVAL; |
470 | } | 470 | } |
@@ -479,7 +479,7 @@ static int convert_variable_fields(Dwarf_Die *vr_die, const char *varname, | |||
479 | } else { | 479 | } else { |
480 | /* Verify it is a data structure */ | 480 | /* Verify it is a data structure */ |
481 | if (tag != DW_TAG_structure_type && tag != DW_TAG_union_type) { | 481 | if (tag != DW_TAG_structure_type && tag != DW_TAG_union_type) { |
482 | pr_warning("%s is not a data structure nor an union.\n", | 482 | pr_warning("%s is not a data structure nor a union.\n", |
483 | varname); | 483 | varname); |
484 | return -EINVAL; | 484 | return -EINVAL; |
485 | } | 485 | } |
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h index 7aff317fc7c4..796c847e2f00 100644 --- a/tools/perf/util/sort.h +++ b/tools/perf/util/sort.h | |||
@@ -108,7 +108,7 @@ struct hist_entry { | |||
108 | /* | 108 | /* |
109 | * Since perf diff only supports the stdio output, TUI | 109 | * Since perf diff only supports the stdio output, TUI |
110 | * fields are only accessed from perf report (or perf | 110 | * fields are only accessed from perf report (or perf |
111 | * top). So make it an union to reduce memory usage. | 111 | * top). So make it a union to reduce memory usage. |
112 | */ | 112 | */ |
113 | struct hist_entry_diff diff; | 113 | struct hist_entry_diff diff; |
114 | struct /* for TUI */ { | 114 | struct /* for TUI */ { |
diff --git a/tools/testing/selftests/sigaltstack/sas.c b/tools/testing/selftests/sigaltstack/sas.c index 1bb01258e559..ccd07343d418 100644 --- a/tools/testing/selftests/sigaltstack/sas.c +++ b/tools/testing/selftests/sigaltstack/sas.c | |||
@@ -57,7 +57,7 @@ void my_usr1(int sig, siginfo_t *si, void *u) | |||
57 | exit(EXIT_FAILURE); | 57 | exit(EXIT_FAILURE); |
58 | } | 58 | } |
59 | if (stk.ss_flags != SS_DISABLE) | 59 | if (stk.ss_flags != SS_DISABLE) |
60 | printf("[FAIL]\tss_flags=%i, should be SS_DISABLE\n", | 60 | printf("[FAIL]\tss_flags=%x, should be SS_DISABLE\n", |
61 | stk.ss_flags); | 61 | stk.ss_flags); |
62 | else | 62 | else |
63 | printf("[OK]\tsigaltstack is disabled in sighandler\n"); | 63 | printf("[OK]\tsigaltstack is disabled in sighandler\n"); |
@@ -122,7 +122,8 @@ int main(void) | |||
122 | if (stk.ss_flags == SS_DISABLE) { | 122 | if (stk.ss_flags == SS_DISABLE) { |
123 | printf("[OK]\tInitial sigaltstack state was SS_DISABLE\n"); | 123 | printf("[OK]\tInitial sigaltstack state was SS_DISABLE\n"); |
124 | } else { | 124 | } else { |
125 | printf("[FAIL]\tInitial sigaltstack state was %i; should have been SS_DISABLE\n", stk.ss_flags); | 125 | printf("[FAIL]\tInitial sigaltstack state was %x; " |
126 | "should have been SS_DISABLE\n", stk.ss_flags); | ||
126 | return EXIT_FAILURE; | 127 | return EXIT_FAILURE; |
127 | } | 128 | } |
128 | 129 | ||
@@ -165,7 +166,7 @@ int main(void) | |||
165 | exit(EXIT_FAILURE); | 166 | exit(EXIT_FAILURE); |
166 | } | 167 | } |
167 | if (stk.ss_flags != SS_AUTODISARM) { | 168 | if (stk.ss_flags != SS_AUTODISARM) { |
168 | printf("[FAIL]\tss_flags=%i, should be SS_AUTODISARM\n", | 169 | printf("[FAIL]\tss_flags=%x, should be SS_AUTODISARM\n", |
169 | stk.ss_flags); | 170 | stk.ss_flags); |
170 | exit(EXIT_FAILURE); | 171 | exit(EXIT_FAILURE); |
171 | } | 172 | } |
diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c index 3815e940fbea..2366177172f6 100644 --- a/virt/kvm/async_pf.c +++ b/virt/kvm/async_pf.c | |||
@@ -204,7 +204,7 @@ int kvm_setup_async_pf(struct kvm_vcpu *vcpu, gva_t gva, unsigned long hva, | |||
204 | work->addr = hva; | 204 | work->addr = hva; |
205 | work->arch = *arch; | 205 | work->arch = *arch; |
206 | work->mm = current->mm; | 206 | work->mm = current->mm; |
207 | atomic_inc(&work->mm->mm_users); | 207 | mmget(work->mm); |
208 | kvm_get_kvm(work->vcpu->kvm); | 208 | kvm_get_kvm(work->vcpu->kvm); |
209 | 209 | ||
210 | /* this can't really happen otherwise gfn_to_pfn_async | 210 | /* this can't really happen otherwise gfn_to_pfn_async |
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 5b0dd4a9b2cb..35f71409d9ee 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -611,7 +611,7 @@ static struct kvm *kvm_create_vm(unsigned long type) | |||
611 | return ERR_PTR(-ENOMEM); | 611 | return ERR_PTR(-ENOMEM); |
612 | 612 | ||
613 | spin_lock_init(&kvm->mmu_lock); | 613 | spin_lock_init(&kvm->mmu_lock); |
614 | atomic_inc(¤t->mm->mm_count); | 614 | mmgrab(current->mm); |
615 | kvm->mm = current->mm; | 615 | kvm->mm = current->mm; |
616 | kvm_eventfd_init(kvm); | 616 | kvm_eventfd_init(kvm); |
617 | mutex_init(&kvm->lock); | 617 | mutex_init(&kvm->lock); |