Commit 13d4999a authored by Sven Schnelle's avatar Sven Schnelle Committed by Heiko Carstens

s390/raw3270: fix formatting issues

fix function prototypes split over two lines like:

static void
foobar(void)

and fix superfluous spaces in declarations like

foo * bar
Signed-off-by: default avatarSven Schnelle <svens@linux.ibm.com>
Acked-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Tested-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent e6d98bb8
...@@ -111,8 +111,7 @@ static inline int raw3270_state_ready(struct raw3270 *rp) ...@@ -111,8 +111,7 @@ static inline int raw3270_state_ready(struct raw3270 *rp)
return rp->state == RAW3270_STATE_READY; return rp->state == RAW3270_STATE_READY;
} }
void void raw3270_buffer_address(struct raw3270 *rp, char *cp, unsigned short addr)
raw3270_buffer_address(struct raw3270 *rp, char *cp, unsigned short addr)
{ {
if (test_bit(RAW3270_FLAGS_14BITADDR, &rp->flags)) { if (test_bit(RAW3270_FLAGS_14BITADDR, &rp->flags)) {
cp[0] = (addr >> 8) & 0x3f; cp[0] = (addr >> 8) & 0x3f;
...@@ -126,8 +125,7 @@ raw3270_buffer_address(struct raw3270 *rp, char *cp, unsigned short addr) ...@@ -126,8 +125,7 @@ raw3270_buffer_address(struct raw3270 *rp, char *cp, unsigned short addr)
/* /*
* Allocate a new 3270 ccw request * Allocate a new 3270 ccw request
*/ */
struct raw3270_request * struct raw3270_request *raw3270_request_alloc(size_t size)
raw3270_request_alloc(size_t size)
{ {
struct raw3270_request *rq; struct raw3270_request *rq;
...@@ -159,8 +157,7 @@ raw3270_request_alloc(size_t size) ...@@ -159,8 +157,7 @@ raw3270_request_alloc(size_t size)
/* /*
* Free 3270 ccw request * Free 3270 ccw request
*/ */
void void raw3270_request_free(struct raw3270_request *rq)
raw3270_request_free (struct raw3270_request *rq)
{ {
kfree(rq->buffer); kfree(rq->buffer);
kfree(rq); kfree(rq);
...@@ -169,8 +166,7 @@ raw3270_request_free (struct raw3270_request *rq) ...@@ -169,8 +166,7 @@ raw3270_request_free (struct raw3270_request *rq)
/* /*
* Reset request to initial state. * Reset request to initial state.
*/ */
void void raw3270_request_reset(struct raw3270_request *rq)
raw3270_request_reset(struct raw3270_request *rq)
{ {
BUG_ON(!list_empty(&rq->list)); BUG_ON(!list_empty(&rq->list));
rq->ccw.cmd_code = 0; rq->ccw.cmd_code = 0;
...@@ -184,8 +180,7 @@ raw3270_request_reset(struct raw3270_request *rq) ...@@ -184,8 +180,7 @@ raw3270_request_reset(struct raw3270_request *rq)
/* /*
* Set command code to ccw of a request. * Set command code to ccw of a request.
*/ */
void void raw3270_request_set_cmd(struct raw3270_request *rq, u8 cmd)
raw3270_request_set_cmd(struct raw3270_request *rq, u8 cmd)
{ {
rq->ccw.cmd_code = cmd; rq->ccw.cmd_code = cmd;
} }
...@@ -193,8 +188,7 @@ raw3270_request_set_cmd(struct raw3270_request *rq, u8 cmd) ...@@ -193,8 +188,7 @@ raw3270_request_set_cmd(struct raw3270_request *rq, u8 cmd)
/* /*
* Add data fragment to output buffer. * Add data fragment to output buffer.
*/ */
int int raw3270_request_add_data(struct raw3270_request *rq, void *data, size_t size)
raw3270_request_add_data(struct raw3270_request *rq, void *data, size_t size)
{ {
if (size + rq->ccw.count > rq->size) if (size + rq->ccw.count > rq->size)
return -E2BIG; return -E2BIG;
...@@ -206,8 +200,7 @@ raw3270_request_add_data(struct raw3270_request *rq, void *data, size_t size) ...@@ -206,8 +200,7 @@ raw3270_request_add_data(struct raw3270_request *rq, void *data, size_t size)
/* /*
* Set address/length pair to ccw of a request. * Set address/length pair to ccw of a request.
*/ */
void void raw3270_request_set_data(struct raw3270_request *rq, void *data, size_t size)
raw3270_request_set_data(struct raw3270_request *rq, void *data, size_t size)
{ {
rq->ccw.cda = __pa(data); rq->ccw.cda = __pa(data);
rq->ccw.count = size; rq->ccw.count = size;
...@@ -216,8 +209,7 @@ raw3270_request_set_data(struct raw3270_request *rq, void *data, size_t size) ...@@ -216,8 +209,7 @@ raw3270_request_set_data(struct raw3270_request *rq, void *data, size_t size)
/* /*
* Set idal buffer to ccw of a request. * Set idal buffer to ccw of a request.
*/ */
void void raw3270_request_set_idal(struct raw3270_request *rq, struct idal_buffer *ib)
raw3270_request_set_idal(struct raw3270_request *rq, struct idal_buffer *ib)
{ {
rq->ccw.cda = __pa(ib->data); rq->ccw.cda = __pa(ib->data);
rq->ccw.count = ib->size; rq->ccw.count = ib->size;
...@@ -228,8 +220,7 @@ raw3270_request_set_idal(struct raw3270_request *rq, struct idal_buffer *ib) ...@@ -228,8 +220,7 @@ raw3270_request_set_idal(struct raw3270_request *rq, struct idal_buffer *ib)
* Add the request to the request queue, try to start it if the * Add the request to the request queue, try to start it if the
* 3270 device is idle. Return without waiting for end of i/o. * 3270 device is idle. Return without waiting for end of i/o.
*/ */
static int static int __raw3270_start(struct raw3270 *rp, struct raw3270_view *view,
__raw3270_start(struct raw3270 *rp, struct raw3270_view *view,
struct raw3270_request *rq) struct raw3270_request *rq)
{ {
rq->view = view; rq->view = view;
...@@ -248,16 +239,14 @@ __raw3270_start(struct raw3270 *rp, struct raw3270_view *view, ...@@ -248,16 +239,14 @@ __raw3270_start(struct raw3270 *rp, struct raw3270_view *view,
return 0; return 0;
} }
int int raw3270_view_active(struct raw3270_view *view)
raw3270_view_active(struct raw3270_view *view)
{ {
struct raw3270 *rp = view->dev; struct raw3270 *rp = view->dev;
return rp && rp->view == view; return rp && rp->view == view;
} }
int int raw3270_start(struct raw3270_view *view, struct raw3270_request *rq)
raw3270_start(struct raw3270_view *view, struct raw3270_request *rq)
{ {
unsigned long flags; unsigned long flags;
struct raw3270 *rp; struct raw3270 *rp;
...@@ -275,8 +264,7 @@ raw3270_start(struct raw3270_view *view, struct raw3270_request *rq) ...@@ -275,8 +264,7 @@ raw3270_start(struct raw3270_view *view, struct raw3270_request *rq)
return rc; return rc;
} }
int int raw3270_start_locked(struct raw3270_view *view, struct raw3270_request *rq)
raw3270_start_locked(struct raw3270_view *view, struct raw3270_request *rq)
{ {
struct raw3270 *rp; struct raw3270 *rp;
int rc; int rc;
...@@ -291,8 +279,7 @@ raw3270_start_locked(struct raw3270_view *view, struct raw3270_request *rq) ...@@ -291,8 +279,7 @@ raw3270_start_locked(struct raw3270_view *view, struct raw3270_request *rq)
return rc; return rc;
} }
int int raw3270_start_irq(struct raw3270_view *view, struct raw3270_request *rq)
raw3270_start_irq(struct raw3270_view *view, struct raw3270_request *rq)
{ {
struct raw3270 *rp; struct raw3270 *rp;
...@@ -306,8 +293,7 @@ raw3270_start_irq(struct raw3270_view *view, struct raw3270_request *rq) ...@@ -306,8 +293,7 @@ raw3270_start_irq(struct raw3270_view *view, struct raw3270_request *rq)
/* /*
* 3270 interrupt routine, called from the ccw_device layer * 3270 interrupt routine, called from the ccw_device layer
*/ */
static void static void raw3270_irq(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
raw3270_irq (struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
{ {
struct raw3270 *rp; struct raw3270 *rp;
struct raw3270_view *view; struct raw3270_view *view;
...@@ -415,8 +401,7 @@ struct raw3270_ua { /* Query Reply structure for Usable Area */ ...@@ -415,8 +401,7 @@ struct raw3270_ua { /* Query Reply structure for Usable Area */
} __attribute__ ((packed)) aua; } __attribute__ ((packed)) aua;
} __attribute__ ((packed)); } __attribute__ ((packed));
static void static void raw3270_size_device_vm(struct raw3270 *rp)
raw3270_size_device_vm(struct raw3270 *rp)
{ {
int rc, model; int rc, model;
struct ccw_dev_id dev_id; struct ccw_dev_id dev_id;
...@@ -465,8 +450,7 @@ raw3270_size_device_vm(struct raw3270 *rp) ...@@ -465,8 +450,7 @@ raw3270_size_device_vm(struct raw3270 *rp)
} }
} }
static void static void raw3270_size_device(struct raw3270 *rp)
raw3270_size_device(struct raw3270 *rp)
{ {
struct raw3270_ua *uap; struct raw3270_ua *uap;
...@@ -505,8 +489,7 @@ raw3270_size_device(struct raw3270 *rp) ...@@ -505,8 +489,7 @@ raw3270_size_device(struct raw3270 *rp)
rp->model = 5; rp->model = 5;
} }
static void static void raw3270_size_device_done(struct raw3270 *rp)
raw3270_size_device_done(struct raw3270 *rp)
{ {
struct raw3270_view *view; struct raw3270_view *view;
...@@ -525,8 +508,7 @@ raw3270_size_device_done(struct raw3270 *rp) ...@@ -525,8 +508,7 @@ raw3270_size_device_done(struct raw3270 *rp)
} }
} }
static void static void raw3270_read_modified_cb(struct raw3270_request *rq, void *data)
raw3270_read_modified_cb(struct raw3270_request *rq, void *data)
{ {
struct raw3270 *rp = rq->view->dev; struct raw3270 *rp = rq->view->dev;
...@@ -534,8 +516,7 @@ raw3270_read_modified_cb(struct raw3270_request *rq, void *data) ...@@ -534,8 +516,7 @@ raw3270_read_modified_cb(struct raw3270_request *rq, void *data)
raw3270_size_device_done(rp); raw3270_size_device_done(rp);
} }
static void static void raw3270_read_modified(struct raw3270 *rp)
raw3270_read_modified(struct raw3270 *rp)
{ {
if (rp->state != RAW3270_STATE_W4ATTN) if (rp->state != RAW3270_STATE_W4ATTN)
return; return;
...@@ -551,8 +532,7 @@ raw3270_read_modified(struct raw3270 *rp) ...@@ -551,8 +532,7 @@ raw3270_read_modified(struct raw3270 *rp)
raw3270_start_irq(&rp->init_view, &rp->init_readmod); raw3270_start_irq(&rp->init_view, &rp->init_readmod);
} }
static void static void raw3270_writesf_readpart(struct raw3270 *rp)
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 };
...@@ -572,8 +552,7 @@ raw3270_writesf_readpart(struct raw3270 *rp) ...@@ -572,8 +552,7 @@ raw3270_writesf_readpart(struct raw3270 *rp)
/* /*
* Device reset * Device reset
*/ */
static void static void raw3270_reset_device_cb(struct raw3270_request *rq, void *data)
raw3270_reset_device_cb(struct raw3270_request *rq, void *data)
{ {
struct raw3270 *rp = rq->view->dev; struct raw3270 *rp = rq->view->dev;
...@@ -590,8 +569,7 @@ raw3270_reset_device_cb(struct raw3270_request *rq, void *data) ...@@ -590,8 +569,7 @@ raw3270_reset_device_cb(struct raw3270_request *rq, void *data)
memset(&rp->init_reset, 0, sizeof(rp->init_reset)); memset(&rp->init_reset, 0, sizeof(rp->init_reset));
} }
static int static int __raw3270_reset_device(struct raw3270 *rp)
__raw3270_reset_device(struct raw3270 *rp)
{ {
int rc; int rc;
...@@ -611,8 +589,7 @@ __raw3270_reset_device(struct raw3270 *rp) ...@@ -611,8 +589,7 @@ __raw3270_reset_device(struct raw3270 *rp)
return rc; return rc;
} }
static int static int raw3270_reset_device(struct raw3270 *rp)
raw3270_reset_device(struct raw3270 *rp)
{ {
unsigned long flags; unsigned long flags;
int rc; int rc;
...@@ -623,8 +600,7 @@ raw3270_reset_device(struct raw3270 *rp) ...@@ -623,8 +600,7 @@ raw3270_reset_device(struct raw3270 *rp)
return rc; return rc;
} }
int int raw3270_reset(struct raw3270_view *view)
raw3270_reset(struct raw3270_view *view)
{ {
struct raw3270 *rp; struct raw3270 *rp;
int rc; int rc;
...@@ -639,8 +615,7 @@ raw3270_reset(struct raw3270_view *view) ...@@ -639,8 +615,7 @@ raw3270_reset(struct raw3270_view *view)
return rc; return rc;
} }
static void static void __raw3270_disconnect(struct raw3270 *rp)
__raw3270_disconnect(struct raw3270 *rp)
{ {
struct raw3270_request *rq; struct raw3270_request *rq;
struct raw3270_view *view; struct raw3270_view *view;
...@@ -661,8 +636,7 @@ __raw3270_disconnect(struct raw3270 *rp) ...@@ -661,8 +636,7 @@ __raw3270_disconnect(struct raw3270 *rp)
__raw3270_reset_device(rp); __raw3270_reset_device(rp);
} }
static void static void raw3270_init_irq(struct raw3270_view *view, struct raw3270_request *rq,
raw3270_init_irq(struct raw3270_view *view, struct raw3270_request *rq,
struct irb *irb) struct irb *irb)
{ {
struct raw3270 *rp; struct raw3270 *rp;
...@@ -689,8 +663,8 @@ static struct raw3270_fn raw3270_init_fn = { ...@@ -689,8 +663,8 @@ static struct raw3270_fn raw3270_init_fn = {
/* /*
* Setup new 3270 device. * Setup new 3270 device.
*/ */
static int static int raw3270_setup_device(struct ccw_device *cdev, struct raw3270 *rp,
raw3270_setup_device(struct ccw_device *cdev, struct raw3270 *rp, char *ascebc) char *ascebc)
{ {
struct list_head *l; struct list_head *l;
struct raw3270 *tmp; struct raw3270 *tmp;
...@@ -800,8 +774,7 @@ struct raw3270 __init *raw3270_setup_console(void) ...@@ -800,8 +774,7 @@ struct raw3270 __init *raw3270_setup_console(void)
return rp; return rp;
} }
void void raw3270_wait_cons_dev(struct raw3270 *rp)
raw3270_wait_cons_dev(struct raw3270 *rp)
{ {
unsigned long flags; unsigned long flags;
...@@ -815,8 +788,7 @@ raw3270_wait_cons_dev(struct raw3270 *rp) ...@@ -815,8 +788,7 @@ raw3270_wait_cons_dev(struct raw3270 *rp)
/* /*
* Create a 3270 device structure. * Create a 3270 device structure.
*/ */
static struct raw3270 * static struct raw3270 *raw3270_create_device(struct ccw_device *cdev)
raw3270_create_device(struct ccw_device *cdev)
{ {
struct raw3270 *rp; struct raw3270 *rp;
char *ascebc; char *ascebc;
...@@ -859,8 +831,7 @@ int raw3270_view_lock_unavailable(struct raw3270_view *view) ...@@ -859,8 +831,7 @@ int raw3270_view_lock_unavailable(struct raw3270_view *view)
/* /*
* Activate a view. * Activate a view.
*/ */
int int raw3270_activate_view(struct raw3270_view *view)
raw3270_activate_view(struct raw3270_view *view)
{ {
struct raw3270 *rp; struct raw3270 *rp;
struct raw3270_view *oldview, *nv; struct raw3270_view *oldview, *nv;
...@@ -905,8 +876,7 @@ raw3270_activate_view(struct raw3270_view *view) ...@@ -905,8 +876,7 @@ raw3270_activate_view(struct raw3270_view *view)
/* /*
* Deactivate current view. * Deactivate current view.
*/ */
void void raw3270_deactivate_view(struct raw3270_view *view)
raw3270_deactivate_view(struct raw3270_view *view)
{ {
unsigned long flags; unsigned long flags;
struct raw3270 *rp; struct raw3270 *rp;
...@@ -937,8 +907,8 @@ raw3270_deactivate_view(struct raw3270_view *view) ...@@ -937,8 +907,8 @@ raw3270_deactivate_view(struct raw3270_view *view)
/* /*
* Add view to device with minor "minor". * Add view to device with minor "minor".
*/ */
int int raw3270_add_view(struct raw3270_view *view, struct raw3270_fn *fn,
raw3270_add_view(struct raw3270_view *view, struct raw3270_fn *fn, int minor, int subclass) int minor, int subclass)
{ {
unsigned long flags; unsigned long flags;
struct raw3270 *rp; struct raw3270 *rp;
...@@ -973,8 +943,7 @@ raw3270_add_view(struct raw3270_view *view, struct raw3270_fn *fn, int minor, in ...@@ -973,8 +943,7 @@ raw3270_add_view(struct raw3270_view *view, struct raw3270_fn *fn, int minor, in
/* /*
* Find specific view of device with minor "minor". * Find specific view of device with minor "minor".
*/ */
struct raw3270_view * struct raw3270_view *raw3270_find_view(struct raw3270_fn *fn, int minor)
raw3270_find_view(struct raw3270_fn *fn, int minor)
{ {
struct raw3270 *rp; struct raw3270 *rp;
struct raw3270_view *view, *tmp; struct raw3270_view *view, *tmp;
...@@ -1003,8 +972,7 @@ raw3270_find_view(struct raw3270_fn *fn, int minor) ...@@ -1003,8 +972,7 @@ raw3270_find_view(struct raw3270_fn *fn, int minor)
/* /*
* Remove view from device and free view structure via call to view->fn->free. * Remove view from device and free view structure via call to view->fn->free.
*/ */
void void raw3270_del_view(struct raw3270_view *view)
raw3270_del_view(struct raw3270_view *view)
{ {
unsigned long flags; unsigned long flags;
struct raw3270 *rp; struct raw3270 *rp;
...@@ -1037,8 +1005,7 @@ raw3270_del_view(struct raw3270_view *view) ...@@ -1037,8 +1005,7 @@ raw3270_del_view(struct raw3270_view *view)
/* /*
* Remove a 3270 device structure. * Remove a 3270 device structure.
*/ */
static void static void raw3270_delete_device(struct raw3270 *rp)
raw3270_delete_device(struct raw3270 *rp)
{ {
struct ccw_device *cdev; struct ccw_device *cdev;
...@@ -1061,8 +1028,7 @@ raw3270_delete_device(struct raw3270 *rp) ...@@ -1061,8 +1028,7 @@ raw3270_delete_device(struct raw3270 *rp)
kfree(rp); kfree(rp);
} }
static int static int raw3270_probe(struct ccw_device *cdev)
raw3270_probe (struct ccw_device *cdev)
{ {
return 0; return 0;
} }
...@@ -1070,16 +1036,16 @@ raw3270_probe (struct ccw_device *cdev) ...@@ -1070,16 +1036,16 @@ raw3270_probe (struct ccw_device *cdev)
/* /*
* Additional attributes for a 3270 device * Additional attributes for a 3270 device
*/ */
static ssize_t static ssize_t raw3270_model_show(struct device *dev, struct device_attribute *attr,
raw3270_model_show(struct device *dev, struct device_attribute *attr, char *buf) char *buf)
{ {
return sysfs_emit(buf, "%i\n", return sysfs_emit(buf, "%i\n",
((struct raw3270 *)dev_get_drvdata(dev))->model); ((struct raw3270 *)dev_get_drvdata(dev))->model);
} }
static DEVICE_ATTR(model, 0444, raw3270_model_show, NULL); static DEVICE_ATTR(model, 0444, raw3270_model_show, NULL);
static ssize_t static ssize_t raw3270_rows_show(struct device *dev, struct device_attribute *attr,
raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf) char *buf)
{ {
return sysfs_emit(buf, "%i\n", return sysfs_emit(buf, "%i\n",
((struct raw3270 *)dev_get_drvdata(dev))->rows); ((struct raw3270 *)dev_get_drvdata(dev))->rows);
...@@ -1087,7 +1053,8 @@ raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf) ...@@ -1087,7 +1053,8 @@ raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf)
static DEVICE_ATTR(rows, 0444, raw3270_rows_show, NULL); static DEVICE_ATTR(rows, 0444, raw3270_rows_show, NULL);
static ssize_t static ssize_t
raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *buf) raw3270_columns_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ {
return sysfs_emit(buf, "%i\n", return sysfs_emit(buf, "%i\n",
((struct raw3270 *)dev_get_drvdata(dev))->cols); ((struct raw3270 *)dev_get_drvdata(dev))->cols);
...@@ -1141,8 +1108,7 @@ void raw3270_unregister_notifier(struct raw3270_notifier *notifier) ...@@ -1141,8 +1108,7 @@ void raw3270_unregister_notifier(struct raw3270_notifier *notifier)
/* /*
* Set 3270 device online. * Set 3270 device online.
*/ */
static int static int raw3270_set_online(struct ccw_device *cdev)
raw3270_set_online (struct ccw_device *cdev)
{ {
struct raw3270_notifier *np; struct raw3270_notifier *np;
struct raw3270 *rp; struct raw3270 *rp;
...@@ -1169,8 +1135,7 @@ raw3270_set_online (struct ccw_device *cdev) ...@@ -1169,8 +1135,7 @@ raw3270_set_online (struct ccw_device *cdev)
/* /*
* Remove 3270 device structure. * Remove 3270 device structure.
*/ */
static void static void raw3270_remove(struct ccw_device *cdev)
raw3270_remove (struct ccw_device *cdev)
{ {
unsigned long flags; unsigned long flags;
struct raw3270 *rp; struct raw3270 *rp;
...@@ -1220,8 +1185,7 @@ raw3270_remove (struct ccw_device *cdev) ...@@ -1220,8 +1185,7 @@ raw3270_remove (struct ccw_device *cdev)
/* /*
* Set 3270 device offline. * Set 3270 device offline.
*/ */
static int static int raw3270_set_offline(struct ccw_device *cdev)
raw3270_set_offline (struct ccw_device *cdev)
{ {
struct raw3270 *rp; struct raw3270 *rp;
...@@ -1260,8 +1224,7 @@ static struct ccw_driver raw3270_ccw_driver = { ...@@ -1260,8 +1224,7 @@ static struct ccw_driver raw3270_ccw_driver = {
.int_class = IRQIO_C70, .int_class = IRQIO_C70,
}; };
static int static int raw3270_init(void)
raw3270_init(void)
{ {
struct raw3270 *rp; struct raw3270 *rp;
int rc; int rc;
...@@ -1283,8 +1246,7 @@ raw3270_init(void) ...@@ -1283,8 +1246,7 @@ raw3270_init(void)
return rc; return rc;
} }
static void static void raw3270_exit(void)
raw3270_exit(void)
{ {
ccw_driver_unregister(&raw3270_ccw_driver); ccw_driver_unregister(&raw3270_ccw_driver);
class_destroy(class3270); class_destroy(class3270);
......
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