linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Jani Nikula <jani.nikula@intel.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Cc: "linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
	Helge Deller <deller@gmx.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"lkft-triage@lists.linaro.org" <lkft-triage@lists.linaro.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Naresh Kamboju <naresh.kamboju@linaro.org>
Subject: Re: [PATCH] powerpc: include linux/backlight.h from asm/backlight.h
Date: Tue, 05 Mar 2024 11:36:00 +1100	[thread overview]
Message-ID: <87frx5plan.fsf@mail.lhotse> (raw)
In-Reply-To: <e5a0e44d-d2b9-49f0-9a08-fb7d9254266c@csgroup.eu>

Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> Le 04/03/2024 à 11:32, Thomas Zimmermann a écrit :
>> Hi
>> 
>> Am 04.03.24 um 10:55 schrieb Jani Nikula:
>>> Removal of the backlight include from fb.h uncovered an implicit
>>> dependency in powerpc asm/backlight.h. Add the explicit include.
>>>
>>> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
>>> Closes: 
>>> https://lore.kernel.org/r/CA+G9fYsAk5TbqqxFC2W4oHLGA0CbTHMxbeq8QayFXTU75YiueA@mail.gmail.com
>>> Fixes: 11b4eedfc87d ("fbdev: Do not include <linux/backlight.h> in 
>>> header")
>>> Cc: Thomas Zimmermann <tzimmermann@suse.de>
>>> Cc: Helge Deller <deller@gmx.de>
>>> Cc: linux-fbdev@vger.kernel.org
>>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>>>
>>> ---
>>>
>>> Not even compile tested!
>> 
>> That's one of the cases that's hard to catch unless you get the config 
>> right.
>> 
>>> ---
>>>   arch/powerpc/include/asm/backlight.h | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/arch/powerpc/include/asm/backlight.h 
>>> b/arch/powerpc/include/asm/backlight.h
>>> index 1b5eab62ed04..275d5bb9aa04 100644
>>> --- a/arch/powerpc/include/asm/backlight.h
>>> +++ b/arch/powerpc/include/asm/backlight.h
>>> @@ -10,6 +10,7 @@
>>>   #define __ASM_POWERPC_BACKLIGHT_H
>>>   #ifdef __KERNEL__
>>> +#include <linux/backlight.h>
>> 
>> Thanks, but I think this should go directly into chipsfb.c. I would have 
>> provided a patch already, if our mail server didn't have issues this 
>> morning. Let me try again.
>
> asm/backlight.h needs it for struct backlight_device
>
> At least if you don't want to include linux/backlight.h in 
> asm/backlight.h, then you need a forward declaration of struct 
> backlight_device;

It's preferable for asm headers not to include linux headers (to avoid
loops), so a forward declaration would be better IMHO.

cheers

  reply	other threads:[~2024-03-05  0:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04  8:20 fbdev/chipsfb.c:401:31: error: invalid use of undefined type 'struct backlight_device' Naresh Kamboju
2024-03-04  9:55 ` [PATCH] powerpc: include linux/backlight.h from asm/backlight.h Jani Nikula
2024-03-04 10:01   ` Jani Nikula
2024-03-04 14:55     ` Naresh Kamboju
2024-03-05  0:39     ` Michael Ellerman
2024-03-05  8:19       ` Jani Nikula
2024-03-04 10:32   ` Thomas Zimmermann
2024-03-04 10:40     ` Thomas Zimmermann
2024-03-04 18:13     ` Christophe Leroy
2024-03-05  0:36       ` Michael Ellerman [this message]
2024-03-05  8:09         ` Thomas Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87frx5plan.fsf@mail.lhotse \
    --to=mpe@ellerman.id.au \
    --cc=christophe.leroy@csgroup.eu \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).