2023-12-21 05:58:38

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the pwm tree

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 <[email protected]>
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 <[email protected]>
---
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");
--
2.43.0

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2023-12-21 09:30:51

by Thierry Reding

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the pwm tree

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 <[email protected]>
> 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 <[email protected]>
> ---
> 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


Attachments:
(No filename) (2.67 kB)
signature.asc (849.00 B)
Download all attachments

2023-12-21 10:10:02

by Lee Jones

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the pwm tree

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 <[email protected]>
> > 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 <[email protected]>
> > ---
> > 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.

--
Lee Jones [李琼斯]

2023-12-21 12:13:23

by Sean Young

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the pwm tree

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 <[email protected]>
> > > 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 <[email protected]>
> > > ---
> > > 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

2023-12-21 12:57:52

by Lee Jones

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the pwm tree

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 <[email protected]>
> > > > 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 <[email protected]>
> > > > ---
> > > > 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 [李琼斯]

2023-12-21 13:04:59

by Lee Jones

[permalink] [raw]
Subject: Re: (subset) linux-next: build failure after merge of the pwm tree

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 [李琼斯]