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: 848910 Received: from mail-vs1-f45.google.com (mail-vs1-f45.google.com [209.85.217.45]) (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 8E3C1227578 for ; Tue, 10 Dec 2024 19:56:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860575; cv=none; b=YjxPJ6OYW8woEBTPn7etZdRCFC2XRfyJCZEURpN3+4mB+NfUZdIrzBwqYKK2v8yNkYei/eGBPcUKKGmmHDwAZEJJyw/TiCT5URIAYP8HyCNioU/G5jnBqzeVFdJ5GZrHjGAZNcFWZvRiq6LIWQtqi35ISpFqltZ3xrfK8ng2LYM= 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.217.45 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-vs1-f45.google.com with SMTP id ada2fe7eead31-4b10e0654afso1362021137.2 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=hH4GltzbTxpp/JiAcwWWzuahmFTVok9+El3kgmgzLtiDHczsz/3GXF7E5qakljbsoY D92KxBqtj5vJxbjwvEzazOD2xSgA93j7w/7p5eAisA4vLmMfZWkYR4vl69H0TN4HM6k3 IeuwfjhgkZ1CrpakCL3/kHo27TkCkOySMmAh4c4SPnLw1PGOpZRHxsc6xoCQj7+0sr7m faaUrtldXb4SnJdI4WjwqHQutLW07ffMuw45jY7GE5QQR4Jlac6RF3Ci2rpJGwB9vjAu yI7SIG1/gckNNYBe4P5TouME5XOd2p1xGmz+rW7rW2z09mGq7avahd7T1T6OQu5X8MCF myOQ== X-Forwarded-Encrypted: i=1; AJvYcCWWK2dLeWKGf37XclOQG90wHEH/z9+emO+lm2Z0iLKAfih6SOZzAhg7AIxDS5+Af+ZLRalt7UiXJ7kB@vger.kernel.org X-Gm-Message-State: AOJu0YwjEqPaxvyVFDdqPHFuOX9jgGdAdCarMspbtP7rNLFhAcvzMMx6 FygSU0p6kA9381T3y5HP6r+jr5gN/okbXKTDkLkFnMc7fyVGcPrpbcDpCOQzYA== X-Gm-Gg: ASbGncsD8EbHxUhzps7IFzCiHaPmWPkId6SKYo/bL5cpvyIkMu4PP9ke7s7gXoQwLBB 8QGzGRVNdCV1FMDCEtWy0Kth/lsojKvCxdc1v+d06x5+4pFeBkK2PsgUdhlTX6fsuqqzkCcDnru y4uL2avTVCbhCn3HLhILD+yX+bCw2n2f9KkHznJ24SBTFB1tAY8MYnWKovd0UNSrcb9cwHerjgq n6NnHc5bKu6PRBM+BzT0vjUaXYnX7W8YQfrlrKBuO0/nYDPWHsqs+Tok/9rnJIOekBlRykWD+8S i1R2B+G5nDsCdQ6hT2YCc/Pdmbkk 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-acpi@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: 849347 Received: from mail-vs1-f44.google.com (mail-vs1-f44.google.com [209.85.217.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 BD9B0227578 for ; Tue, 10 Dec 2024 19:56:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860577; cv=none; b=Kxs9XHh9pD5GphaTbPuK9p4zojwabDqXdN/Y+/2RmDHThEb19mN5kAYhbO9N5LBi/rwJn/TScOVVxebI2ZkG941waVOi9bIRJO1T+hFlTFlKiMYUY2sVh76QH8gvWbj38pBKUyKwI1lXQe2tmrYJrLcJd1AXRKbA1cPU/CRViiw= 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.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="Ws4Sj/MV" Received: by mail-vs1-f44.google.com with SMTP id ada2fe7eead31-4afe2f6cecdso1562682137.1 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=IB7UbxFVowEW4Z/4winBUKygvhjW62PTyKWYJF85mRcliaaVM9YMpbs5zVLvohnvjl gefSQOhDMmacrWqm3/jtxSodgAUuER2qnkbIKCv9FiER5GtMdeQaKlIkUTwDLoEVRwyH /iA+m3o+6eCrJrNmOKagdBWML0yJSl9tm01rsvqlB9a7Qh5JERv7GW2MptOcRLWMqeOo 85W6s3S+EcBsinR9hMf30/pKdl/4GH44s0kwpIO9SToipDC9ckcIHA9igwNyKa3Y5HQ0 rWQZwWbPYX0kuhomZSLCaYe0+V0PRjnVW9paB5cwSCUnpRuI7a/2RW2MYG4O+uFYf09W 5cSg== X-Forwarded-Encrypted: i=1; AJvYcCUbtob52XOWZeZ6H0vIKRd5bZPDOCQMT1CYMGNQQC27IsG/uhYG2ZTukVRCvcnz7UeQbJyLvE2tc1vW@vger.kernel.org X-Gm-Message-State: AOJu0YyxEN7hkMC+dElx8h0KE8IWQoBmUiXQSBfsERh7Ps4sv0i2Wl/D sVy2qcH7Xs1wJ4a31wWyDlLsbWcu5fVx1t464U2c5p6iaQDOUIn2S0D/u/up6Q== X-Gm-Gg: ASbGncsjGkR41S67vW7EhuMbci/L/1Px7RZL/T09wSQPXM959TTcZ0SumLJazhrXYSf 2vOHRiWU8+zh/ODx1nXDPXeda3fOWgz12Nnfrx6xd6RNneqaC5B63fg58guF99kCdtveJYUQp30 LLR/Eb11bX29SCSGtels/1MWE88Pp/pA7i//BGRyC6i5hYcdOFkGUO4UpXF/kPeUGv/0+VZzwSQ 6Roz3TpclOusD+MnBLphqTakAk8sixkuT3VA7rGeiqMYHp+RxBisR3QZM8r7E8rBDSZ+WVtv6Ub bGRXQuLevgq31pZfaVoCRpbCLBbv 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-acpi@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 --- 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: 848909 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 12C81228383 for ; Tue, 10 Dec 2024 19:56:17 +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=1733860580; cv=none; b=gR7nD9leQLcNXs2dVa7BYJKiXgYee/SbQeQqz5LaGlHfxS2ZLV7mVUhWfH89qRjE8QNBdnUoJ6Yn43ykDyTeH1Y2PnmtxONtJL4CHFiG8e1fIyjaeRF8wsYbO3iTLiwfQfWTOGk6ikPtbWmn8pcrr2yd8YutDdCMpMqrN4CbKFE= 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.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="Da8DHjme" Received: by mail-ua1-f54.google.com with SMTP id a1e0cc1a2514c-85c48f5e2c1so822852241.3 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=fZd6S5aBvGSRqQBOIUckHhXN7oNGPN04A+Gmq40yqiRjWk1S0JSUoAW858979C+iyq zTdoNZsJlWIMMcjZeFUwRjEtW7H/RrIvWGG8SQDMVqTv35ZpqsHJ6pNel7q7oVSlnOKs xamJ0jq9M0vVa48d5EGgbVf7fOmGIcz/GsgIpYQOWbhdUwcO9MATFSn4Y06m2c/+1NgU MyG4fMhkgsQcwRARACrWl79lY6zXyOL+Cdy2g5d+8RQ1sbi8y2QP10O5w7FktYhiTDBl OJVkAJ9O1iu/7jE0lhWihcIICuF5PWczsHXLU/ioA12NrUrr5Ap4lrNd4K01ZtedQ8Zt WQUQ== X-Forwarded-Encrypted: i=1; AJvYcCUZkVFdaEFN6cSERm/0CnDJdSOlQqmSzgqiaKzPib0Hzkaa37cmDGWhoX9pxY9wcRMt+oecUYb27d57@vger.kernel.org X-Gm-Message-State: AOJu0YxItOogn+eVGEvTQwd45/eT3CrrAb89xZpi6/gm5nS+U6DClIyc Ovs+pZJbl+yxEex/VYZAK8lmNRt3blHvcC+NWaaSGH+TUjckBOT5ioTdV/H4uQ== X-Gm-Gg: ASbGncta3ODCARTTQaQ/RbGLm+Usa4VrXakJsKV1lQC3IJYUxcWJeDt0eXq03qqTopd PdAbko+RNoS7xZbEsi2AYBX3McB9itYt91Wgcu02PXwbJVqgnKMZZaRqKfU014lhCiGQhyc4MOT kiyK9ONlVQRygCv7YedBk8oq4V7xcckfoi9/c1DymorztAthIrI+AOvpBYlbp6/KbKOLiPHyaei G36FD9j3EU6vRtSxOIXWdSTSeZcut9TJfoc2/1muJm61cRKgL+Cw50HTtWWmcTtOrZHn8ytovtG LyOuHh70tD7flYVQUslWieYX7EIi 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-acpi@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 --- 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: 849346 Received: from mail-vk1-f176.google.com (mail-vk1-f176.google.com [209.85.221.176]) (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 5A7D1228C9A for ; Tue, 10 Dec 2024 19:56:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860581; cv=none; b=tAhTh+XRPw8D7yFOFqcT8MdBiE6lPe+ujMhoQDgD12cnaR9b+jZtjlH8XdZFUhv33DBfypwJOoMTtdsyYhWfq8jRSfSO2Co+vPM75Oh2tpW177o5vNhzaYSqaq8Fjbt0qIhzKvGQHTIh1HVxxAY4Nfs5JzL96U2YOljafK2eg88= 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.176 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-f176.google.com with SMTP id 71dfb90a1353d-51889930cb1so484170e0c.0 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=vpB1YoM9VUHcr5cKyeAodKKybhKo4Y7aUeiorZm+xti7M/gWehDlyNDx/yhQpFKbvA zxdJVH3yIN85kWHSHAOCpL2hhxmdHtg7XjfuVrXKxbMGwRaymDTCH6paERpUaLCiDfYL s5VydVaWuCUoxMWpy62HPSgZ3Ib4b0sRrd7fCHg4O6F3hVHCTDvtngRz4kgkHOIm7wBt YflbzaWATa9B8Rqou6LewA9IH/pVGw7S1YswTDOPRb3Fx5BomhQ0Zqlh2m9KniSu/le8 JE+O38v26wV9G8aVISMcFugshIZNGmUkoXUjizKZLxi9riIcFpWgfNiSLe4kDms2qmq2 1GlA== X-Forwarded-Encrypted: i=1; AJvYcCWOXNYPY1tPC+jvm8Ru0+N+NlDR+opIiLnc/oqX2RDgfLVDC6CL9AugBPv5caxJ+xtEK0TVeIo1B+CU@vger.kernel.org X-Gm-Message-State: AOJu0YzBfdm7W9KH00ZFff/nqpbwJS2grTdpZH/vIUxi72mPyfpPh8GO 0TWdxhkIEWvy8BqKv4017gUhNm5yWrXBULABQRdaHroqbc7PBckUakWSrIQEYw== X-Gm-Gg: ASbGncu7TspmZc0PhVh3CZ8df1H5UD+8U+do946VYwouEfmHDOa1kbI0GZoikuto4Hf 16UOGm7AOBQjNLgFAUoC2aoZbNiCyp5KnmvBf+ywCg7rqN+gry3BI/78TFUdoIHl9KOA+bq9OI5 s7QVOC9V+mH3842hl+mQLwk5EJlZRZKBnSPBhgEvXauNDpqKPBqbLM05B9zPj1B8ulxCO2yNCWg O45pVVWlaTqmvD74f6fhQUWlU5om3HU8jAPHpGarZvX332lz9pF0uu/bwdqOB7pdmkMqEB0HDjQ aq3bKnTwuym+TuB2wqySbs5KKgy1 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-acpi@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 --- 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: 848908 Received: from mail-vk1-f169.google.com (mail-vk1-f169.google.com [209.85.221.169]) (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 BC31E228C98 for ; Tue, 10 Dec 2024 19:56:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860584; cv=none; b=giH2+hGdJirp9O5mZLUCtRaG0if1OfLpuIo5cznQS+o31pj9+FX/AsIbli1dlsnaygodtddE5aqwdv4ReLfubUODdP1y//8bXQcCCD4ocgp8eXMbTfGByCZP2h1mz5IzWY0GBuUhE48D210J8u7LoOI12Z6IPPjCGg++2eusa1Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860584; 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=LWqyHj1zAabQ37K8ppUiJ3QzqTa7rTKJZdO8/sFl4XaPwK1YNPv/CGmczQ5pVxXY+kzNiaoS48MDJLC+5PwEdUkSDEELwaGvFPlzpPSJGcrfPEKMRHRACJam4KlLOR6YOOfbbSTzRkS8BE800heFpB2naE4ES8axRIvijQAM7kA= 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.221.169 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-vk1-f169.google.com with SMTP id 71dfb90a1353d-5174f9c0d2aso797948e0c.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=uRbW+HPU76J9bTZk90wwZjWBc1OAVfr+0xzCaXfV33/yPy/HPrmusi9nHmwLVGqxBD ouoZ2eMQHw39ADab0wOJYcVfC2HqQSQLH2fbgkhz5SLzbLA3CYKWSLDvmk8hi6PeIH55 yg+JiUtPkmRVaeJC8OuZ2l0pTqJWCdna8ZSQH5nTp6VVr/6puf6t3+J8V+nGRse1SwF0 8e/Rk6JchwcEidFeZSz5a/E1sr+OaipUkqmfx67Ymcw+/K6PHYMqfuCe6L+GI6Ypm0an 57k3OvvwKU92Vhil+ma7WCwyw0+mx0f4kpZd1BwzNIZKXLX9tTaTn+xQF4F5iPxINSyF DzIg== X-Forwarded-Encrypted: i=1; AJvYcCWUhNN+xD/QkeqIYIfMR3OdF8xZaVt/fn7yysIOR0PHTKg7KqKc5KUbLfD88GsRAax+PS93eQ7dtvE9@vger.kernel.org X-Gm-Message-State: AOJu0Yzn4XeHA+WmAN6AHvEvIhvuv1RXkievc+7LiTzD/1oBcWwuI6m8 uOYD2TSyV9Qmw2YkJtiZ+6nJl3o2J3vetx5qL9Do7rCt9//sFTXpXkMqsc9UgA== X-Gm-Gg: ASbGnctQVKK0HPLDmXaxNXhJDHciksJYhcQakw1yer49cT4Ei+BrkvPxQ45XdR/ATTr HLT8HlKlOGE7ovS/ZOmEDr4kxDPE5IRyligE9lC70Bmav/0STAh0+TXXIog1XKdKkUxXF2eaxHI tZzrS/0nWC5tMBIGyJ2UdAYww9wUM+alo3vdEd8ej8ak2KRFf2Dzjtf4tSDrUelBmTGGifypjMd opHhIaqOE0/1Yy+UpzEh9amCOkbRHPe53ImSh+IGwyi3pcG7SlD+kWQL6P4xuw3zhH+yvPfdLiY 59fwXYRb8Dfi/BpMZ6VSDMJUyTs4 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-acpi@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: 849345 Received: from mail-ua1-f41.google.com (mail-ua1-f41.google.com [209.85.222.41]) (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 EE00322A1E3 for ; Tue, 10 Dec 2024 19:56:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860586; cv=none; b=VOxGQ0R1lKG8SIm831q8ftKQIzMM89X548skXOC7MQiisnerQPzqd5LnIbqpMv3N3ieAmE/o1xFe/gNxZzjFzK8SQa4J8pfxnKbpIkjXbR8DmElfhTYQIns8JhdUXxuqTGiuTAs0M0fYdRXMfD1iP3bGGP/7NQBiQ5T9aV0CfbM= 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.222.41 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-ua1-f41.google.com with SMTP id a1e0cc1a2514c-85c5d4f3d58so659774241.3 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=X1z9GWb2VXFjuCdfbyVAyHdNBUizKBGfkrcvwq0HZO5lC4+f1T7+ivsyGfLV2n6FkE NqsirIBch75LeK5dMm/qh6ds7mEx19DcszYSDnL0BkqPSsvW0/6JUevDqEZ2P51zJ9aq Ce13wCpWOXjpupHiqXMHyfxgvoNCGC/b8tozejbiXTSLUWb1H7LARpxcYGW692Z9EHB8 F+lW14NXoG5kdP9yN20HuLZ6RvZzwExg4QXMym4yci838gM8kkd3La7iv8lxXzAlIgqq 04lbDhDKidwCq4IA1K14nAFaEPd4TZZbPlmNqpvpr5TxuqBKDwxmp0wihhNQRYFOZZii l56w== X-Forwarded-Encrypted: i=1; AJvYcCUuNpyh38JbkoKEKwOjruhn4NBHZyypNECMfy2hUnKQ8KDfkf9nWjWpyv26lev+2SllFxzLQ9tmFf/L@vger.kernel.org X-Gm-Message-State: AOJu0YzOhynyf0mfBV+C+NlcLU6cLw0sGXPelwOWiKis3Fh9W3EN6of+ AJnFr38QidxuUuBsId4ihxQIy14zVns7gU2UH15SaNN0MppB7RvS37P9nTsY+A== X-Gm-Gg: ASbGnctmRyv/GaasOw/TGHjQSyp6ZKob56u7AVbY9QnmUJw79GX371CH5mP6uacQtDR 8cEJNLTL8NRlCboaBQf2f91GXfSATNwBn6dqMRi9t7bTyyvCta+P2PcKB6mKP8OEYlKWB7k5IfO MjtSHUpFmKKx4JisaJMYY7CqLIjV1jhk4b/644IK8ErhOFG+if4TbOWnyzovMhlo96/Jqdi+H1c KqxFoqUwOl9ItyJXxK6+krjxQwTFOX6C3dQOl0Lp7+A6Y9WWBwtP9pB2b/AdQV3OTJfGyhqsXp+ 4qpa4ifgtmHBh4A0N4ki4ZTOnwPf 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-acpi@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 --- 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: 849344 Received: from mail-vs1-f50.google.com (mail-vs1-f50.google.com [209.85.217.50]) (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 5B9DD22ACE7 for ; Tue, 10 Dec 2024 19:56:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860589; cv=none; b=BUYIpDXwJlSnhPxpc8OO/849Pc0vA1HDYQIIlPO4rVkJtJywV1FpgUJUt65/Ef6hzHWaahF+Q3hsufwC5YWQnIzspYTjePGfU9H3bn8GF5wiwQSl3T1rypfB4ugxLyXtukE1IPskPsyDFtXtUReBur2Z6JQZpIk2BsjhfMNXspM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733860589; c=relaxed/simple; bh=ukuL0J/MKKzCt1mPhJR16PHXljadgzBKa2hSze0hLo8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IzPTlfpKAMieOcJb7KoJkchyBgYhUXFGmmKLkxDBi3KaPNorrqXRkfiNi/KIUb8jAbaDhYqGTg+JO+Z9e7vOjHbKQZrX0gG4CSBxyFQAFvGSD0p7JqL+C65kV/Igjv20PIuB5NualMYzQFZAl+5jycXHJqlJujxX9NXYbQNXY/s= 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.50 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-f50.google.com with SMTP id ada2fe7eead31-4afe4f1ce18so1055136137.3 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=SLY74+LcurdddA064WfiEtYwaZ1oMaqDAfuyd18Uo3DEVJJZXnb+0sUXZn6SSPmmAV 1Z0gVIVf6YdgLvFUKsWEkmT+WGYrP4csrksV8RERyPmF7FAXuCAG1QaGQmj3sCyOwZ72 eVGQLaQ/Vsps1yNqpN9YlCejwREbMKSC7E8RQwbknH8INDPfK5+M9o6gnPHgQes1eAq0 8RZkcb5qXR91nP6qbI/oDrFFjlLUyl9puMQHbBBgXDrOmN7/NHec03M/1WXDt93OACiF aSZyvLnbuhtt1TTZ/FIniL+KwMrGohcKPJYyhNdEtEZXNUlBQmq8n6Id3PaWBZT3gPlG r8Lw== X-Forwarded-Encrypted: i=1; AJvYcCXiBFyJSoeaLL5bs89XdIYqe5uxuTirUKckF8EKAJjmFePHgdvDHKbiJ2rQHvMhcU+MHHuKpA2m9Ztc@vger.kernel.org X-Gm-Message-State: AOJu0Yz8nEo76nudh+SA6jS/fACSvqpt03ZpI5lz5R2x7c7iXUzIyZFf LMSp4+o6wahV7T0tC7PZmr04/7m/rD7rdbL3k8yJNoSfKb9cdv0ONw/Wr/eo8g== X-Gm-Gg: ASbGncs3rgAVbCTwR1UOcNw9Ax9Os/Lh7FkvDT1zNa3tvvCPP+5QMR49rWWCPtQRo65 6jp0sqT2KF5+m7HtGI5HCRWuAZzkCwsgIApgz5yblynGMapdhcYTYl3gFe9YVTwA8eFusXtdI1m 5q7jvMPjTQY6S3TEd38ngra2I1nJCb1J+r6ukD/0lqTU1rIGX4QxbznAmBDYf8FCF24abG9Xpt0 JdEKkbFVYbYQZBNfXceloNOJ9DB1J4g92WVU5LUIKVH2INs7Oqeg1LXfJDFKwXjpT4Y74JFIgwQ NxsTXJ0LvSWpvTD+JNEv8DiagC3C 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-acpi@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 --- 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;