Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1240502rdh; Fri, 27 Oct 2023 08:26:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH8O0xyaTcVviPin9wPtOCVFCsNnERj/ynDc6yMuR62yR5yvv/eV/0ihBk/esHo8mLm3/QW X-Received: by 2002:a05:6870:1344:b0:1e9:94c1:917a with SMTP id 4-20020a056870134400b001e994c1917amr2313316oac.54.1698420411000; Fri, 27 Oct 2023 08:26:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698420410; cv=none; d=google.com; s=arc-20160816; b=G8m9goDBFt2U8e7/5MuqH9vZyvZC3MyV1t3WyopYZv6M5962uJhCaYQrX0YpmrqMEv 6kYuDObZBPUL3IAvUUlPk+737ABlGaX+qWNpkhEfZQeb7P0nlYnM5Y607cX1cW12Y7Qo 9WhSyvL1Faa0w4Q+RCpbafZ331ev1q21rkrdO0SDoMT03pGo8Sh1H4c5m/h7J7hq5JM/ JrRC9RvNaw3laaMh+c3jLJrCqE2WavbSuXG9sTH9OumbZ4UDl2GCd90Vdd9H/PLt+XUV N7URcrH1FThMzHF4sjRLP21aWtVwrUNVSOQI9jqNx4YXD1v56ZsQdtcsT1Uc3nDJMIJF Sytg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=g841opa4u9oO/VHFvoijZOKMtjwd46jKmFGu2qT+AW4=; fh=npI2rx8gQ4awUndgmVIYmpP6WrLkhTTQQa1fetDTZq4=; b=l4CG2AUPs2XPaPGeG+7yrHOtws41vK6aIjYHo8TaiWy9sbuuuaduvUUIrWeaxo1JW6 gQZt8n/shzYbh4To+QGuXtfNHHEhHSraEia7TjsOjEUt+ifxV0BN5GAAoft+tLl6VixC 524LAXPIzZvY/n+h5ynEv5+cUbaoIaNL+aLW/NDZuTqdeGekQiYQ1hp4dg12rnCSVsFV cmTTYGPJp8V7JPAJtepgOVRB9JlIzvblrEKq9Gih2umsxIfYmbaYg05K6kKFkbvmWONs F7XUSw7XXGJw6CBZCvG0I3qFO7ysKrwaiNJ98UXFXLhUCdUBVC5Iech1k/AEhAbCVyyY QojQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QQRAlRCt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id 189-20020a2500c6000000b00da1e007da59si1967412yba.35.2023.10.27.08.26.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 08:26:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QQRAlRCt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 45101801B818; Fri, 27 Oct 2023 08:26:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231925AbjJ0P0m (ORCPT + 99 others); Fri, 27 Oct 2023 11:26:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231906AbjJ0P0l (ORCPT ); Fri, 27 Oct 2023 11:26:41 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22259186 for ; Fri, 27 Oct 2023 08:26:39 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE0F1C433C8; Fri, 27 Oct 2023 15:26:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698420398; bh=RxaYtqGr2+GxYO6xhl6ZJJP1os+XOSBfgC7UHEbUye0=; h=From:To:Cc:Subject:Date:From; b=QQRAlRCtgdel7XpyAAQMZUYi0rbo4jkuK7LtpPJewjmbSzpBVZ3brHDPORY01iu+x 2otGvxIXE/9aLVuQ8bTPEjSZcxkMtZGF2RKNabJiJh4ZD+sbsBT5NiU+C43/OWhPxF 3+iaHWEZgbx0QvB535iE0ssAUTipyab/mODrRRTQGNNUutvJfnwitMnyRm5shBII5K oPmMsNPhNfXkvWeNhrprqhc7/eFTMqYmY3Sdtxy3zsI8qySpFv2gx0YOAx+tL40MH7 0T8eVesi1/TapgMZY7BugocSbki5ny8dU8aeC5Hx5xWE7KVVEZhBZuHPwlpL2oVVAl 7uNNFOM/bx4ZA== From: Arnd Bergmann To: Jacek Lawrynowicz , Stanislaw Gruszka , Oded Gabbay , Jeffrey Hugo , Karol Wachowski Cc: Arnd Bergmann , Krystian Pradzynski , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] accel/ivpu: avoid build failure with CONFIG_PM=n Date: Fri, 27 Oct 2023 17:26:23 +0200 Message-Id: <20231027152633.528490-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 27 Oct 2023 08:26:48 -0700 (PDT) From: Arnd Bergmann The usage count of struct dev_pm_info is an implementation detail that is only available if CONFIG_PM is enabled, so printing it in a debug message causes a build failure in configurations without PM: In file included from include/linux/device.h:15, from include/linux/pci.h:37, from drivers/accel/ivpu/ivpu_pm.c:8: drivers/accel/ivpu/ivpu_pm.c: In function 'ivpu_rpm_get_if_active': drivers/accel/ivpu/ivpu_pm.c:254:51: error: 'struct dev_pm_info' has no member named 'usage_count' 254 | atomic_read(&vdev->drm.dev->power.usage_count)); | ^ include/linux/dev_printk.h:129:48: note: in definition of macro 'dev_printk' 129 | _dev_printk(level, dev, fmt, ##__VA_ARGS__); \ | ^~~~~~~~~~~ drivers/accel/ivpu/ivpu_drv.h:75:17: note: in expansion of macro 'dev_dbg' 75 | dev_dbg((vdev)->drm.dev, "[%s] " fmt, #type, ##args); \ | ^~~~~~~ drivers/accel/ivpu/ivpu_pm.c:253:9: note: in expansion of macro 'ivpu_dbg' 253 | ivpu_dbg(vdev, RPM, "rpm_get_if_active count %d\n", | ^~~~~~~~ The print message does not seem essential, so the easiest workaround is to just remove it. Fixes: c39dc15191c4 ("accel/ivpu: Read clock rate only if device is up") Signed-off-by: Arnd Bergmann --- drivers/accel/ivpu/ivpu_pm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_pm.c b/drivers/accel/ivpu/ivpu_pm.c index 0ace218783c8..e9b16cbc26f4 100644 --- a/drivers/accel/ivpu/ivpu_pm.c +++ b/drivers/accel/ivpu/ivpu_pm.c @@ -250,9 +250,6 @@ int ivpu_rpm_get_if_active(struct ivpu_device *vdev) { int ret; - ivpu_dbg(vdev, RPM, "rpm_get_if_active count %d\n", - atomic_read(&vdev->drm.dev->power.usage_count)); - ret = pm_runtime_get_if_active(vdev->drm.dev, false); drm_WARN_ON(&vdev->drm, ret < 0); -- 2.39.2