From: Ozgur Karatas <okaratas@member.fsf.org>
To: yishaih@mellanox.com
Cc: netdev <netdev@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/1] Fixed to BUG_ON to WARN_ON def
Date: Mon, 12 Dec 2016 12:58:59 +0200 [thread overview]
Message-ID: <811031481540339@web1j.yandex.ru> (raw)
Hello all,
I think should be use to "WARN_ON" and checkpatch script give to error, I fixed and I think should don't use "BUG_ON".
Regards,
Signed-off-by: Ozgur Karatas <okaratas@member.fsf.org>
---
drivers/net/ethernet/mellanox/mlx4/icm.c | 4 ++--
diff --git a/drivers/net/ethernet/mellanox/mlx4/icm.c b/drivers/net/ethernet/mellanox/mlx4/icm.c
index 2a9dd46..3fde535 100644
--- a/drivers/net/ethernet/mellanox/mlx4/icm.c
+++ b/drivers/net/ethernet/mellanox/mlx4/icm.c
@@ -119,7 +119,7 @@ static int mlx4_alloc_icm_coherent(struct device *dev, struct scatterlist *mem,
return -ENOMEM;
sg_set_buf(mem, buf, PAGE_SIZE << order);
- BUG_ON(mem->offset);
+ WARN_ON(mem->offset);
sg_dma_len(mem) = PAGE_SIZE << order;
return 0;
}
@@ -133,7 +133,7 @@ struct mlx4_icm *mlx4_alloc_icm(struct mlx4_dev *dev, int npages,
int ret;
/* We use sg_set_buf for coherent allocs, which assumes low memory */
- BUG_ON(coherent && (gfp_mask & __GFP_HIGHMEM));
+ WARN_ON(coherent && (gfp_mask & __GFP_HIGHMEM));
icm = kmalloc_node(sizeof(*icm),
gfp_mask & ~(__GFP_HIGHMEM | __GFP_NOWARN),
--
2.1.4
next reply other threads:[~2016-12-12 11:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-12 10:58 Ozgur Karatas [this message]
2016-12-12 11:19 ` Stefan Schmidt
2016-12-12 11:32 ` [PATCH 1/1] Fixed to BUG_ON to WARN_ON Ozgur Karatas
2016-12-12 12:39 ` [PATCH 1/1] Fixed to BUG_ON to WARN_ON def Leon Romanovsky
2016-12-12 13:04 ` Ozgur Karatas
2016-12-12 18:18 ` Leon Romanovsky
2016-12-12 20:24 ` Ozgur Karatas
2016-12-14 12:58 ` Tariq Toukan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=811031481540339@web1j.yandex.ru \
--to=okaratas@member.fsf.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yishaih@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome