From patchwork Fri Nov 22 09:47: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: 13882957 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (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 D4F0A1DC1B7 for ; Fri, 22 Nov 2024 09:48:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268902; cv=none; b=W3AMHjy6Spytkt9RqOoyq+qNy2+mnCwVTTxS07QwAQaQSpSkwB6/ibfsBBB1KA3DDLxCBfZ7YGigNXxbYXCuoixYGolfIhFgjnQYJNA8dS38a0SzN8yTwfENeALGLr5EDMP2hgbiJKokg0CNMGgA2HnCW377eFm29A8FAvRq/Ck= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268902; c=relaxed/simple; bh=w9LCIWUOMl/uTKpIvXEyGapEo1u86swQRW6MRCHY3D0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gve27xEComAkbAUvDfWT+9GfVruwKCVkTVHJj/Gi3vjyZmeFKAVH/DfrUt+4ncxbVl43eMz3IsK43chsBnbwglTm1UVVRJZ57y2SPOTzfYeQyigaayD0AkxmGLyqI5BDxjPmjcYfP3Z6wuixAGXl4RShXPQWN2xFw+/12CA9Imo= 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=bxophegV; arc=none smtp.client-ip=209.85.160.170 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="bxophegV" Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-460a415633fso10709901cf.2 for ; Fri, 22 Nov 2024 01:48:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1732268900; x=1732873700; 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=I/BFNmnXBO58C7oe88M+ixtZQGuz6wm+Rt7+horX5NE=; b=bxophegV0qAeFpYhJAVl/AFaeEm2uRTWoPgNLgEsKfH2O5EzErr1+Bfjb6NHusm4E6 bEQFa2oH9nq3H8m/zfMspitRKAbdH2ddonPWyO+7HSOEnmZNVpqTUM/CAM1wkYIkOxyi 5aY1cwcHKHAGpj9ZoVFgRo5XEk+ZriS8B9z1s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732268900; x=1732873700; 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=I/BFNmnXBO58C7oe88M+ixtZQGuz6wm+Rt7+horX5NE=; b=goRvdeph7BM8CVHeuHSypgJED1XWd0NUTfm1+nv8Ac+YpKPeP4DxqfQTK3mB4mLVYl jATtA25A5zU/671c06lt2H6S2Knrppf16/4ZVMewXf3JJMao44eFN6zdEUQayPKlPKJT aOcw9COz8IeR4fUACmSh771aIIMYQ4qyVV/r1dHiCy6RMGk05MAjHcL6xbLbQi2x7BfX OUdqRa9WwOOALOAKmj27tyiamQd90pNN0ERd5FTeycoNqmvnwOTVp8Pry7/VVFDaQb3T xdJHZT74RQwiyCmaOAvZHTRTfu6QzI2Fovtrn6EEvABr/ghnP6nV11i2xrX8hwmQ1ziD rXGQ== X-Forwarded-Encrypted: i=1; AJvYcCXc2H7tPiZplMDqkg0OT42WG2zYAbF9hvpdIzy8KrIGDQ43JaTGB+BfZS1RP9aPzUkx+C3pQImafIiB+g==@vger.kernel.org X-Gm-Message-State: AOJu0Yx3qjtcJhn9VYWZ76libB36pxcxMnpaOeE4o8tk0qjk9AVvj3CK xa0UMxJdn4vsHpnR1TRshkPBw8aUxsgOQ8MklJ8l4N6HLNs9y1+AOt8XVCJc2g== X-Gm-Gg: ASbGncuMwVoQ4OmdtXlVmothZbqItWpz3XGdupVjlAlhodLGhq90jQr49WqpDqWbnbO X/6GJWKsaTNjsYX53Pax+vx6UdT4iX0fcczfgAW4zlE9AyyGcROsnwGvjXeStrpww+vGj1XV5Us jdsml+XbdowmaHOLhRGfGh1UY3BxZm7pKB0MArB053g8krVDCTpK7PKMShjBl8nQYeaapjCEe7U LLojEkz4oR8ynhRyhF5K73RNFgFZEFAtSLCqULpakMUW5/tEk4/StjFwReFVtDeyKjujKJ3I4xe Lqg1LKd/aYzWOfdlb/9lcL8X X-Google-Smtp-Source: AGHT+IHHdb/bCzojxcLvKgiZFS7wveq70HirCmNUp9dbcD65FOXFHZVsY9GQS/ctk0cY1TQI6tOweA== X-Received: by 2002:a05:622a:1e8e:b0:460:ab29:e6b1 with SMTP id d75a77b69052e-4653d617eb8mr30106331cf.44.1732268899812; Fri, 22 Nov 2024 01:48: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 d75a77b69052e-4653c47f124sm9282731cf.62.2024.11.22.01.48.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 01:48:19 -0800 (PST) From: Ricardo Ribalda Date: Fri, 22 Nov 2024 09:47:58 +0000 Subject: [PATCH v2 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: <20241122-fix-ipu-v2-1-bba65856e9ff@chromium.org> References: <20241122-fix-ipu-v2-0-bba65856e9ff@chromium.org> In-Reply-To: <20241122-fix-ipu-v2-0-bba65856e9ff@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 Fri Nov 22 09:47: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: 13882958 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (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 CC5881DDC16 for ; Fri, 22 Nov 2024 09:48:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268904; cv=none; b=BWSPX0QFKhUv+UDHYcEPXlQZQWTblIliYYLjQHTPaE5sSW9S5v0aFCEAEI7g23BuHwhfZUrd5xfdtWflxuEO69zC96/o4SviTX3I5ZUMuFd1FCEifVpzIsOBp8RHmst08St6m8/hmLfgtdobNCL2eUOdtpzZQ3kJs3f1ByK6A0g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268904; c=relaxed/simple; bh=sHpIqPIcR2Hbo49SEnSkc9fxU6SdQ6Gky5F7X03Wuxs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=I/qKnHA84PbN1JOE3guR93VvvQsrEV/cagqXzrbI/AhwkkOs2UhukxbnV32BAdV5etrBrFbMr/bkZwXTiDE5RQIt8sliy3UGYGn3FqKSeW6N5r+kohFscamYivmrWqxFxpVjruRea+/eWZ1NTbOfzFj05WkegNdEr34oPQjHExQ= 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=XKlev80f; arc=none smtp.client-ip=209.85.160.170 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="XKlev80f" Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-46097806aaeso11988811cf.2 for ; Fri, 22 Nov 2024 01:48:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1732268902; x=1732873702; 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=T9GJCP1X0CqpJdW1fWNKDOtb2VgDbT9PrS/YhQ90tFA=; b=XKlev80fU0zJRVhQchANLOn003FtfmXIhADc9RkN5HhvL4TZs5vbqbSQTSq5LIZfsI jrLrxLYzGBoOBXJ7uNx4hLU2NItVB1JtpZ1tc7zy45EFMLjAQSWKqWLohz9SKSedIekJ jF9U3fl2dxHT5ZhqOTnrcvZMKFQAO+Ej1xqAI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732268902; x=1732873702; 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=T9GJCP1X0CqpJdW1fWNKDOtb2VgDbT9PrS/YhQ90tFA=; b=A2ATecLa5bptlDLhsPTV4/Ljyku+tfOgRuMh72hYKGNthmFS+vJx4n8dDzMuAiUI/K hcr4AijxQljCCzkvzDE9N+6mMZs3Po7zNt9ap6Qtd0ZPaw41XY8A57PZcRpA3dFW570o DEkDdVYBulyUxZ0YmikfUUhnX+Rew/xgla8Xc4pkX1GUPeeWwtxsq6w9+Ma0PDLOj9Jc CRcnu0CjCoO6VICedkeyHUEGlRaFTlNC6r8kdszY2+b9Y+fdQ2XzZxAUVGYB6eVC1YjQ V/+NCn/txA9Vo4sDrjX52RlI7Tuo6NRks3OMP6G255wnxcOHWFtKamZMuZ6AP7lQ7IU/ m1OA== X-Forwarded-Encrypted: i=1; AJvYcCXK3YbZbrX4VDDUqpdyNX6sva1vk9m5tLLIYu5enr3TJjL+jBZZ/XfSff2f0jZjLoqzih+ZaC7FDtrTmw==@vger.kernel.org X-Gm-Message-State: AOJu0YzYwQ9Rvc4+L3KecYBYv0y1PS0wNdcVE3mGZHmnWqbFDkekWelh pt+WFUk1hL6NwtQJWMg9gL7r3cjCnDcqrMedQ8V7su/ipZAXibTVGOUpmngNHg== X-Gm-Gg: ASbGnctLJe3ieQF4b9oQkM4Esmqj1QzowNKowGvTL6XM8hIWBe6t2L4asDaC3j0axqU trpbhM/dE0FgMJPh8FsxgZacV1go33DTb9FhvGWKuZwA0IeAFdDO5Ujpbah4v/E/0jgPKitJEWO cCQL+SmIzFq7mcb1P9WvmrDx83XbKfF/Fu59hHE2rg3EE3zRQcQj8P1B5XjKsWuZ/y/KriU5+pL kL29yicTcCc7f/BdpfYUcQCzlmOOFdzBwNj1bvh9YF6LLtGcy86B/M5mfbF/K6DDbF1z88mPTry agn/n3tbwokn6KCFxxjEso+V X-Google-Smtp-Source: AGHT+IF2+E7hA5csqndp9Lp4Yhj03h88SxplMlYhJShe/LVL3nGthWIokV9jzsEcGM0TTVk5jNqFjg== X-Received: by 2002:a05:622a:590f:b0:458:33ce:dcfc with SMTP id d75a77b69052e-4653d62c171mr29716911cf.48.1732268901824; Fri, 22 Nov 2024 01:48: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 d75a77b69052e-4653c47f124sm9282731cf.62.2024.11.22.01.48.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 01:48:20 -0800 (PST) From: Ricardo Ribalda Date: Fri, 22 Nov 2024 09:47:59 +0000 Subject: [PATCH v2 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: <20241122-fix-ipu-v2-2-bba65856e9ff@chromium.org> References: <20241122-fix-ipu-v2-0-bba65856e9ff@chromium.org> In-Reply-To: <20241122-fix-ipu-v2-0-bba65856e9ff@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 Fri Nov 22 09:48: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: 13882959 Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) (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 34EAF1DE4D4 for ; Fri, 22 Nov 2024 09:48:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268907; cv=none; b=ba2cva/Guw3fmPSBbL57mdGXYG9X9Fg1i775KGH9RS8s13L+WmPTIdoV8nsqKzARmrTgd+UTw6dp/rzMJWdsAcKh47XKOM11fEyt8xos/Dpmcdo9jzHW0Iv4AYogs6UkzD3dmZnCCSMGg0pMTclOOUR3+9uGALIDA3LjEHKIMIc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268907; c=relaxed/simple; bh=s/RFQ8hC9e/8cn1SLTw55cw7d/tVQKC4RIk8exh03Y4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=V6z3LyH2/qZdKxwUulPWxikrAgWbz0dgI7lE4z61rtOppjJWaqyk6l9gqqxNY5n3NJjyqvzEpvk5cb8e1a3/8DRJrUFlpjLZlIIPbHyFjJSwfCWrERN7HzoGxjzZ1TCsi+uIa09ic0UKR5Smrex1mw3yno5Kb8sbJe5beMUvVxU= 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=SHtnu3GG; arc=none smtp.client-ip=209.85.160.175 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="SHtnu3GG" Received: by mail-qt1-f175.google.com with SMTP id d75a77b69052e-460af1a1154so11558601cf.0 for ; Fri, 22 Nov 2024 01:48:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1732268903; x=1732873703; 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=zG7I43DMEh4GfUqzQUdimZGvwsrcdmhPZLNEbgcg8ic=; b=SHtnu3GGz5BW3ctFws7PPU9Y6sM2ikaYQwI90aL4/KAKHuMxMisBrBzHwgN41RkxO/ ID+aTiMzKpRKVkjwWxFjnDP4NSzWp87Z45FqEhRp8vGcOAMOlaw/vy+cEh3y8LzXKjE5 t/AmNzdpP99aY9TjJtU7KUHlhbvU8vtItYTSU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732268903; x=1732873703; 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=zG7I43DMEh4GfUqzQUdimZGvwsrcdmhPZLNEbgcg8ic=; b=N/25ETMtv16mgBnxagqFtitM6RjgurovQcEZbOqws3wOwyudec3AqJHQ03sPSClpSK u+qukg6N/ZBrT2QSUwTd00G/KmatLqciSVPUXrhy21Ekutm+kehH7i3wQ2B6cl94EIrV USKoRaidn2tHmaLA+b40/GZFvGJgAcMVBTGAuI6gROiNI7vcyXUKLD1L+UTc127+JNtc KSHSxSG+oefcVhnpGIJACx4cNRbYmyLLaPVDp0CoR/4XKuH04QROjAWtOaB3Du/PmSps iFXfHMjvH8GGSRs4LIfnM3yS+LPyxWWgIMtl6Q3IMPucCjja35+G1ECvg8RSiu2Iy/KC VxXg== X-Forwarded-Encrypted: i=1; AJvYcCVwftqoF5AUDyYnQMuJo3/s8U06FhwueYJtJKqDtK5H9LWwg3H5wIYUg024Tc3CTRAap1pFxoOFK70C+g==@vger.kernel.org X-Gm-Message-State: AOJu0YzIz+MAuWV+W2PJYxA/AJcZu6dqplpEwSAmc3663I+4n/0JHF1O Sm+z+ZgVm99cEoi6i4zjE9ScEg4v9nAJBe8TDvZfEg2AzyHYSK3+/CXmoz44hg== X-Gm-Gg: ASbGnctvzmzhcPYsfhaYi9pKiltBT3njdEB+tLXzJcXsxHjgjV5vuNzTFs0LVwt8rnQ mRC/LN8QXYdmGLw7qX2ov5RZEykRtXNADVm0v1bNKtZOTnx161txX0f2esw52xALoGcaQkxCL/d awHxPB4Y2WVRjS/ZuoS65321FId4jUcsL4JnlmFTR7gn0df2D7hvo6jOxXb2+q9//zarcbma0sH /jyKpz0WZhpfNssiPmg4lWlcNCvaDpiOf45q2wXsQa+90eb5/JhPdKfz0jpN7UeXQdjaUkTRqU1 RKbZG1mwolWGmt/d0pD8JfL+ X-Google-Smtp-Source: AGHT+IGMlQYEruhIl1CbTQvmldwCNjhRHjn9f7tEPvnZRJBnvQVCS4h0diiDqwqoJ+Hs/FtxPNpzMg== X-Received: by 2002:a05:622a:5919:b0:460:c2f3:7343 with SMTP id d75a77b69052e-4653d5af2dcmr28382081cf.28.1732268903212; Fri, 22 Nov 2024 01:48:23 -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 d75a77b69052e-4653c47f124sm9282731cf.62.2024.11.22.01.48.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 01:48:22 -0800 (PST) From: Ricardo Ribalda Date: Fri, 22 Nov 2024 09:48:00 +0000 Subject: [PATCH v2 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: <20241122-fix-ipu-v2-3-bba65856e9ff@chromium.org> References: <20241122-fix-ipu-v2-0-bba65856e9ff@chromium.org> In-Reply-To: <20241122-fix-ipu-v2-0-bba65856e9ff@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 --- include/acpi/acpi_bus.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index eaafca41cf02..4888231422ea 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,8 @@ static inline int unregister_acpi_bus_type(void *bus) { return 0; } static inline int acpi_wait_for_acpi_ipmi(void) { return 0; } +#define acpi_get_physical_device_location(handle, pld) (AE_ERROR) + #define for_each_acpi_dev_match(adev, hid, uid, hrv) \ for (adev = NULL; false && (hid) && (uid) && (hrv);) From patchwork Fri Nov 22 09:48: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: 13882960 Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (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 E2CF91DE8BD for ; Fri, 22 Nov 2024 09:48:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268908; cv=none; b=jmJFm6bVT2RbnLUtHteOCq+VahsWaxKmEbBkKIO4OfXVTAESkdFL+1sSPGwWLI2Qq9iyk8OVzSiFT9wZ3T0xnBWK/cw+vtFDap3C+mk89WzwJNED3vgV9QFFCd0IDWA0c32jB254TM8vIkUrTvGULm/3yPPP8S53b1BRN4zAhgs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268908; c=relaxed/simple; bh=BYuLHzueav0sdSprQfzk88q4Y6f26g51RU20Q1WXi6I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qLM+ED/nBYTeCNWasWZ56BMjAK7QWn4GQDLSyr4Fcr7XQBeDyEG8b6b+cNdaulGfaPGVP8B8MNCRy/a8b0YYiZGdS7paZqi6r6/68wdtexA7UsrFWT3IS6zkQgY3R+BXNk3AzReitL791t/1+SfkOVZrAfCTcrRnSSFxTyKUByw= 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=Swx+cqMp; arc=none smtp.client-ip=209.85.160.179 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="Swx+cqMp" Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-4609beb631aso11971921cf.2 for ; Fri, 22 Nov 2024 01:48:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1732268905; x=1732873705; 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=Acc8f5vjpjnUsttSTKqKG5ha9p9/8KASrkXH0sEj3iU=; b=Swx+cqMprFgLvaSl+WDnFWbXqyPb1COCP+tO98Oly3pcw1UZozCkYWVS6Lm4HkTodX olgFILbOfld5/PZpesnWfV6rDfOJh/U5TXIqY38hNUR2xA9Ev7fMhIwvbgzhkSYZF0dd 0BrfQbG/NtOPfLf/s4ibj1f1jTKgBMEotrx6o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732268905; x=1732873705; 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=Acc8f5vjpjnUsttSTKqKG5ha9p9/8KASrkXH0sEj3iU=; b=pZ/pIUsYQJwfG//jPRb3FwFfG3gLoJeZ/HFYJqLi1B8bIjmBjyPUTfZGU7cgERhXvZ zTEkuU45DeRPuZPmNKNUc9cnjwjVztR9Jwcl4JmaSxlDA/qqYYiFtazcWiPtnKcqe0Op 4mMCBrZ2yRFGRda1zE/3TTqCxLmCNG5TzvgoNISckeapgBIRHjf4GzsCocUK7617OJQd hqoHoF8jX+pCLdEodNUkdB+cInZiA0nopJ1skF9xJzFuq5K99k/szFUybnYlSwsZO4Bs wKBXV4SxphvvPIJzBr9N7Bc3R1rd1g3k2FwTiS5cpy7VAwsG3o2k54aSJSJZIUANrnLe 5p6Q== X-Forwarded-Encrypted: i=1; AJvYcCVAhLMFSsgICDdpTSCeaju/8IGL/Rk7UFYrmuEFG+sZIKMJYM3y8ujacvLkzEyiYbT4nQ2DVZR4hZDu0A==@vger.kernel.org X-Gm-Message-State: AOJu0YxUCnrYmWuT04K3xVTHIOYeR1/ixRNEiAsjg+3Q02GOoKJAssFR tl0jH2dNoecHGL/dfW7r9zJpwazMFK7vRReSctXc87GjQOxI7tl1xq8jFZ2rzA== X-Gm-Gg: ASbGncsSG+dJQBTdg3/ap8qBpF1UAjDp5WrgK7KeV6EyCQM+ZXK4aFdCfQfu/tcrRAY g8oZRTKn7lKAeg1RbbHx152iPPYaxKUmOeh1mTp3gzS7gnrWp4QPdKgO7iOEFw7cup7GxvcZZ6b jkCQjmRk2ZC9ylBEDttG2OzQQSV//AebeM59Y4J7UCpP5iz7aSYYmg1559SQrvLtUCJ8bxU5mG7 RvHEwVYUh2cMZAXqAboyMFA2cYKXI9WrLa5AlKAsjTJuI204HTY9lz7Ks/iouv+Hkaw7MqY+c8K 63MalZEZQoRADBxJIYh+Jvj8 X-Google-Smtp-Source: AGHT+IECFL9WoKiDiu1xKptVQF2T2gvsl28cr0HW2a0s9qqj6Aj7Q+ZZVLocd/R1cde01FoPlwJaWg== X-Received: by 2002:a05:622a:1ba9:b0:464:889f:a413 with SMTP id d75a77b69052e-4653d5344f9mr24237121cf.6.1732268904929; Fri, 22 Nov 2024 01:48: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 d75a77b69052e-4653c47f124sm9282731cf.62.2024.11.22.01.48.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 01:48:23 -0800 (PST) From: Ricardo Ribalda Date: Fri, 22 Nov 2024 09:48:01 +0000 Subject: [PATCH v2 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: <20241122-fix-ipu-v2-4-bba65856e9ff@chromium.org> References: <20241122-fix-ipu-v2-0-bba65856e9ff@chromium.org> In-Reply-To: <20241122-fix-ipu-v2-0-bba65856e9ff@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 | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 4d5ee84c468b..85d7649ac17d 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -777,6 +777,7 @@ const char *acpi_get_subsystem_id(acpi_handle handle); #define acpi_disabled 1 +#define acpi_device_handle(adev) (NULL) #define ACPI_COMPANION(dev) (NULL) #define ACPI_COMPANION_SET(dev, adev) do { } while (0) #define ACPI_HANDLE(dev) (NULL) From patchwork Fri Nov 22 09:48: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: 13882961 Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (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 4B2EF1DED6C for ; Fri, 22 Nov 2024 09:48:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268909; cv=none; b=fIqE2PN79bhIwd2D+DcFhQVhkjBlnJyVwsRWEyLYoYFpVuLQm0eFJjlhUXc6Q/UKQ4hBvqHjezAt1vYalnGw4CG1kl07XCnlnk2VQdji/tocRZhun+4b+ir8fLbe2Vups+PW31E218ld/LGZ6f3TEmKF2DYCY86dTXXIHRGYaCA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268909; c=relaxed/simple; bh=4H1xI8rZic7uj8BVAr4deS1lVj9r+ITu7MlYRDSB8Ik=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sItbOQ1gYHfGlPYESrLT0ClCZ8yBpuLrdBVfSc6qmMs92AzHQ9vqYy74iRFCiy6QxCdZEmctRIpxO2/bBrBWskAU8K2igjBWDzxbY2nNbDAP4V/iBrZ69pdrwrRBM7BPGGi+orI/dKMtJzHPuCTEi3CMc+JkwxIbWutipUOIdOY= 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=A/sY87vJ; arc=none smtp.client-ip=209.85.160.173 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="A/sY87vJ" Received: by mail-qt1-f173.google.com with SMTP id d75a77b69052e-460e6d331d6so11571801cf.2 for ; Fri, 22 Nov 2024 01:48:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1732268906; x=1732873706; 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=VrSmAj2jkvytw0rNLCddg1aexjt2xHCHXsrUaR3oGCc=; b=A/sY87vJxtLNW3pnMxjNevbIQvdRjQ4qjdxdDwQOBUUB4T7cEX9oxWyKrlDGKyfKRN Rk3LMSBF4ln1WUQLoY8ED0ux27iR8uspjKKZfg+K2LL14MmUks9R61PUn16FBb5ryQZF GWDPKk2ShrGJjhKngu+NSbYVjROvh+Mpyz9cg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732268906; x=1732873706; 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=VrSmAj2jkvytw0rNLCddg1aexjt2xHCHXsrUaR3oGCc=; b=AGcBlYhJfmY9Xj9951tT3BPErEYbrbtYH2jvVfr+G5Pz2lihWKQ9mBFpkJsa8c2nR0 VoNj79Aqjipmwvs31n+z6lPzTG1Rksa3w3cRaOTMQQ2V54h7PDUT+1ycUU7Lm8iqa/+0 vwAz6st3Y5UilLVdR2piByb42Ydv4WqrHdtn/0rwFTayH1TSlHE0wgbrfS3Y2w3S5HHF KIuF0gGbW+k3MDFd0MVZKWEb/nN8OJo5on+44F9atfyzkH0mBPDSGUbnO8Wv/n8/2d1b mWVfpBTyAomqftJ8G90Ag7KT2AFp4J9xcpMKAHIG+EFZa9f7smQctmN9xHzxrQWSflQX olSA== X-Forwarded-Encrypted: i=1; AJvYcCWDrphV9YKZh/cu7QqkubQe5uX8bmSYVGyVzEA+naGbzcaRTM4mXuHO/V4eGpi0jSDhwVsv37I1pdXLug==@vger.kernel.org X-Gm-Message-State: AOJu0YyfXyw9X5/uL+gNaROZ34usuC3SHadwWw0uVjuGV4RKnC9gNW+L xwzY1eIlX6Ej31VcTKrPec+oa+m/NYhPLO9qntBW3MBm+9yrsCPv/fKjLqtrew== X-Gm-Gg: ASbGncvjJpNuS9IugXol3afMScY3rIutIMcZHzXinhYt8pKZozhGBewvMhRs4UZGa8W 8ZfpM1iRtxlP74A83OLUWG5O7ODkZMx4egeEvzfFDYR9HBDc4YNIF2J6voFAJOlpdqhz8q5r95R f62ukiDIlH1zAK6nLxbDuoEUkJZGBT7W8cptXAgGJPsn6NiYbwZNOj5tv+3R1KTbi+9I2/tyi4m Wx63/KdYmWNJr2L/w43EOXKX0z5PMweXQLJwL7boBjOPRME2zrcZBPX1pzktlGCdAxgfYEYmWHs F0O4vOCWjoJuQPQr/TSAKQrf X-Google-Smtp-Source: AGHT+IFru2WAUE4DOiSVjGZ5la48og7nHQB/1X/SGFbEnNNed0D8aT6/FZPgrfye+Wt1XXhUhzTTyw== X-Received: by 2002:a05:622a:2d2:b0:45d:9357:1cca with SMTP id d75a77b69052e-4653d57be12mr23934371cf.14.1732268906271; Fri, 22 Nov 2024 01:48: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 d75a77b69052e-4653c47f124sm9282731cf.62.2024.11.22.01.48.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 01:48:25 -0800 (PST) From: Ricardo Ribalda Date: Fri, 22 Nov 2024 09:48:02 +0000 Subject: [PATCH v2 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: <20241122-fix-ipu-v2-5-bba65856e9ff@chromium.org> References: <20241122-fix-ipu-v2-0-bba65856e9ff@chromium.org> In-Reply-To: <20241122-fix-ipu-v2-0-bba65856e9ff@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 --- 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 4888231422ea..57298c7cfb5d 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -1005,6 +1005,9 @@ static inline int acpi_wait_for_acpi_ipmi(void) { return 0; } #define acpi_get_physical_device_location(handle, pld) (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 Fri Nov 22 09:48: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: 13882962 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 E07271DEFC7 for ; Fri, 22 Nov 2024 09:48:28 +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=1732268910; cv=none; b=txHq90HF+Ep/3cx5bsQFNCMxC6OWwaByI/gORxwMaoEZk/T++NNEHJz28hjK1vilEL40kcKRcfZBAWFfF/Ul/Ayj8z1F5Gjqrwq0wsfIKCEeuOp6P/SlI/RHXTGvumNKHeiy15JvlQT+kVAdHkd33nlU0bI2M8QH3PXoIku5D/g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268910; c=relaxed/simple; bh=4cTEN9eOVpTN9Nyc7Cl2/7/R18o2ZkyvA49rT4c3S24=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KmWH0NEy/9LfAJvsRgpEB1IlxUpp33SjLh/Rl+q+pbK/DDoN9q0gK4fxXxCZRTYaz1kffzKieybLZtqW/bb8OizVxho1uNbDUvsh8ReumhpnSfi414hOKSprgy8ZogsD2qgXn5ibQr3otbmsWyoRfLvGqAoAsFbtns6Qc4GTNh0= 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=fGHAPEzL; 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="fGHAPEzL" Received: by mail-vs1-f53.google.com with SMTP id ada2fe7eead31-4a484e9d537so217570137.1 for ; Fri, 22 Nov 2024 01:48:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1732268908; x=1732873708; 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=K/QkgKOmc9/c2cCjRI19/30uaM7Ny2Es4XuDA0KGTSM=; b=fGHAPEzLf/8i13EPFHoTmj473H/jY0wXpMLEXQ6qPP1kqgSowGlK9ov9Xz2q43SUc0 hdNUQlHFpKUT9LcEoTIKnuN8ChpDpvRqYyzLvRvpm3xCgIwVn9hu5TOl7KiBhusTzigt fVIawulg6IUZGsEB0W2zeJKG6vb7bcKkAXDp8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732268908; x=1732873708; 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=K/QkgKOmc9/c2cCjRI19/30uaM7Ny2Es4XuDA0KGTSM=; b=sIOnIE4qdnGIqAgXkNZbbIhc/NjenH2eYocPjXujPZMqNcyxGUOPbjHN8mcbTnDHBF TFpI9pAk/nNvVxLF5vl5t6GMt9p3CPku/2I698o5VW2jUy94EHJNgX7he5yII02yi59x Hzq2Z6/oF+Xe5DwFpl2HE1CwyxArSj8jzv1rYqX1vsKaihkcfohyPLffzoG94Cnpmqhr Q8QBHNJMWxRqryRba/RYAmHrbwFzSDXBlxKj2+wd+Hu0UbMRt0LU58gN+nFGtJMS4cj+ EPH0NM7rcN2c3H0v+RxZDs3PQU4iWbNH4r7J/5aWegQ7n41cuLDId2SH/VJu17hwyeq3 F3Kg== X-Forwarded-Encrypted: i=1; AJvYcCWdFkQGbJWYuM7fRwhzUf8sAsS4eNXwRKsjKGbvAL0f/PjCoSNcRq68nXqurwGZrLJDkz3l8Ie7GtKavA==@vger.kernel.org X-Gm-Message-State: AOJu0Yxj3GU/LFC9e3gp86ePXSBcEhW1D6lOVpYxIp3uFkG5GJ8m3Jc2 /aKabuIuKIClcFUy5WojVukRJt0Eln6nWi/QcJxvqRt2dbYlKPvSziPqmAaM6A== X-Gm-Gg: ASbGncsWEsJ3oiCPJmCwwli4sdNebZqUPT5jkNSfKBygZTuM4dL4fSlujLrKOLR3tdn 9sJ9GWawoU++9E7Da3CxyDbjipu17nRHK/r5DaqyuKRBF1YqoSTMb91FVsNCNbx/ffRWBFX2mlx uFrvx50v0J1XvP2HS26tS1saoFyp+R6syme4QIiqpU0qmnCDysrDw7RKlgh5rUflKpTa+BS815T kRvI72rqTvOySLS9HB2zNhq5I8zheLFQ7KcwYgMc/Pseeeqe6wkdXKut7kwMiyJUYTB3gT1Pxae Cy1W6fBto5w/qjT0vVYusX27 X-Google-Smtp-Source: AGHT+IFUbTeZHYJsenOKlTvdD0U5qrkMPADbncarGrIZ0AbdaxBfQXQNtKr0lRUxMa4p5cx4/MlDgA== X-Received: by 2002:a05:6102:374c:b0:4aa:fafa:e100 with SMTP id ada2fe7eead31-4addcecef0fmr2390924137.26.1732268907770; Fri, 22 Nov 2024 01:48:27 -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 d75a77b69052e-4653c47f124sm9282731cf.62.2024.11.22.01.48.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 01:48:27 -0800 (PST) From: Ricardo Ribalda Date: Fri, 22 Nov 2024 09:48:03 +0000 Subject: [PATCH v2 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: <20241122-fix-ipu-v2-6-bba65856e9ff@chromium.org> References: <20241122-fix-ipu-v2-0-bba65856e9ff@chromium.org> In-Reply-To: <20241122-fix-ipu-v2-0-bba65856e9ff@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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 57298c7cfb5d..cb1b38245f15 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -1003,6 +1003,8 @@ static inline int unregister_acpi_bus_type(void *bus) { return 0; } static inline int acpi_wait_for_acpi_ipmi(void) { return 0; } +#define acpi_device_hid(device) "" + #define acpi_get_physical_device_location(handle, pld) (AE_ERROR) #define for_each_acpi_consumer_dev(supplier, consumer) \ From patchwork Fri Nov 22 09:48: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: 13882963 Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (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 A6F951DEFF7 for ; Fri, 22 Nov 2024 09:48:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268912; cv=none; b=XU8THN3T+nVAier2rZfYcD6xFYO2g+WCeRfkoCnkfTu86Sq5xEo9JhFjQOjXVFn6++QxeGDHC3SltPC+ZAbWaT8lzE7SLT9txuTYADukNjXMTTKYzKjK7OcF3Ak6qwG8m3LjpWbAyg0NFCEXsUsALlAG2lsF1arTrUlUpDqdDck= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268912; c=relaxed/simple; bh=/xyrOk13WfYwXnzGF1BEMgqEZvLsICd5gWhhYG2cImQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KQnUkGdzyP5wxmsrzD6eXnOQrjSLPnSKyARPmFSS3cedYMbLbn9Oxsa4NBMJE5R2pIHn6NJbrCDx1SsU8O9a/d4m1VLn3YEmUYvGwSz+HGuxXGmNYxaOh26z8kySo1DPI4eNyr9u5KarvfOXM6c7h1Pefmhb8BgJ0aVUj0vFJZw= 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=K4JcKc1e; arc=none smtp.client-ip=209.85.160.173 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="K4JcKc1e" Received: by mail-qt1-f173.google.com with SMTP id d75a77b69052e-460b16d4534so11782621cf.3 for ; Fri, 22 Nov 2024 01:48:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1732268909; x=1732873709; 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=uKV0qKpenqq8YefMBn8axPBP/1pf6x8COWK/EGNLUhk=; b=K4JcKc1emtFZL8AasidnVN6IgGI894tWJKkBfVZw+HSi3ezVGLAwmrBzMWDkck6+iW pDdzQo5o7QbSRic9VOi/pDSh2Ds0S34oDo/CrG4pTvpaQ8fpk2yy1D7UonxKxXh9njAE OZCJpJ4o2hbYu1CN8gTr0RubqdaQQawl0rriQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732268909; x=1732873709; 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=uKV0qKpenqq8YefMBn8axPBP/1pf6x8COWK/EGNLUhk=; b=bP9S7hUdsHkoM+X/iQzR6FcnWVlPY5xRjd61j4mekkX89ApptggJz7mTQaIgURW0EY V5eEgnOv985R1AgXnwzGLNcOoqcdXrWHGdftmMkov1Y0Om1s1pIye4ayvgXQ/VTRFWfw Nt1vU2to/GEz3iZWJk+VcXcWWpgoPca6JlYaldNe6xRoyTzmWtZ9t2sGXKTh9fxtQbkj IDly9jLkfmhMkyXWFCZLN1YLWIuwmi71/TnqpDUO2kaMPaXHi6ekRkyUJk3r3ngrofk6 B8h9LtrSZeIKW7YAiQ7zmztSd9nHVD8uiGjZnwZk8XHu+UKRthr6v0gcCEt4pzOjJQeD AXKg== X-Forwarded-Encrypted: i=1; AJvYcCXPfyctiMhYqZGryMCs/TZIa/liKpyUp981TgpJSxUbIzuaFzLxSpo7XmO6U/MvwWnn6iUSaKAoiuL+aA==@vger.kernel.org X-Gm-Message-State: AOJu0Yx0XvtV1wU3n4qSl7XjJMfXL3JZSwkfsGHg5ioXc0KqrlM7rzab T6qCTkbAWXna0kGUrvommelGSJv4cribC0b7KEXNuTR990+oI2wP34961OiQgQ== X-Gm-Gg: ASbGncspDvwLMBL6cHnBUMUREENyPj808xGJG3Pp0aLywETPOwHagLsDR+08HeTn/f9 J8vJfuEic5x5vbKlM0nWAx4sRjHkO511TYMJxZejX4xvNWcARDgBfIxvMC9Tpne0uQdtDGbkEb6 fitmbJGELDblxNjdWmyR/FJkaKQ0BGE20jhCdP+1Qqnr5/FCp8FR7vFCLI5k7niXqvsTH3idXme hPH+6ZEcWxYjSvlQT00kig6ea2PrnCefVDuC9H0Cse+WXwd8UcDV0J93hhyvZlEGBJ0J+NASDKR tjgQUY+MNkme1SLtAO3t5vB5 X-Google-Smtp-Source: AGHT+IGkqqWnODk2xignRvaov7QmeTL3jw/lsAM7Pyz5eBZ/ng+3qbMNUUQf4HXvA77w2WK8NKWLDQ== X-Received: by 2002:ac8:5ac6:0:b0:461:1532:d769 with SMTP id d75a77b69052e-4653d63aebamr22893621cf.54.1732268909452; Fri, 22 Nov 2024 01:48:29 -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 d75a77b69052e-4653c47f124sm9282731cf.62.2024.11.22.01.48.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 01:48:28 -0800 (PST) From: Ricardo Ribalda Date: Fri, 22 Nov 2024 09:48:04 +0000 Subject: [PATCH v2 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: <20241122-fix-ipu-v2-7-bba65856e9ff@chromium.org> References: <20241122-fix-ipu-v2-0-bba65856e9ff@chromium.org> In-Reply-To: <20241122-fix-ipu-v2-0-bba65856e9ff@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 | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index be82bc3e27d0..6bdf42f6769f 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. @@ -131,7 +131,7 @@ static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *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,7 @@ 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 if (ACPI_FAILURE(status)) { dev_warn(ADEV_DEV(adev), "_PLD call failed, using default orientation\n"); return V4L2_FWNODE_ORIENTATION_EXTERNAL; @@ -498,9 +490,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 +661,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 +754,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;