From patchwork Tue Dec 10 19:55:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13901991 Received: from mail-ua1-f54.google.com (mail-ua1-f54.google.com [209.85.222.54]) (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 9822F227588 for ; Tue, 10 Dec 2024 19:56:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860575; cv=none; b=bBPhrbPUGDsV6jPt1DstTOpO2sdSBVOLb1+ucUhqHAUiJ7gzGEdTMO3viOsTWhmjKo60WRkQF/cZCUikDCCIO6F3UM1f7eN+Yiy+TWKH9OapEgpN7TzEE04Oq/PDSXSxVj0pywBQho5rAVqCCRqTYVtiDA/JHcaodLTaKiUJToA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860575; c=relaxed/simple; bh=sdF7tOeLaLfCdiDlVogKRTgQV5yx9VBAgCr2khnDCdU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fYGnfzO4pWTc1capiScKhuKCBH+3RHfU1ZHtDgSnppc7NZStji+xPl6B6tJmud57h9TbwCXyTJgSObfLjurxWuajrsJWA8gLv07CCtwM6yhbal+0+NRXmRNq10L5BMmgJjf3dlSpVqz5TOnnV9wQjilLMUPj4ln/xJt6XdVf70w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=luzU6aTT; arc=none smtp.client-ip=209.85.222.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="luzU6aTT" Received: by mail-ua1-f54.google.com with SMTP id a1e0cc1a2514c-85ba92b3acfso1429368241.1 for ; Tue, 10 Dec 2024 11:56:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733860572; x=1734465372; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=CTX31YxAcEET+qmrwOGI7rmuqifx9R2Evse3TExOMoA=; b=luzU6aTTSezSex1ALcfr8qm/Cw43J8blTOlKNcRbTvmt2thKSm04esfPknpK/p4PlZ lzXIXwS80VEBJYaklDfFc3P70PWXSZiRXWH/+ATNeATzC93i5+9o11+s04HJoVVxLXct lg+PTzl62ZYA9JYwTeo2CZIxc5S4oZSVr1tGc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733860572; x=1734465372; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CTX31YxAcEET+qmrwOGI7rmuqifx9R2Evse3TExOMoA=; b=nQlMb2k9ivlR0qiyoYlMXrqauXj94rqNEtay8MA0kp5Mj1smQRnWjy7cZT9OH5LjZn YZBHoPbSyCKgyagljdvboYrFR4Y7hxx9uMohUVme7BQFa9jsN514M1hidEiSdwEpKmbv 1fVDKrwS+A+1n+U9PGp8vsr8kfFF9dUMeUXqsHHVUm6qc4rlc9iSmLE2egRuFNXdhteA ITDh8LMTF4YgwAItdOiH0Vaf7Al+DnJkuI5lEAhA6HZCa8zxikvpgub/1QONlMFVI1Nb A9eOOOLlXXVxjeX8tqPkvwna3tgWPuPlSzGGkqsh6RJ1lR40bG3dwQNO4zFOBFvExyAe eROQ== X-Forwarded-Encrypted: i=1; AJvYcCXiXIuFZeTK+jmmcVif8OFL3U4Q75KyazCAB7HcUMu9lfCwo5SRu8b9LiaQmIVMDHQ2+i9+4fl5ZUlmng==@vger.kernel.org X-Gm-Message-State: AOJu0YwnBxYOWOPh3Dyg2jzPzfmgKgnD4hQwKCiHuonTut3AZLB47Dz0 EoOjPO4eqmhJLRPwFVKTYDEzVel34HNrnlgiRIS6ZM4ZtzTi+YqE14Tsw+Cf2w== X-Gm-Gg: ASbGncvOSWqgf/qqad3CQ1ZHX/H4rk7uRJrFnBB7vJWLdqaV+Y7vyuhwIIj/ZaDM+gD gWiyFd5PKbLDAMw8sLTc67kiuDXdOsYCVOH7BqDM6bvUDK/5go4rmPTgA/Wj2HYUn+kPGlIBng2 s6uJfQyCTrDwfzb3v7Ud7ZV6MPqCTX0Rea88537I/TAbm1xLsCsI20wZRjYvNGI16PCJK1wqiX4 o32T+n4u/kyoM/RzdHKCJ6WHFLlP/yIZmeJ6rAXrQP2QXMsRYBYSBW/1RgZohpAZsubxqKMCxmr QVrN5eQ8RzAyzaYrt468sJJ0GLL/ X-Google-Smtp-Source: AGHT+IFOlLOc71KptU+gM+mbs7OSqZvI0F+Ca1OaQ7iYQclHhw5OIq3pXc1ymxgCi+mj9I6EK0fVEA== X-Received: by 2002:a05:6102:418b:b0:4b1:1971:383f with SMTP id ada2fe7eead31-4b128fee492mr811079137.8.1733860572588; Tue, 10 Dec 2024 11:56:12 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id a1e0cc1a2514c-85c2ba7dc70sm1279522241.15.2024.12.10.11.56.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 11:56:11 -0800 (PST) From: Ricardo Ribalda Date: Tue, 10 Dec 2024 19:55:58 +0000 Subject: [PATCH v3 1/7] media: ipu-bridge: Fix warning when !ACPI Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241210-fix-ipu-v3-1-00e409c84a6c@chromium.org> References: <20241210-fix-ipu-v3-0-00e409c84a6c@chromium.org> In-Reply-To: <20241210-fix-ipu-v3-0-00e409c84a6c@chromium.org> To: Mauro Carvalho Chehab , "Rafael J. Wysocki" , Len Brown , Robert Moore , "Rafael J. Wysocki" Cc: Sakari Ailus , Dan Carpenter , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, Ricardo Ribalda , kernel test robot X-Mailer: b4 0.13.0 One of the quirks that we introduced to build with !ACPI && COMPILE_TEST throws the following smatch warning: drivers/media/pci/intel/ipu-bridge.c:752 ipu_bridge_ivsc_is_ready() warn: iterator 'i' not incremented Fix it by replacing the condition. Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202411221147.N6w23gDo-lkp@intel.com/ Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202411221147.N6w23gDo-lkp@intel.com/ Signed-off-by: Ricardo Ribalda --- drivers/media/pci/intel/ipu-bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index a0e9a71580b5..be82bc3e27d0 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -774,7 +774,7 @@ static int ipu_bridge_ivsc_is_ready(void) for_each_acpi_dev_match(sensor_adev, cfg->hid, NULL, -1) { #else - while (true) { + while (false) { sensor_adev = NULL; #endif if (!ACPI_PTR(sensor_adev->status.enabled)) From patchwork Tue Dec 10 19:55:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13901992 Received: from mail-vs1-f53.google.com (mail-vs1-f53.google.com [209.85.217.53]) (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 DAC6F228365 for ; Tue, 10 Dec 2024 19:56:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860577; cv=none; b=izTOI+bQq6FkGgD4KQX5MAlMtOCwu+HUV13F/5vUsh8v6FCUeZ3KxyY9+ix6NM64GF8oyiRCgS40ym7jPe72nTVQl4uUuiWnRF7um6+IqqihjY7P818Nvmgn6OJ3otH9aEabtk2mXH89zDrLipBc7ZtXeuWM+fc3sgO8Dr/77jY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860577; c=relaxed/simple; bh=JEumEao6OwtFIq3N27scJvmQPpmiw+AAjw5tpWVO+jU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GkOIFrAL+LLHzUNhBusnJPgx1tNBMD/kF9o6s8GkhDDkp4Bo0ie8t7bZSVbf3R48MlH+zl49h8njIiTr74vSkgXhdAS2GeI/4nnQNB9A6mdnIqC2vjOhhG1N5OLAySPyLFd7ehG8uHIky2pouybAGQUi0WsrnT7r1FkC3/V0uyI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=Ws4Sj/MV; arc=none smtp.client-ip=209.85.217.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Ws4Sj/MV" Received: by mail-vs1-f53.google.com with SMTP id ada2fe7eead31-4aff04f17c7so1465279137.0 for ; Tue, 10 Dec 2024 11:56:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733860575; x=1734465375; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=/FC4QnqJ94HTxVX1/4qkFrZziKxV3eN8ciCJ+f2BMLY=; b=Ws4Sj/MVvQsDZ4JUz9UwtCUys0nLv5tjhXrxEueNLtG3HUN0QaVVC7sqvLLuf1BLsC VRCNlSBoXBWcofxTdC7Lw69wE82O+3lURT/ZrEgdPjOj1lKbKohYLM+VA7GQcazKjctp 02Aoc3IwuphW2yVTskgPEYHo+iqHeEICVgWEg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733860575; x=1734465375; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/FC4QnqJ94HTxVX1/4qkFrZziKxV3eN8ciCJ+f2BMLY=; b=V8IxQN3+BYlz0z0UJ6fPzq/Lp2J2SUXf8B9zHwjgNnbD8IlP8Vj6Wr/+YYUMRdQP1q /s5T7sYNf98W6zhmGwEA2Y09IxkaXX1irl8UFwdG1KmoilrsErvlGEDceIH2wEIJOrG2 ZJOLouTNV2u3DAr527NNzqsipQI92xRNkyQ5QWtvulLoOccP3EBND/NeW7CQMyf0Zlk+ OtUnkA+616CKnVE/2y4ZNh5XPTIND2i7jYB6Qi7g2/f5H+TLyl1mRNGH6jqbHS7qTewn tnA9ZzTRbBmV7HUqACnq5+aZFFDJzrUFNZUU05Z2vyUqw4HD1EDLWaagOzc6gwPapvXe xrkA== X-Forwarded-Encrypted: i=1; AJvYcCVKwEWGEbghXkXof6L8s6td6mJmnF5e8xDgVUZhYEI3OsECYiCqQ7kbsj45kFaYIXUQdJs09SNpK6swzg==@vger.kernel.org X-Gm-Message-State: AOJu0YyJjopZzoR9pElBzC1lTQLvk6q0cc6+zFj1b1SIS1E84ZXSGu+0 JK6Zx1XTGIhE1YeDdfzCnY/eRZn+nERYdiHKDxuVPZz/diIR24geCNSucrh3HQ== X-Gm-Gg: ASbGncsNMR9HE1da1GKpPxWCgK6qjdP0N9PGO4QVzKg7060EaZRe79g2eInoJyUQ8Rh 4B49H0CFglQ5goDnPb7NQh6xjnpqQZ2HWDYlxB5MF8DHeDfAk8fDvzXXehXcxuDKgTbJ+6sNGxI 37aLYHOPShEDBeEqVDqs5EUM3OEh7/2wPGBCviMw9UqQCBCzV/D0+1c61Zw0+aHunjxjFEkaWii AJlEFMus3FO1uXJ6pZc5Rb5fsH+y51sJnw/JFx6tC8wfOIiWAt+IF+p9Wj7CgUcZCWwlpl/fEnI jsPQgZB2/FEjly20YiKHMcfSS9O7 X-Google-Smtp-Source: AGHT+IF9huJ4RGbON6vnfjO82QKXcufJ1oPqeqqPWduurqVjnR4pau4FlzjogA7CTu3zPtWKx5FO2A== X-Received: by 2002:a05:6102:34a:b0:4af:fa96:1ff with SMTP id ada2fe7eead31-4b1ca3daba8mr12220137.6.1733860574875; Tue, 10 Dec 2024 11:56:14 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id a1e0cc1a2514c-85c2ba7dc70sm1279522241.15.2024.12.10.11.56.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 11:56:13 -0800 (PST) From: Ricardo Ribalda Date: Tue, 10 Dec 2024 19:55:59 +0000 Subject: [PATCH v3 2/7] ACPI: bus: implement for_each_acpi_dev_match when !ACPI Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241210-fix-ipu-v3-2-00e409c84a6c@chromium.org> References: <20241210-fix-ipu-v3-0-00e409c84a6c@chromium.org> In-Reply-To: <20241210-fix-ipu-v3-0-00e409c84a6c@chromium.org> To: Mauro Carvalho Chehab , "Rafael J. Wysocki" , Len Brown , Robert Moore , "Rafael J. Wysocki" Cc: Sakari Ailus , Dan Carpenter , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, Ricardo Ribalda X-Mailer: b4 0.13.0 Provide an implementation of for_each_acpi_dev_match that can be used when CONFIG_ACPI is not set. The condition `false && hid && uid && hrv` is used to avoid "variable not used" warnings. Signed-off-by: Ricardo Ribalda Reviewed-by: Sakari Ailus --- include/acpi/acpi_bus.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index b2e377b7f337..eaafca41cf02 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -1003,6 +1003,9 @@ static inline int unregister_acpi_bus_type(void *bus) { return 0; } static inline int acpi_wait_for_acpi_ipmi(void) { return 0; } +#define for_each_acpi_dev_match(adev, hid, uid, hrv) \ + for (adev = NULL; false && (hid) && (uid) && (hrv);) + #endif /* CONFIG_ACPI */ #endif /*__ACPI_BUS_H__*/ From patchwork Tue Dec 10 19:56:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13901993 Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com [209.85.217.54]) (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 05F8C22837E for ; Tue, 10 Dec 2024 19:56:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860580; cv=none; b=q5sdG8FtZL7eBcEuzF72JWzXgqKus/DMZpX44iPEnwhufSGv/I/y/HVus2pBNLFYEWi474GDXZK99oSnDrltPvOMZX513kWvoxuTQRa3TcSmwXLvcH233+V2un3QX7mxsIljDOvrkVNzIUIzKuw1hg1edBrDJwAYAe2ghddalAo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860580; c=relaxed/simple; bh=chc2biaIGBXBwkFrS62DYUV3DrLJW93SY6ROXf7O2qs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=E88UEsq1txRsvQ1akFjuFWiwqSstyZLCh2KyjiKK9+WN/icfRHvwHqHDopP+g2+Wqnv343zv1GEJU7yZL6TJKpb9+cCLiu2nAKK9jLLgRtCacUNdgA+6M/n7Y3WGqs4UAqy1aiqc8b1StSksJiHstIJCw9CoTXrGlTBMHKO/ZTI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=Da8DHjme; arc=none smtp.client-ip=209.85.217.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Da8DHjme" Received: by mail-vs1-f54.google.com with SMTP id ada2fe7eead31-4afdfefc6c1so1003918137.0 for ; Tue, 10 Dec 2024 11:56:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733860577; x=1734465377; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ipHTgEYnJA8+ZRCN0225YuFAf9jLp2OjhxHNBjpqWmI=; b=Da8DHjme4nPG8jec2YpUq3oIuQqq8FayWiTME97aleolJmcMikScO8lPjcHwyw4dyM DTOJ0+eP28+CX4SneF2fr5oP238XvlzqceCZTFnHmJcD9vl/Xaf8W/ses+KkUIPavQjI HaaVsGVJ/FmelcUieLD0kU3FhS/bYCLs8Hp2I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733860577; x=1734465377; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ipHTgEYnJA8+ZRCN0225YuFAf9jLp2OjhxHNBjpqWmI=; b=qJRfhiGoRPn1sUfWApvwfaP0cVHiKQWGtEBkR0HU9EgIwGBFa+6+zTnW0Ts4XNqZBJ 0ys67ayi3uPCIp405sfuL0HHlolBybM8Oy56n2cpITqs+WJEEB47LDB2KtTvuDi9WSrK l9VIlrH0XaF54aaT0a/39YWSkSGAqkbG2+vsQU3zszhxDFDCgNHAUKw3gyxQTj3JSrML CuuAetL6t46wErYvJJmzO5F1vLQ+ovFlMWQJL3sHK+YkL2/iwKfPdsKyVJLBwwNvTkdM DJTsq7qHzipDInWRTV5DzqDhpzM5a04bXQx3TdOsKYfMFqQYi4Vo7KeYKEy/mQzNZaSZ +Zjg== X-Forwarded-Encrypted: i=1; AJvYcCWTg4Jm5EfNw/YsaY4IU573pzuNU25/crk6WJey04fXZbRc9suwrxEU6dTGnJ9eHiY7Wk0FsCi13v6IPg==@vger.kernel.org X-Gm-Message-State: AOJu0YyeuoZ/r5XR95pKtIbgf3qolJ3VSlXEaBZeHeiBjhhpFDgZX8mO h+z2GEBZvY0YhJC780Vs1hxdILrjRZNkIIEdpxHhBpHBLhTSvK2WPZ9Ce5fxtQ== X-Gm-Gg: ASbGnctHR9DggYJJOAdkvyniK6vK55sWPGATIX/uSJpGz5mGb2dhup3FXSzur7rz4cT qX9WaP3HSU0v6FZ5cVrEYvTRWY3G9i5Ovu9CkpE8mlBB4zZS8l/q5cYM4mZVq83rdbjcy2B8Sqx +11rAWGUlYKx0eID8rOpLKf8GjA0Bn+u0rn+L9BVWWMrOaHGZrNON+/hgyUsE+K4DQAsEi7QXCD 9lBdmz12CfmMOgWszpv6RK8bLeFtLN3gCAUnUBpQL57EYE5iG5+c1y5Am1+JlnJykHkGexWQL9/ NszQSzJazDc/EM9R9V1MLTMu9eFE X-Google-Smtp-Source: AGHT+IH0lF25QvlNGwotiz6cjbBqZqy/AoYoxDEDz8EsANwxf772+wFf4srhmhHPIWngtFbdyB/avg== X-Received: by 2002:a05:6102:d91:b0:4b1:24c0:4274 with SMTP id ada2fe7eead31-4b1291af18emr998015137.26.1733860577115; Tue, 10 Dec 2024 11:56:17 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id a1e0cc1a2514c-85c2ba7dc70sm1279522241.15.2024.12.10.11.56.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 11:56:15 -0800 (PST) From: Ricardo Ribalda Date: Tue, 10 Dec 2024 19:56:00 +0000 Subject: [PATCH v3 3/7] ACPI: bus: implement acpi_get_physical_device_location when !ACPI Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241210-fix-ipu-v3-3-00e409c84a6c@chromium.org> References: <20241210-fix-ipu-v3-0-00e409c84a6c@chromium.org> In-Reply-To: <20241210-fix-ipu-v3-0-00e409c84a6c@chromium.org> To: Mauro Carvalho Chehab , "Rafael J. Wysocki" , Len Brown , Robert Moore , "Rafael J. Wysocki" Cc: Sakari Ailus , Dan Carpenter , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, Ricardo Ribalda X-Mailer: b4 0.13.0 Provide an implementation of acpi_get_physical_device_location that can be used when CONFIG_ACPI is not set. Signed-off-by: Ricardo Ribalda dasadsd Signed-off-by: Ricardo Ribalda Reviewed-by: Sakari Ailus --- include/acpi/acpi_bus.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index eaafca41cf02..520f12155e7f 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -43,9 +43,6 @@ acpi_status acpi_evaluate_ost(acpi_handle handle, u32 source_event, u32 status_code, struct acpi_buffer *status_buf); -acpi_status -acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld); - bool acpi_has_method(acpi_handle handle, char *name); acpi_status acpi_execute_simple_method(acpi_handle handle, char *method, u64 arg); @@ -60,6 +57,9 @@ bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs); union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 func, union acpi_object *argv4); #ifdef CONFIG_ACPI +acpi_status +acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld); + static inline union acpi_object * acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev, u64 func, union acpi_object *argv4, @@ -1003,6 +1003,12 @@ static inline int unregister_acpi_bus_type(void *bus) { return 0; } static inline int acpi_wait_for_acpi_ipmi(void) { return 0; } +static inline acpi_status +acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld) +{ + return AE_ERROR; +} + #define for_each_acpi_dev_match(adev, hid, uid, hrv) \ for (adev = NULL; false && (hid) && (uid) && (hrv);) From patchwork Tue Dec 10 19:56:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13901994 Received: from mail-vk1-f174.google.com (mail-vk1-f174.google.com [209.85.221.174]) (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 560B5228C98 for ; Tue, 10 Dec 2024 19:56:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860581; cv=none; b=tfwU6Q8FewZpR6tX7ZGblepH52zhYxYXGLWgOPxOdBwch/VDkLv/+UGfNp9Rf3ueYLF5tcfppkN22YF7l++mzQCy9f4vJt3oMrPb2XGbL4FvsvgBFF8wZpVYtoQ8t+eANrRIxPXc8laS8E8eHW0ufP5FB9karkBeGpCPZAptE3A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860581; c=relaxed/simple; bh=oQ6DOmEDhAhaC7ko0Me30Rr/Q1eMZQPunpUP2qNklrs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cZi14iLKICMI6VPOVXY8kRT6cZ27S+k3NfGJH4sT4AjQAPLJ65TaP69U8rxvIVPbGCdYEwYH6R8KgNGW0qDU5JQbWooTMocTEZIJtRc7M2xacUA49pPYUt6SqsgRea+mmiLciu/hqT35Vyc2XNC5yH8N/t0lhGIsvfkMAF5w8dc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=eS0bQQSR; arc=none smtp.client-ip=209.85.221.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="eS0bQQSR" Received: by mail-vk1-f174.google.com with SMTP id 71dfb90a1353d-5162571e761so902897e0c.2 for ; Tue, 10 Dec 2024 11:56:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733860579; x=1734465379; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=lezNY8dR9ljfu1iEN3ZQdA0hj9drLp6T4ntvpJiXGhM=; b=eS0bQQSRKOkRTg1R00Lzul3TSSpu/eJPD7952BfrCPISozqKj5oTrH2z+ycumAO7P2 aqMeIYtSUBs9+yuennfm1GB1PlaEgI6Lvc0xLC6rU8Vc+wEEuIKK5bNUBtqUmCbogqVG KMc46btlPwz1ne0c0cRg0s/yOEeBRJApCUoHM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733860579; x=1734465379; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lezNY8dR9ljfu1iEN3ZQdA0hj9drLp6T4ntvpJiXGhM=; b=nX7Ulv/6UcFgzdQOdTldu1SUSSP+7JIfGzJWMInTvb+6K9c5keyhQlWIHWPPQIdWTH AqAIM9B/hP6s9ooKlDwN+zzj1w46/5Q8yZRgq7/M2Bz4FZEXOLzP+Uqx4Gwl2gMi+qaT U9lG1fcTlNRejkjeKUEBPI1BZxQ0jFWdmRCCEqQlKzHe0DEfkL1DA86u03RrtNmdfc/z 02ZJJCFYq70k4Ot7x+Z7CiQsaQwbc2i0W85a/u4SUU5YqJVRMJjxCuNWnAN+M5p/S4Uz oTmIAYJ8yweNpHWXRTbe+Lp/bhUUBC51bEpYL4wGn+O/e54aEk51LfhjoSvt6ncH9qzG tduQ== X-Forwarded-Encrypted: i=1; AJvYcCWbZLRtXRYiTR4IuVKy9urxqV+LevCNl+lUcEqnnaLkz5eHQcRcvT8AVLWe8aObpysI2VLOU8Pk4mCPFw==@vger.kernel.org X-Gm-Message-State: AOJu0YxggiJJq/3MX2vOtJwh4y2PzTYxBKXp/rhZu2Ypc25ss70xAyiC IVsBm3B5RG22ahXcwOFV+Jw+YW5wIBH6gGecIuYSnTbm6squLNZNIXQSebMHPA== X-Gm-Gg: ASbGncsIgRFD72u+XSwCUnn31PN+QAyURUxn+Hc/4IFs5/xiPukcz7OKpHCW3Qp7U7f Gx++WrLSuplaFss+fAJ0R5DX3kPJEFgySoA8NkodA00LCdWg4GRA/qT+J8geTqmp/SI98A0w5p0 03pT7fpwJQrQHU0Wctg8B/1SkUFK53kdwu7ZRpGw8rK93m13QkyABZM8oPgLhiSe9m+JmTNt1mc xwefq9T1hgdr0PwcDnENiHqNWd1kotRhyYLTizzbxlLE6tuDjwwT6Y5rpY9w3XAh+Jwyv0dgsrf 3+1Q+1+VHPmK4BfkOTqhRapSe9Zf X-Google-Smtp-Source: AGHT+IEMhYnLWvQoSWZmZsMGZeYTR3YN9TLWCv16La+76YSYWE5jDBmdmVAao50oTu5BwjDFJ7Yo7w== X-Received: by 2002:a05:6122:1d8b:b0:515:c769:9d32 with SMTP id 71dfb90a1353d-518a3a34d65mr938780e0c.4.1733860579349; Tue, 10 Dec 2024 11:56:19 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id a1e0cc1a2514c-85c2ba7dc70sm1279522241.15.2024.12.10.11.56.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 11:56:18 -0800 (PST) From: Ricardo Ribalda Date: Tue, 10 Dec 2024 19:56:01 +0000 Subject: [PATCH v3 4/7] ACPI: header: implement acpi_device_handle when !ACPI Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241210-fix-ipu-v3-4-00e409c84a6c@chromium.org> References: <20241210-fix-ipu-v3-0-00e409c84a6c@chromium.org> In-Reply-To: <20241210-fix-ipu-v3-0-00e409c84a6c@chromium.org> To: Mauro Carvalho Chehab , "Rafael J. Wysocki" , Len Brown , Robert Moore , "Rafael J. Wysocki" Cc: Sakari Ailus , Dan Carpenter , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, Ricardo Ribalda X-Mailer: b4 0.13.0 Provide an implementation of acpi_device_handle that can be used when CONFIG_ACPI is not set. Signed-off-by: Ricardo Ribalda Reviewed-by: Sakari Ailus --- include/linux/acpi.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 05f39fbfa485..59a5d110ff54 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -787,6 +787,12 @@ const char *acpi_get_subsystem_id(acpi_handle handle); #define acpi_dev_hid_uid_match(adev, hid2, uid2) (adev && false) struct fwnode_handle; +struct acpi_device; + +static inline acpi_handle acpi_device_handle(struct acpi_device *adev) +{ + return NULL; +} static inline bool acpi_dev_found(const char *hid) { From patchwork Tue Dec 10 19:56:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13901995 Received: from mail-ua1-f44.google.com (mail-ua1-f44.google.com [209.85.222.44]) (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 B1DFC226886 for ; Tue, 10 Dec 2024 19:56:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860585; cv=none; b=oAgIhKmSTRqKNtNhtjNOfg6Fcw6scf6RI7kWAn1GetoH/4OqMmbK036WyeCgk5uYP2naETYM5fs3T96OCEOEecuyJGqLSh/6Dt8PuytUIBePDRVUpUvEUU0vQzrFkGio0LS+PIFYgaWYlJJoTXmmZXtVC9lIVSbB8YHHzKxogx4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860585; c=relaxed/simple; bh=Whh0DQItzHYKCLXHq+kfFC3x+7+Dk004xdEIyRizvX4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OvQrXowBx64K8ej3SEJa8C/1KlYIjkVJWsY5NOlyYWNV37jJTTiPY9pJtgF9U733/1RPlb3fQ6prr7nGPJeUWiR8eu0cXlQ7A7eyIbtcRqBx15vl432nhXVyKpLFRDCISrcLdWSSVWh5uDtKkrvz7A8nvrZSG30KS9DxQ0cf6ik= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=QkvUaSsD; arc=none smtp.client-ip=209.85.222.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="QkvUaSsD" Received: by mail-ua1-f44.google.com with SMTP id a1e0cc1a2514c-85bb13573fbso1854164241.1 for ; Tue, 10 Dec 2024 11:56:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733860581; x=1734465381; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=y8Rm27YENFKXAm/b99nWNPn/wMV7ojkGu352W65SJ+Y=; b=QkvUaSsDjiaKz2N0cUsM9qtCGW0xthUakRBDtOZqKdtK4jG2jUqgbMhI3n43H0+YqT SmLX0FldveJuUcacSKDYeZBWIv9Bn8zLiSS636aIXDBVJ6aYwpRHADGKx+TJ4vTCF+A3 WV/WuXdK89/b2l9+3Llaqrz60WkOLXK11QRjA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733860581; x=1734465381; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y8Rm27YENFKXAm/b99nWNPn/wMV7ojkGu352W65SJ+Y=; b=QTbFTD6Av/z41Y3lTJ1PvrZE90KX7SzD60i3uA/PrRNIuLjrfiG60BWytYYSS+MTlS YH3dopplsc0eBS4lhIY9mh7LWw88PePznZ6jSiH7UKS/E/hyl/lEyJTemKVNg562765i snm6IXAWbPRqifVffs/XGGAXKofw/E/lzQ8X8X5rk6TyBXVQg028OtiR751FHIhTIist m5VT2WsL32uSy6IUN0A2Yre8OlqPoprWt2g45kduf+wLBV6xH0p2lZwgLVAXIYKJX/Jn LHdjMThSJzFbO7uhME2lj9MoUMTg5FtVH4VqPZuo+3AqSzoYqoW6iho+8SmwHQ/KEDxG DEjg== X-Forwarded-Encrypted: i=1; AJvYcCVo0dz+4D3kjZH5p23CqdPh3jV6MiCVpcJRnsYBXxp96p9JcSyfQyjmk5LumdX1QLdHIj28aM5QLJc5BA==@vger.kernel.org X-Gm-Message-State: AOJu0YybSsoKS7dsfMdn9rhwlRvS1SzRuzBibMXD+CuXhv2MR5yMeXvR v9VAwfd+DO4P9WYngxMAWo5tYsW2QWVBKas0ja458tqNcsbZ98666GrkcIgYzw== X-Gm-Gg: ASbGnctzLFQF96el+SJTo8+QaddGIICFtJiXsqmNyxBszJ0NBddQ00AZuJ8nBlTFOr/ sPF6EKH6Hu0mYFTERUaUuKJ4D7TWeTVXXUmxk03FIqlfx5SGLluGs+Wr/+3EXMHCuWhQDmfRjIT 0w+aVj6aq+lioVRhDwrfQitZX+xSsDd+mp7bCjTn6FPFPcRmLj0gNzI9udr9FRkRzqbHauMTHPw rJEk0fEFm+SxTW0JVeig20QbJ0X3O3odpTZP1gDCpHKg96cOk9XJhjGP0ZU7e/6T9BVh003GC++ vAvkIYEFllMKI4rloplSTSwnQD4w X-Google-Smtp-Source: AGHT+IEooHxihkgq0sisqhW/5irMfcedK/Z/FIef/F30lACx1FcjAKe1abfF7f/u+XsC/FOi7CtYPg== X-Received: by 2002:a05:6102:ccb:b0:4af:a925:6b40 with SMTP id ada2fe7eead31-4b12913b260mr760661137.20.1733860581729; Tue, 10 Dec 2024 11:56:21 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id a1e0cc1a2514c-85c2ba7dc70sm1279522241.15.2024.12.10.11.56.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 11:56:20 -0800 (PST) From: Ricardo Ribalda Date: Tue, 10 Dec 2024 19:56:02 +0000 Subject: [PATCH v3 5/7] ACPI: bus: implement for_each_acpi_consumer_dev when !ACPI Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241210-fix-ipu-v3-5-00e409c84a6c@chromium.org> References: <20241210-fix-ipu-v3-0-00e409c84a6c@chromium.org> In-Reply-To: <20241210-fix-ipu-v3-0-00e409c84a6c@chromium.org> To: Mauro Carvalho Chehab , "Rafael J. Wysocki" , Len Brown , Robert Moore , "Rafael J. Wysocki" Cc: Sakari Ailus , Dan Carpenter , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, Ricardo Ribalda X-Mailer: b4 0.13.0 Provide an implementation of for_each_acpi_consumer_dev that can be use used when CONFIG_ACPI is not set. The expression `false && supplier` is used to avoid "variable not used" warnings. Signed-off-by: Ricardo Ribalda Reviewed-by: Sakari Ailus --- include/acpi/acpi_bus.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 520f12155e7f..4f1b3a6f107b 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -1009,6 +1009,9 @@ acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld return AE_ERROR; } +#define for_each_acpi_consumer_dev(supplier, consumer) \ + for (consumer = NULL; false && (supplier);) + #define for_each_acpi_dev_match(adev, hid, uid, hrv) \ for (adev = NULL; false && (hid) && (uid) && (hrv);) From patchwork Tue Dec 10 19:56:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13901996 Received: from mail-vs1-f42.google.com (mail-vs1-f42.google.com [209.85.217.42]) (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 F187722A1E9 for ; Tue, 10 Dec 2024 19:56:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860586; cv=none; b=MQViqYNHo+e+b4XtXQmC4rfFjafk+sZopWoCkXamLOAG499kQqIsM/Mp1rQM0SH0Y7vVLyj10LeX5O/03jrZzSUYdWDlPO4YUud5bGlKviXMu/OLZPhGQTe+VMZESvV9yGPS8D+N3o/Wd03JVmSIGQKpevLS4FNAttPfYuld1jM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860586; c=relaxed/simple; bh=YpVt1IJK5kIz3EzNG0TljucOUwJ/2fX8gxiI1v679o0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=paKLQ9vWEReSw0lioUWpbZnYEszgDHChfLVNLYhSQ1mT08ZA1X6c8QMoID0MoRiLSw+5yjx9fKDIgNslGpdTAxQsy6Y5cuALTuD6zt1bgOb8eYfiwPvtVXJGAgvZzYyNl+Mp470XX60z4bxvysyRdglmQhaApGGtMIVoxpmMCnQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=f2U1IB2M; arc=none smtp.client-ip=209.85.217.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="f2U1IB2M" Received: by mail-vs1-f42.google.com with SMTP id ada2fe7eead31-4afdf8520c2so1296479137.2 for ; Tue, 10 Dec 2024 11:56:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733860584; x=1734465384; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Wo4Brw2DCcVsJ26CFqfG+Q/anJpN5TVrr8Upgev/TjM=; b=f2U1IB2MM4pHGi6h3UpxH8PSKZ6clBOZPiOblYq05btEOJIzc9916Snj4+Jp3OQrHc UbvDG3LfFc3Z0BRlooNqPPrd4cnYfDF0JLbzINax0Rxoefm2NTjD8j7ZpsZLAoOOXaJd dfX8rHqUmXbJYJfP4XmDlydxxCMXboiPEZPAY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733860584; x=1734465384; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Wo4Brw2DCcVsJ26CFqfG+Q/anJpN5TVrr8Upgev/TjM=; b=O/KSJru0+Dx007SJ8IUjTq2s7wpwqQNCXoAJvzXsbBFUivnwnJUXDYOyuhyAjAOQK7 CBTsWJa3ACd7+wmlNwDbqtvt4yjTyZn1ojSHHLY/alJRZ+qNr7gI2JytjRNT901/bT5O VisX1ondVFRgcqcihJ0dMwE6r4FwJnK0nPoyfrS2vzKe+R+4xOngMkh/CzDHMHSiqpB7 04ettlyQ1sEacrqCJ9DNX3jTpDg8VuBcNYp4ZUcu51Ss4PiWom8+B8Ud30MEDv73js99 ZAHFvc3tYWlXMulW+ae3m7yW4BspX/Bi6Dgw3uD0MOwOZnbyQxy8E6AsHxO4nfbOMf1T kTWg== X-Forwarded-Encrypted: i=1; AJvYcCU013BHw161dJIeWLwO6CWNF8bTlfvJUGu3EUaqJIVFlbvOx3CKzw2SONN9cjgf7qsGAr/r8tGzW+4u+w==@vger.kernel.org X-Gm-Message-State: AOJu0YzBySy4Av6Vov5NpKHM4jKb79031QxIxXrbJqCCgq+KsMVPne+Y 4kGgLQRGSw29KzaX7vdezknPVB5y7m4bkcPcs43Z7fe327ROvof23oLtJX01yg== X-Gm-Gg: ASbGncsUEs5PaAJ//J6WNO2AzVM31Zctd+7VH1RXpjH/qU/U2xVbz97pvJeLQ/Yl4kI SjoHjOssrlYFcBiJCirNTB/g4UrnHkaY13XsKjS56S2+TyIM3wH8I9IKJ1PgWh9r3mHq0XFs46n 31n8O34YMyW8qILHL9x9r5CrslOtzEUvgdEjBwEsw7U8KH2LJv5FibZ1mer7tv67/1mTmLbDo9e b8W9wViONmiF95pR/EF5ZDGKRBthpOD/u3qCnSJcajYp/KFTz1LZDuvTbOYbSOajufnIVqviuih qhBKlpvX214m5gMuNyMXH0K1BZst X-Google-Smtp-Source: AGHT+IEmzXYFoUfqOj/dIppTnK2q1X3UMKlfoOVpixdTmMHqeSiokiuDcOibXmJMwEkU4cB2noY0sQ== X-Received: by 2002:a05:6102:5092:b0:4af:bef2:c8df with SMTP id ada2fe7eead31-4b1290d6f1fmr862642137.17.1733860584010; Tue, 10 Dec 2024 11:56:24 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id a1e0cc1a2514c-85c2ba7dc70sm1279522241.15.2024.12.10.11.56.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 11:56:22 -0800 (PST) From: Ricardo Ribalda Date: Tue, 10 Dec 2024 19:56:03 +0000 Subject: [PATCH v3 6/7] ACPI: bus: implement acpi_device_hid when !ACPI Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241210-fix-ipu-v3-6-00e409c84a6c@chromium.org> References: <20241210-fix-ipu-v3-0-00e409c84a6c@chromium.org> In-Reply-To: <20241210-fix-ipu-v3-0-00e409c84a6c@chromium.org> To: Mauro Carvalho Chehab , "Rafael J. Wysocki" , Len Brown , Robert Moore , "Rafael J. Wysocki" Cc: Sakari Ailus , Dan Carpenter , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, Ricardo Ribalda X-Mailer: b4 0.13.0 Provide an implementation of acpi_device_hid that can be used when CONFIG_ACPI is not set. Signed-off-by: Ricardo Ribalda Reviewed-by: Sakari Ailus --- include/acpi/acpi_bus.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 4f1b3a6f107b..c25914a152ee 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -1003,6 +1003,11 @@ static inline int unregister_acpi_bus_type(void *bus) { return 0; } static inline int acpi_wait_for_acpi_ipmi(void) { return 0; } +static inline const char *acpi_device_hid(struct acpi_device *device) +{ + return ""; +} + static inline acpi_status acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld) { From patchwork Tue Dec 10 19:56:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13901997 Received: from mail-vs1-f43.google.com (mail-vs1-f43.google.com [209.85.217.43]) (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 7B30022ACE9 for ; Tue, 10 Dec 2024 19:56:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860590; cv=none; b=bSIR55d6djcu5lGftPUFwICxoy5yTaaIiH0N7AB2SWih7PLcQbL4xc4ln51nMYS3ZA7VoDnxVK0Hki812OGoR1e/dJfq2Ce6oMqnJ9clpddbRsX40O9Fjk10mq3RH/gp3WDudE8oSsaiy4I4MbxfYxPucOLVu1NhMZdA1sQVth4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860590; c=relaxed/simple; bh=ukuL0J/MKKzCt1mPhJR16PHXljadgzBKa2hSze0hLo8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=syPPgXZTX8cvK6MdHdyJ72ZEhw0ESXdJA0aMMidP7dgSXRdtUnwjgq12EvXNcy+TOdLDFBA4TzD+JT9aBrQVYxnWtgn4q+Xld+kggSlIrNSDs+LhfGbWo6BZBwjZ23K5pmOlvLB8z/BNy5iBl6fwiTF1l95DKt9CdZ34klJADKw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=KOLGOKD/; arc=none smtp.client-ip=209.85.217.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="KOLGOKD/" Received: by mail-vs1-f43.google.com with SMTP id ada2fe7eead31-4afdd15db60so1147379137.1 for ; Tue, 10 Dec 2024 11:56:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733860586; x=1734465386; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=dngrOjvFkokaO//xpC5ashvyb8OkGy64lo3N8QG5GXU=; b=KOLGOKD/qaXR7H25UZLEBaHjq2UOt9wZwomhp1XKtzKewScYKBofXHPpsnMJZe+ifA 5HP4JV06jQ+vtM1+bAtWxWPG+JLWI7gypWpG2eAeQTrxFyFevK3jzn1/TO159zsY8Gsr Be/GAgMEljUWHJYqNzsNKhd1N0/gBjDWG1i20= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733860586; x=1734465386; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dngrOjvFkokaO//xpC5ashvyb8OkGy64lo3N8QG5GXU=; b=cjq5gtkvNOKb/i9RoMbjUp2ym464h9E4MnviZ4qiEzExHPQIFTYzMkIXIFDUXBzjqw h+fjVj4fHsDnwoF6koGKR1kUqA6OEaJQqLQwR8prgqHSrkJ24MGYpCY5iTrph9eEQ7x2 CXUsV1SeyrJWdtfOvrh7yiob0KH7Xo92CJZi8LRXEyCUBTBzA202tx2H+8vsK5d9R4h4 7Hus3FxQUkF83y2mpEHx13pf51oyGsKcxA7Crb49rJyjKnb9Rxn8KK72mV+N9iWmJm2P rWfdc1ZzG5xxpggP7Rn+b7SrA4oup6+TUEj+vcXtricQgar3f+o2cpIIVNywyC6Ked/7 Ye/w== X-Forwarded-Encrypted: i=1; AJvYcCXLS7j97DNzD8dILSgR1J3HhFA/aZ6g7DGjo7ABseEiG1J4Z62D2lF0dmIutVpzIbH87J0kpE6SrjoHmA==@vger.kernel.org X-Gm-Message-State: AOJu0YxFELRq0Gm3MXQ/pd8M3bxETgBsmT5XiftvqnGzzs8UwVcWS+Av uuOvMppe52jo+siaqpTjNrx2L400TIfj1Cq0ogxkJ1c7N8g2xEWUp/WTAy9ssw== X-Gm-Gg: ASbGncsqF4a2wxitNubcP5zTMm42WCU8pahkZL9xIO914qIG8WT/z4zlXKFKdEOq01Y RiKNtQ1OPhX7tom2hi6P1MkdlN4w3BgUJLmaZ22rl7bsTD+LzQNx68BLM1933q+g4+ipVTa/Lis IVxX0O/EiSuaRuG1R+bpkneg+ROBX8lYJuNOOUDHE7ra4D7C/x+lbjO7JMvZGQeUQGnv1eMXg35 SqiLnh7yKfEon1kTwX8zihebeOP6svcTD9DOz9L1gr+TZ/k1rlcf97sW5jMlQEHhmFYBIhcYyJK bZ7fQ+Yjj2IzIA/V55WkimbUkU5t X-Google-Smtp-Source: AGHT+IFCnfB8ydByqooGet6PwgafKh6LnL27DqPrsLgjTnlJDdhRhasDusXRsUEK8BwIHAK84lpL7Q== X-Received: by 2002:a05:6102:3714:b0:4b0:4d6:bff1 with SMTP id ada2fe7eead31-4b1290040cdmr739077137.14.1733860586240; Tue, 10 Dec 2024 11:56:26 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id a1e0cc1a2514c-85c2ba7dc70sm1279522241.15.2024.12.10.11.56.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 11:56:25 -0800 (PST) From: Ricardo Ribalda Date: Tue, 10 Dec 2024 19:56:04 +0000 Subject: [PATCH v3 7/7] media: ipu-bridge: Remove unneeded conditional compilations Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241210-fix-ipu-v3-7-00e409c84a6c@chromium.org> References: <20241210-fix-ipu-v3-0-00e409c84a6c@chromium.org> In-Reply-To: <20241210-fix-ipu-v3-0-00e409c84a6c@chromium.org> To: Mauro Carvalho Chehab , "Rafael J. Wysocki" , Len Brown , Robert Moore , "Rafael J. Wysocki" Cc: Sakari Ailus , Dan Carpenter , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, Ricardo Ribalda X-Mailer: b4 0.13.0 The ACPI headers have introduced implementations for some of their functions when the kernel is not configured with ACPI. Let's use them instead of our conditional compilation. It is easier to maintain and less prone to errors. Signed-off-by: Ricardo Ribalda Reviewed-by: Mauro Carvalho Chehab --- drivers/media/pci/intel/ipu-bridge.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index be82bc3e27d0..1db994338fdf 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -2,6 +2,7 @@ /* Author: Dan Scally */ #include +#include #include #include #include @@ -107,7 +108,6 @@ static const char * const ipu_vcm_types[] = { "lc898212axb", }; -#if IS_ENABLED(CONFIG_ACPI) /* * Used to figure out IVSC acpi device by ipu_bridge_get_ivsc_acpi_dev() * instead of device and driver match to probe IVSC device. @@ -127,11 +127,11 @@ static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev const struct acpi_device_id *acpi_id = &ivsc_acpi_ids[i]; struct acpi_device *consumer, *ivsc_adev; - acpi_handle handle = acpi_device_handle(adev); + acpi_handle handle = acpi_device_handle(ACPI_PTR(adev)); for_each_acpi_dev_match(ivsc_adev, acpi_id->id, NULL, -1) /* camera sensor depends on IVSC in DSDT if exist */ for_each_acpi_consumer_dev(ivsc_adev, consumer) - if (consumer->handle == handle) { + if (ACPI_PTR(consumer->handle) == handle) { acpi_dev_put(consumer); return ivsc_adev; } @@ -139,12 +139,6 @@ static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev return NULL; } -#else -static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev) -{ - return NULL; -} -#endif static int ipu_bridge_match_ivsc_dev(struct device *dev, const void *adev) { @@ -261,9 +255,8 @@ static enum v4l2_fwnode_orientation ipu_bridge_parse_orientation(struct acpi_dev struct acpi_pld_info *pld = NULL; acpi_status status = AE_ERROR; -#if IS_ENABLED(CONFIG_ACPI) - status = acpi_get_physical_device_location(adev->handle, &pld); -#endif + status = acpi_get_physical_device_location(ACPI_PTR(adev->handle), + &pld); if (ACPI_FAILURE(status)) { dev_warn(ADEV_DEV(adev), "_PLD call failed, using default orientation\n"); return V4L2_FWNODE_ORIENTATION_EXTERNAL; @@ -498,9 +491,7 @@ static void ipu_bridge_create_connection_swnodes(struct ipu_bridge *bridge, if (sensor->csi_dev) { const char *device_hid = ""; -#if IS_ENABLED(CONFIG_ACPI) device_hid = acpi_device_hid(sensor->ivsc_adev); -#endif snprintf(sensor->ivsc_name, sizeof(sensor->ivsc_name), "%s-%u", device_hid, sensor->link); @@ -671,11 +662,7 @@ static int ipu_bridge_connect_sensor(const struct ipu_sensor_config *cfg, struct acpi_device *adev = NULL; int ret; -#if IS_ENABLED(CONFIG_ACPI) for_each_acpi_dev_match(adev, cfg->hid, NULL, -1) { -#else - while (true) { -#endif if (!ACPI_PTR(adev->status.enabled)) continue; @@ -768,15 +755,10 @@ static int ipu_bridge_ivsc_is_ready(void) unsigned int i; for (i = 0; i < ARRAY_SIZE(ipu_supported_sensors); i++) { -#if IS_ENABLED(CONFIG_ACPI) const struct ipu_sensor_config *cfg = &ipu_supported_sensors[i]; for_each_acpi_dev_match(sensor_adev, cfg->hid, NULL, -1) { -#else - while (false) { - sensor_adev = NULL; -#endif if (!ACPI_PTR(sensor_adev->status.enabled)) continue;