diff mbox series

[4/5] pinctrl: mediatek: pinctrl-mtk-common-v2: Make eint_m u16

Message ID 20181008191411.32555-5-manivannan.sadhasivam@linaro.org
State New
Headers show
Series Add initial pinctrl support for MT6797 SoC | expand

Commit Message

Manivannan Sadhasivam Oct. 8, 2018, 7:14 p.m. UTC
For SoC's which lacks EINT support, U16_MAX is assigned to both eint_m
and eint_n through macro NO_EINT_SUPPORT. This will generate integer
overflow warning because eint_m is declared as u8 type. Hence modify
the eint_m type to u16.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

---
 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

Comments

Matthias Brugger Oct. 11, 2018, 9:29 a.m. UTC | #1
On 08/10/2018 21:14, Manivannan Sadhasivam wrote:
> For SoC's which lacks EINT support, U16_MAX is assigned to both eint_m

> and eint_n through macro NO_EINT_SUPPORT. This will generate integer

> overflow warning because eint_m is declared as u8 type. Hence modify

> the eint_m type to u16.

> 

> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>


Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>


> ---

>  drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h

> index 991c1c56670c..6d24522739d9 100644

> --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h

> +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h

> @@ -154,7 +154,7 @@ struct mtk_func_desc {

>   * @eitn_n:		the eint number for this pin

>   */

>  struct mtk_eint_desc {

> -	u8 eint_m;

> +	u16 eint_m;

>  	u16 eint_n;

>  };

>  

>
diff mbox series

Patch

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
index 991c1c56670c..6d24522739d9 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
@@ -154,7 +154,7 @@  struct mtk_func_desc {
  * @eitn_n:		the eint number for this pin
  */
 struct mtk_eint_desc {
-	u8 eint_m;
+	u16 eint_m;
 	u16 eint_n;
 };