Commit 706dc3b
scsi: message: fusion: mptctl: Use dma_alloc_coherent()
In [1], Christoph Hellwig has proposed to remove the wrappers in
include/linux/pci-dma-compat.h.
Some reasons why this API should be removed have been given by Julia
Lawall in [2].
When memory is allocated in kbuf_alloc_2_sgl() GFP_KERNEL can be used
because this function already uses the GFP_USER flag for some memory
allocation and not spin_lock is taken in the between.
When memory is allocated in mptctl_do_mpt_command() GFP_KERNEL can be used
because this function already uses copy_from_user() and this function can
sleep.
When memory is allocated in mptctl_hp_hostinfo() GFP_KERNEL can be used
because this function already uses mpt_config() and this function has an
explicit might_sleep().
When memory is allocated in mptctl_hp_targetinfo() GFP_KERNEL can be used
because this function already uses mpt_config() and this function has an
explicit might_sleep().
[1]: https://lore.kernel.org/kernel-janitors/20200421081257.GA131897@infradead.org/
[2]: https://lore.kernel.org/kernel-janitors/alpine.DEB.2.22.394.2007120902170.2424@hadrien/
Link: https://lore.kernel.org/r/516375d6d06114484533baf03aae351306100246.1641500561.git.christophe.jaillet@wanadoo.fr
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent 76a334d commit 706dc3b
1 file changed
Lines changed: 19 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1041 | 1041 | | |
1042 | 1042 | | |
1043 | 1043 | | |
1044 | | - | |
| 1044 | + | |
| 1045 | + | |
1045 | 1046 | | |
1046 | 1047 | | |
1047 | 1048 | | |
| |||
1062 | 1063 | | |
1063 | 1064 | | |
1064 | 1065 | | |
1065 | | - | |
1066 | | - | |
1067 | | - | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
1068 | 1069 | | |
1069 | 1070 | | |
1070 | 1071 | | |
| |||
2105 | 2106 | | |
2106 | 2107 | | |
2107 | 2108 | | |
2108 | | - | |
2109 | | - | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
2110 | 2112 | | |
2111 | 2113 | | |
2112 | 2114 | | |
| |||
2139 | 2141 | | |
2140 | 2142 | | |
2141 | 2143 | | |
2142 | | - | |
2143 | | - | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
2144 | 2147 | | |
2145 | 2148 | | |
2146 | 2149 | | |
| |||
2400 | 2403 | | |
2401 | 2404 | | |
2402 | 2405 | | |
2403 | | - | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
2404 | 2409 | | |
2405 | 2410 | | |
2406 | 2411 | | |
| |||
2477 | 2482 | | |
2478 | 2483 | | |
2479 | 2484 | | |
2480 | | - | |
| 2485 | + | |
2481 | 2486 | | |
2482 | 2487 | | |
2483 | 2488 | | |
| |||
2592 | 2597 | | |
2593 | 2598 | | |
2594 | 2599 | | |
2595 | | - | |
| 2600 | + | |
| 2601 | + | |
2596 | 2602 | | |
2597 | 2603 | | |
2598 | 2604 | | |
| |||
2657 | 2663 | | |
2658 | 2664 | | |
2659 | 2665 | | |
2660 | | - | |
| 2666 | + | |
| 2667 | + | |
2661 | 2668 | | |
2662 | 2669 | | |
2663 | 2670 | | |
| |||
0 commit comments