From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dri-devel-bounces@lists.freedesktop.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
	aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.lore.kernel.org (Postfix) with ESMTPS id C3028CD379F
	for <dri-devel@archiver.kernel.org>; Tue,  3 Sep 2024 17:35:10 +0000 (UTC)
Received: from gabe.freedesktop.org (localhost [127.0.0.1])
	by gabe.freedesktop.org (Postfix) with ESMTP id 43F8010E05A;
	Tue,  3 Sep 2024 17:35:10 +0000 (UTC)
Authentication-Results: gabe.freedesktop.org;
	dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="HO7SRGxz";
	dkim-atps=neutral
Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9])
 by gabe.freedesktop.org (Postfix) with ESMTPS id 573F210E05A
 for <dri-devel@lists.freedesktop.org>; Tue,  3 Sep 2024 17:35:09 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
 d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
 t=1725384910; x=1756920910;
 h=from:to:cc:subject:date:message-id:mime-version:
 content-transfer-encoding;
 bh=O8h218KSYzFJ7ytdusPeiz4McpB/2x8TF2/ID7soWz8=;
 b=HO7SRGxzbZp0i87bAa4fNyDnyS5jdBJaXwN4zL3hadX4d6TCJWKlyE5W
 NHZeNi4d7XwO9bA2AXHsiF1XwIgbif4OSGqVNEJcXlvM6+ihUydlM6bLw
 hf3fDLG6zw9u4GgpevT9yIImpOd7qvVufWruMHAcOMJ42HGYSLGjjjTqr
 r7942abC2j08TVbi4716A2Q28iDHqRIQvwJ1cCYMv4CIw7nW/vjd76qar
 bv5RKuDb6Y5eSU+i3r7WO3LMsjcJ35fIWv15xA8gE958CbCDwhZsAG3Yh
 ooVkwUPkZwEGsKhDtvqZO/OLeAgKM20wW9MVKnKE6DTqtBwK/B5wXpMYL A==;
X-CSE-ConnectionGUID: x0TKXKnKTdOa4Nrc+6Nu4g==
X-CSE-MsgGUID: I696AF0gRVykrWqUWfa/Dg==
X-IronPort-AV: E=McAfee;i="6700,10204,11184"; a="46528580"
X-IronPort-AV: E=Sophos;i="6.10,199,1719903600"; d="scan'208";a="46528580"
Received: from orviesa004.jf.intel.com ([10.64.159.144])
 by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 03 Sep 2024 10:35:09 -0700
X-CSE-ConnectionGUID: mkdkZB6pQea5sqJ442/vaQ==
X-CSE-MsgGUID: BGcdTzdGQkWy1P1YXpX1GA==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.10,199,1719903600"; d="scan'208";a="69845336"
Received: from sschumil-mobl2.ger.corp.intel.com (HELO localhost)
 ([10.245.246.148])
 by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 03 Sep 2024 10:35:08 -0700
From: Jani Nikula <jani.nikula@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@intel.com>,
 Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH] drm/mm: annotate drm_mm_node_scanned_block() with
 __maybe_unused
Date: Tue,  3 Sep 2024 20:34:37 +0300
Message-Id: <20240903173437.3212437-1-jani.nikula@intel.com>
X-Mailer: git-send-email 2.39.2
MIME-Version: 1.0
Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
Content-Transfer-Encoding: 8bit
X-BeenThere: dri-devel@lists.freedesktop.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Direct Rendering Infrastructure - Development
 <dri-devel.lists.freedesktop.org>
List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>,
 <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe>
List-Archive: <https://lists.freedesktop.org/archives/dri-devel>
List-Post: <mailto:dri-devel@lists.freedesktop.org>
List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help>
List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>,
 <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe>
Errors-To: dri-devel-bounces@lists.freedesktop.org
Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org>

Clang build with CONFIG_DRM_DEBUG_MM=n, CONFIG_WERROR=y, and W=1 leads
to:

  CC [M]  drivers/gpu/drm/drm_mm.o
../drivers/gpu/drm/drm_mm.c:614:20: error: function 'drm_mm_node_scanned_block' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
static inline bool drm_mm_node_scanned_block(const struct drm_mm_node *node)
                   ^

Fix this by annotating drm_mm_node_scanned_block() with __maybe_unused.

Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/drm_mm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 1ed68d3cd80b..ca254611b382 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -611,7 +611,7 @@ int drm_mm_insert_node_in_range(struct drm_mm * const mm,
 }
 EXPORT_SYMBOL(drm_mm_insert_node_in_range);
 
-static inline bool drm_mm_node_scanned_block(const struct drm_mm_node *node)
+static inline __maybe_unused bool drm_mm_node_scanned_block(const struct drm_mm_node *node)
 {
 	return test_bit(DRM_MM_NODE_SCANNED_BIT, &node->flags);
 }
-- 
2.39.2


From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dri-devel-bounces@lists.freedesktop.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
	aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.lore.kernel.org (Postfix) with ESMTPS id DBBCBCD37AB
	for <dri-devel@archiver.kernel.org>; Tue,  3 Sep 2024 18:32:14 +0000 (UTC)
Received: from gabe.freedesktop.org (localhost [127.0.0.1])
	by gabe.freedesktop.org (Postfix) with ESMTP id 4DA6910E395;
	Tue,  3 Sep 2024 18:32:14 +0000 (UTC)
Authentication-Results: gabe.freedesktop.org;
	dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Q/s5H/y1";
	dkim-atps=neutral
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14])
 by gabe.freedesktop.org (Postfix) with ESMTPS id 87BE210E395
 for <dri-devel@lists.freedesktop.org>; Tue,  3 Sep 2024 18:32:12 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
 d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
 t=1725388333; x=1756924333;
 h=date:from:to:cc:subject:message-id:references:
 mime-version:in-reply-to;
 bh=bbK/ChdCGWWtAeomVfnTC1pDOginoVo1EJRCCfUvjVM=;
 b=Q/s5H/y1YpmxqIc3emOw5BpOqH8E3aeXmD79YvG/N2tIcXG9nlsO1DmS
 ygjAN+ry0IyVwJVHszIN99jZA7wJ4nJF3/IzsHlUHMDBfGIK36/1MSp2z
 mkok5NUFBUqF3BP7ulu+mmE07EGbXwZvanOvmv/yIyxeS72i0cJaeZjUR
 I4A1UVQQirLg2az+EZzL8v9BpRqfmUKDumU11TmaAC3VENNX1rQ6U0bjp
 RcWnU3B8J56KDH+unEhhS2L58MnVkDxZtyH/rJwNm5gNcdg71CtW86arM
 7lL1gbCwgzHeVRkUQaZ5WzQ/uQeDqEudH/KWpLvOShuwKyvX+XdyUTqAp Q==;
X-CSE-ConnectionGUID: 20zPkhUTTX+WToAjyQ+kgg==
X-CSE-MsgGUID: SKbhEPluSMqzRaKv74k3eg==
X-IronPort-AV: E=McAfee;i="6700,10204,11184"; a="24200701"
X-IronPort-AV: E=Sophos;i="6.10,199,1719903600"; d="scan'208";a="24200701"
Received: from fmviesa003.fm.intel.com ([10.60.135.143])
 by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 03 Sep 2024 11:24:53 -0700
X-CSE-ConnectionGUID: NCSSc9ELR9Wo/ZrPkYbUTA==
X-CSE-MsgGUID: 33/cm75lSe25cS5w8/mXNA==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.10,199,1719903600"; d="scan'208";a="69155334"
Received: from smile.fi.intel.com ([10.237.72.54])
 by fmviesa003.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 03 Sep 2024 11:24:52 -0700
Received: from andy by smile.fi.intel.com with local (Exim 4.98)
 (envelope-from <andriy.shevchenko@linux.intel.com>)
 id 1slYCw-00000004nza-2Npy; Tue, 03 Sep 2024 21:24:50 +0300
Date: Tue, 3 Sep 2024 21:24:50 +0300
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/mm: annotate drm_mm_node_scanned_block() with
 __maybe_unused
Message-ID: <ZtdUcteHkNDNbZAw@smile.fi.intel.com>
References: <20240903173437.3212437-1-jani.nikula@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20240903173437.3212437-1-jani.nikula@intel.com>
Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
X-BeenThere: dri-devel@lists.freedesktop.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Direct Rendering Infrastructure - Development
 <dri-devel.lists.freedesktop.org>
List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>,
 <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe>
List-Archive: <https://lists.freedesktop.org/archives/dri-devel>
List-Post: <mailto:dri-devel@lists.freedesktop.org>
List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help>
List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>,
 <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe>
Errors-To: dri-devel-bounces@lists.freedesktop.org
Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org>

On Tue, Sep 03, 2024 at 08:34:37PM +0300, Jani Nikula wrote:
> Clang build with CONFIG_DRM_DEBUG_MM=n, CONFIG_WERROR=y, and W=1 leads
> to:
> 
>   CC [M]  drivers/gpu/drm/drm_mm.o
> ../drivers/gpu/drm/drm_mm.c:614:20: error: function 'drm_mm_node_scanned_block' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
> static inline bool drm_mm_node_scanned_block(const struct drm_mm_node *node)
>                    ^
> 
> Fix this by annotating drm_mm_node_scanned_block() with __maybe_unused.

FWIW,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

-- 
With Best Regards,
Andy Shevchenko



From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dri-devel-bounces@lists.freedesktop.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
	aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.lore.kernel.org (Postfix) with ESMTPS id 9F4B8CD3431
	for <dri-devel@archiver.kernel.org>; Wed,  4 Sep 2024 09:19:20 +0000 (UTC)
Received: from gabe.freedesktop.org (localhost [127.0.0.1])
	by gabe.freedesktop.org (Postfix) with ESMTP id 22FCB8911F;
	Wed,  4 Sep 2024 09:19:19 +0000 (UTC)
Authentication-Results: gabe.freedesktop.org;
	dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="etV7KExd";
	dkim-atps=neutral
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13])
 by gabe.freedesktop.org (Postfix) with ESMTPS id E10448911F
 for <dri-devel@lists.freedesktop.org>; Wed,  4 Sep 2024 09:19:16 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
 d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
 t=1725441557; x=1756977557;
 h=from:to:cc:subject:in-reply-to:references:date:
 message-id:mime-version;
 bh=VKpRU+5B793TwrhoCZoT/4dHv803Xk1ulHEQY0NeDhQ=;
 b=etV7KExdsBZFtHgB2u7DhoGaxic3POoYEO0Cjw4Ng7EGAdx+JGxtNLqe
 ifdbBJc6kb/ESGYaQXDT6Fb1/aD3VKGwmHEtKzNoGrdbGgMyebeMh1Bjb
 04x/BWlTddIeLIrzlQTSNfw5SdJC/PamWSjb/DyuCbLyX1Gbh1KHxQCWG
 5YOsnPrquHGlakk44GKsHisFdJ1ZElC7WBcnD2IrH2zOp1j5y242P/kuk
 1E3M/oEeCLXyzGDzlyumC9wNpClDoJ+E0+6VPFYEekP7+1wz/SCIx01CW
 jkL0CkbhoQYd9W20aQ/Eb3gKceZT11F8HAdEPm3prsPcuGrUJ4NmpRQBe g==;
X-CSE-ConnectionGUID: 9g9FXOOvS2u6QUTlrjCAHA==
X-CSE-MsgGUID: GyfUhu9qRUy9eMYpbihjHA==
X-IronPort-AV: E=McAfee;i="6700,10204,11184"; a="27006121"
X-IronPort-AV: E=Sophos;i="6.10,201,1719903600"; d="scan'208";a="27006121"
Received: from orviesa008.jf.intel.com ([10.64.159.148])
 by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 04 Sep 2024 02:19:16 -0700
X-CSE-ConnectionGUID: xQgPzs1mTHmSxlfcNCE1MQ==
X-CSE-MsgGUID: HJMUC4W+RImol8qOZWcN0A==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.10,201,1719903600"; d="scan'208";a="65940636"
Received: from cpetruta-mobl1.ger.corp.intel.com (HELO localhost)
 ([10.245.246.18])
 by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 04 Sep 2024 02:19:14 -0700
From: Jani Nikula <jani.nikula@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/mm: annotate drm_mm_node_scanned_block() with
 __maybe_unused
In-Reply-To: <ZtdUcteHkNDNbZAw@smile.fi.intel.com>
Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
References: <20240903173437.3212437-1-jani.nikula@intel.com>
 <ZtdUcteHkNDNbZAw@smile.fi.intel.com>
Date: Wed, 04 Sep 2024 12:18:57 +0300
Message-ID: <87r09zsrni.fsf@intel.com>
MIME-Version: 1.0
Content-Type: text/plain
X-BeenThere: dri-devel@lists.freedesktop.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Direct Rendering Infrastructure - Development
 <dri-devel.lists.freedesktop.org>
List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>,
 <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe>
List-Archive: <https://lists.freedesktop.org/archives/dri-devel>
List-Post: <mailto:dri-devel@lists.freedesktop.org>
List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help>
List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>,
 <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe>
Errors-To: dri-devel-bounces@lists.freedesktop.org
Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org>

On Tue, 03 Sep 2024, Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> On Tue, Sep 03, 2024 at 08:34:37PM +0300, Jani Nikula wrote:
>> Clang build with CONFIG_DRM_DEBUG_MM=n, CONFIG_WERROR=y, and W=1 leads
>> to:
>> 
>>   CC [M]  drivers/gpu/drm/drm_mm.o
>> ../drivers/gpu/drm/drm_mm.c:614:20: error: function 'drm_mm_node_scanned_block' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
>> static inline bool drm_mm_node_scanned_block(const struct drm_mm_node *node)
>>                    ^
>> 
>> Fix this by annotating drm_mm_node_scanned_block() with __maybe_unused.
>
> FWIW,
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Pushed to drm-misc-next, thanks for the review.

BR,
Jani.

-- 
Jani Nikula, Intel

