diff mbox series

power: supply: surface-charger: Fix type of integer variable

Message ID 20210511092421.1928586-1-luzmaximilian@gmail.com
State Accepted
Commit 601423bc0c06467d019cf2a446962a5bf1b5e330
Headers show
Series power: supply: surface-charger: Fix type of integer variable | expand

Commit Message

Maximilian Luz May 11, 2021, 9:24 a.m. UTC
The ac->state field is __le32, not u32. So change the variable we're
temporarily storing it in to __le32 as well.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: e61ffb344591 ("power: supply: Add AC driver for Surface Aggregator Module")
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
---
 drivers/power/supply/surface_charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Maximilian Luz June 3, 2021, 6:37 p.m. UTC | #1
On 5/11/21 11:24 AM, Maximilian Luz wrote:
> The ac->state field is __le32, not u32. So change the variable we're

> temporarily storing it in to __le32 as well.

> 

> Reported-by: kernel test robot <lkp@intel.com>

> Fixes: e61ffb344591 ("power: supply: Add AC driver for Surface Aggregator Module")

> Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>


Friendly ping :)

> ---

>   drivers/power/supply/surface_charger.c | 2 +-

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

> 

> diff --git a/drivers/power/supply/surface_charger.c b/drivers/power/supply/surface_charger.c

> index 81a5b79822c9..a060c36c7766 100644

> --- a/drivers/power/supply/surface_charger.c

> +++ b/drivers/power/supply/surface_charger.c

> @@ -66,7 +66,7 @@ struct spwr_ac_device {

>   

>   static int spwr_ac_update_unlocked(struct spwr_ac_device *ac)

>   {

> -	u32 old = ac->state;

> +	__le32 old = ac->state;

>   	int status;

>   

>   	lockdep_assert_held(&ac->lock);

>
Sebastian Reichel June 4, 2021, 12:58 p.m. UTC | #2
Hi,

On Thu, Jun 03, 2021 at 08:37:13PM +0200, Maximilian Luz wrote:
> On 5/11/21 11:24 AM, Maximilian Luz wrote:

> > The ac->state field is __le32, not u32. So change the variable we're

> > temporarily storing it in to __le32 as well.

> > 

> > Reported-by: kernel test robot <lkp@intel.com>

> > Fixes: e61ffb344591 ("power: supply: Add AC driver for Surface Aggregator Module")

> > Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>

> 

> Friendly ping :)


Thanks, this has now been queued to my fixes branch.

-- Sebastian

> > ---

> >   drivers/power/supply/surface_charger.c | 2 +-

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

> > 

> > diff --git a/drivers/power/supply/surface_charger.c b/drivers/power/supply/surface_charger.c

> > index 81a5b79822c9..a060c36c7766 100644

> > --- a/drivers/power/supply/surface_charger.c

> > +++ b/drivers/power/supply/surface_charger.c

> > @@ -66,7 +66,7 @@ struct spwr_ac_device {

> >   static int spwr_ac_update_unlocked(struct spwr_ac_device *ac)

> >   {

> > -	u32 old = ac->state;

> > +	__le32 old = ac->state;

> >   	int status;

> >   	lockdep_assert_held(&ac->lock);

> >
diff mbox series

Patch

diff --git a/drivers/power/supply/surface_charger.c b/drivers/power/supply/surface_charger.c
index 81a5b79822c9..a060c36c7766 100644
--- a/drivers/power/supply/surface_charger.c
+++ b/drivers/power/supply/surface_charger.c
@@ -66,7 +66,7 @@  struct spwr_ac_device {
 
 static int spwr_ac_update_unlocked(struct spwr_ac_device *ac)
 {
-	u32 old = ac->state;
+	__le32 old = ac->state;
 	int status;
 
 	lockdep_assert_held(&ac->lock);