Commit c53033f6 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] gfp_t: drivers/scsi

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9796fdd8
...@@ -1357,7 +1357,7 @@ static int port_detect(unsigned long port_base, unsigned int j, ...@@ -1357,7 +1357,7 @@ static int port_detect(unsigned long port_base, unsigned int j,
for (i = 0; i < shost->can_queue; i++) { for (i = 0; i < shost->can_queue; i++) {
size_t sz = shost->sg_tablesize *sizeof(struct sg_list); size_t sz = shost->sg_tablesize *sizeof(struct sg_list);
unsigned int gfp_mask = (shost->unchecked_isa_dma ? GFP_DMA : 0) | GFP_ATOMIC; gfp_t gfp_mask = (shost->unchecked_isa_dma ? GFP_DMA : 0) | GFP_ATOMIC;
ha->cp[i].sglist = kmalloc(sz, gfp_mask); ha->cp[i].sglist = kmalloc(sz, gfp_mask);
if (!ha->cp[i].sglist) { if (!ha->cp[i].sglist) {
printk printk
......
...@@ -287,7 +287,8 @@ static void scsi_host_dev_release(struct device *dev) ...@@ -287,7 +287,8 @@ static void scsi_host_dev_release(struct device *dev)
struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
{ {
struct Scsi_Host *shost; struct Scsi_Host *shost;
int gfp_mask = GFP_KERNEL, rval; gfp_t gfp_mask = GFP_KERNEL;
int rval;
if (sht->unchecked_isa_dma && privsize) if (sht->unchecked_isa_dma && privsize)
gfp_mask |= __GFP_DMA; gfp_mask |= __GFP_DMA;
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#define LPFC_MEM_POOL_SIZE 64 /* max elem in non-DMA safety pool */ #define LPFC_MEM_POOL_SIZE 64 /* max elem in non-DMA safety pool */
static void * static void *
lpfc_pool_kmalloc(unsigned int gfp_flags, void *data) lpfc_pool_kmalloc(gfp_t gfp_flags, void *data)
{ {
return kmalloc((unsigned long)data, gfp_flags); return kmalloc((unsigned long)data, gfp_flags);
} }
......
...@@ -5146,7 +5146,8 @@ static long osst_compat_ioctl(struct file * file, unsigned int cmd_in, unsigned ...@@ -5146,7 +5146,8 @@ static long osst_compat_ioctl(struct file * file, unsigned int cmd_in, unsigned
/* Try to allocate a new tape buffer skeleton. Caller must not hold os_scsi_tapes_lock */ /* Try to allocate a new tape buffer skeleton. Caller must not hold os_scsi_tapes_lock */
static struct osst_buffer * new_tape_buffer( int from_initialization, int need_dma, int max_sg ) static struct osst_buffer * new_tape_buffer( int from_initialization, int need_dma, int max_sg )
{ {
int i, priority; int i;
gfp_t priority;
struct osst_buffer *tb; struct osst_buffer *tb;
if (from_initialization) if (from_initialization)
...@@ -5178,7 +5179,8 @@ static struct osst_buffer * new_tape_buffer( int from_initialization, int need_d ...@@ -5178,7 +5179,8 @@ static struct osst_buffer * new_tape_buffer( int from_initialization, int need_d
/* Try to allocate a temporary (while a user has the device open) enlarged tape buffer */ /* Try to allocate a temporary (while a user has the device open) enlarged tape buffer */
static int enlarge_buffer(struct osst_buffer *STbuffer, int need_dma) static int enlarge_buffer(struct osst_buffer *STbuffer, int need_dma)
{ {
int segs, nbr, max_segs, b_size, priority, order, got; int segs, nbr, max_segs, b_size, order, got;
gfp_t priority;
if (STbuffer->buffer_size >= OS_FRAME_SIZE) if (STbuffer->buffer_size >= OS_FRAME_SIZE)
return 1; return 1;
......
...@@ -52,7 +52,7 @@ extern int qla2x00_load_risc(struct scsi_qla_host *, uint32_t *); ...@@ -52,7 +52,7 @@ extern int qla2x00_load_risc(struct scsi_qla_host *, uint32_t *);
extern int qla24xx_load_risc_flash(scsi_qla_host_t *, uint32_t *); extern int qla24xx_load_risc_flash(scsi_qla_host_t *, uint32_t *);
extern int qla24xx_load_risc_hotplug(scsi_qla_host_t *, uint32_t *); extern int qla24xx_load_risc_hotplug(scsi_qla_host_t *, uint32_t *);
extern fc_port_t *qla2x00_alloc_fcport(scsi_qla_host_t *, int); extern fc_port_t *qla2x00_alloc_fcport(scsi_qla_host_t *, gfp_t);
extern int qla2x00_loop_resync(scsi_qla_host_t *); extern int qla2x00_loop_resync(scsi_qla_host_t *);
...@@ -277,7 +277,7 @@ extern int qla2x00_fdmi_register(scsi_qla_host_t *); ...@@ -277,7 +277,7 @@ extern int qla2x00_fdmi_register(scsi_qla_host_t *);
/* /*
* Global Function Prototypes in qla_rscn.c source file. * Global Function Prototypes in qla_rscn.c source file.
*/ */
extern fc_port_t *qla2x00_alloc_rscn_fcport(scsi_qla_host_t *, int); extern fc_port_t *qla2x00_alloc_rscn_fcport(scsi_qla_host_t *, gfp_t);
extern int qla2x00_handle_port_rscn(scsi_qla_host_t *, uint32_t, fc_port_t *, extern int qla2x00_handle_port_rscn(scsi_qla_host_t *, uint32_t, fc_port_t *,
int); int);
extern void qla2x00_process_iodesc(scsi_qla_host_t *, struct mbx_entry *); extern void qla2x00_process_iodesc(scsi_qla_host_t *, struct mbx_entry *);
......
...@@ -1685,7 +1685,7 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) ...@@ -1685,7 +1685,7 @@ qla2x00_nvram_config(scsi_qla_host_t *ha)
* Returns a pointer to the allocated fcport, or NULL, if none available. * Returns a pointer to the allocated fcport, or NULL, if none available.
*/ */
fc_port_t * fc_port_t *
qla2x00_alloc_fcport(scsi_qla_host_t *ha, int flags) qla2x00_alloc_fcport(scsi_qla_host_t *ha, gfp_t flags)
{ {
fc_port_t *fcport; fc_port_t *fcport;
......
...@@ -1066,7 +1066,7 @@ qla2x00_send_login_iocb_cb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, ...@@ -1066,7 +1066,7 @@ qla2x00_send_login_iocb_cb(scsi_qla_host_t *ha, struct io_descriptor *iodesc,
* Returns a pointer to the allocated RSCN fcport, or NULL, if none available. * Returns a pointer to the allocated RSCN fcport, or NULL, if none available.
*/ */
fc_port_t * fc_port_t *
qla2x00_alloc_rscn_fcport(scsi_qla_host_t *ha, int flags) qla2x00_alloc_rscn_fcport(scsi_qla_host_t *ha, gfp_t flags)
{ {
fc_port_t *fcport; fc_port_t *fcport;
......
...@@ -130,7 +130,7 @@ EXPORT_SYMBOL(scsi_device_types); ...@@ -130,7 +130,7 @@ EXPORT_SYMBOL(scsi_device_types);
* Returns: Pointer to request block. * Returns: Pointer to request block.
*/ */
struct scsi_request *scsi_allocate_request(struct scsi_device *sdev, struct scsi_request *scsi_allocate_request(struct scsi_device *sdev,
int gfp_mask) gfp_t gfp_mask)
{ {
const int offset = ALIGN(sizeof(struct scsi_request), 4); const int offset = ALIGN(sizeof(struct scsi_request), 4);
const int size = offset + sizeof(struct request); const int size = offset + sizeof(struct request);
...@@ -196,7 +196,7 @@ struct scsi_host_cmd_pool { ...@@ -196,7 +196,7 @@ struct scsi_host_cmd_pool {
unsigned int users; unsigned int users;
char *name; char *name;
unsigned int slab_flags; unsigned int slab_flags;
unsigned int gfp_mask; gfp_t gfp_mask;
}; };
static struct scsi_host_cmd_pool scsi_cmd_pool = { static struct scsi_host_cmd_pool scsi_cmd_pool = {
...@@ -213,7 +213,7 @@ static struct scsi_host_cmd_pool scsi_cmd_dma_pool = { ...@@ -213,7 +213,7 @@ static struct scsi_host_cmd_pool scsi_cmd_dma_pool = {
static DECLARE_MUTEX(host_cmd_pool_mutex); static DECLARE_MUTEX(host_cmd_pool_mutex);
static struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *shost, static struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *shost,
int gfp_mask) gfp_t gfp_mask)
{ {
struct scsi_cmnd *cmd; struct scsi_cmnd *cmd;
...@@ -245,7 +245,7 @@ static struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *shost, ...@@ -245,7 +245,7 @@ static struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *shost,
* *
* Returns: The allocated scsi command structure. * Returns: The allocated scsi command structure.
*/ */
struct scsi_cmnd *scsi_get_command(struct scsi_device *dev, int gfp_mask) struct scsi_cmnd *scsi_get_command(struct scsi_device *dev, gfp_t gfp_mask)
{ {
struct scsi_cmnd *cmd; struct scsi_cmnd *cmd;
......
...@@ -205,7 +205,8 @@ int scsi_ioctl_send_command(struct scsi_device *sdev, ...@@ -205,7 +205,8 @@ int scsi_ioctl_send_command(struct scsi_device *sdev,
unsigned int inlen, outlen, cmdlen; unsigned int inlen, outlen, cmdlen;
unsigned int needed, buf_needed; unsigned int needed, buf_needed;
int timeout, retries, result; int timeout, retries, result;
int data_direction, gfp_mask = GFP_KERNEL; int data_direction;
gfp_t gfp_mask = GFP_KERNEL;
if (!sic) if (!sic)
return -EINVAL; return -EINVAL;
......
...@@ -677,7 +677,7 @@ static struct scsi_cmnd *scsi_end_request(struct scsi_cmnd *cmd, int uptodate, ...@@ -677,7 +677,7 @@ static struct scsi_cmnd *scsi_end_request(struct scsi_cmnd *cmd, int uptodate,
return NULL; return NULL;
} }
static struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *cmd, int gfp_mask) static struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *cmd, gfp_t gfp_mask)
{ {
struct scsi_host_sg_pool *sgp; struct scsi_host_sg_pool *sgp;
struct scatterlist *sgl; struct scatterlist *sgl;
......
...@@ -2644,7 +2644,7 @@ static char * ...@@ -2644,7 +2644,7 @@ static char *
sg_page_malloc(int rqSz, int lowDma, int *retSzp) sg_page_malloc(int rqSz, int lowDma, int *retSzp)
{ {
char *resp = NULL; char *resp = NULL;
int page_mask; gfp_t page_mask;
int order, a_size; int order, a_size;
int resSz = rqSz; int resSz = rqSz;
......
...@@ -3577,7 +3577,8 @@ static long st_compat_ioctl(struct file *file, unsigned int cmd, unsigned long a ...@@ -3577,7 +3577,8 @@ static long st_compat_ioctl(struct file *file, unsigned int cmd, unsigned long a
static struct st_buffer * static struct st_buffer *
new_tape_buffer(int from_initialization, int need_dma, int max_sg) new_tape_buffer(int from_initialization, int need_dma, int max_sg)
{ {
int i, priority, got = 0, segs = 0; int i, got = 0, segs = 0;
gfp_t priority;
struct st_buffer *tb; struct st_buffer *tb;
if (from_initialization) if (from_initialization)
...@@ -3610,7 +3611,8 @@ static struct st_buffer * ...@@ -3610,7 +3611,8 @@ static struct st_buffer *
/* Try to allocate enough space in the tape buffer */ /* Try to allocate enough space in the tape buffer */
static int enlarge_buffer(struct st_buffer * STbuffer, int new_size, int need_dma) static int enlarge_buffer(struct st_buffer * STbuffer, int new_size, int need_dma)
{ {
int segs, nbr, max_segs, b_size, priority, order, got; int segs, nbr, max_segs, b_size, order, got;
gfp_t priority;
if (new_size <= STbuffer->buffer_size) if (new_size <= STbuffer->buffer_size)
return 1; return 1;
......
...@@ -146,7 +146,7 @@ struct scsi_cmnd { ...@@ -146,7 +146,7 @@ struct scsi_cmnd {
#define SCSI_STATE_MLQUEUE 0x100b #define SCSI_STATE_MLQUEUE 0x100b
extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, int); extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t);
extern void scsi_put_command(struct scsi_cmnd *); extern void scsi_put_command(struct scsi_cmnd *);
extern void scsi_io_completion(struct scsi_cmnd *, unsigned int, unsigned int); extern void scsi_io_completion(struct scsi_cmnd *, unsigned int, unsigned int);
extern void scsi_finish_command(struct scsi_cmnd *cmd); extern void scsi_finish_command(struct scsi_cmnd *cmd);
......
...@@ -45,7 +45,7 @@ struct scsi_request { ...@@ -45,7 +45,7 @@ struct scsi_request {
level driver) of this request */ level driver) of this request */
}; };
extern struct scsi_request *scsi_allocate_request(struct scsi_device *, int); extern struct scsi_request *scsi_allocate_request(struct scsi_device *, gfp_t);
extern void scsi_release_request(struct scsi_request *); extern void scsi_release_request(struct scsi_request *);
extern void scsi_wait_req(struct scsi_request *, const void *cmnd, extern void scsi_wait_req(struct scsi_request *, const void *cmnd,
void *buffer, unsigned bufflen, void *buffer, unsigned bufflen,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment