[openib-general] [PATCH] IB/iser: Remove unused "write-only" variables

Erez Zilber erezz at voltaire.com
Wed Dec 6 03:29:27 PST 2006


Roland Dreier wrote:
> Remove variables that are set but then never looked at in the iSER
> initiator.  These cleanups came from David Binderman's list of "set
> but never used" warnings from icc.
>
> Signed-off-by: Roland Dreier <rolandd at cisco.com>
> ---
> Erez, does this look OK to merge?
>
>  drivers/infiniband/ulp/iser/iser_initiator.c |    4 ----
>  drivers/infiniband/ulp/iser/iser_memory.c    |    3 +--
>  2 files changed, 1 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c
> index 9b3d79c..e73c87b 100644
> --- a/drivers/infiniband/ulp/iser/iser_initiator.c
> +++ b/drivers/infiniband/ulp/iser/iser_initiator.c
> @@ -487,10 +487,8 @@ int iser_send_control(struct iscsi_conn
>  	struct iscsi_iser_conn *iser_conn = conn->dd_data;
>  	struct iser_desc *mdesc = mtask->dd_data;
>  	struct iser_dto *send_dto = NULL;
> -	unsigned int itt;
>  	unsigned long data_seg_len;
>  	int err = 0;
> -	unsigned char opcode;
>  	struct iser_regd_buf *regd_buf;
>  	struct iser_device *device;
>  
> @@ -512,8 +510,6 @@ int iser_send_control(struct iscsi_conn
>  
>  	iser_reg_single(device, send_dto->regd[0], DMA_TO_DEVICE);
>  
> -	itt = ntohl(mtask->hdr->itt);
> -	opcode = mtask->hdr->opcode & ISCSI_OPCODE_MASK;
>  	data_seg_len = ntoh24(mtask->hdr->dlength);
>  
>  	if (data_seg_len > 0) {
> diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c
> index 0606744..e5a1091 100644
> --- a/drivers/infiniband/ulp/iser/iser_memory.c
> +++ b/drivers/infiniband/ulp/iser/iser_memory.c
> @@ -234,7 +234,7 @@ static int iser_sg_to_page_vec(struct is
>  {
>  	struct scatterlist *sg = (struct scatterlist *)data->buf;
>  	dma_addr_t first_addr, last_addr, page;
> -	int start_aligned, end_aligned;
> +	int end_aligned;
>  	unsigned int cur_page = 0;
>  	unsigned long total_sz = 0;
>  	int i;
> @@ -248,7 +248,6 @@ static int iser_sg_to_page_vec(struct is
>  		first_addr = sg_dma_address(&sg[i]);
>  		last_addr  = first_addr + sg_dma_len(&sg[i]);
>  
> -		start_aligned = !(first_addr & ~MASK_4K);
>  		end_aligned   = !(last_addr  & ~MASK_4K);
>  
>  		/* continue to collect page fragments till aligned or SG ends */
>   
I'm ok with that. Thanks.

-- 

____________________________________________________________

Erez Zilber | 972-9-971-7689

Software Engineer, Storage Team

Voltaire – _The Grid Backbone_

__

www.voltaire.com <http://www.voltaire.com/>







More information about the general mailing list