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: 13882965 Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.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 5DFD61D63F8 for ; Fri, 22 Nov 2024 09:48:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268903; cv=none; b=uMOTmhEFmuv9EYAP0lYwyT79WVvksWnYyJcTKpT7U2ZvcPlOCoM/2aH5jDp1K+k9HVTY6YDAi+6rhuRZkZY6JhfzcY9pNEBKIIZJNS7F0WswQ/M1q8li+6eRSiWbpT6C4Wasv7M8NcdvAjMq5ZuZpb1RNMgCOkc2+1ArYLGdR0I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268903; c=relaxed/simple; bh=w9LCIWUOMl/uTKpIvXEyGapEo1u86swQRW6MRCHY3D0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pPNhvCAo2XT8v2Kb8dy45ubqnOwKsBfdWibncdEJtdS4v2RhlGskcCTdYYY/sTGzMKsizn7mv2+AWgUEJE7+kAO9KnLrbEhm6/6QWl6Cdjfx73x5K40eamYNrphAxcnQcJNlnDUg1UxWbyr8SXF49BBJcluvn/lIPwni1AXl21w= 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.222.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-qk1-f170.google.com with SMTP id af79cd13be357-7b1474b1377so120297085a.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=LrS+lwAP3PeNNsZ0cVP1mFfFNyLTRwJtCEJ0ysoe7YqEKPBr8vAEysFUkyu1PXs1UZ xmnWbjgN5O6zT2dX76k0Yjx9oH7ZmguU1xKUmdmclW9TCeliIvDQvHPTBj7xb0Haivx4 2XVWRrRm29IVtwyY70qqK7cAJ1PMlJ/hN/W1t4R/HJ6awYu6Rn6z63goe9urVy59ivmI 0efpVB+1r7pTKRGh1NjCcnh5+FiboksHnM9VM1/yWD8BynBUk/J9wvJQjy759ohKep/A 5d6SP9cf0qNVY6XJsw79NEhNNn23Mdrp8Fm5CtcM0ekaintfG+7iQ6hy8RjI6uCHJuIP RjZA== X-Forwarded-Encrypted: i=1; AJvYcCUzmXeReIh8JgQonrfLDWuskKYCbtn4Vt/iykOA+NZ+dKAjQN27sFBXjguyh7xbQpxuzbM5IyTOVqvD@vger.kernel.org X-Gm-Message-State: AOJu0YwdIo59lbToIkb4paAt6CJhkj1unInaTUrZb3+j0ZKwNIOfz3nb bf9gpi8aS9iEU3V1AWBWtzAzXathHSEYV1MDuuQFiuar8v8bcsmJvSSOKF2VtQ== X-Gm-Gg: ASbGnctqqlYiueuwMzE1YzXRa8/B4X5LvhLf9/2jJvtEa5/Fr9L1KwPALmxiSslm70Y ey5L6i+jcs/vCuRotFeCGXXG3R49in6rDxdmpo7oSDmDoIebhW6/ONsZa+PqByO/+0Z446XccAJ ibGATETEUqYS2lLDZmhnIrusK7+tw9LcQRm6Fz8YS5YI/efH2lXAnjKiOmSwFDnDbf3rqXZHdL9 C5dGGExbSuQpw3CAPefPyJAket+zVkV8EApww0K2PpdfFpKEME9Oe7cZ66Up1dQqGDfbbdUrPZX u391ivasEoV6gMVlh6VYIKJj 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-acpi@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: 13882966 Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) (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 DB3E01DE3C0 for ; Fri, 22 Nov 2024 09:48:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268905; cv=none; b=A2K7cLMQViBqFKEv2DK1GmVixICrrBtkViDgejouxbG1I7S23bj1ZVKk5TJ2gsZpCdGjgPD0Uy9gechkeM4amcNlRWkVjIdR394lmLZoOs9xj9P1XG9eAxShcpUqWGL3wJ6xCDsRZkrb0egLcrxVpJknnokrLC3Xo3lWyPCxENc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268905; c=relaxed/simple; bh=sHpIqPIcR2Hbo49SEnSkc9fxU6SdQ6Gky5F7X03Wuxs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RcjHgeQJ2JWFvfEJCh/czTYTJ7JOlXJa2bPFt4CbY1TQtzWgfcVQ3Rq1r1whZyHlmkEbjBdlIJ1El5TLcF6hz+8nr5buFFVxumk2yajCjXGg7wXOobRWBnPnmVSRzs44ejuRUK9wV+zTSjnJEvR47ZIkAPpIeGaKgkAnRYLxcOk= 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.182 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-f182.google.com with SMTP id d75a77b69052e-460ab1bc2aeso11564901cf.3 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=DtphpRH909BZQHLdTmQqKqAdiPBm4mL3aYEiKr9hduK0jA5QrsoJrwACo1tkqn5fo4 QQop1vAiWS+9xAgGzskQsHaBXZ9Jv0cPAQpAVgJgw4TGkHbBVTv+1GilM9ZVU4mSsYQf RAwCM5o9/56PgysL3AejPxLRoMURPqmE4FeBkFjW6gzIliL35lJuH60IEPUn5mOY9JXE DRPesF5bps39qJcVSu/z3fCCxSEkEtnoB34geTd7Yfb1lhuZy4tM33ch+c6RmUzfGmoF 1gg6MtHllQv6Y/MkcqEnLm/IIYrnODDuPALOCCGNKoBFg4etIXgxIcpEOaS1L7+2fnuG lu+Q== X-Forwarded-Encrypted: i=1; AJvYcCUxF6Ws9BCVJU7n155JOqL+jgHdv9htMivchygEpSU7+JFnv73xqRoIRtpXv2yibUuIXfPnowaFDPe4@vger.kernel.org X-Gm-Message-State: AOJu0YzM3qpAxGAeCdtVhCO+OGVyGURTMItV+2AgnAVWHtB2gzj9zVne 3tJ8KkrIjxFOoPUOPJuer6GCY1gO9i8JT9vDqmxWwT75ynot4TIVENgo94pKJQ== X-Gm-Gg: ASbGncsygIPSIxv7wSCAaLvFPyWvB0b1fwr+1aXnhPcqiUqRBvtCcGHOWmDHNQmOW0S X3nP2yx8iAnnafEOW2+XvnaGRrcDhb3MKkXdnKtUpaJf5JkFXf8ZLPRMRYqtlVMxkc+/YGhGeho huIyHNkHvyuhgnrfL/V+S1E4QS48TEJTbygy4AP3vVilu2NUHScmmVNTHaOG3hX8n6fPiPdNwcB DZ9az3iXqHgHfHbMh1t9909X4E35iLLIF8LFCIJo0P5zhwUoaPQr1NzP96S0DlsDwnd6lmq1+4a aK/isZbWtQZZjfFF+6RndJbT 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-acpi@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: 13882967 Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (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 2F1211DE4D1 for ; Fri, 22 Nov 2024 09:48:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268906; cv=none; b=Awq0I46QwWeI1Dw08AM1jHzlwKKsa6egQyRnaHV6hFCu8GvQoYwp+GhJqyMaDW6PPjIfxCdpns4dNCOX07t4wsJqlrawDC6hNqZSRaaGPkDJ1TWbeaO60fG6xyVROFJer5r6Pl1ohkckt7HUjhePBAtYPPmnBiF0Uk6taDQUoag= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268906; 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=MXq/rmrOo4K1jLSgdKSdp2h2fQpd+0Mvmzkfaq6xPAXTkXbaF8hFSv1P4WU5yrAdJ4wRz4bHWf0SQcjxUJK3xK+10V+Po8OvUgl3V8vtasORGnM/hhRpzy6NyzXT/Wnq3ruU+cmY9/CY71ZAD3KHfsZufMBGHh/9JOVvZQYD+hE= 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.171 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-f171.google.com with SMTP id d75a77b69052e-46353bd879aso12167141cf.3 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=CShsJGH8lWoXyeprkF8GDA7HlMO12TJO0ARREtSlA1XAtRCQIBRHW+QQ1pw2WuaDfm sN4fpjqM9+DR9REDOFSI2bOGrIfI77xkreA2LcElFEOPPY++gMacUngrJES9DTV8F4YM SSdOVlfM4P8RUOe1QbgBoHKg0L1je9umuS+PzKqJMlzIAUAK6IOehA0rtRuk1FjgVKmH JwLOyO9ZOmTn6QO1KnIhB/KBkiSKJzDlt7UJSuD/BFniSm5ujjyx8Lvzt0/PyL0cs++q hcwpPa1UGPF4SBokCMukasoelmyFjgWgCe2e1AdBhSMh/B+dw1oKGUG61w22LeKobSGP /dCQ== X-Forwarded-Encrypted: i=1; AJvYcCXCESFo8SF3Sj+a7RhBaS3I2Rsya3ddQpL9AEwVApITwYRHjFlRNPPC4ZgHsxVNanK3RGGpr4G78m/J@vger.kernel.org X-Gm-Message-State: AOJu0YyjydpvniPVem6SF8JZqbLdTyDKu8VVvTograeU6iERPxwXO2Fn KdXwa4KnJYfbZHi7YtYDB5H4xWfwpneZn9NY50uGTS1RjwpqOuzhSs7GNjpyXA== X-Gm-Gg: ASbGncuKzXNOF5Mo+R0/H3fddg7hP6AQQfCalrVaecB4+TH30w/o+PwGMPht8rUNK6v JHcjjR+rIdx744aXWbV7cpi9OdkypInDlqTfMHGtJdp6hTUn1IpEZdkLl5kFV3oLxmYAKqk3HHs JBScjPP9xpDbu2NltypSdACNxB9fHjaMy0Bedr9CgExyAOBHOKP8MoLCXUsjfv5D8mT8mzoM9su gZCf+aYpOnJL5bFdQgZF6R8svYPBHsqhEweDXEivWq5EYF1skpPbCGB3PYzWAIF3cWPj94dsnJf hLmCroTtntpBa5WYtSNg0x1t 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-acpi@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: 13882968 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 DF17B1DE880 for ; Fri, 22 Nov 2024 09:48:25 +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=1732268908; cv=none; b=IMX/MrHhavYZTM/XNNl1GydXIJVFYzdJiSPXnhgSdYP7215zlnGJAM4XNY1IbcgXBGosJM1kJJ3+YJJ3eQ96LJOiUg1p42JuHlSDXN+0lfkpHcRd5tNqEhg9EsiSzGPBPta5HzKIjCjzWByU8bPgg2MXpR1NL+qGvpXMIkYlvqk= 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.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="Swx+cqMp" Received: by mail-qt1-f173.google.com with SMTP id d75a77b69052e-4613162181dso11148311cf.3 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=KR83ER3zehLQBfJMy8B6SRPtlcO83a9rZN9C9UWw81T8GuLHtUfVU8orCyQRwcPVlc mIdh3pemU4pWzLtdnxkT/Gs8j4k0DacVM/B1b5J+9i7QehLDBoHUwRx5mh0nmL/oBFIj dQbKqOhFFpxy28pE2v42pdCLyEcW42cAcL25dtUgbWriRfMo/c5H7hL36o2dtV5fJK3l AZHMX/PCA4jKa4diUCtZtf+TyV/IsgVur0OverSxGBc7aAWq1TLlvr46DU8gsMDRlxG1 /spqQ8p3oAZuPTywbe1CMZsI3RqwvAsot1XvxRqEVSnFometlJoimG4YUOyLt2Qa3pPP 2PPg== X-Forwarded-Encrypted: i=1; AJvYcCXVI0bjonhI8Xk7LT1C14giR4z9b3ICur0JiYfec1pB37EdWC3Gppbdfhufixa6XOwhEJWerDB7Mn/g@vger.kernel.org X-Gm-Message-State: AOJu0YxgzHO9pGRh/hNQoypYjwtXCvpbuna0rB5gwAcPXQzAihKTFX1S oal1HhYSXY1I1jmvznsN6xTBDkp8CRZ2OL6YSUApDMdeuj93yhCe+wyEN7GVEQ== X-Gm-Gg: ASbGncuu4v6YMYrLmat8G/1CGmv1pWEPMoTIPGSd52pNtv7RHiuAhC3XuZwPqzHPeZA PAOvtvaL4uMx8O8zMkx8bqtPUXha3S1N7uJF5x6GKYIdoKSeZG5mX81q3a9SJUV2hdbdyk3+QDo nK7IVNjhy0DvuXSrS/qw6ZteLBWG4bfgTMpIrDMcM9lf5GaCPUkFyMI92EXQY9eI1UBrZxcBjsi txwc/NbEQpvzwJsJrAGY/c7UsH4dBkuYvCWPMTJAPMNFwPkcQB1FrknRe0skamDGnJqVReS/ORS CekCjLzoaz+5wQKizYj+S61I 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-acpi@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: 13882969 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 41B741DED6A for ; Fri, 22 Nov 2024 09:48:27 +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=1732268909; cv=none; b=VPCdnUo9p/wZNemz9Jn2OmOWeZpGA/JEFCXbc/zdCpIUAwa24Vn1U3F0YebB8n6sLJRMRwiXMSwGr1ZbAO8UMUdy3Hwhh1T76RLuIHYN1QJ3VDGzjdaHFaX6PFp3cm7iN6qmwMfDkGV56UNi+JhxBcFyVuiiMyh7qh35Kfm08Ks= 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.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="A/sY87vJ" Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-460b16d4534so11782301cf.3 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=rU+s7SY3wZIDKBBPNsXzWaShqP9eGbPqN9Xjy4e0fB55rQ9zn9kppCA37tNTzQK6My 7uSbU1gnty8JD2J2fDwmuzVQFMWG4EkXKoEXPIwlemdhPRr9iOVhuZlXARWLJl12WHL/ FMAefjmZLYCYTuziq3M1+DGsLYa3V1/TS/cZP85WfpKHNChTb62qdV6zVKEDfToUWAYq VOV3n2HkCODMPobzLI8JijzVbA43UrMBv8+htZeCUp56lTJwICdHvuILDMsvhD96yT30 gsMFu4tJ3L2/EXx037yLt8NFPbs8oiD018xYtc88W0syYo2/oPButT118MjiPQ2gVGrx 3RuA== X-Forwarded-Encrypted: i=1; AJvYcCVFqwNkgWN6ZkzJjBfzoLWpDuZYrA7c2ei4O9LUSFj435wWnmF1lTsDKPevazpXaoFqKSjvWkprHbqJ@vger.kernel.org X-Gm-Message-State: AOJu0Yyx2DM9+uONJKsm4miOCBcUgT7s4lccdRcxx6mWTnwtDHDVJPui C5wQo1CEG0ZEDEctVxrnR2ahWBLHEtQqg9QtBo1mcK5vE6W0jwAoJNGC0jgKlg== X-Gm-Gg: ASbGncuKqQY+EZTvnuqCQ3REzqqsMhjMqppJ6yDsCa4VxqUBcQpyK0qHrdE1XGHG+hp GykRTBDn0aV+2FX801CEJy8LeZFP5nN2tF01JgmyIqs6L8Yo3PHCqX8VZQNV6n0THyMdZPYm/yK zCTULBxYzAodjHgoP4NwA8YNvlSUKYuNhF5gyeJia3MkN8E4ETf1SojhiKkSCmdSn3kDenBpFzU yrmcM6QBOUTzlq5isRnYafxPWOg7sERs7gOBQ0onrHhzMMrbbZ3/f59EYEJVuJtfEQGghbSTLcX GckSaTs9nJxlQTbsTaaX5fQ5 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-acpi@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: 13882970 Received: from mail-vs1-f49.google.com (mail-vs1-f49.google.com [209.85.217.49]) (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 E02461DEFC6 for ; Fri, 22 Nov 2024 09:48:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268910; cv=none; b=aaC81iE6ynK5Rri34aYCuxv0yhjGrG1GzeWPqC0tSFWvuaaP6nF6DAFuucNjA2dLhvm8PaB6AAqzbyQxxCjplNz6Xe+sypYJr2lGj9gue8zxtNqUg02Gpy5UgUzFUNn2VzCPOhYPtllE4x7HMlcl9nM2N/hY4Rwsc13ea8JIuDc= 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.49 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-f49.google.com with SMTP id ada2fe7eead31-4a487a7519fso322949137.0 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=J264BcfYU1dfqCKNFrolH8aPT/4WQQVp0RUl77Y4if7v+oRgaG9ZhLAmelHr+WLB9s RD5sAIuv8vDWi+UJLDrzJLHWYqcygFj76WVBz3UziNsPh6h7E+3Oc6S2MHdu53/khM2f LbpQgVSgLwRiY/E4KrmAcw1fUbOG3n1eYffM+peFj/LhR5Bc0MUbGaLcEU818VnZR/5F znwml8qKkzMliCDBvy80/FpEqURxlCjAJaMweb0tRrLwKtr+oa/aEVUdgDGUmAIe43Yq IENnEruVWNUWXSfMZJhWfidS0MSfM6HT7QT5bRzOyrSgjKXVwWB3td9fJhl7K415fKLq U2Jg== X-Forwarded-Encrypted: i=1; AJvYcCXxmQOAxRlN/voV8/kwEa2+JOoASqH44ZL/CnlhK+bh90RZatAoB3dqJH3TsqqDPGiPAnaPPEXwzOa0@vger.kernel.org X-Gm-Message-State: AOJu0YzNiKmERMnNCAEA+zuTMQLhwfZZojk4UtQk/ZrhoRyRznIOAGqu gWM3gA2AAndqPhfTVXbNBiJXwfV6fROlToENKaP17cdPlOruENl5RsFvlmrv0g== X-Gm-Gg: ASbGncud/Hspmg+dNh9k/OCWnZbjXkLdYmam5wpL/aibKPCf/SRbYHAt4lpS4BA1lLW CXTgjIs0dRja79HUShkU3uXKutCacy6doCSeevJIySGxbWGRCDQnpT/+M8xu556af3JUCeL2HU/ 2bYTNgc/QWR6hS5DCZoxX78Z9ooGMly5QLKIK8EYt9lJsWGBleZAiVfiXWwTPQVsqg3oz9ceE6f oBw3WyGG9q6vrYaZfm+CW+JYsExTwvtTwUlPNCPkg2bQWbWyyPQH6gEchp5ZDzDYhffJp47cQ+j RtSM4K77sRC1iPxnORPIo7oc 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-acpi@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: 13882971 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 92FF81DEFF6 for ; Fri, 22 Nov 2024 09:48:30 +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=1732268913; cv=none; b=QD+3VN8XsGt0Z/1RRMq4kkZtL6/z3aaAljl2Ru8B5YEKMe4sORnE2p4OdmictXVfu4CSKiV7gD5G7vGjQimQH1PRPjUmDIljcN47f2gmGg24HF7R2WV6bFmGDsMuI7KfOk2IzO7j4puV/+CwxybvKENdx5+9neR2dmy6NklXisA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732268913; c=relaxed/simple; bh=/xyrOk13WfYwXnzGF1BEMgqEZvLsICd5gWhhYG2cImQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TJyw6eHU4kB9xIPHv4YfF4pna02jN9cEYNxa0O+eE/EIOoxkYLPresvm1e1LTIjFwBMMWNiqsnQ1k6D6KbxCN5NObSPig0KcHZRblWwxtkneyeG5UMEzM6BDKmTY+ZPG1OE1IIyl/gwYI4v894rRhySXn+XdoICBHS4ociFF8sA= 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.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="K4JcKc1e" Received: by mail-qt1-f175.google.com with SMTP id d75a77b69052e-4609c96b2e5so12689561cf.0 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=ZeMVOI6xkG6iCeeebcgMVe+NdwlglQGpyqxbpmlI3QPkM0SfpOHMkgOikmjpxwwpyC xd6X2JbDWk6GtvzqZRv9EF1QOHpSveifhox+wo1DFNAk7WjaX6XtsZN4ILObIVQfhnTE ezg/QQNGcUkoeUXDf3nkH3rp3OrgE4fGMk4WyGc8YsGSMgiptbGcx7bRkhhFDm2Jr8vF IoTZ630skEyqzul5GNZR6IN6BC9eDC2fIE8bF/eJlTZYIgS6H91J64Byppo8SuwjX2Si e6nYBN1sjR2qUn9gHJab1gK5/btXJW/v7vO/2tw4z0Ls2xqrGzUCH1OsJdOVxFcCgASO pEGA== X-Forwarded-Encrypted: i=1; AJvYcCXGuurIb2owTFTO1j+Ec9cExtNhuYdgbmmseIddj1V4USnjutrqoKmS5KUaT1FXvzq4yENktG4ySmdG@vger.kernel.org X-Gm-Message-State: AOJu0YwDpQQuGASC9ZuFSAnQmv6sA8n/UmJzEnQPVrDGYSpHUBbIbVOw wK/55PMrhDiWuEuzPjhoyzXWRWo8JPutPzSoyI1YL1pPzbEpUkplxhBD8xYh8Q== X-Gm-Gg: ASbGncvAd61iDSeb3y5kHWNktobDJjqoIOLZb09ZT2Hn35iX/KDjxhBQpEb7mYGDQki PdcTZG6VWsKdypB2b1WzivJWoefCTFOtDFiNuZHPpgg5Nm0gCDfBBUbPJLxTUhY0rjeHwCP/6fs GOwUhg5uCIkr7wBzKxUcgGSwcFePL0p3wmxE6rojtrpZ9SnN6k26fy2SXOO+rQIuJsW0VqdKZiS 0QJAgOF/zGvZOsL4k6D5ZOjtHi6nq1gHOUzfMZ7CFn6qdFkOAaTy3/j8s1oZ//+oNxGvRfTS348 Ibmb18WizKqOSwFU34oF2kiS 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-acpi@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;