From nobody Tue Feb 10 01:59:58 2026 Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.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 85D682163A4 for ; Sat, 25 Jan 2025 06:47:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737787646; cv=none; b=God9C0kTaZ+2gdsz63OIOIj0/UL58FZtaIivRV1x4IJs7Zs98+DmDz5JIogI8rTyR6m13sD9yZkJ+397X5iiUNfx29CIuMGCYUUp4kgE2FUIP0b4cN/zcEFhFdpcZZKwgWJtg1yF30YtDIuJNZ4AvSoIx+M7i1KRegC74eybJHI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737787646; c=relaxed/simple; bh=+wjwpsPj/1sPPCtA3vtTlM8eMk+tU17VlVzU6QrjcdQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NzmlbkyuxiLEquk3wu7yzz2iwlTH35PDL2APJtF2sYC/iK7AgD+Ok/LXixUrVnUZPUdzKqTNfc8tDyDlTT6drMO5eXvxKk73ZdHBCRA7okJvAO0LuLY+r+wPHzOMvfl+OX0TqHQ7BFnGeHBxCcH5KxJ8K6sgVvx7icco0hzccNg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hGHtPyqv; arc=none smtp.client-ip=209.85.166.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hGHtPyqv" Received: by mail-io1-f53.google.com with SMTP id ca18e2360f4ac-844ee43460aso183965239f.1 for ; Fri, 24 Jan 2025 22:47:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737787643; x=1738392443; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jK0UrBy056BGUqJ1ryqJN7gZOTsk9pTFsv0ec8+B0yU=; b=hGHtPyqvojAsmEX3KJy0sxRedcRbYR4dt84MQ6vrP+g6NSVj3AC1qlHVjtY9xrRUW1 nlokq5THFeCxcBMFQvQP3j5yxFb1QBRvvT7WK9xYZqnmgEiMcrkxPF8nI8MJ5lVqO4tk Au/HGDKRW9//inxwJse/o9F2E49mp6MVW07L+c1D7dQBtrQTP6gQ9GDBTjjhtlFrocju L2M66DL4dWcWBRQ/x3NhB5o72bBTYUTmwC/TvURBUiRWaoZgwWvmr+AjHivWgwS2KU+h dufPBXnn0Xr8vHnQUXfUklBBri9aef4pS3hbuamaHjOpJgar7VQf7tUQkdE23JLyd9b+ pV4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737787643; x=1738392443; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jK0UrBy056BGUqJ1ryqJN7gZOTsk9pTFsv0ec8+B0yU=; b=IBwA9Ge29yF3QLy6uQjqUksDY4Mxs7wIxrmBmJ/biQMuGzAWdZDrw3VnmjW3fOK3dW PpLmfSyNOabTXBNnZK8AFUGZR0uylugHsxxsTNYrr/2spn4mNJcsPz4gYyW5ulOYosaV W1m9M8yefumJTdk2DvvHWSgsCBmxR9Bqh5T7Xze/5wss3Ybk4MBb7ZYIORDHIEElpkXC G+RMhF5sm0afDLlrUEspv0v8AkLaEZThunLZVUndUc0zQjIOBYhPRSjXAVT+YdT/eG6F uxw0y+PFAFV+2v30fifPAGwIynjffqpOndfAgw/NVTJbM93urMffVkey6eiJ8Q9A8LuO ovqQ== X-Gm-Message-State: AOJu0Yz0DZG/KUFNzyr35ffXj4yuEeTY7v4G0YRvHK5hsd2pmYVGDWn/ BrApwWL+qNeexM5jchJf1oK11+MHDHgEJneFqnHYP6r2J3wORkqGCpLiPg== X-Gm-Gg: ASbGncuP5sKGRWED7kZRSo+8um0Kwp/jNgE9YRZasctGcU1BLV7bGm8Yn9orkOzQm0l uJXjtt8+qp6G3dG2ZsSlxxJnCpKeZDnvbG2Gl6vSlbC6KC1rrj87ZQtLPr5Ve02hhdDoDwRHCf7 wqvWyz3x8QeERhLg0jteypmyvp366N2om09y74znmNSTHDif+lvMMlyb+MSE7HghrINRLs/A+Qg 6jbnrzFnYgBODGrvUkwrY2At8CqQKoDH+MAUAATO29uueNQsEOmqn3bFzYZPGZz4qQHPcaiipXo BQCs1nbHNDBsRA4CZS3QO3rdHIuOQdon73vkZg== X-Google-Smtp-Source: AGHT+IHayxOMJs31PstVOcXn+82f63fxvtyYlv8CLQzhR0Q1eGOVyp3qvY9W6qSZ3tkYze4hI3v78g== X-Received: by 2002:a05:6602:27cb:b0:83a:b500:3513 with SMTP id ca18e2360f4ac-851b62426b6mr3493044439f.8.1737787643439; Fri, 24 Jan 2025 22:47:23 -0800 (PST) Received: from gandalf.. (c-67-165-245-5.hsd1.co.comcast.net. [67.165.245.5]) by smtp.googlemail.com with ESMTPSA id 8926c6da1cb9f-4ec1da476fesm1174144173.58.2025.01.24.22.47.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jan 2025 22:47:22 -0800 (PST) From: Jim Cromie To: linux-kernel@vger.kernel.org, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: intel-gfx-trybot@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, Jim Cromie Subject: [PATCH 43/63] drm-print: fix config-dependent unused variable Date: Fri, 24 Jan 2025 23:45:57 -0700 Message-ID: <20250125064619.8305-44-jim.cromie@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250125064619.8305-1-jim.cromie@gmail.com> References: <20250125064619.8305-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" With CONFIG_DRM_USE_DYNAMIC_DEBUG=3Dy, __drm_printfn_dbg() gets an unused variable warning/error on 'category', even though the usage follows immediately, in drm_debug_enabled(category). For static-key optimized dyndbg, the macro doesn't actually check the category var, since the static-key patches in the proper state. The compiler evidently sees this lack of reference and complains. So this drops the local var and refs the field directly in the macro-call, which avoids the warning/error. Signed-off-by: Jim Cromie --- drivers/gpu/drm/drm_print.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c index b5fe0c37dcee..dcdf21eb73f1 100644 --- a/drivers/gpu/drm/drm_print.c +++ b/drivers/gpu/drm/drm_print.c @@ -212,9 +212,8 @@ void __drm_printfn_dbg(struct drm_printer *p, struct va= _format *vaf) { const struct drm_device *drm =3D p->arg; const struct device *dev =3D drm ? drm->dev : NULL; - enum drm_debug_category category =3D p->category; =20 - if (!__drm_debug_enabled(category)) + if (!__drm_debug_enabled(p->category)) return; =20 __drm_dev_vprintk(dev, KERN_DEBUG, p->origin, p->prefix, vaf); --=20 2.48.1