I2O: some cleanups
PATCH 1/1 I2O: some cleanups
the patch below makes the following changes to code under drivers/message/i2o :
- remove unused code
- make needlessly global code static
Please review this patch and apply if it's correct.
diffstat output:
drivers/message/i2o/debug.c | 108 +------------------------------ drivers/message/i2o/device.c | 46 ------------- drivers/message/i2o/exec-osm.c | 5 - drivers/message/i2o/i2o_config.c | 3 drivers/message/i2o/i2o_proc.c | 38 +++++----- drivers/message/i2o/i2o_scsi.c | 6 - drivers/message/i2o/iop.c | 7 +- include/linux/i2o.h | 3 8 files changed, 36 insertions(+), 180 deletions(-)
Signed-off-by Adrian Bunk <[email protected]>
include/linux/i2o.h renamed from include/linux/i2o.h.old +0 -3
@@ -263,7 +263,6 @@/* IOP functions */ extern int i2o_status_get (struct i2o_controller *); -extern int i2o_hrt_get (struct i2o_controller *);extern int i2o_event_register (struct i2o_device *,struct i2o_driver *,int ,u32 );
@@ -385,7 +384,6 @@/* Exec OSM functions */ extern int i2o_exec_lct_get (struct i2o_controller *); -extern int i2o_exec_lct_notify (struct i2o_controller *,u32 );/* device to i2o_device and driver to i2o_driver convertion functions */ #define to_i2o_driver (drv) container_of(drv,struct i2o_driver, driver)
@@ -633,7 +631,6 @@#define i2o_raw_writel (val, mem) __raw_writel(cpu_to_le32(val), mem)extern int i2o_parm_field_get (struct i2o_device *,int ,int ,void *,int ); -extern int i2o_parm_field_set (struct i2o_device *,int ,int ,void *,int );extern int i2o_parm_table_get (struct i2o_device *,int ,int ,int ,void *,int ,void *,int );/* FIXME: remove
drivers/message/i2o/debug.c renamed from drivers/message/i2o/debug.c.old +4 -104
147 lines not on this page · raw message
drivers/message/i2o/device.c renamed from drivers/message/i2o/device.c.old +2 -44
63 lines not on this page · raw message
drivers/message/i2o/exec-osm.c renamed from drivers/message/i2o/exec-osm.c.old +3 -2
@@ -33,6 +33,8 @@struct i2o_driver i2o_exec_driver; +static int i2o_exec_lct_notify (struct i2o_controller *c,u32 change_ind); +/* Module internal functions from other sources */ extern int i2o_device_parse_lct (struct i2o_controller *);
@@ -436,7 +438,7 @@* replies immediately after the request. If change_ind > 0 the reply is * send after change indicator of the LCT is > change_ind. */ -int i2o_exec_lct_notify (struct i2o_controller *c,u32 change_ind) +static int i2o_exec_lct_notify (struct i2o_controller *c,u32 change_ind) {i2o_status_block *sb = c->status_block.virt;struct device *dev;
@@ -503,4 +505,3 @@EXPORT_SYMBOL (i2o_msg_post_wait_mem);EXPORT_SYMBOL (i2o_exec_lct_get); -EXPORT_SYMBOL (i2o_exec_lct_notify);
drivers/message/i2o/i2o_config.c renamed from drivers/message/i2o/i2o_config.c.old +1 -2
@@ -51,7 +51,6 @@extern int i2o_parm_issue (struct i2o_device *,int ,void *,int ,void *,int );static spinlock_t i2o_config_lock =SPIN_LOCK_UNLOCKED ; -struct wait_queue *i2o_wait_queue;#define MODINC (x,y) ((x) = ((x) + 1) % (y))
@@ -79,7 +78,7 @@* multiplexed by the i2o_core code */ -struct i2o_driver i2o_config_driver = { +static struct i2o_driver i2o_config_driver = { .name ="Config-OSM" };
drivers/message/i2o/i2o_proc.c renamed from drivers/message/i2o/i2o_proc.c.old +19 -19
@@ -290,7 +290,7 @@ "CARDBUS" }; -int i2o_seq_show_hrt (struct seq_file *seq,void *v) +static int i2o_seq_show_hrt (struct seq_file *seq,void *v) {struct i2o_controller *c = (struct i2o_controller *)seq->private;i2o_hrt *hrt = (i2o_hrt *) c->hrt.virt;
@@ -391,7 +391,7 @@return 0 ; } -int i2o_seq_show_lct (struct seq_file *seq,void *v) +static int i2o_seq_show_lct (struct seq_file *seq,void *v) {struct i2o_controller *c = (struct i2o_controller *)seq->private;i2o_lct *lct = (i2o_lct *) c->lct;
@@ -521,7 +521,7 @@return 0 ; } -int i2o_seq_show_status (struct seq_file *seq,void *v) +static int i2o_seq_show_status (struct seq_file *seq,void *v) {struct i2o_controller *c = (struct i2o_controller *)seq->private;char prodstr[25 ];
@@ -718,7 +718,7 @@return 0 ; } -int i2o_seq_show_hw (struct seq_file *seq,void *v) +static int i2o_seq_show_hw (struct seq_file *seq,void *v) {struct i2o_controller *c = (struct i2o_controller *)seq->private;static u32 work32[5 ];
@@ -775,7 +775,7 @@ }/* Executive group 0003h - Executing DDM List (table) */ -int i2o_seq_show_ddm_table (struct seq_file *seq,void *v) +static int i2o_seq_show_ddm_table (struct seq_file *seq,void *v) {struct i2o_controller *c = (struct i2o_controller *)seq->private;int token;
@@ -851,7 +851,7 @@ }/* Executive group 0004h - Driver Store (scalar) */ -int i2o_seq_show_driver_store (struct seq_file *seq,void *v) +static int i2o_seq_show_driver_store (struct seq_file *seq,void *v) {struct i2o_controller *c = (struct i2o_controller *)seq->private;u32 work32[8 ];
@@ -874,7 +874,7 @@ }/* Executive group 0005h - Driver Store Table (table) */ -int i2o_seq_show_drivers_stored (struct seq_file *seq,void *v) +static int i2o_seq_show_drivers_stored (struct seq_file *seq,void *v) { typedef struct _i2o_driver_store { u16 stored_ddm_index;
@@ -953,7 +953,7 @@ }/* Generic group F000h - Params Descriptor (table) */ -int i2o_seq_show_groups (struct seq_file *seq,void *v) +static int i2o_seq_show_groups (struct seq_file *seq,void *v) {struct i2o_device *d = (struct i2o_device *)seq->private;int token;
@@ -1029,7 +1029,7 @@ }/* Generic group F001h - Physical Device Table (table) */ -int i2o_seq_show_phys_device (struct seq_file *seq,void *v) +static int i2o_seq_show_phys_device (struct seq_file *seq,void *v) {struct i2o_device *d = (struct i2o_device *)seq->private;int token;
@@ -1070,7 +1070,7 @@ }/* Generic group F002h - Claimed Table (table) */ -int i2o_seq_show_claimed (struct seq_file *seq,void *v) +static int i2o_seq_show_claimed (struct seq_file *seq,void *v) {struct i2o_device *d = (struct i2o_device *)seq->private;int token;
@@ -1110,7 +1110,7 @@ }/* Generic group F003h - User Table (table) */ -int i2o_seq_show_users (struct seq_file *seq,void *v) +static int i2o_seq_show_users (struct seq_file *seq,void *v) {struct i2o_device *d = (struct i2o_device *)seq->private;int token;
@@ -1164,7 +1164,7 @@ }/* Generic group F005h - Private message extensions (table) (optional) */ -int i2o_seq_show_priv_msgs (struct seq_file *seq,void *v) +static int i2o_seq_show_priv_msgs (struct seq_file *seq,void *v) {struct i2o_device *d = (struct i2o_device *)seq->private;int token;
@@ -1213,7 +1213,7 @@ }/* Generic group F006h - Authorized User Table (table) */ -int i2o_seq_show_authorized_users (struct seq_file *seq,void *v) +static int i2o_seq_show_authorized_users (struct seq_file *seq,void *v) {struct i2o_device *d = (struct i2o_device *)seq->private;int token;
@@ -1254,7 +1254,7 @@ }/* Generic group F100h - Device Identity (scalar) */ -int i2o_seq_show_dev_identity (struct seq_file *seq,void *v) +static int i2o_seq_show_dev_identity (struct seq_file *seq,void *v) {struct i2o_device *d = (struct i2o_device *)seq->private;static u32 work32[128 ];// allow for "stuff" + up to 256 byte (max) serial number
@@ -1292,7 +1292,7 @@return 0 ; } -int i2o_seq_show_dev_name (struct seq_file *seq,void *v) +static int i2o_seq_show_dev_name (struct seq_file *seq,void *v) {struct i2o_device *d = (struct i2o_device *)seq->private;
@@ -1302,7 +1302,7 @@ }/* Generic group F101h - DDM Identity (scalar) */ -int i2o_seq_show_ddm_identity (struct seq_file *seq,void *v) +static int i2o_seq_show_ddm_identity (struct seq_file *seq,void *v) {struct i2o_device *d = (struct i2o_device *)seq->private;int token;
@@ -1339,7 +1339,7 @@ }/* Generic group F102h - User Information (scalar) */ -int i2o_seq_show_uinfo (struct seq_file *seq,void *v) +static int i2o_seq_show_uinfo (struct seq_file *seq,void *v) {struct i2o_device *d = (struct i2o_device *)seq->private;int token;
@@ -1371,7 +1371,7 @@ }/* Generic group F103h - SGL Operating Limits (scalar) */ -int i2o_seq_show_sgl_limits (struct seq_file *seq,void *v) +static int i2o_seq_show_sgl_limits (struct seq_file *seq,void *v) {struct i2o_device *d = (struct i2o_device *)seq->private;static u32 work32[12 ];
@@ -1418,7 +1418,7 @@ }/* Generic group F200h - Sensors (scalar) */ -int i2o_seq_show_sensors (struct seq_file *seq,void *v) +static int i2o_seq_show_sensors (struct seq_file *seq,void *v) {struct i2o_device *d = (struct i2o_device *)seq->private;int token;
drivers/message/i2o/i2o_scsi.c renamed from drivers/message/i2o/i2o_scsi.c.old +3 -3
@@ -460,7 +460,7 @@* If a I2O controller is added, we catch the notification to add a * corresponding Scsi_Host. */ -void i2o_scsi_notify_controller_add (struct i2o_controller *c) +static void i2o_scsi_notify_controller_add (struct i2o_controller *c) {struct i2o_scsi_host *i2o_shost;int rc;
@@ -492,7 +492,7 @@* If a I2O controller is removed, we catch the notification to remove the * corresponding Scsi_Host. */ -void i2o_scsi_notify_controller_remove (struct i2o_controller *c) +static void i2o_scsi_notify_controller_remove (struct i2o_controller *c) {struct i2o_scsi_host *i2o_shost; i2o_shost =i2o_scsi_get_host (c);
@@ -717,7 +717,7 @@* Returns 0 if the command is successfully aborted or negative error code * on failure. */ -int i2o_scsi_abort (struct scsi_cmnd *SCpnt) +static int i2o_scsi_abort (struct scsi_cmnd *SCpnt) {struct i2o_device *i2o_dev;struct i2o_controller *c;
drivers/message/i2o/iop.c renamed from drivers/message/i2o/iop.c.old +4 -3
@@ -38,6 +38,8 @@*/ static struct i2o_dma i2o_systab; +static int i2o_hrt_get (struct i2o_controller *c); +/* Module internal functions from other sources */ extern struct i2o_driver i2o_exec_driver;extern int i2o_exec_lct_get (struct i2o_controller *);
@@ -564,7 +566,7 @@* * Returns 0 on success or a negative errno code on failure. */ -int i2o_iop_init_outbound_queue (struct i2o_controller *c) +static int i2o_iop_init_outbound_queue (struct i2o_controller *c) {u8 *status = c->status.virt;u32 m;
@@ -1050,7 +1052,7 @@* * Returns 0 on success or negativer error code on failure. */ -int i2o_hrt_get (struct i2o_controller *c) +static int i2o_hrt_get (struct i2o_controller *c) {int rc;int i;
@@ -1310,5 +1312,4 @@EXPORT_SYMBOL (i2o_iop_find_device);EXPORT_SYMBOL (i2o_event_register);EXPORT_SYMBOL (i2o_status_get); -EXPORT_SYMBOL (i2o_hrt_get);EXPORT_SYMBOL (i2o_controllers);