From 5767d25f0d0933ebba111dfb6ae5c820add8d8e4 Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Wed, 25 Jun 2014 17:05:49 -0400 Subject: mptfusion: mark file-private functions as static Fixes the following sparse warnings: drivers/message/fusion/mptbase.c:7011:1: warning: symbol 'mpt_SoftResetHandler' was not declared. Should it be static? drivers/message/fusion/mptsas.c:1578:23: warning: symbol 'mptsas_refreshing_device_handles' was not declared. Should it be static? drivers/message/fusion/mptsas.c:3653:24: warning: symbol 'mptsas_expander_add' was not declared. Should it be static? drivers/message/fusion/mptsas.c:5327:1: warning: symbol 'mptsas_shutdown' was not declared. Should it be static? drivers/message/fusion/mptspi.c:624:1: warning: symbol 'mptscsih_quiesce_raid' was not declared. Should it be static? Signed-off-by: Joe Lawrence Acked-by: Sreekanth Reddy Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig --- drivers/message/fusion/mptspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/message/fusion/mptspi.c') diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 49d11338294b..7b4db9acf7d7 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c @@ -620,7 +620,7 @@ static void mptspi_read_parameters(struct scsi_target *starget) spi_width(starget) = (nego & MPI_SCSIDEVPAGE0_NP_WIDE) ? 1 : 0; } -int +static int mptscsih_quiesce_raid(MPT_SCSI_HOST *hd, int quiesce, u8 channel, u8 id) { MPT_ADAPTER *ioc = hd->ioc; -- cgit v1.2.3 From 5074b1b60edd47e0ce4485e57990f7ca75c3e67e Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Wed, 25 Jun 2014 17:06:02 -0400 Subject: mptfusion: remove redundant kfree checks Fixes the following smatch warnings: drivers/message/fusion/mptfc.c:529 mptfc_target_destroy() info: redundant null check on starget->hostdata calling kfree() drivers/message/fusion/mptspi.c:465 mptspi_target_destroy() info: redundant null check on starget->hostdata calling kfree() Signed-off-by: Joe Lawrence Acked-by: Sreekanth Reddy Signed-off-by: Christoph Hellwig --- drivers/message/fusion/mptfc.c | 3 +-- drivers/message/fusion/mptspi.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/message/fusion/mptspi.c') diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index bf2a2cef562b..d8bf84aef602 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c @@ -525,8 +525,7 @@ mptfc_target_destroy(struct scsi_target *starget) if (ri) /* better be! */ ri->starget = NULL; } - if (starget->hostdata) - kfree(starget->hostdata); + kfree(starget->hostdata); starget->hostdata = NULL; } diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 7b4db9acf7d7..787933d43d32 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c @@ -461,8 +461,7 @@ static int mptspi_target_alloc(struct scsi_target *starget) static void mptspi_target_destroy(struct scsi_target *starget) { - if (starget->hostdata) - kfree(starget->hostdata); + kfree(starget->hostdata); starget->hostdata = NULL; } -- cgit v1.2.3