]> git.baikalelectronics.ru Git - kernel.git/commit
mfd: sprd-sc27xx-spi: Fix-up bogus IRQ register offset and mask setting
authorLee Jones <lee.jones@linaro.org>
Thu, 25 Jun 2020 08:39:11 +0000 (09:39 +0100)
committerLee Jones <lee.jones@linaro.org>
Mon, 6 Jul 2020 07:32:05 +0000 (08:32 +0100)
commit0703f1495b5cede301c0ddbddee08db919933244
tree61b441e8d1865508a6d7ac68e7edbe2cb4cfc386
parent3cde40d20f334a1f21c12a96d3b0de085fc07dcf
mfd: sprd-sc27xx-spi: Fix-up bogus IRQ register offset and mask setting

'i / pdata->num_irqs' always equates to 0 and 'BIT(i % pdata->num_irqs)'
always ends up being BIT(i) here, so make that clearer in the code.  If
the code base needs to support more than 32 IRQs in the future, this will
have to be reworked, but lets just keep it simple for as long as we can.

This fixes the following W=1 warning:

 drivers/mfd/sprd-sc27xx-spi.c:255 sprd_pmic_probe() debug: sval_binop_unsigned: divide by zero

Cc: Orson Zhai <orsonzhai@gmail.com>
Cc: Chunyan Zhang <zhang.lyra@gmail.com>
Suggested-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/sprd-sc27xx-spi.c