isci: Removing unused variables compiler warnings
authorDave Jiang <dave.jiang@intel.com>
Wed, 1 Jun 2011 09:03:08 +0000 (09:03 +0000)
committerDan Williams <dan.j.williams@intel.com>
Sun, 3 Jul 2011 11:04:50 +0000 (04:04 -0700)
Newer gcc's are better at identifying "set, but not used" variables.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/scsi/isci/request.c
drivers/scsi/isci/task.c

index 7c0928ed9e630b92087d7e7e9a3b7a9836948f09..31c9b2c342594708020197d4432286cc0d5e1ca7 100644 (file)
@@ -211,11 +211,9 @@ static void scu_ssp_reqeust_construct_task_context(
        struct scu_task_context *task_context)
 {
        dma_addr_t dma_addr;
-       struct scic_sds_controller *controller;
        struct scic_sds_remote_device *target_device;
        struct scic_sds_port *target_port;
 
-       controller = scic_sds_request_get_controller(sds_request);
        target_device = scic_sds_request_get_device(sds_request);
        target_port = scic_sds_request_get_port(sds_request);
 
@@ -384,11 +382,9 @@ static void scu_sata_reqeust_construct_task_context(
        struct scu_task_context *task_context)
 {
        dma_addr_t dma_addr;
-       struct scic_sds_controller *controller;
        struct scic_sds_remote_device *target_device;
        struct scic_sds_port *target_port;
 
-       controller = scic_sds_request_get_controller(sci_req);
        target_device = scic_sds_request_get_device(sci_req);
        target_port = scic_sds_request_get_port(sci_req);
 
@@ -677,12 +673,10 @@ enum sci_status scic_task_request_construct_ssp(
 static enum sci_status scic_io_request_construct_basic_sata(struct scic_sds_request *sci_req)
 {
        enum sci_status status;
-       struct scic_sds_stp_request *stp_req;
        bool copy = false;
        struct isci_request *isci_request = sci_req_to_ireq(sci_req);
        struct sas_task *task = isci_request_access_task(isci_request);
 
-       stp_req = &sci_req->stp.req;
        sci_req->protocol = SCIC_STP_PROTOCOL;
 
        copy = (task->data_dir == DMA_NONE) ? false : true;
@@ -3190,7 +3184,6 @@ scu_smp_request_construct_task_context(struct scic_sds_request *sci_req,
                                       ssize_t req_len)
 {
        dma_addr_t dma_addr;
-       struct scic_sds_controller *scic;
        struct scic_sds_remote_device *sci_dev;
        struct scic_sds_port *sci_port;
        struct scu_task_context *task_context;
@@ -3202,7 +3195,6 @@ scu_smp_request_construct_task_context(struct scic_sds_request *sci_req,
 
        task_context = scic_sds_request_get_task_context(sci_req);
 
-       scic = scic_sds_request_get_controller(sci_req);
        sci_dev = scic_sds_request_get_device(sci_req);
        sci_port = scic_sds_request_get_port(sci_req);
 
index 93c75560a5c768b04468512f836fb03df5acab20..b54ef2b0fca134d1ac47925684da6bdca6046441 100644 (file)
@@ -1358,7 +1358,6 @@ isci_task_request_complete(struct isci_host *ihost,
                           enum sci_task_status completion_status)
 {
        struct isci_remote_device *idev = ireq->isci_device;
-       enum isci_request_status old_state;
        struct isci_tmf *tmf = isci_request_access_tmf(ireq);
        struct completion *tmf_complete;
        struct scic_sds_request *sci_req = &ireq->sci;
@@ -1367,7 +1366,7 @@ isci_task_request_complete(struct isci_host *ihost,
                "%s: request = %p, status=%d\n",
                __func__, ireq, completion_status);
 
-       old_state = isci_request_change_state(ireq, completed);
+       isci_request_change_state(ireq, completed);
 
        tmf->status = completion_status;
        ireq->complete_in_target = true;