Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1595291 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2017-03-08 16:40 +0100 |
| Last post | 2017-03-09 12:50 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 16/26] IB/ocrdma: Adjust a null pointer check in ocrdma_alloc_resources() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-03-08 16:40 +0100
Re: [PATCH 16/26] IB/ocrdma: Adjust a null pointer check in ocrdma_alloc_resources() Yuval Shaia <yuval.shaia@oracle.com> - 2017-03-09 12:50 +0100
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-03-08 16:40 +0100 |
| Subject | [PATCH 16/26] IB/ocrdma: Adjust a null pointer check in ocrdma_alloc_resources() |
| Message-ID | <tiLxF-8ng-35@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Tue, 7 Mar 2017 22:34:33 +0100 The script "checkpatch.pl" pointed information out like the following. Comparison to NULL could be written "!dev->stag_arr". Thus fix the affected source code place. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c index 93113feeb2d5..fbf672c79d5f 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c @@ -238,7 +238,7 @@ static int ocrdma_alloc_resources(struct ocrdma_dev *dev) dev->stag_arr = kcalloc(OCRDMA_MAX_STAG, sizeof(*dev->stag_arr), GFP_KERNEL); - if (dev->stag_arr == NULL) + if (!dev->stag_arr) goto alloc_err; ocrdma_alloc_pd_pool(dev); -- 2.12.0
[toc] | [next] | [standalone]
| From | Yuval Shaia <yuval.shaia@oracle.com> |
|---|---|
| Date | 2017-03-09 12:50 +0100 |
| Message-ID | <tj4JZ-4BF-49@gated-at.bofh.it> |
| In reply to | #1595291 |
On Wed, Mar 08, 2017 at 02:15:34PM +0100, SF Markus Elfring wrote: > From: Markus Elfring <elfring@users.sourceforge.net> > Date: Tue, 7 Mar 2017 22:34:33 +0100 > > The script "checkpatch.pl" pointed information out like the following. > > Comparison to NULL could be written "!dev->stag_arr". > > Thus fix the affected source code place. > > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> > --- > drivers/infiniband/hw/ocrdma/ocrdma_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c > index 93113feeb2d5..fbf672c79d5f 100644 > --- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c > +++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c > @@ -238,7 +238,7 @@ static int ocrdma_alloc_resources(struct ocrdma_dev *dev) > > dev->stag_arr = kcalloc(OCRDMA_MAX_STAG, sizeof(*dev->stag_arr), > GFP_KERNEL); > - if (dev->stag_arr == NULL) > + if (!dev->stag_arr) > goto alloc_err; Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> > > ocrdma_alloc_pd_pool(dev); > -- > 2.12.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web