Commit ff61744c authored by Sven Schnelle's avatar Sven Schnelle Committed by Heiko Carstens

s390/raw3270: fix indentation/whitespace errors

Signed-off-by: default avatarSven Schnelle <svens@linux.ibm.com>
Acked-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 754f66b5
...@@ -142,7 +142,7 @@ struct raw3270_request *raw3270_request_alloc(size_t size) ...@@ -142,7 +142,7 @@ struct raw3270_request *raw3270_request_alloc(size_t size)
struct raw3270_request *rq; struct raw3270_request *rq;
/* Allocate request structure */ /* Allocate request structure */
rq = kzalloc(sizeof(struct raw3270_request), GFP_KERNEL | GFP_DMA); rq = kzalloc(sizeof(*rq), GFP_KERNEL | GFP_DMA);
if (!rq) if (!rq)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
...@@ -248,7 +248,7 @@ static int __raw3270_start(struct raw3270 *rp, struct raw3270_view *view, ...@@ -248,7 +248,7 @@ static int __raw3270_start(struct raw3270 *rp, struct raw3270_view *view,
!test_bit(RAW3270_FLAGS_BUSY, &rp->flags)) { !test_bit(RAW3270_FLAGS_BUSY, &rp->flags)) {
/* No other requests are on the queue. Start this one. */ /* No other requests are on the queue. Start this one. */
rq->rc = ccw_device_start(rp->cdev, &rq->ccw, rq->rc = ccw_device_start(rp->cdev, &rq->ccw,
(unsigned long) rq, 0, 0); (unsigned long)rq, 0, 0);
if (rq->rc) { if (rq->rc) {
raw3270_put_view(view); raw3270_put_view(view);
return rq->rc; return rq->rc;
...@@ -338,7 +338,7 @@ static void raw3270_irq(struct ccw_device *cdev, unsigned long intparm, struct i ...@@ -338,7 +338,7 @@ static void raw3270_irq(struct ccw_device *cdev, unsigned long intparm, struct i
rp = dev_get_drvdata(&cdev->dev); rp = dev_get_drvdata(&cdev->dev);
if (!rp) if (!rp)
return; return;
rq = (struct raw3270_request *) intparm; rq = (struct raw3270_request *)intparm;
view = rq ? rq->view : rp->view; view = rq ? rq->view : rp->view;
if (!IS_ERR(irb)) { if (!IS_ERR(irb)) {
...@@ -379,9 +379,9 @@ static void raw3270_irq(struct ccw_device *cdev, unsigned long intparm, struct i ...@@ -379,9 +379,9 @@ static void raw3270_irq(struct ccw_device *cdev, unsigned long intparm, struct i
* started successful. * started successful.
*/ */
while (!list_empty(&rp->req_queue)) { while (!list_empty(&rp->req_queue)) {
rq = list_entry(rp->req_queue.next,struct raw3270_request,list); rq = list_entry(rp->req_queue.next, struct raw3270_request, list);
rq->rc = ccw_device_start(rp->cdev, &rq->ccw, rq->rc = ccw_device_start(rp->cdev, &rq->ccw,
(unsigned long) rq, 0, 0); (unsigned long)rq, 0, 0);
if (rq->rc == 0) if (rq->rc == 0)
break; break;
/* Start failed. Remove request and do callback. */ /* Start failed. Remove request and do callback. */
...@@ -557,6 +557,7 @@ static void raw3270_size_device_done(struct raw3270 *rp) ...@@ -557,6 +557,7 @@ static void raw3270_size_device_done(struct raw3270 *rp)
void raw3270_read_modified_cb(struct raw3270_request *rq, void *data) void raw3270_read_modified_cb(struct raw3270_request *rq, void *data)
{ {
struct raw3270 *rp = rq->view->dev; struct raw3270 *rp = rq->view->dev;
raw3270_size_device(rp, data); raw3270_size_device(rp, data);
raw3270_size_device_done(rp); raw3270_size_device_done(rp);
} }
...@@ -572,7 +573,7 @@ static void raw3270_read_modified(struct raw3270 *rp) ...@@ -572,7 +573,7 @@ static void raw3270_read_modified(struct raw3270 *rp)
rp->init_readmod.ccw.cmd_code = TC_READMOD; rp->init_readmod.ccw.cmd_code = TC_READMOD;
rp->init_readmod.ccw.flags = CCW_FLAG_SLI; rp->init_readmod.ccw.flags = CCW_FLAG_SLI;
rp->init_readmod.ccw.count = sizeof(rp->init_data); rp->init_readmod.ccw.count = sizeof(rp->init_data);
rp->init_readmod.ccw.cda = (__u32) __pa(rp->init_data); rp->init_readmod.ccw.cda = (__u32)__pa(rp->init_data);
rp->init_readmod.callback = raw3270_read_modified_cb; rp->init_readmod.callback = raw3270_read_modified_cb;
rp->init_readmod.callback_data = rp->init_data; rp->init_readmod.callback_data = rp->init_data;
rp->state = RAW3270_STATE_READMOD; rp->state = RAW3270_STATE_READMOD;
...@@ -581,8 +582,9 @@ static void raw3270_read_modified(struct raw3270 *rp) ...@@ -581,8 +582,9 @@ static void raw3270_read_modified(struct raw3270 *rp)
static void raw3270_writesf_readpart(struct raw3270 *rp) static void raw3270_writesf_readpart(struct raw3270 *rp)
{ {
static const unsigned char wbuf[] = static const unsigned char wbuf[] = {
{ 0x00, 0x07, 0x01, 0xff, 0x03, 0x00, 0x81 }; 0x00, 0x07, 0x01, 0xff, 0x03, 0x00, 0x81
};
/* Store 'read partition' data stream to init_data */ /* Store 'read partition' data stream to init_data */
memset(&rp->init_readpart, 0, sizeof(rp->init_readpart)); memset(&rp->init_readpart, 0, sizeof(rp->init_readpart));
...@@ -591,7 +593,7 @@ static void raw3270_writesf_readpart(struct raw3270 *rp) ...@@ -591,7 +593,7 @@ static void raw3270_writesf_readpart(struct raw3270 *rp)
rp->init_readpart.ccw.cmd_code = TC_WRITESF; rp->init_readpart.ccw.cmd_code = TC_WRITESF;
rp->init_readpart.ccw.flags = CCW_FLAG_SLI; rp->init_readpart.ccw.flags = CCW_FLAG_SLI;
rp->init_readpart.ccw.count = sizeof(wbuf); rp->init_readpart.ccw.count = sizeof(wbuf);
rp->init_readpart.ccw.cda = (__u32) __pa(&rp->init_data); rp->init_readpart.ccw.cda = (__u32)__pa(&rp->init_data);
rp->state = RAW3270_STATE_W4ATTN; rp->state = RAW3270_STATE_W4ATTN;
raw3270_start_irq(&rp->init_view, &rp->init_readpart); raw3270_start_irq(&rp->init_view, &rp->init_readpart);
} }
...@@ -611,8 +613,9 @@ static void raw3270_reset_device_cb(struct raw3270_request *rq, void *data) ...@@ -611,8 +613,9 @@ static void raw3270_reset_device_cb(struct raw3270_request *rq, void *data)
} else if (MACHINE_IS_VM) { } else if (MACHINE_IS_VM) {
raw3270_size_device_vm(rp); raw3270_size_device_vm(rp);
raw3270_size_device_done(rp); raw3270_size_device_done(rp);
} else } else {
raw3270_writesf_readpart(rp); raw3270_writesf_readpart(rp);
}
memset(&rp->init_reset, 0, sizeof(rp->init_reset)); memset(&rp->init_reset, 0, sizeof(rp->init_reset));
} }
...@@ -628,7 +631,7 @@ static int __raw3270_reset_device(struct raw3270 *rp) ...@@ -628,7 +631,7 @@ static int __raw3270_reset_device(struct raw3270 *rp)
rp->init_reset.ccw.cmd_code = TC_EWRITEA; rp->init_reset.ccw.cmd_code = TC_EWRITEA;
rp->init_reset.ccw.flags = CCW_FLAG_SLI; rp->init_reset.ccw.flags = CCW_FLAG_SLI;
rp->init_reset.ccw.count = 1; rp->init_reset.ccw.count = 1;
rp->init_reset.ccw.cda = (__u32) __pa(rp->init_data); rp->init_reset.ccw.cda = (__u32)__pa(rp->init_data);
rp->init_reset.callback = raw3270_reset_device_cb; rp->init_reset.callback = raw3270_reset_device_cb;
rc = __raw3270_start(rp, &rp->init_view, &rp->init_reset); rc = __raw3270_start(rp, &rp->init_view, &rp->init_reset);
if (rc == 0 && rp->state == RAW3270_STATE_INIT) if (rc == 0 && rp->state == RAW3270_STATE_INIT)
...@@ -672,7 +675,7 @@ static void __raw3270_disconnect(struct raw3270 *rp) ...@@ -672,7 +675,7 @@ static void __raw3270_disconnect(struct raw3270 *rp)
rp->view = &rp->init_view; rp->view = &rp->init_view;
/* Cancel all queued requests */ /* Cancel all queued requests */
while (!list_empty(&rp->req_queue)) { while (!list_empty(&rp->req_queue)) {
rq = list_entry(rp->req_queue.next,struct raw3270_request,list); rq = list_entry(rp->req_queue.next, struct raw3270_request, list);
view = rq->view; view = rq->view;
rq->rc = -EACCES; rq->rc = -EACCES;
list_del_init(&rq->list); list_del_init(&rq->list);
...@@ -800,7 +803,7 @@ struct raw3270 __init *raw3270_setup_console(void) ...@@ -800,7 +803,7 @@ struct raw3270 __init *raw3270_setup_console(void)
if (IS_ERR(cdev)) if (IS_ERR(cdev))
return ERR_CAST(cdev); return ERR_CAST(cdev);
rp = kzalloc(sizeof(struct raw3270), GFP_KERNEL | GFP_DMA); rp = kzalloc(sizeof(*rp), GFP_KERNEL | GFP_DMA);
ascebc = kzalloc(256, GFP_KERNEL); ascebc = kzalloc(256, GFP_KERNEL);
rc = raw3270_setup_device(cdev, rp, ascebc); rc = raw3270_setup_device(cdev, rp, ascebc);
if (rc) if (rc)
...@@ -845,7 +848,7 @@ static struct raw3270 *raw3270_create_device(struct ccw_device *cdev) ...@@ -845,7 +848,7 @@ static struct raw3270 *raw3270_create_device(struct ccw_device *cdev)
char *ascebc; char *ascebc;
int rc; int rc;
rp = kzalloc(sizeof(struct raw3270), GFP_KERNEL | GFP_DMA); rp = kzalloc(sizeof(*rp), GFP_KERNEL | GFP_DMA);
if (!rp) if (!rp)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
ascebc = kmalloc(256, GFP_KERNEL); ascebc = kmalloc(256, GFP_KERNEL);
...@@ -893,11 +896,11 @@ int raw3270_activate_view(struct raw3270_view *view) ...@@ -893,11 +896,11 @@ int raw3270_activate_view(struct raw3270_view *view)
if (!rp) if (!rp)
return -ENODEV; return -ENODEV;
spin_lock_irqsave(get_ccwdev_lock(rp->cdev), flags); spin_lock_irqsave(get_ccwdev_lock(rp->cdev), flags);
if (rp->view == view) if (rp->view == view) {
rc = 0; rc = 0;
else if (!raw3270_state_ready(rp)) } else if (!raw3270_state_ready(rp)) {
rc = -EBUSY; rc = -EBUSY;
else { } else {
oldview = NULL; oldview = NULL;
if (rp->view && rp->view->fn->deactivate) { if (rp->view && rp->view->fn->deactivate) {
oldview = rp->view; oldview = rp->view;
...@@ -1117,7 +1120,7 @@ raw3270_columns_show(struct device *dev, struct device_attribute *attr, ...@@ -1117,7 +1120,7 @@ raw3270_columns_show(struct device *dev, struct device_attribute *attr,
} }
static DEVICE_ATTR(columns, 0444, raw3270_columns_show, NULL); static DEVICE_ATTR(columns, 0444, raw3270_columns_show, NULL);
static struct attribute * raw3270_attrs[] = { static struct attribute *raw3270_attrs[] = {
&dev_attr_model.attr, &dev_attr_model.attr,
&dev_attr_rows.attr, &dev_attr_rows.attr,
&dev_attr_columns.attr, &dev_attr_columns.attr,
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
#define TUBOCMD _IO('3', 4) /* set ccw command for fs writes. */ #define TUBOCMD _IO('3', 4) /* set ccw command for fs writes. */
#define TUBGETI _IO('3', 7) /* get ccw command for fs reads. */ #define TUBGETI _IO('3', 7) /* get ccw command for fs reads. */
#define TUBGETO _IO('3', 8) /* get ccw command for fs writes. */ #define TUBGETO _IO('3', 8) /* get ccw command for fs writes. */
#define TUBSETMOD _IO('3',12) /* FIXME: what does it do ?*/ #define TUBSETMOD _IO('3', 12) /* FIXME: what does it do ?*/
#define TUBGETMOD _IO('3',13) /* FIXME: what does it do ?*/ #define TUBGETMOD _IO('3', 13) /* FIXME: what does it do ?*/
/* Local Channel Commands */ /* Local Channel Commands */
#define TC_WRITE 0x01 /* Write */ #define TC_WRITE 0x01 /* Write */
......
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