Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1888890lqg; Mon, 4 Mar 2024 06:55:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWEnSmd/ucFsFGAGKeo8LDJePVCoElJ70GYqPxvxWgnzhS62MVVgMiFhKmo1WSfsDKogVp3J3onFc/zbViyz31rsZhOsBxcSIB9uHmMZw== X-Google-Smtp-Source: AGHT+IHoHOxGNiGcl+oneZFqAK4azrNiGoeimApbopiP/NRoOUfkXhwDir85MmxtmUYUOKY41NIt X-Received: by 2002:a05:6402:2315:b0:565:59a:a103 with SMTP id l21-20020a056402231500b00565059aa103mr6757115eda.33.1709564158894; Mon, 04 Mar 2024 06:55:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709564158; cv=pass; d=google.com; s=arc-20160816; b=s6XjtcuV4hYL51cSjkTzFV3JbCUzl1WErcL+85aFqUS/p3mqcXvv6AACv+3g++laC6 4Hrxrw8oqPwfVZm+1AheB3wyU0ja8mAZjNxQf/FBUGnT6MMaP9j8Ejj/5yaqIJD6xZgJ MfXH++tSO11vYDGIc6kr2lgiZGs80jDOwEqvdqTVvCjxkr7k8FeEhr5VGomXaOZkF/xR 3Z4B2i1FM8zMwxUpgUizjzhBaudljE9n9KmS+MYYrj3Vq+hSq3DDz18++gi1x+A7CYI3 1UPZnlkdmjKYQR6+3Lj7yA1o1ZGQKHkVdfhcUcmy9uVhLn6fjFxYFbRbh1uRLj0lIQ03 GKBQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=AWTkZgsoLpPKdOGgcn1hzOrRfxw8EPkwi9BIWs11TSI=; fh=FCcxoOK5O7CSb4qykDEM4AaT5zG8FBUFhRMUe6bLeSo=; b=QSutek557snk89GLCT3/yxadmp/8bWzP78fLXEB7uEc9BqiMQCSiDHLO6ikASWyPTy OJyIi0e7ts0xfO1GxhnfTtPCT+keMorRPuy8V/y4gZ/u/lIuq2KLRXt7k+JP5/Nz848r hqrVgRsxZrYV3kPRd4kKdppS0QSiB/S3KO5c2gXsXS2GvhH19L3+v/5oeZr38LkB15y1 CQG1ToedYJImdsZiepKVlnJ7lHr+T1ZspxP4QBZUffJbz4OzhNCwuTERlKB28rjONVf4 vrSUNy/tsxWTgN6rTEPiqeaw6mTnG92O9q6mMR+PZKs6trGWoDnkfSBeyAeMGbq2yD7O 5PIA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yWExFihy; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-90761-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90761-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 9-20020a508e09000000b0056456044eabsi4159693edw.479.2024.03.04.06.55.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 06:55:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90761-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yWExFihy; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-90761-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90761-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 78B2C1F23F00 for ; Mon, 4 Mar 2024 14:55:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A6CE45BE7; Mon, 4 Mar 2024 14:55:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="yWExFihy" Received: from mail-ua1-f47.google.com (mail-ua1-f47.google.com [209.85.222.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83EEDBE4C for ; Mon, 4 Mar 2024 14:55:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709564152; cv=none; b=c+0yU4hIRR+dpTHYqDE77Vv2nvhPxL3/tcYFiRrOEbZpApucwoA7kVgX/BoCJl7NMyAJS5LpbVSeey9j4HaBHzc+wEntGWH1DS551V+IV1IDGyAuNJit1+dRkwziNAEJbwcj9qkaKrLPaYmfYcctP9A3i+rhgxMcsfvMJW3plFA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709564152; c=relaxed/simple; bh=em9YUjFkpzeno/gvQM325mN/Zt68LM+X3qfM17oePbE=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=MhpQEwaTO36uf7S0b95xugKIf10seY4ENsshUeypgONz8DyVcTowOOMCqwEEsr0F/K7/XbQcaTyC51i9k4j87+Gorb2JEmkTIWWcw9avGjP0JBzntfiCbxBQs3dEjPlfDy3C2wNnA7QKjvSTRiPQtLV8BuiSnXQaGi0rWn/Oejg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=yWExFihy; arc=none smtp.client-ip=209.85.222.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ua1-f47.google.com with SMTP id a1e0cc1a2514c-7db26980225so715934241.0 for ; Mon, 04 Mar 2024 06:55:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709564149; x=1710168949; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=AWTkZgsoLpPKdOGgcn1hzOrRfxw8EPkwi9BIWs11TSI=; b=yWExFihyoc93KBaHOuofUoWwWQaah7fGF/nim+U2eB7kKKNvp4cleKrVHiCZZRYSy2 X3/75o9Hft/DNBEXAbkViqFUgdu5kAGrwVpbmSn3Jg7p6Jb2b9A/dHJfE2Dfnh7jTkVI ukdBgfYvDqUQlVhGatTYjQnd5RRk4HX6Q7vVVKU2DcBBXyI5QUhuOQsGsCF3FQm2ooId QSBVJ08lVxvr0a8Jo3RNSeE88D/AFfUMSjZ4BQLsCm8K7/0GE8LKKFzZ+lTMBfmRJLRN S/MTDkdj93qp5jeRPTWpGMfTcSfDN170kqYKbJXL+e4JLVw+xGk+hGVZEOTASgswfzLv jm0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709564149; x=1710168949; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AWTkZgsoLpPKdOGgcn1hzOrRfxw8EPkwi9BIWs11TSI=; b=RZLOYxwPUE+LaPffpXMK45Xdltja0Sg6pZxLWcpSe6g895j3O3Jhw+Ppp1mYFBlZgS bSsl+ivPXzetSBgQefS7EuhcJuJU8/KBJDd8rHa5T3IKtnSAx+gjFMcVbqbDczuHI6kh RUUrIskObAlw6Ofx95buVGx22DSryPT3s7jJuX1awbqYu5S6jCFsUdTkhadTP/dRbadC v09Fj2WDbxt9g8EP8m18kcpwAH7TjBbUMnEhz9c2eJEsn9xW6sxLoEOLUELdY67toGsu KGloZJwoPxQk6cJJrORp9qPVAvpe8l8jwGrFva4yXBQTo+Ou+McbfOdbfsyeMbx+rYa7 xz3g== X-Forwarded-Encrypted: i=1; AJvYcCXtN34Msqq6/k7/HFd8cnkDst08qKAu7h30SbBNfvnIPNZv4I5BUk/lP7jnyQ3GC+VESR/4p+fY6c5+ZjboK8t5pugEFPcTlb5yqrxH X-Gm-Message-State: AOJu0YzzLDOu0Zs6kiID94NflTgmVp/paY0Mj3KYoDdxl33xVFtawb0R rS7+C9qf12bA0oXF7xNMgNK2iXCGXW2oiUTEyiyIVFezHqhfd6GhzjKokxzspwgc0y70fN8uQKd 2ZaE+KN78kYq4b7LhXmSP2yrDNUvjeC8ikI4TV5aGqL1mpkKhpLE= X-Received: by 2002:a05:6102:2927:b0:472:d517:24cf with SMTP id cz39-20020a056102292700b00472d51724cfmr879625vsb.15.1709564149443; Mon, 04 Mar 2024 06:55:49 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240304095512.742348-1-jani.nikula@intel.com> <87bk7u5n9h.fsf@intel.com> In-Reply-To: <87bk7u5n9h.fsf@intel.com> From: Naresh Kamboju Date: Mon, 4 Mar 2024 20:25:38 +0530 Message-ID: Subject: Re: [PATCH] powerpc: include linux/backlight.h from asm/backlight.h To: Jani Nikula Cc: Michael Ellerman , linuxppc-dev@lists.ozlabs.org, dri-devel@lists.freedesktop.org, lkft-triage@lists.linaro.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , Helge Deller , linux-fbdev@vger.kernel.org, =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Benjamin Herrenschmidt Content-Type: text/plain; charset="UTF-8" Hi Jani and Benjamin, On Mon, 4 Mar 2024 at 15:31, Jani Nikula wrote: > > On Mon, 04 Mar 2024, Jani Nikula wrote: > > 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 > > Closes: https://lore.kernel.org/r/CA+G9fYsAk5TbqqxFC2W4oHLGA0CbTHMxbeq8QayFXTU75YiueA@mail.gmail.com > > Fixes: 11b4eedfc87d ("fbdev: Do not include in header") > > Cc: Thomas Zimmermann > > Cc: Helge Deller > > Cc: linux-fbdev@vger.kernel.org > > Signed-off-by: Jani Nikula > > > > --- > > > > Not even compile tested! > > Naresh, please try this patch! Thanks for the proposed fix patch. Steps to reproduce: # tuxmake --runtime podman --target-arch powerpc --toolchain gcc-13 --kconfig ppc6xx_defconfig --kconfig-add CONFIG_PMAC_BACKLIGHT=y config debugkernel dtbs kernel modules xipkernel # Applying patch set Applying: fbdev/chipsfb: Include The reported build regression is fixed but build failed with below errors. My two cents, I should have copied the full build error log in the morning. Few more build errors on powerpc builds, ------------------ drivers/macintosh/via-pmu-backlight.c: In function '__pmu_backlight_update_status': drivers/macintosh/via-pmu-backlight.c:74:21: error: implicit declaration of function 'backlight_get_brightness'; did you mean 'pmu_backlight_get_level_brightness'? [-Werror=implicit-function-declaration] 74 | int level = backlight_get_brightness(bd); | ^~~~~~~~~~~~~~~~~~~~~~~~ | pmu_backlight_get_level_brightness drivers/macintosh/via-pmu-backlight.c: At top level: drivers/macintosh/via-pmu-backlight.c:108:21: error: variable 'pmu_backlight_data' has initializer but incomplete type 108 | static const struct backlight_ops pmu_backlight_data = { | ^~~~~~~~~~~~~ drivers/macintosh/via-pmu-backlight.c:109:10: error: 'const struct backlight_ops' has no member named 'update_status' 109 | .update_status = pmu_backlight_update_status, | ^~~~~~~~~~~~~ drivers/macintosh/via-pmu-backlight.c:109:27: warning: excess elements in struct initializer 109 | .update_status = pmu_backlight_update_status, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/macintosh/via-pmu-backlight.c:109:27: note: (near initialization for 'pmu_backlight_data') drivers/macintosh/via-pmu-backlight.c: In function 'pmu_backlight_init': drivers/macintosh/via-pmu-backlight.c:136:37: error: storage size of 'props' isn't known 136 | struct backlight_properties props; | ^~~~~ drivers/macintosh/via-pmu-backlight.c:154:34: error: invalid application of 'sizeof' to incomplete type 'struct backlight_properties' 154 | memset(&props, 0, sizeof(struct backlight_properties)); | ^~~~~~ drivers/macintosh/via-pmu-backlight.c:155:22: error: 'BACKLIGHT_PLATFORM' undeclared (first use in this function) 155 | props.type = BACKLIGHT_PLATFORM; | ^~~~~~~~~~~~~~~~~~ drivers/macintosh/via-pmu-backlight.c:155:22: note: each undeclared identifier is reported only once for each function it appears in drivers/macintosh/via-pmu-backlight.c:157:14: error: implicit declaration of function 'backlight_device_register'; did you mean 'root_device_register'? [-Werror=implicit-function-declaration] 157 | bd = backlight_device_register(name, NULL, NULL, &pmu_backlight_data, | ^~~~~~~~~~~~~~~~~~~~~~~~~ | root_device_register drivers/macintosh/via-pmu-backlight.c:166:19: error: invalid use of undefined type 'struct backlight_device' 166 | level = bd->props.max_brightness; | ^~ drivers/macintosh/via-pmu-backlight.c:176:35: error: invalid use of undefined type 'struct backlight_device' 176 | bd->props.max_brightness / 15); | ^~ drivers/macintosh/via-pmu-backlight.c:179:11: error: invalid use of undefined type 'struct backlight_device' 179 | bd->props.brightness = level; | ^~ drivers/macintosh/via-pmu-backlight.c:180:11: error: invalid use of undefined type 'struct backlight_device' 180 | bd->props.power = FB_BLANK_UNBLANK; | ^~ drivers/macintosh/via-pmu-backlight.c:181:9: error: implicit declaration of function 'backlight_update_status'; did you mean 'pmu_backlight_update_status'? [-Werror=implicit-function-declaration] 181 | backlight_update_status(bd); | ^~~~~~~~~~~~~~~~~~~~~~~ | pmu_backlight_update_status drivers/macintosh/via-pmu-backlight.c:136:37: warning: unused variable 'props' [-Wunused-variable] 136 | struct backlight_properties props; | ^~~~~ drivers/macintosh/via-pmu-backlight.c: At top level: drivers/macintosh/via-pmu-backlight.c:108:35: error: storage size of 'pmu_backlight_data' isn't known 108 | static const struct backlight_ops pmu_backlight_data = { | ^~~~~~~~~~~~~~~~~~ drivers/macintosh/via-pmu-backlight.c:108:35: error: storage size of 'pmu_backlight_data' isn't known cc1: some warnings being treated as errors make[5]: *** [scripts/Makefile.build:244: drivers/macintosh/via-pmu-backlight.o] Error 1 Reported-by: Linux Kernel Functional Testing > Michael, if this is fine by you, ack to merge via the drm subsystem > along with the regressing commit? > > BR, > Jani. > > > --- > > 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 > > #include > > #include > > -- > Jani Nikula, Intel -- Linaro LKFT https://lkft.linaro.org