linux-next: build failure after merge of the pwm tree

Message ID 20231221165805.0c4771c1@canb.auug.org.au
State New
Headers
Series linux-next: build failure after merge of the pwm tree |

Commit Message

Stephen Rothwell Dec. 21, 2023, 5:58 a.m. UTC
  Hi all,

After merging the backlight tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/video/backlight/mp3309c.c: In function 'mp3309c_bl_update_status':
drivers/video/backlight/mp3309c.c:134:23: error: implicit declaration of function 'pwm_apply_state'; did you mean 'pwm_apply_args'? [-Werror=implicit-function-declaration]
  134 |                 ret = pwm_apply_state(chip->pwmd, &pwmstate);
      |                       ^~~~~~~~~~~~~~~
      |                       pwm_apply_args

Caused by commit

  c748a6d77c06 ("pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()")

interacting with commit

  2e914516a58c ("backlight: mp3309c: Add support for MPS MP3309C")

from the backlight tree.

I have appplied the following merge fix patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 21 Dec 2023 16:13:37 +1100
Subject: [PATCH] fix up for "backlight: mp3309c: Add support for MPS MP3309C"

from the backlight tree interacting with commit

  c748a6d77c06 ("pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()")

from the pwm tree.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/video/backlight/mp3309c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Thierry Reding Dec. 21, 2023, 9:25 a.m. UTC | #1
On Thu, Dec 21, 2023 at 04:58:05PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the backlight tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> drivers/video/backlight/mp3309c.c: In function 'mp3309c_bl_update_status':
> drivers/video/backlight/mp3309c.c:134:23: error: implicit declaration of function 'pwm_apply_state'; did you mean 'pwm_apply_args'? [-Werror=implicit-function-declaration]
>   134 |                 ret = pwm_apply_state(chip->pwmd, &pwmstate);
>       |                       ^~~~~~~~~~~~~~~
>       |                       pwm_apply_args
> 
> Caused by commit
> 
>   c748a6d77c06 ("pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()")
> 
> interacting with commit
> 
>   2e914516a58c ("backlight: mp3309c: Add support for MPS MP3309C")
> 
> from the backlight tree.
> 
> I have appplied the following merge fix patch.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 21 Dec 2023 16:13:37 +1100
> Subject: [PATCH] fix up for "backlight: mp3309c: Add support for MPS MP3309C"
> 
> from the backlight tree interacting with commit
> 
>   c748a6d77c06 ("pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()")
> 
> from the pwm tree.
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/video/backlight/mp3309c.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/backlight/mp3309c.c b/drivers/video/backlight/mp3309c.c
> index 34d71259fac1..b0d9aef6942b 100644
> --- a/drivers/video/backlight/mp3309c.c
> +++ b/drivers/video/backlight/mp3309c.c
> @@ -131,7 +131,7 @@ static int mp3309c_bl_update_status(struct backlight_device *bl)
>  					    chip->pdata->levels[brightness],
>  					    chip->pdata->levels[chip->pdata->max_brightness]);
>  		pwmstate.enabled = true;
> -		ret = pwm_apply_state(chip->pwmd, &pwmstate);
> +		ret = pwm_apply_might_sleep(chip->pwmd, &pwmstate);
>  		if (ret)
>  			return ret;
>  
> @@ -393,7 +393,7 @@ static int mp3309c_probe(struct i2c_client *client)
>  					    chip->pdata->default_brightness,
>  					    chip->pdata->max_brightness);
>  		pwmstate.enabled = true;
> -		ret = pwm_apply_state(chip->pwmd, &pwmstate);
> +		ret = pwm_apply_might_sleep(chip->pwmd, &pwmstate);
>  		if (ret)
>  			return dev_err_probe(chip->dev, ret,
>  					     "error setting pwm device\n");

Hi Lee,

We could exchange stable tags to make this work, but given that people
(myself included) are getting into holiday mode I'm inclined to just add
a pwm_apply_state() compatibility inline for now and then we can address
this in the new year or for the next cycle. What do you think?

Thierry
  
Lee Jones Dec. 21, 2023, 10:09 a.m. UTC | #2
On Thu, 21 Dec 2023, Thierry Reding wrote:

> On Thu, Dec 21, 2023 at 04:58:05PM +1100, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the backlight tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> > 
> > drivers/video/backlight/mp3309c.c: In function 'mp3309c_bl_update_status':
> > drivers/video/backlight/mp3309c.c:134:23: error: implicit declaration of function 'pwm_apply_state'; did you mean 'pwm_apply_args'? [-Werror=implicit-function-declaration]
> >   134 |                 ret = pwm_apply_state(chip->pwmd, &pwmstate);
> >       |                       ^~~~~~~~~~~~~~~
> >       |                       pwm_apply_args
> > 
> > Caused by commit
> > 
> >   c748a6d77c06 ("pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()")
> > 
> > interacting with commit
> > 
> >   2e914516a58c ("backlight: mp3309c: Add support for MPS MP3309C")
> > 
> > from the backlight tree.
> > 
> > I have appplied the following merge fix patch.
> > 
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Thu, 21 Dec 2023 16:13:37 +1100
> > Subject: [PATCH] fix up for "backlight: mp3309c: Add support for MPS MP3309C"
> > 
> > from the backlight tree interacting with commit
> > 
> >   c748a6d77c06 ("pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()")
> > 
> > from the pwm tree.
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >  drivers/video/backlight/mp3309c.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/video/backlight/mp3309c.c b/drivers/video/backlight/mp3309c.c
> > index 34d71259fac1..b0d9aef6942b 100644
> > --- a/drivers/video/backlight/mp3309c.c
> > +++ b/drivers/video/backlight/mp3309c.c
> > @@ -131,7 +131,7 @@ static int mp3309c_bl_update_status(struct backlight_device *bl)
> >  					    chip->pdata->levels[brightness],
> >  					    chip->pdata->levels[chip->pdata->max_brightness]);
> >  		pwmstate.enabled = true;
> > -		ret = pwm_apply_state(chip->pwmd, &pwmstate);
> > +		ret = pwm_apply_might_sleep(chip->pwmd, &pwmstate);
> >  		if (ret)
> >  			return ret;
> >  
> > @@ -393,7 +393,7 @@ static int mp3309c_probe(struct i2c_client *client)
> >  					    chip->pdata->default_brightness,
> >  					    chip->pdata->max_brightness);
> >  		pwmstate.enabled = true;
> > -		ret = pwm_apply_state(chip->pwmd, &pwmstate);
> > +		ret = pwm_apply_might_sleep(chip->pwmd, &pwmstate);
> >  		if (ret)
> >  			return dev_err_probe(chip->dev, ret,
> >  					     "error setting pwm device\n");
> 
> Hi Lee,
> 
> We could exchange stable tags to make this work, but given that people
> (myself included) are getting into holiday mode I'm inclined to just add
> a pwm_apply_state() compatibility inline for now and then we can address
> this in the new year or for the next cycle. What do you think?

Sorry, why is this happening?

I still see support for pwm_apply_state() in -next.
  
Sean Young Dec. 21, 2023, 12:13 p.m. UTC | #3
On Thu, Dec 21, 2023 at 10:09:50AM +0000, Lee Jones wrote:
> On Thu, 21 Dec 2023, Thierry Reding wrote:
> 
> > On Thu, Dec 21, 2023 at 04:58:05PM +1100, Stephen Rothwell wrote:
> > > Hi all,
> > > 
> > > After merging the backlight tree, today's linux-next build (x86_64
> > > allmodconfig) failed like this:
> > > 
> > > drivers/video/backlight/mp3309c.c: In function 'mp3309c_bl_update_status':
> > > drivers/video/backlight/mp3309c.c:134:23: error: implicit declaration of function 'pwm_apply_state'; did you mean 'pwm_apply_args'? [-Werror=implicit-function-declaration]
> > >   134 |                 ret = pwm_apply_state(chip->pwmd, &pwmstate);
> > >       |                       ^~~~~~~~~~~~~~~
> > >       |                       pwm_apply_args
> > > 
> > > Caused by commit
> > > 
> > >   c748a6d77c06 ("pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()")
> > > 
> > > interacting with commit
> > > 
> > >   2e914516a58c ("backlight: mp3309c: Add support for MPS MP3309C")
> > > 
> > > from the backlight tree.
> > > 
> > > I have appplied the following merge fix patch.
> > > 
> > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > Date: Thu, 21 Dec 2023 16:13:37 +1100
> > > Subject: [PATCH] fix up for "backlight: mp3309c: Add support for MPS MP3309C"
> > > 
> > > from the backlight tree interacting with commit
> > > 
> > >   c748a6d77c06 ("pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()")
> > > 
> > > from the pwm tree.
> > > 
> > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > ---
> > >  drivers/video/backlight/mp3309c.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/video/backlight/mp3309c.c b/drivers/video/backlight/mp3309c.c
> > > index 34d71259fac1..b0d9aef6942b 100644
> > > --- a/drivers/video/backlight/mp3309c.c
> > > +++ b/drivers/video/backlight/mp3309c.c
> > > @@ -131,7 +131,7 @@ static int mp3309c_bl_update_status(struct backlight_device *bl)
> > >  					    chip->pdata->levels[brightness],
> > >  					    chip->pdata->levels[chip->pdata->max_brightness]);
> > >  		pwmstate.enabled = true;
> > > -		ret = pwm_apply_state(chip->pwmd, &pwmstate);
> > > +		ret = pwm_apply_might_sleep(chip->pwmd, &pwmstate);
> > >  		if (ret)
> > >  			return ret;
> > >  
> > > @@ -393,7 +393,7 @@ static int mp3309c_probe(struct i2c_client *client)
> > >  					    chip->pdata->default_brightness,
> > >  					    chip->pdata->max_brightness);
> > >  		pwmstate.enabled = true;
> > > -		ret = pwm_apply_state(chip->pwmd, &pwmstate);
> > > +		ret = pwm_apply_might_sleep(chip->pwmd, &pwmstate);
> > >  		if (ret)
> > >  			return dev_err_probe(chip->dev, ret,
> > >  					     "error setting pwm device\n");
> > 
> > Hi Lee,
> > 
> > We could exchange stable tags to make this work, but given that people
> > (myself included) are getting into holiday mode I'm inclined to just add
> > a pwm_apply_state() compatibility inline for now and then we can address
> > this in the new year or for the next cycle. What do you think?
> 
> Sorry, why is this happening?
> 
> I still see support for pwm_apply_state() in -next.

Not any more:

$ git grep pwm_apply_state linux-next/master 
$ 


Sean
  
Lee Jones Dec. 21, 2023, 12:51 p.m. UTC | #4
On Thu, 21 Dec 2023, Sean Young wrote:

> On Thu, Dec 21, 2023 at 10:09:50AM +0000, Lee Jones wrote:
> > On Thu, 21 Dec 2023, Thierry Reding wrote:
> > 
> > > On Thu, Dec 21, 2023 at 04:58:05PM +1100, Stephen Rothwell wrote:
> > > > Hi all,
> > > > 
> > > > After merging the backlight tree, today's linux-next build (x86_64
> > > > allmodconfig) failed like this:
> > > > 
> > > > drivers/video/backlight/mp3309c.c: In function 'mp3309c_bl_update_status':
> > > > drivers/video/backlight/mp3309c.c:134:23: error: implicit declaration of function 'pwm_apply_state'; did you mean 'pwm_apply_args'? [-Werror=implicit-function-declaration]
> > > >   134 |                 ret = pwm_apply_state(chip->pwmd, &pwmstate);
> > > >       |                       ^~~~~~~~~~~~~~~
> > > >       |                       pwm_apply_args
> > > > 
> > > > Caused by commit
> > > > 
> > > >   c748a6d77c06 ("pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()")
> > > > 
> > > > interacting with commit
> > > > 
> > > >   2e914516a58c ("backlight: mp3309c: Add support for MPS MP3309C")
> > > > 
> > > > from the backlight tree.
> > > > 
> > > > I have appplied the following merge fix patch.
> > > > 
> > > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > Date: Thu, 21 Dec 2023 16:13:37 +1100
> > > > Subject: [PATCH] fix up for "backlight: mp3309c: Add support for MPS MP3309C"
> > > > 
> > > > from the backlight tree interacting with commit
> > > > 
> > > >   c748a6d77c06 ("pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()")
> > > > 
> > > > from the pwm tree.
> > > > 
> > > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > ---
> > > >  drivers/video/backlight/mp3309c.c | 4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > 
> > > > diff --git a/drivers/video/backlight/mp3309c.c b/drivers/video/backlight/mp3309c.c
> > > > index 34d71259fac1..b0d9aef6942b 100644
> > > > --- a/drivers/video/backlight/mp3309c.c
> > > > +++ b/drivers/video/backlight/mp3309c.c
> > > > @@ -131,7 +131,7 @@ static int mp3309c_bl_update_status(struct backlight_device *bl)
> > > >  					    chip->pdata->levels[brightness],
> > > >  					    chip->pdata->levels[chip->pdata->max_brightness]);
> > > >  		pwmstate.enabled = true;
> > > > -		ret = pwm_apply_state(chip->pwmd, &pwmstate);
> > > > +		ret = pwm_apply_might_sleep(chip->pwmd, &pwmstate);
> > > >  		if (ret)
> > > >  			return ret;
> > > >  
> > > > @@ -393,7 +393,7 @@ static int mp3309c_probe(struct i2c_client *client)
> > > >  					    chip->pdata->default_brightness,
> > > >  					    chip->pdata->max_brightness);
> > > >  		pwmstate.enabled = true;
> > > > -		ret = pwm_apply_state(chip->pwmd, &pwmstate);
> > > > +		ret = pwm_apply_might_sleep(chip->pwmd, &pwmstate);
> > > >  		if (ret)
> > > >  			return dev_err_probe(chip->dev, ret,
> > > >  					     "error setting pwm device\n");
> > > 
> > > Hi Lee,
> > > 
> > > We could exchange stable tags to make this work, but given that people
> > > (myself included) are getting into holiday mode I'm inclined to just add
> > > a pwm_apply_state() compatibility inline for now and then we can address
> > > this in the new year or for the next cycle. What do you think?
> > 
> > Sorry, why is this happening?
> > 
> > I still see support for pwm_apply_state() in -next.
> 
> Not any more:
> 
> $ git grep pwm_apply_state linux-next/master 
> $ 

Okay, that's changed since this morning.

I think the easiest solution would be to take Stephen's patch.
  
Lee Jones Dec. 21, 2023, 12:54 p.m. UTC | #5
On Thu, 21 Dec 2023 16:58:05 +1100, Stephen Rothwell wrote:
> After merging the backlight tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> drivers/video/backlight/mp3309c.c: In function 'mp3309c_bl_update_status':
> drivers/video/backlight/mp3309c.c:134:23: error: implicit declaration of function 'pwm_apply_state'; did you mean 'pwm_apply_args'? [-Werror=implicit-function-declaration]
>   134 |                 ret = pwm_apply_state(chip->pwmd, &pwmstate);
>       |                       ^~~~~~~~~~~~~~~
>       |                       pwm_apply_args
> 
> [...]

Applied, thanks!

[1/1] linux-next: build failure after merge of the pwm tree
      commit: f7baa9ccef93ba1c36a8ecf58c2f4e86fb3181b9

--
Lee Jones [李琼斯]
  
Lee Jones Dec. 21, 2023, 12:58 p.m. UTC | #6
On Thu, 21 Dec 2023, Lee Jones wrote:

> On Thu, 21 Dec 2023 16:58:05 +1100, Stephen Rothwell wrote:
> > After merging the backlight tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> > 
> > drivers/video/backlight/mp3309c.c: In function 'mp3309c_bl_update_status':
> > drivers/video/backlight/mp3309c.c:134:23: error: implicit declaration of function 'pwm_apply_state'; did you mean 'pwm_apply_args'? [-Werror=implicit-function-declaration]
> >   134 |                 ret = pwm_apply_state(chip->pwmd, &pwmstate);
> >       |                       ^~~~~~~~~~~~~~~
> >       |                       pwm_apply_args
> > 
> > [...]
> 
> Applied, thanks!
> 
> [1/1] linux-next: build failure after merge of the pwm tree
>       commit: f7baa9ccef93ba1c36a8ecf58c2f4e86fb3181b9

Actually it's:

  f7baa9ccef93b ("backlight: mp3309c: Rename  pwm_apply_state() to pwm_apply_might_sleep()")

But don't bank on the commit ID staying the same.
  
Thierry Reding Dec. 21, 2023, 6:34 p.m. UTC | #7
On Thu, Dec 21, 2023 at 12:58:01PM +0000, Lee Jones wrote:
> On Thu, 21 Dec 2023, Lee Jones wrote:
> 
> > On Thu, 21 Dec 2023 16:58:05 +1100, Stephen Rothwell wrote:
> > > After merging the backlight tree, today's linux-next build (x86_64
> > > allmodconfig) failed like this:
> > > 
> > > drivers/video/backlight/mp3309c.c: In function 'mp3309c_bl_update_status':
> > > drivers/video/backlight/mp3309c.c:134:23: error: implicit declaration of function 'pwm_apply_state'; did you mean 'pwm_apply_args'? [-Werror=implicit-function-declaration]
> > >   134 |                 ret = pwm_apply_state(chip->pwmd, &pwmstate);
> > >       |                       ^~~~~~~~~~~~~~~
> > >       |                       pwm_apply_args
> > > 
> > > [...]
> > 
> > Applied, thanks!
> > 
> > [1/1] linux-next: build failure after merge of the pwm tree
> >       commit: f7baa9ccef93ba1c36a8ecf58c2f4e86fb3181b9
> 
> Actually it's:
> 
>   f7baa9ccef93b ("backlight: mp3309c: Rename  pwm_apply_state() to pwm_apply_might_sleep()")
> 
> But don't bank on the commit ID staying the same.

This is likely going to break the build on your branch because
pwm_apply_might_sleep() is only available in the PWM tree right now. In
any case, I've now pushed a commit that adds pwm_apply_state() back as a
compatibility stub, so it should be okay for you to drop this if you
run into problems. It's always possible that somebody else wants to add
a new caller of pwm_apply_state() and in retrospect we should've
probably done this from the start, at least as a transitional measure
for one or two cycles.

Thierry
  
Stephen Rothwell Dec. 22, 2023, 1:27 a.m. UTC | #8
Hi all,

On Thu, 21 Dec 2023 19:34:57 +0100 Thierry Reding <thierry.reding@gmail.com> wrote:
>
> On Thu, Dec 21, 2023 at 12:58:01PM +0000, Lee Jones wrote:
> > On Thu, 21 Dec 2023, Lee Jones wrote:
> >   
> > > On Thu, 21 Dec 2023 16:58:05 +1100, Stephen Rothwell wrote:  
> > > > After merging the backlight tree, today's linux-next build (x86_64
> > > > allmodconfig) failed like this:
> > > > 
> > > > drivers/video/backlight/mp3309c.c: In function 'mp3309c_bl_update_status':
> > > > drivers/video/backlight/mp3309c.c:134:23: error: implicit declaration of function 'pwm_apply_state'; did you mean 'pwm_apply_args'? [-Werror=implicit-function-declaration]
> > > >   134 |                 ret = pwm_apply_state(chip->pwmd, &pwmstate);
> > > >       |                       ^~~~~~~~~~~~~~~
> > > >       |                       pwm_apply_args
> > > > 
> > > > [...]  
> > > 
> > > Applied, thanks!
> > > 
> > > [1/1] linux-next: build failure after merge of the pwm tree
> > >       commit: f7baa9ccef93ba1c36a8ecf58c2f4e86fb3181b9  
> > 
> > Actually it's:
> > 
> >   f7baa9ccef93b ("backlight: mp3309c: Rename  pwm_apply_state() to pwm_apply_might_sleep()")
> > 
> > But don't bank on the commit ID staying the same.  
> 
> This is likely going to break the build on your branch because
> pwm_apply_might_sleep() is only available in the PWM tree right now. In

And break it did (since I merge the backlight tree before the pwm
tree), so I used the backlight tree from 20231221.
  
Stephen Rothwell Jan. 2, 2024, 12:47 a.m. UTC | #9
Hi Lee,

On Fri, 22 Dec 2023 12:27:58 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Thu, 21 Dec 2023 19:34:57 +0100 Thierry Reding <thierry.reding@gmail.com> wrote:
> >
> > On Thu, Dec 21, 2023 at 12:58:01PM +0000, Lee Jones wrote:  
> > > On Thu, 21 Dec 2023, Lee Jones wrote:
> > >     
> > > > On Thu, 21 Dec 2023 16:58:05 +1100, Stephen Rothwell wrote:    
> > > > > After merging the backlight tree, today's linux-next build (x86_64
> > > > > allmodconfig) failed like this:
> > > > > 
> > > > > drivers/video/backlight/mp3309c.c: In function 'mp3309c_bl_update_status':
> > > > > drivers/video/backlight/mp3309c.c:134:23: error: implicit declaration of function 'pwm_apply_state'; did you mean 'pwm_apply_args'? [-Werror=implicit-function-declaration]
> > > > >   134 |                 ret = pwm_apply_state(chip->pwmd, &pwmstate);
> > > > >       |                       ^~~~~~~~~~~~~~~
> > > > >       |                       pwm_apply_args
> > > > > 
> > > > > [...]    
> > > > 
> > > > Applied, thanks!
> > > > 
> > > > [1/1] linux-next: build failure after merge of the pwm tree
> > > >       commit: f7baa9ccef93ba1c36a8ecf58c2f4e86fb3181b9    
> > > 
> > > Actually it's:
> > > 
> > >   f7baa9ccef93b ("backlight: mp3309c: Rename  pwm_apply_state() to pwm_apply_might_sleep()")
> > > 
> > > But don't bank on the commit ID staying the same.    
> > 
> > This is likely going to break the build on your branch because
> > pwm_apply_might_sleep() is only available in the PWM tree right now. In  
> 
> And break it did (since I merge the backlight tree before the pwm
> tree), so I used the backlight tree from 20231221.

Please remove that merge fix patch from your tree.
  
Stephen Rothwell Jan. 4, 2024, 12:55 a.m. UTC | #10
Hi all,

On Tue, 2 Jan 2024 11:47:58 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> On Fri, 22 Dec 2023 12:27:58 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > On Thu, 21 Dec 2023 19:34:57 +0100 Thierry Reding <thierry.reding@gmail.com> wrote:  
> > >
> > > On Thu, Dec 21, 2023 at 12:58:01PM +0000, Lee Jones wrote:    
> > > > On Thu, 21 Dec 2023, Lee Jones wrote:
> > > >       
> > > > > On Thu, 21 Dec 2023 16:58:05 +1100, Stephen Rothwell wrote:      
> > > > > > After merging the backlight tree, today's linux-next build (x86_64
> > > > > > allmodconfig) failed like this:
> > > > > > 
> > > > > > drivers/video/backlight/mp3309c.c: In function 'mp3309c_bl_update_status':
> > > > > > drivers/video/backlight/mp3309c.c:134:23: error: implicit declaration of function 'pwm_apply_state'; did you mean 'pwm_apply_args'? [-Werror=implicit-function-declaration]
> > > > > >   134 |                 ret = pwm_apply_state(chip->pwmd, &pwmstate);
> > > > > >       |                       ^~~~~~~~~~~~~~~
> > > > > >       |                       pwm_apply_args
> > > > > > 
> > > > > > [...]      
> > > > > 
> > > > > Applied, thanks!
> > > > > 
> > > > > [1/1] linux-next: build failure after merge of the pwm tree
> > > > >       commit: f7baa9ccef93ba1c36a8ecf58c2f4e86fb3181b9      
> > > > 
> > > > Actually it's:
> > > > 
> > > >   f7baa9ccef93b ("backlight: mp3309c: Rename  pwm_apply_state() to pwm_apply_might_sleep()")
> > > > 
> > > > But don't bank on the commit ID staying the same.      
> > > 
> > > This is likely going to break the build on your branch because
> > > pwm_apply_might_sleep() is only available in the PWM tree right now. In    
> > 
> > And break it did (since I merge the backlight tree before the pwm
> > tree), so I used the backlight tree from 20231221.  
> 
> Please remove that merge fix patch from your tree.

The build of the backlight tree is still failing.
  
Bagas Sanjaya Jan. 4, 2024, 10:02 a.m. UTC | #11
[also add Jingoo (additional backlight maintainer) and Linus]

On Thu, Dec 21, 2023 at 07:34:57PM +0100, Thierry Reding wrote:
> On Thu, Dec 21, 2023 at 12:58:01PM +0000, Lee Jones wrote:
> > On Thu, 21 Dec 2023, Lee Jones wrote:
> > 
> > > On Thu, 21 Dec 2023 16:58:05 +1100, Stephen Rothwell wrote:
> > > > After merging the backlight tree, today's linux-next build (x86_64
> > > > allmodconfig) failed like this:
> > > > 
> > > > drivers/video/backlight/mp3309c.c: In function 'mp3309c_bl_update_status':
> > > > drivers/video/backlight/mp3309c.c:134:23: error: implicit declaration of function 'pwm_apply_state'; did you mean 'pwm_apply_args'? [-Werror=implicit-function-declaration]
> > > >   134 |                 ret = pwm_apply_state(chip->pwmd, &pwmstate);
> > > >       |                       ^~~~~~~~~~~~~~~
> > > >       |                       pwm_apply_args
> > > > 
> > > > [...]
> > > 
> > > Applied, thanks!
> > > 
> > > [1/1] linux-next: build failure after merge of the pwm tree
> > >       commit: f7baa9ccef93ba1c36a8ecf58c2f4e86fb3181b9
> > 
> > Actually it's:
> > 
> >   f7baa9ccef93b ("backlight: mp3309c: Rename  pwm_apply_state() to pwm_apply_might_sleep()")
> > 
> > But don't bank on the commit ID staying the same.
> 
> This is likely going to break the build on your branch because
> pwm_apply_might_sleep() is only available in the PWM tree right now. In
> any case, I've now pushed a commit that adds pwm_apply_state() back as a
> compatibility stub, so it should be okay for you to drop this if you
> run into problems. It's always possible that somebody else wants to add
> a new caller of pwm_apply_state() and in retrospect we should've
> probably done this from the start, at least as a transitional measure
> for one or two cycles.
> 

Hi Lee and Thierry,

I know that we're still on New Year vibes, so some things are not up to full
steam for now; but since we're close to v6.7 release and v6.8 merge window,
hence allow me to ask:

Stephen Rothwell is still complaining about backlight tree build failure
due to f7baa9ccef93b, yet it has not been fixed so far. Has the culprit
been dropped/reverted as he requested? The worst case is the culprit slips
through and become part of backlight PR and Linus will likely not happy
with the build regression (maybe he had to fix by himself).

Thanks.
  
Sean Young Jan. 4, 2024, 12:50 p.m. UTC | #12
On Thu, Jan 04, 2024 at 05:02:41PM +0700, Bagas Sanjaya wrote:
> [also add Jingoo (additional backlight maintainer) and Linus]
> 
> On Thu, Dec 21, 2023 at 07:34:57PM +0100, Thierry Reding wrote:
> > On Thu, Dec 21, 2023 at 12:58:01PM +0000, Lee Jones wrote:
> > > On Thu, 21 Dec 2023, Lee Jones wrote:
> > > 
> > > > On Thu, 21 Dec 2023 16:58:05 +1100, Stephen Rothwell wrote:
> > > > > After merging the backlight tree, today's linux-next build (x86_64
> > > > > allmodconfig) failed like this:
> > > > > 
> > > > > drivers/video/backlight/mp3309c.c: In function 'mp3309c_bl_update_status':
> > > > > drivers/video/backlight/mp3309c.c:134:23: error: implicit declaration of function 'pwm_apply_state'; did you mean 'pwm_apply_args'? [-Werror=implicit-function-declaration]
> > > > >   134 |                 ret = pwm_apply_state(chip->pwmd, &pwmstate);
> > > > >       |                       ^~~~~~~~~~~~~~~
> > > > >       |                       pwm_apply_args
> > > > > 
> > > > > [...]
> > > > 
> > > > Applied, thanks!
> > > > 
> > > > [1/1] linux-next: build failure after merge of the pwm tree
> > > >       commit: f7baa9ccef93ba1c36a8ecf58c2f4e86fb3181b9
> > > 
> > > Actually it's:
> > > 
> > >   f7baa9ccef93b ("backlight: mp3309c: Rename  pwm_apply_state() to pwm_apply_might_sleep()")
> > > 
> > > But don't bank on the commit ID staying the same.
> > 
> > This is likely going to break the build on your branch because
> > pwm_apply_might_sleep() is only available in the PWM tree right now. In
> > any case, I've now pushed a commit that adds pwm_apply_state() back as a
> > compatibility stub, so it should be okay for you to drop this if you
> > run into problems. It's always possible that somebody else wants to add
> > a new caller of pwm_apply_state() and in retrospect we should've
> > probably done this from the start, at least as a transitional measure
> > for one or two cycles.
> > 
> 
> Hi Lee and Thierry,
> 
> I know that we're still on New Year vibes, so some things are not up to full
> steam for now; but since we're close to v6.7 release and v6.8 merge window,
> hence allow me to ask:
> 
> Stephen Rothwell is still complaining about backlight tree build failure
> due to f7baa9ccef93b, yet it has not been fixed so far. Has the culprit
> been dropped/reverted as he requested? The worst case is the culprit slips
> through and become part of backlight PR and Linus will likely not happy
> with the build regression (maybe he had to fix by himself).

This should be fixed by 9a216587a03df, and on current linux-next I can't 
reproduce the problem any more (x86_64 allmodconfig).

Thanks,
Sean
  
Stephen Rothwell Jan. 4, 2024, 10:04 p.m. UTC | #13
Hi all,

On Thu, 4 Jan 2024 12:50:28 +0000 Sean Young <sean@mess.org> wrote:
>
> On Thu, Jan 04, 2024 at 05:02:41PM +0700, Bagas Sanjaya wrote:
> > [also add Jingoo (additional backlight maintainer) and Linus]
> > 
> > On Thu, Dec 21, 2023 at 07:34:57PM +0100, Thierry Reding wrote:  
> > > On Thu, Dec 21, 2023 at 12:58:01PM +0000, Lee Jones wrote:  
> > > > On Thu, 21 Dec 2023, Lee Jones wrote:
> > > >   
> > > > > On Thu, 21 Dec 2023 16:58:05 +1100, Stephen Rothwell wrote:  
> > > > > > After merging the backlight tree, today's linux-next build (x86_64
> > > > > > allmodconfig) failed like this:
> > > > > > 
> > > > > > drivers/video/backlight/mp3309c.c: In function 'mp3309c_bl_update_status':
> > > > > > drivers/video/backlight/mp3309c.c:134:23: error: implicit declaration of function 'pwm_apply_state'; did you mean 'pwm_apply_args'? [-Werror=implicit-function-declaration]
> > > > > >   134 |                 ret = pwm_apply_state(chip->pwmd, &pwmstate);
> > > > > >       |                       ^~~~~~~~~~~~~~~
> > > > > >       |                       pwm_apply_args
> > > > > > 
> > > > > > [...]  
> > > > > 
> > > > > Applied, thanks!
> > > > > 
> > > > > [1/1] linux-next: build failure after merge of the pwm tree
> > > > >       commit: f7baa9ccef93ba1c36a8ecf58c2f4e86fb3181b9  
> > > > 
> > > > Actually it's:
> > > > 
> > > >   f7baa9ccef93b ("backlight: mp3309c: Rename  pwm_apply_state() to pwm_apply_might_sleep()")
> > > > 
> > > > But don't bank on the commit ID staying the same.  
> > > 
> > > This is likely going to break the build on your branch because
> > > pwm_apply_might_sleep() is only available in the PWM tree right now. In
> > > any case, I've now pushed a commit that adds pwm_apply_state() back as a
> > > compatibility stub, so it should be okay for you to drop this if you
> > > run into problems. It's always possible that somebody else wants to add
> > > a new caller of pwm_apply_state() and in retrospect we should've
> > > probably done this from the start, at least as a transitional measure
> > > for one or two cycles.
> > >   
> > 
> > Hi Lee and Thierry,
> > 
> > I know that we're still on New Year vibes, so some things are not up to full
> > steam for now; but since we're close to v6.7 release and v6.8 merge window,
> > hence allow me to ask:
> > 
> > Stephen Rothwell is still complaining about backlight tree build failure
> > due to f7baa9ccef93b, yet it has not been fixed so far. Has the culprit
> > been dropped/reverted as he requested? The worst case is the culprit slips
> > through and become part of backlight PR and Linus will likely not happy
> > with the build regression (maybe he had to fix by himself).  
> 
> This should be fixed by 9a216587a03df, and on current linux-next I can't 
> reproduce the problem any more (x86_64 allmodconfig).

Of course linux-next is fine, because I have fixed it up in there.

Here is the problem:  the backlight tree
(git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git#for-backlight-next)
is broken when built in its own because of the above patch (which is
commit f7baa9ccef93).  In linux-next, I have been merging the previous
working version of the backlight tree (with head commit 7d84a63a39b7).
The patch (commit f7baa9ccef93) can only be applied to the merge of the
backlight tree and the pwm tree
(git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm.git#for-next)
which is merged much later in the linux-next process.  If the backlight
tree was merged by Linus before the pwm tree, it would break his build
(and he would not be happy).  But the patch on the head of the
backlight tree was made unnecessary by commit 9a216587a03d in the pwm
tree.  So, please either revert commit f7baa9ccef93 in the backlight
tree (or simply to a "git reset --hard HEAD^" there).  The patch of
commit f7baa9ccef93 can be applied some time later (after Linus has
merged both trees.
  
Bagas Sanjaya Jan. 5, 2024, 2:20 a.m. UTC | #14
On Thu, Jan 04, 2024 at 12:50:28PM +0000, Sean Young wrote:
> On Thu, Jan 04, 2024 at 05:02:41PM +0700, Bagas Sanjaya wrote:
> > [also add Jingoo (additional backlight maintainer) and Linus]
> > 
> > On Thu, Dec 21, 2023 at 07:34:57PM +0100, Thierry Reding wrote:
> > > On Thu, Dec 21, 2023 at 12:58:01PM +0000, Lee Jones wrote:
> > > > On Thu, 21 Dec 2023, Lee Jones wrote:
> > > > 
> > > > > On Thu, 21 Dec 2023 16:58:05 +1100, Stephen Rothwell wrote:
> > > > > > After merging the backlight tree, today's linux-next build (x86_64
> > > > > > allmodconfig) failed like this:
> > > > > > 
> > > > > > drivers/video/backlight/mp3309c.c: In function 'mp3309c_bl_update_status':
> > > > > > drivers/video/backlight/mp3309c.c:134:23: error: implicit declaration of function 'pwm_apply_state'; did you mean 'pwm_apply_args'? [-Werror=implicit-function-declaration]
> > > > > >   134 |                 ret = pwm_apply_state(chip->pwmd, &pwmstate);
> > > > > >       |                       ^~~~~~~~~~~~~~~
> > > > > >       |                       pwm_apply_args
> > > > > > 
> > > > > > [...]
> > > > > 
> > > > > Applied, thanks!
> > > > > 
> > > > > [1/1] linux-next: build failure after merge of the pwm tree
> > > > >       commit: f7baa9ccef93ba1c36a8ecf58c2f4e86fb3181b9
> > > > 
> > > > Actually it's:
> > > > 
> > > >   f7baa9ccef93b ("backlight: mp3309c: Rename  pwm_apply_state() to pwm_apply_might_sleep()")
> > > > 
> > > > But don't bank on the commit ID staying the same.
> > > 
> > > This is likely going to break the build on your branch because
> > > pwm_apply_might_sleep() is only available in the PWM tree right now. In
> > > any case, I've now pushed a commit that adds pwm_apply_state() back as a
> > > compatibility stub, so it should be okay for you to drop this if you
> > > run into problems. It's always possible that somebody else wants to add
> > > a new caller of pwm_apply_state() and in retrospect we should've
> > > probably done this from the start, at least as a transitional measure
> > > for one or two cycles.
> > > 
> > 
> > Hi Lee and Thierry,
> > 
> > I know that we're still on New Year vibes, so some things are not up to full
> > steam for now; but since we're close to v6.7 release and v6.8 merge window,
> > hence allow me to ask:
> > 
> > Stephen Rothwell is still complaining about backlight tree build failure
> > due to f7baa9ccef93b, yet it has not been fixed so far. Has the culprit
> > been dropped/reverted as he requested? The worst case is the culprit slips
> > through and become part of backlight PR and Linus will likely not happy
> > with the build regression (maybe he had to fix by himself).
> 
> This should be fixed by 9a216587a03df, and on current linux-next I can't 
> reproduce the problem any more (x86_64 allmodconfig).

OK, thanks!
  
Lee Jones Jan. 8, 2024, 5:15 p.m. UTC | #15
On Fri, 05 Jan 2024, Stephen Rothwell wrote:

> Hi all,
> 
> On Thu, 4 Jan 2024 12:50:28 +0000 Sean Young <sean@mess.org> wrote:
> >
> > On Thu, Jan 04, 2024 at 05:02:41PM +0700, Bagas Sanjaya wrote:
> > > [also add Jingoo (additional backlight maintainer) and Linus]
> > > 
> > > On Thu, Dec 21, 2023 at 07:34:57PM +0100, Thierry Reding wrote:  
> > > > On Thu, Dec 21, 2023 at 12:58:01PM +0000, Lee Jones wrote:  
> > > > > On Thu, 21 Dec 2023, Lee Jones wrote:
> > > > >   
> > > > > > On Thu, 21 Dec 2023 16:58:05 +1100, Stephen Rothwell wrote:  
> > > > > > > After merging the backlight tree, today's linux-next build (x86_64
> > > > > > > allmodconfig) failed like this:
> > > > > > > 
> > > > > > > drivers/video/backlight/mp3309c.c: In function 'mp3309c_bl_update_status':
> > > > > > > drivers/video/backlight/mp3309c.c:134:23: error: implicit declaration of function 'pwm_apply_state'; did you mean 'pwm_apply_args'? [-Werror=implicit-function-declaration]
> > > > > > >   134 |                 ret = pwm_apply_state(chip->pwmd, &pwmstate);
> > > > > > >       |                       ^~~~~~~~~~~~~~~
> > > > > > >       |                       pwm_apply_args
> > > > > > > 
> > > > > > > [...]  
> > > > > > 
> > > > > > Applied, thanks!
> > > > > > 
> > > > > > [1/1] linux-next: build failure after merge of the pwm tree
> > > > > >       commit: f7baa9ccef93ba1c36a8ecf58c2f4e86fb3181b9  
> > > > > 
> > > > > Actually it's:
> > > > > 
> > > > >   f7baa9ccef93b ("backlight: mp3309c: Rename  pwm_apply_state() to pwm_apply_might_sleep()")
> > > > > 
> > > > > But don't bank on the commit ID staying the same.  
> > > > 
> > > > This is likely going to break the build on your branch because
> > > > pwm_apply_might_sleep() is only available in the PWM tree right now. In
> > > > any case, I've now pushed a commit that adds pwm_apply_state() back as a
> > > > compatibility stub, so it should be okay for you to drop this if you
> > > > run into problems. It's always possible that somebody else wants to add
> > > > a new caller of pwm_apply_state() and in retrospect we should've
> > > > probably done this from the start, at least as a transitional measure
> > > > for one or two cycles.
> > > >   
> > > 
> > > Hi Lee and Thierry,
> > > 
> > > I know that we're still on New Year vibes, so some things are not up to full
> > > steam for now; but since we're close to v6.7 release and v6.8 merge window,
> > > hence allow me to ask:
> > > 
> > > Stephen Rothwell is still complaining about backlight tree build failure
> > > due to f7baa9ccef93b, yet it has not been fixed so far. Has the culprit
> > > been dropped/reverted as he requested? The worst case is the culprit slips
> > > through and become part of backlight PR and Linus will likely not happy
> > > with the build regression (maybe he had to fix by himself).  
> > 
> > This should be fixed by 9a216587a03df, and on current linux-next I can't 
> > reproduce the problem any more (x86_64 allmodconfig).
> 
> Of course linux-next is fine, because I have fixed it up in there.
> 
> Here is the problem:  the backlight tree
> (git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git#for-backlight-next)
> is broken when built in its own because of the above patch (which is
> commit f7baa9ccef93).  In linux-next, I have been merging the previous
> working version of the backlight tree (with head commit 7d84a63a39b7).
> The patch (commit f7baa9ccef93) can only be applied to the merge of the
> backlight tree and the pwm tree
> (git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm.git#for-next)
> which is merged much later in the linux-next process.  If the backlight
> tree was merged by Linus before the pwm tree, it would break his build
> (and he would not be happy).  But the patch on the head of the
> backlight tree was made unnecessary by commit 9a216587a03d in the pwm
> tree.  So, please either revert commit f7baa9ccef93 in the backlight
> tree (or simply to a "git reset --hard HEAD^" there).  The patch of
> commit f7baa9ccef93 can be applied some time later (after Linus has
> merged both trees.

Works for me.

It is done!
  

Patch

diff --git a/drivers/video/backlight/mp3309c.c b/drivers/video/backlight/mp3309c.c
index 34d71259fac1..b0d9aef6942b 100644
--- a/drivers/video/backlight/mp3309c.c
+++ b/drivers/video/backlight/mp3309c.c
@@ -131,7 +131,7 @@  static int mp3309c_bl_update_status(struct backlight_device *bl)
 					    chip->pdata->levels[brightness],
 					    chip->pdata->levels[chip->pdata->max_brightness]);
 		pwmstate.enabled = true;
-		ret = pwm_apply_state(chip->pwmd, &pwmstate);
+		ret = pwm_apply_might_sleep(chip->pwmd, &pwmstate);
 		if (ret)
 			return ret;
 
@@ -393,7 +393,7 @@  static int mp3309c_probe(struct i2c_client *client)
 					    chip->pdata->default_brightness,
 					    chip->pdata->max_brightness);
 		pwmstate.enabled = true;
-		ret = pwm_apply_state(chip->pwmd, &pwmstate);
+		ret = pwm_apply_might_sleep(chip->pwmd, &pwmstate);
 		if (ret)
 			return dev_err_probe(chip->dev, ret,
 					     "error setting pwm device\n");