diff mbox series

[for-next,v2,09/12] RDMA/bnxt_re: Use GFP_KERNEL in non atomic context

Message ID 1631709163-2287-10-git-send-email-selvin.xavier@broadcom.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show
Series RDMA/bnxt_re: Driver update | expand

Commit Message

Selvin Xavier Sept. 15, 2021, 12:32 p.m. UTC
Use GFP_KERNEL instead of GFP_ATOMIC while allocating
control path structures which will be only called from
non atomic context

Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
---
v1->v2:
	Using GFP_KERNEL in bnxt_re_netdev_event also
 drivers/infiniband/hw/bnxt_re/main.c       | 2 +-
 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Leon Romanovsky Sept. 20, 2021, 1:19 p.m. UTC | #1
On Wed, Sep 15, 2021 at 05:32:40AM -0700, Selvin Xavier wrote:
> Use GFP_KERNEL instead of GFP_ATOMIC while allocating
> control path structures which will be only called from
> non atomic context
> 
> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
> ---
> v1->v2:
> 	Using GFP_KERNEL in bnxt_re_netdev_event also
>  drivers/infiniband/hw/bnxt_re/main.c       | 2 +-
>  drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
index 4214674..488a160 100644
--- a/drivers/infiniband/hw/bnxt_re/main.c
+++ b/drivers/infiniband/hw/bnxt_re/main.c
@@ -1731,7 +1731,7 @@  static int bnxt_re_netdev_event(struct notifier_block *notifier,
 	}
 	if (sch_work) {
 		/* Allocate for the deferred task */
-		re_work = kzalloc(sizeof(*re_work), GFP_ATOMIC);
+		re_work = kzalloc(sizeof(*re_work), GFP_KERNEL);
 		if (re_work) {
 			get_device(&rdev->ibdev.dev);
 			re_work->rdev = rdev;
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
index 947e8c5..3de8547 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
@@ -848,13 +848,13 @@  struct bnxt_qplib_rcfw_sbuf *bnxt_qplib_rcfw_alloc_sbuf(
 {
 	struct bnxt_qplib_rcfw_sbuf *sbuf;
 
-	sbuf = kzalloc(sizeof(*sbuf), GFP_ATOMIC);
+	sbuf = kzalloc(sizeof(*sbuf), GFP_KERNEL);
 	if (!sbuf)
 		return NULL;
 
 	sbuf->size = size;
 	sbuf->sb = dma_alloc_coherent(&rcfw->pdev->dev, sbuf->size,
-				      &sbuf->dma_addr, GFP_ATOMIC);
+				      &sbuf->dma_addr, GFP_KERNEL);
 	if (!sbuf->sb)
 		goto bail;