[openib-general] Re: [PATCH applied] kill dead code around kmap_atomic
Michael S. Tsirkin
mst at mellanox.co.il
Thu Dec 15 00:49:45 PST 2005
Quoting r. Michael S. Tsirkin <mst at mellanox.co.il>:
> Subject: [PATCH applied] kill dead code around kmap_atomic
>
> kmap_atomic never returns NULL.
>
> Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Sorry, wrong patch. Here it is:
Index: linux-2.6.14/drivers/infiniband/ulp/sdp/sdp_send.c
===================================================================
--- linux-2.6.14.orig/drivers/infiniband/ulp/sdp/sdp_send.c 2005-12-15 13:25:11.000000000 +0200
+++ linux-2.6.14/drivers/infiniband/ulp/sdp/sdp_send.c 2005-12-15 13:25:49.000000000 +0200
@@ -639,11 +639,6 @@ static int sdp_send_data_iocb_src(struct
local_irq_save(flags);
addr = kmap_atomic(iocb->page_array[pos], KM_IRQ0);
- if (!addr) {
- result = -ENOMEM;
- local_irq_restore(flags);
- goto error;
- }
memcpy(buff->tail, addr + off, len);
@@ -711,10 +706,6 @@ static int sdp_send_iocb_buff_write(stru
local_irq_save(flags);
addr = kmap_atomic(iocb->page_array[counter], KM_IRQ0);
- if (!addr) {
- local_irq_restore(flags);
- break;
- }
copy = min(PAGE_SIZE - offset,
(unsigned long)(buff->end - buff->tail));
Index: linux-2.6.14/drivers/infiniband/ulp/sdp/sdp_recv.c
===================================================================
--- linux-2.6.14.orig/drivers/infiniband/ulp/sdp/sdp_recv.c 2005-12-15 13:25:11.000000000 +0200
+++ linux-2.6.14/drivers/infiniband/ulp/sdp/sdp_recv.c 2005-12-15 13:25:53.000000000 +0200
@@ -599,8 +599,6 @@ static int sdp_read_buff_iocb(struct sdp
local_irq_save(flags);
addr = kmap_atomic(iocb->page_array[counter], KM_IRQ0);
- if (!addr)
- break;
copy = min(PAGE_SIZE - offset,
(unsigned long)(buff->tail - buff->data));
--
MST
More information about the general
mailing list