The patch below fixes more checkpatch warnings about lines that are over

eighty columns, and more sparse warnings about missing declarations by
inserting the keyword static where appropriate. A sparse warning about a
shadowed variable (ucmd) is also fixed.

This patch has been verified by rereading the patch carefully, and by verifying
that SCST source code still compiles fine.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@538 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2008-10-24 12:11:17 +00:00
parent 6544d6716b
commit 6077bb04e5
5 changed files with 12 additions and 11 deletions

View File

@@ -57,7 +57,7 @@ static struct scst_dev_type changer_devtype = CHANGER_TYPE;
*
* Description:
*************************************************************/
int changer_attach(struct scst_device *dev)
static int changer_attach(struct scst_device *dev)
{
int res = 0;
int retries;
@@ -142,7 +142,7 @@ void changer_detach(struct scst_device *dev)
*
* Note: Not all states are allowed on return
********************************************************************/
int changer_parse(struct scst_cmd *cmd)
static int changer_parse(struct scst_cmd *cmd)
{
int res = SCST_CMD_STATE_DEFAULT;

View File

@@ -57,7 +57,7 @@ static struct scst_dev_type processor_devtype = PROCESSOR_TYPE;
*
* Description:
*************************************************************/
int processor_attach(struct scst_device *dev)
static int processor_attach(struct scst_device *dev)
{
int res = 0;
int retries;
@@ -142,7 +142,7 @@ void processor_detach(struct scst_device *dev)
*
* Note: Not all states are allowed on return
********************************************************************/
int processor_parse(struct scst_cmd *cmd)
static int processor_parse(struct scst_cmd *cmd)
{
int res = SCST_CMD_STATE_DEFAULT;

View File

@@ -57,7 +57,7 @@ static struct scst_dev_type raid_devtype = RAID_TYPE;
*
* Description:
*************************************************************/
int raid_attach(struct scst_device *dev)
static int raid_attach(struct scst_device *dev)
{
int res = 0;
int retries;

View File

@@ -2817,12 +2817,12 @@ static int dev_user_process_cleanup(struct scst_user_dev *dev)
int i;
for (i = 0; i < (int)ARRAY_SIZE(dev->ucmd_hash); i++) {
struct list_head *head = &dev->ucmd_hash[i];
struct scst_user_cmd *ucmd;
struct scst_user_cmd *ucmd2;
again:
list_for_each_entry(ucmd, head, hash_list_entry) {
PRINT_ERROR("Lost ucmd %p (state %x, ref %d)", ucmd,
ucmd->state, atomic_read(&ucmd->ucmd_ref));
ucmd_put(ucmd);
list_for_each_entry(ucmd2, head, hash_list_entry) {
PRINT_ERROR("Lost ucmd %p (state %x, ref %d)", ucmd2,
ucmd2->state, atomic_read(&ucmd2->ucmd_ref));
ucmd_put(ucmd2);
goto again;
}
}

View File

@@ -2202,7 +2202,8 @@ restart:
PRINT_ERROR("lseek trouble %lld != %lld",
(long long unsigned int)err,
(long long unsigned int)loff);
scst_set_cmd_error(cmd, SCST_LOAD_SENSE(scst_sense_hardw_error));
scst_set_cmd_error(cmd,
SCST_LOAD_SENSE(scst_sense_hardw_error));
goto out_set_fs;
}