From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Nathan Chancellor <nathan@kernel.org>, Lee Jones <lee@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Daniel Thompson <danielt@kernel.org>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Simona Vetter <simona.vetter@ffwll.ch>,
linuxppc-dev@lists.ozlabs.org, patches@lists.linux.dev
Subject: Re: [PATCH 1/2] powerpc/powermac: Include linux/of.h in backlight.c
Date: Fri, 26 Sep 2025 10:28:17 +0200 [thread overview]
Message-ID: <e9e538bd-644b-4c02-bf14-6f5d397554c1@csgroup.eu> (raw)
In-Reply-To: <20250925-ppc-fixes-for-backlight-fb-h-removal-v1-1-d256858d86a6@kernel.org>
Le 26/09/2025 à 01:46, Nathan Chancellor a écrit :
> After the recent removal of the fb.h include from backlight.h, which
> transitively included of.h, there are several errors in the powermac backlight
> driver:
>
> arch/powerpc/platforms/powermac/backlight.c: In function 'pmac_has_backlight_type':
> arch/powerpc/platforms/powermac/backlight.c:59:39: error: implicit declaration of function 'of_find_node_by_name'; did you mean 'bus_find_device_by_name'? [-Wimplicit-function-declaration]
> 59 | struct device_node* bk_node = of_find_node_by_name(NULL, "backlight");
> | ^~~~~~~~~~~~~~~~~~~~
> | bus_find_device_by_name
> arch/powerpc/platforms/powermac/backlight.c:59:39: error: initialization of 'struct device_node *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> arch/powerpc/platforms/powermac/backlight.c:60:17: error: implicit declaration of function 'of_property_match_string' [-Wimplicit-function-declaration]
> 60 | int i = of_property_match_string(bk_node, "backlight-control", type);
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> arch/powerpc/platforms/powermac/backlight.c:62:9: error: implicit declaration of function 'of_node_put' [-Wimplicit-function-declaration]
> 62 | of_node_put(bk_node);
> | ^~~~~~~~~~~
>
> Explicitly include of.h to resolve the errors.
>
> Fixes: 9f218f9bb9d2 ("backlight: Do not include <linux/fb.h> in header file")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---
> arch/powerpc/platforms/powermac/backlight.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/powerpc/platforms/powermac/backlight.c b/arch/powerpc/platforms/powermac/backlight.c
> index 79741370c40c..9afb64723649 100644
> --- a/arch/powerpc/platforms/powermac/backlight.c
> +++ b/arch/powerpc/platforms/powermac/backlight.c
> @@ -14,6 +14,7 @@
> #include <linux/pmu.h>
> #include <linux/atomic.h>
> #include <linux/export.h>
> +#include <linux/of.h>
> #include <asm/backlight.h>
>
> #define OLD_BACKLIGHT_MAX 15
>
next prev parent reply other threads:[~2025-09-26 8:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-25 23:46 [PATCH 0/2] Fixes for pmac32_defconfig after fb.h removal from backlight.h Nathan Chancellor
2025-09-25 23:46 ` [PATCH 1/2] powerpc/powermac: Include linux/of.h in backlight.c Nathan Chancellor
2025-09-26 8:28 ` Christophe Leroy [this message]
2025-09-25 23:46 ` [PATCH 2/2] macintosh/via-pmu-backlight: Include linux/of.h and uapi/linux/fb.h Nathan Chancellor
2025-09-26 8:29 ` Christophe Leroy
2025-11-04 12:43 ` Thomas Zimmermann
2025-11-04 17:01 ` Nathan Chancellor
2025-11-04 18:11 ` Thomas Zimmermann
2025-11-04 11:29 ` [PATCH 0/2] Fixes for pmac32_defconfig after fb.h removal from backlight.h Christophe Leroy
2025-11-05 3:50 ` Madhavan Srinivasan
2025-11-04 12:42 ` 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=e9e538bd-644b-4c02-bf14-6f5d397554c1@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=danielt@kernel.org \
--cc=lee@kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=nathan@kernel.org \
--cc=npiggin@gmail.com \
--cc=patches@lists.linux.dev \
--cc=simona.vetter@ffwll.ch \
--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).