* [PATCH 0/3] IB-iSER: Adjustments for three function implementations
@ 2018-01-27 18:17 SF Markus Elfring
2018-01-27 18:18 ` [PATCH 1/3] IB/iser: Delete an error message for a failed memory allocation in iser_send_data_out() SF Markus Elfring
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: SF Markus Elfring @ 2018-01-27 18:17 UTC (permalink / raw)
To: linux-rdma, Doug Ledford, Jason Gunthorpe, Or Gerlitz, Roi Dayan,
Sagi Grimberg
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 27 Jan 2018 19:02:34 +0100
Three update suggestions were taken into account
from static source code analysis.
Markus Elfring (3):
Delete an error message for a failed memory allocation in iser_send_data_out()
Delete an unnecessary variable initialisation in iser_send_data_out()
Combine substrings for three messages
drivers/infiniband/ulp/iser/iser_initiator.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
--
2.16.1
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/3] IB/iser: Delete an error message for a failed memory allocation in iser_send_data_out() 2018-01-27 18:17 [PATCH 0/3] IB-iSER: Adjustments for three function implementations SF Markus Elfring @ 2018-01-27 18:18 ` SF Markus Elfring 2018-01-27 18:20 ` [PATCH 2/3] IB/iser: Delete an unnecessary variable initialisation " SF Markus Elfring ` (2 subsequent siblings) 3 siblings, 0 replies; 7+ messages in thread From: SF Markus Elfring @ 2018-01-27 18:18 UTC (permalink / raw) To: linux-rdma, Doug Ledford, Jason Gunthorpe, Or Gerlitz, Roi Dayan, Sagi Grimberg Cc: LKML, kernel-janitors From: Markus Elfring <elfring@users.sourceforge.net> Date: Sat, 27 Jan 2018 17:48:47 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/infiniband/ulp/iser/iser_initiator.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c index 2a07692007bd..3ae2571ba5b4 100644 --- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ b/drivers/infiniband/ulp/iser/iser_initiator.c @@ -452,10 +452,8 @@ int iser_send_data_out(struct iscsi_conn *conn, __func__,(int)itt,(int)data_seg_len,(int)buf_offset); tx_desc = kmem_cache_zalloc(ig.desc_cache, GFP_ATOMIC); - if (tx_desc = NULL) { - iser_err("Failed to alloc desc for post dataout\n"); + if (!tx_desc) return -ENOMEM; - } tx_desc->type = ISCSI_TX_DATAOUT; tx_desc->cqe.done = iser_dataout_comp; -- 2.16.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] IB/iser: Delete an unnecessary variable initialisation in iser_send_data_out() 2018-01-27 18:17 [PATCH 0/3] IB-iSER: Adjustments for three function implementations SF Markus Elfring 2018-01-27 18:18 ` [PATCH 1/3] IB/iser: Delete an error message for a failed memory allocation in iser_send_data_out() SF Markus Elfring @ 2018-01-27 18:20 ` SF Markus Elfring [not found] ` <00e8b16f-c856-8999-fe93-2724a2f6a56e-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org> 2018-01-28 14:41 ` [PATCH 0/3] IB-iSER: Adjustments for three function implementations Max Gurtovoy 3 siblings, 0 replies; 7+ messages in thread From: SF Markus Elfring @ 2018-01-27 18:20 UTC (permalink / raw) To: linux-rdma, Doug Ledford, Jason Gunthorpe, Or Gerlitz, Roi Dayan, Sagi Grimberg Cc: LKML, kernel-janitors From: Markus Elfring <elfring@users.sourceforge.net> Date: Sat, 27 Jan 2018 17:55:13 +0100 The variable "tx_desc" will be set to an appropriate pointer a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/infiniband/ulp/iser/iser_initiator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c index 3ae2571ba5b4..1425c4957a04 100644 --- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ b/drivers/infiniband/ulp/iser/iser_initiator.c @@ -436,7 +436,7 @@ int iser_send_data_out(struct iscsi_conn *conn, { struct iser_conn *iser_conn = conn->dd_data; struct iscsi_iser_task *iser_task = task->dd_data; - struct iser_tx_desc *tx_desc = NULL; + struct iser_tx_desc *tx_desc; struct iser_mem_reg *mem_reg; unsigned long buf_offset; unsigned long data_seg_len; -- 2.16.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
[parent not found: <00e8b16f-c856-8999-fe93-2724a2f6a56e-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>]
* [PATCH 3/3] IB/iser: Combine substrings for three messages [not found] ` <00e8b16f-c856-8999-fe93-2724a2f6a56e-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org> @ 2018-01-27 18:21 ` SF Markus Elfring 0 siblings, 0 replies; 7+ messages in thread From: SF Markus Elfring @ 2018-01-27 18:21 UTC (permalink / raw) To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Doug Ledford, Jason Gunthorpe, Or Gerlitz, Roi Dayan, Sagi Grimberg Cc: LKML, kernel-janitors-u79uwXL29TY76Z2rM5mHXA From: Markus Elfring <elfring@users.sourceforge.net> Date: Sat, 27 Jan 2018 18:25:37 +0100 The script "checkpatch.pl" pointed information out like the following. WARNING: quoted string split across lines Thus fix the affected source code places. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/infiniband/ulp/iser/iser_initiator.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c index 1425c4957a04..df49c4eb67f7 100644 --- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ b/drivers/infiniband/ulp/iser/iser_initiator.c @@ -142,8 +142,7 @@ iser_prepare_write_cmd(struct iscsi_task *task, hdr->write_va = cpu_to_be64(mem_reg->sge.addr + unsol_sz); } - iser_dbg("Cmd itt:%d, WRITE tags, RKEY:%#.4X " - "VA:%#llX + unsol:%d\n", + iser_dbg("Cmd itt:%d, WRITE tags, RKEY:%#.4X VA:%#llX + unsol:%d\n", task->itt, mem_reg->rkey, (unsigned long long)mem_reg->sge.addr, unsol_sz); } @@ -473,8 +472,7 @@ int iser_send_data_out(struct iscsi_conn *conn, tx_desc->num_sge = 2; if (buf_offset + data_seg_len > iser_task->data[ISER_DIR_OUT].data_len) { - iser_err("Offset:%ld & DSL:%ld in Data-Out " - "inconsistent with total len:%ld, itt:%d\n", + iser_err("Offset:%ld & DSL:%ld in Data-Out inconsistent with total len:%ld, itt:%d\n", buf_offset, data_seg_len, iser_task->data[ISER_DIR_OUT].data_len, itt); err = -EINVAL; @@ -612,8 +610,8 @@ iser_check_remote_inv(struct iser_conn *iser_conn, iser_conn, rkey); if (unlikely(!iser_conn->snd_w_inv)) { - iser_err("conn %p: unexpected remote invalidation, " - "terminating connection\n", iser_conn); + iser_err("conn %p: unexpected remote invalidation, terminating connection\n", + iser_conn); return -EPROTO; } -- 2.16.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] IB-iSER: Adjustments for three function implementations 2018-01-27 18:17 [PATCH 0/3] IB-iSER: Adjustments for three function implementations SF Markus Elfring ` (2 preceding siblings ...) [not found] ` <00e8b16f-c856-8999-fe93-2724a2f6a56e-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org> @ 2018-01-28 14:41 ` Max Gurtovoy 2018-01-28 21:10 ` Jason Gunthorpe 3 siblings, 1 reply; 7+ messages in thread From: Max Gurtovoy @ 2018-01-28 14:41 UTC (permalink / raw) To: SF Markus Elfring, linux-rdma, Doug Ledford, Jason Gunthorpe, Or Gerlitz, Roi Dayan, Sagi Grimberg Cc: LKML, kernel-janitors On 1/27/2018 8:17 PM, SF Markus Elfring wrote: > From: Markus Elfring <elfring@users.sourceforge.net> > Date: Sat, 27 Jan 2018 19:02:34 +0100 > > Three update suggestions were taken into account > from static source code analysis. > > Markus Elfring (3): > Delete an error message for a failed memory allocation in iser_send_data_out() > Delete an unnecessary variable initialisation in iser_send_data_out() > Combine substrings for three messages > > drivers/infiniband/ulp/iser/iser_initiator.c | 16 ++++++---------- > 1 file changed, 6 insertions(+), 10 deletions(-) > This series looks good to me, Reviewed-by: Max Gurtovoy <maxg@mellanox.com> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] IB-iSER: Adjustments for three function implementations 2018-01-28 14:41 ` [PATCH 0/3] IB-iSER: Adjustments for three function implementations Max Gurtovoy @ 2018-01-28 21:10 ` Jason Gunthorpe [not found] ` <20180128211050.GM23869-uk2M96/98Pc@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Jason Gunthorpe @ 2018-01-28 21:10 UTC (permalink / raw) To: Max Gurtovoy Cc: SF Markus Elfring, linux-rdma, Doug Ledford, Or Gerlitz, Roi Dayan, Sagi Grimberg, LKML, kernel-janitors On Sun, Jan 28, 2018 at 04:41:16PM +0200, Max Gurtovoy wrote: > > > On 1/27/2018 8:17 PM, SF Markus Elfring wrote: > >From: Markus Elfring <elfring@users.sourceforge.net> > >Date: Sat, 27 Jan 2018 19:02:34 +0100 > > > >Three update suggestions were taken into account > >from static source code analysis. > > > >Markus Elfring (3): > > Delete an error message for a failed memory allocation in iser_send_data_out() > > Delete an unnecessary variable initialisation in iser_send_data_out() > > Combine substrings for three messages > > > > drivers/infiniband/ulp/iser/iser_initiator.c | 16 ++++++---------- > > 1 file changed, 6 insertions(+), 10 deletions(-) > > > > This series looks good to me, > > Reviewed-by: Max Gurtovoy <maxg@mellanox.com> Okay, applied to for-next, thanks both Jason ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <20180128211050.GM23869-uk2M96/98Pc@public.gmane.org>]
* Re: [0/3] IB-iSER: Adjustments for three function implementations [not found] ` <20180128211050.GM23869-uk2M96/98Pc@public.gmane.org> @ 2018-01-29 10:28 ` SF Markus Elfring 0 siblings, 0 replies; 7+ messages in thread From: SF Markus Elfring @ 2018-01-29 10:28 UTC (permalink / raw) To: Jason Gunthorpe, linux-rdma-u79uwXL29TY76Z2rM5mHXA Cc: Max Gurtovoy, Doug Ledford, Or Gerlitz, Roi Dayan, Sagi Grimberg, LKML, kernel-janitors-u79uwXL29TY76Z2rM5mHXA > Okay, applied to for-next, thanks both Thanks for your acceptance. How are the chances for integration of further software updates from my selection of change possibilities? Example: IB/iser: Add spaces for better code readability https://lkml.org/lkml/2017/4/7/667 https://patchwork.kernel.org/patch/9670439/ https://lkml.kernel.org/r/<7e406ba5-f7c8-16a7-9c3e-464e48120088@users.sourceforge.net> Regards, Markus ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-01-29 10:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-27 18:17 [PATCH 0/3] IB-iSER: Adjustments for three function implementations SF Markus Elfring
2018-01-27 18:18 ` [PATCH 1/3] IB/iser: Delete an error message for a failed memory allocation in iser_send_data_out() SF Markus Elfring
2018-01-27 18:20 ` [PATCH 2/3] IB/iser: Delete an unnecessary variable initialisation " SF Markus Elfring
[not found] ` <00e8b16f-c856-8999-fe93-2724a2f6a56e-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
2018-01-27 18:21 ` [PATCH 3/3] IB/iser: Combine substrings for three messages SF Markus Elfring
2018-01-28 14:41 ` [PATCH 0/3] IB-iSER: Adjustments for three function implementations Max Gurtovoy
2018-01-28 21:10 ` Jason Gunthorpe
[not found] ` <20180128211050.GM23869-uk2M96/98Pc@public.gmane.org>
2018-01-29 10:28 ` [0/3] " SF Markus Elfring
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox