summaryrefslogtreecommitdiff
path: root/drivers/staging/wfx/bus_sdio.c
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2019-10-08 09:43:01 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-08 14:44:56 +0200
commitb5be2aa3b3ac153f056f93406c520dc74a1cebbe (patch)
tree97bd40357c828e475d64c31e63432bb05d4f7781 /drivers/staging/wfx/bus_sdio.c
parent51f589c82f6d4b3c9e417b39141836fb3db86093 (diff)
staging: wfx: drop calls to BUG_ON()
Most of calls to BUG_ON() could replaced by WARN(). By the way, this patch also try to favor WARN() (that include a comment about the problem) instead of WARN_ON(). Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191008094232.10014-7-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/bus_sdio.c')
-rw-r--r--drivers/staging/wfx/bus_sdio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c
index 05f02c278782..f97360513150 100644
--- a/drivers/staging/wfx/bus_sdio.c
+++ b/drivers/staging/wfx/bus_sdio.c
@@ -37,7 +37,7 @@ static int wfx_sdio_copy_from_io(void *priv, unsigned int reg_id,
unsigned int sdio_addr = reg_id << 2;
int ret;
- BUG_ON(reg_id > 7);
+ WARN(reg_id > 7, "chip only has 7 registers");
WARN(((uintptr_t) dst) & 3, "unaligned buffer size");
WARN(count & 3, "unaligned buffer address");
@@ -58,7 +58,7 @@ static int wfx_sdio_copy_to_io(void *priv, unsigned int reg_id,
unsigned int sdio_addr = reg_id << 2;
int ret;
- BUG_ON(reg_id > 7);
+ WARN(reg_id > 7, "chip only has 7 registers");
WARN(((uintptr_t) src) & 3, "unaligned buffer size");
WARN(count & 3, "unaligned buffer address");