From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 52E1F1925A6 for ; Sat, 18 Jan 2025 16:13:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737216791; cv=none; b=fl1wKT5IADXKEV2JB2F4IWHCUdk0xLNTxkR/tDjBq4pO+5v1AaLxZIfmx6I6RGHjDX0gsXWNyzoZ7Ok8E5W13D0CRYvhvXxtc4cqdGRrE4Ea36StKwWiqtxUidFO/eCqnyW/8YPn3ZiHvBgt5Lw9I/gAjAefdczxqTteJT5Il1M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737216791; c=relaxed/simple; bh=q8RyNIr32FN7v+ql+YL681n/x/yHex2Coz5W1qwMECI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kcUM+ho6tio9Z8t3J1k+CU90x1RklXpKvSQzLCsiLQ6S16+/v9lNYCfPps+ATlBwT8p44W12kAmVUuC6Dp54YHFo1CHMQiLNGdaBpXz/iwDyqYo9bGDmjjVcdPjnvqfuihAltqLBSF/ZQSmDgZ+9EJVcsaVJbtFm6FX03xSMbjI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MiWoN1gv; arc=none smtp.client-ip=209.85.214.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net 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="MiWoN1gv" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-21a7ed0155cso49150985ad.3 for ; Sat, 18 Jan 2025 08:13:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737216788; x=1737821588; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=PRxl7tw1tBVTf8wfl2sTflbbSC/aCmrPpnmfRo4YyNE=; b=MiWoN1gvxOFQD7jUkGKIa59AG/1BzxZyyO/llPYzSztSr7JyZCQ9E5MhswL0PfTAVf vKJPUVCBRvNp8y8UQFY6uY3g5m42+ERAyiu3SfJWvKFk7a4QfWY0Nt9XxSBbDm0gKGO6 gVlrHUJpIDfk+Ca1ilQFmIHL7q1aVQbUCwcQiMLWauxyV8nuCMI3MomtnB8QDwCxNdbu L1qvMyLo6tKBcdKr/mqhQ/PT3pF6a7r+VmWv4FJCvIomy9BIIiwWWbLQ8tLYVh3FdXVb SUy17Xz8RDXWJcBTs9VMY16UcGbY6hUyotfj9BPqendICG+8E6Ilt/Y1T4YwdM+aGg8J tCBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737216788; x=1737821588; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PRxl7tw1tBVTf8wfl2sTflbbSC/aCmrPpnmfRo4YyNE=; b=O5cQo3HgtBz3m6bzvQX0L0a1fBnSsglJ0W4cVVvHEFZVu00s4lAaRJljRLixDVNxSx ZT1F1QsY/b3cJPC5s9Nzh5EDBlWbEDhpWkOG+Rf0SGkyde1mV0wjvFLglByYl1Z34/75 5rCnDWiRUoEVkGYr8ochzD2Vm+RfjjeJ1V6nXfuHyJFWQxMFluGJ6iPZyKpHh6Dz3Hzn rCB1W53bDGs0JrjDgeccjJez/lmFtjqaKzt5cMV1PtkxaGpPQFnBFRH+W5t9Su7jQrDi FGkrU/sFfD/zBG4hGnrZPf7s4QFisgV4AcrqEZTmREGVBKgG+0T34j8jVbhwNhDFQpHh +cyQ== X-Forwarded-Encrypted: i=1; AJvYcCXI6Qy/L09/e5J7/OSalWOE7QQ8usqkMNj1Rbv8wX+5KgEMPcIdPXlEDoeeBI9tlJVJQTlu1vCAymYLfU8=@vger.kernel.org X-Gm-Message-State: AOJu0Ywtm7vM5gQSKj1XD0B+LOIDA2fzrqjE0sD45LCV4v9/q2ETvoVQ if+KrF0SYClPPLFvqS3n42//a0gF3hn46+recfr5it+UnN2aYd1k X-Gm-Gg: ASbGnctubBxvJDu3z8evngPsNQBFN3LX5Mi7Ladvna5xrq1erJIJR6Qb0q0hRfHZt+N SL7kQD4Q4ZiBqdTMzyDW/oTZp1BSKkOmDYbsNn/VQQdhY/dyzB9qAaJyRgQYWiJLpHmb5J6FeGv Rik1EewLlh2dnhZg8XWHiNNSzZvK8iHozP6CGwqoqiwn25Cjiy0Au8vCteEXFLXLmeO7wcW+6dp 4PxRDf7qX5ywGztoGJZPPHS4UM0HT9X7TxtGrgqDLoP664XvTLe5lc4G7ZiFo8mgIXqCCF5avGh XKS8yF0= X-Google-Smtp-Source: AGHT+IGccmzskmYB9AUwNl5v5brzjltc2G9SiDMIOf8YUDLyCHNVVfV+jcvrChvPtP7dnXsTlgp1ow== X-Received: by 2002:a05:6a00:4c94:b0:724:e75b:22d1 with SMTP id d2e1a72fcca58-72dafa800c4mr10673668b3a.16.1737216788407; Sat, 18 Jan 2025 08:13:08 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:da43:aeff:fecc:bfd5]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72dab7f190fsm3916275b3a.26.2025.01.18.08.13.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jan 2025 08:13:07 -0800 (PST) Sender: Guenter Roeck Date: Sat, 18 Jan 2025 08:13:06 -0800 From: Guenter Roeck To: David Laight Cc: Linus Torvalds , 'Arnd Bergmann' , "'linux-kernel@vger.kernel.org'" , 'Jens Axboe' , 'Matthew Wilcox' , 'Christoph Hellwig' , 'Andrew Morton' , 'Andy Shevchenko' , 'Dan Carpenter' , "'Jason A . Donenfeld'" , "'pedro.falcato@gmail.com'" , 'Mateusz Guzik' , "'linux-mm@kvack.org'" , 'Lorenzo Stoakes' , intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, David Airlie , Simona Vetter , Jani Nikula , Rodrigo Vivi Subject: Buiild error in i915/xe (was: [PATCH next 4/7] minmax.h: Use BUILD_BUG_ON_MSG() for the lo < hi test in clamp()) Message-ID: References: <34d53778977747f19cce2abb287bb3e6@AcuMS.aculab.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <34d53778977747f19cce2abb287bb3e6@AcuMS.aculab.com> Hi, On Mon, Nov 18, 2024 at 07:13:31PM +0000, David Laight wrote: > Use BUILD_BUG_ON_MSG(statically_true(ulo > uhi), ...) for the sanity > check of the bounds in clamp(). > Gives better error coverage and one less expansion of the arguments. > > Signed-off-by: David Laight This patch triggers a build error when trying to build parisc:allmodconfig. See error message and bisect log below. I don't think there is anything wrong with the patch. The underlying problem seems to be that parisc:allmodconfig enables CONFIG_DRM_XE which tries to build the affected file even though CONFIG_DRM_I915 is not enabled/supported on parisc. Copying XE maintainers for feedback/advice. Thanks, Guenter --- Building parisc:allmodconfig ... failed -------------- Error log: In file included from : drivers/gpu/drm/i915/display/intel_backlight.c: In function 'scale': include/linux/compiler_types.h:542:45: error: call to '__compiletime_assert_415' declared with attribute error: clamp() low limit source_min greater than high limit source_max 542 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:523:25: note: in definition of macro '__compiletime_assert' 523 | prefix ## suffix(); \ | ^~~~~~ include/linux/compiler_types.h:542:9: note: in expansion of macro '_compiletime_assert' 542 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^~~~~~~~~~~~~~~~~~ include/linux/minmax.h:188:9: note: in expansion of macro 'BUILD_BUG_ON_MSG' 188 | BUILD_BUG_ON_MSG(statically_true(ulo > uhi), \ | ^~~~~~~~~~~~~~~~ include/linux/minmax.h:195:9: note: in expansion of macro '__clamp_once' 195 | __clamp_once(type, val, lo, hi, __UNIQUE_ID(v_), __UNIQUE_ID(l_), __UNIQUE_ID(h_)) | ^~~~~~~~~~~~ include/linux/minmax.h:206:28: note: in expansion of macro '__careful_clamp' 206 | #define clamp(val, lo, hi) __careful_clamp(__auto_type, val, lo, hi) | ^~~~~~~~~~~~~~~ drivers/gpu/drm/i915/display/intel_backlight.c:48:22: note: in expansion of macro 'clamp' 48 | source_val = clamp(source_val, source_min, source_max); | ^~~~~ --- # bad: [0907e7fb35756464aa34c35d6abb02998418164b] Add linux-next specific files for 20250117 # good: [5bc55a333a2f7316b58edc7573e8e893f7acb532] Linux 6.13-rc7 git bisect start 'HEAD' 'v6.13-rc7' # bad: [195cedf4deacf84167c32b866ceac1cf4a16df15] Merge branch 'main' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git git bisect bad 195cedf4deacf84167c32b866ceac1cf4a16df15 # bad: [e8c0711b153b0db806410d8b31ed23b590f4eab4] Merge branch 'xtensa-for-next' of git://github.com/jcmvbkbc/linux-xtensa.git git bisect bad e8c0711b153b0db806410d8b31ed23b590f4eab4 # bad: [81d45722d699e594c66c150c8f7a0ec2e2bc9be6] Merge branch 'for-next/perf' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git git bisect bad 81d45722d699e594c66c150c8f7a0ec2e2bc9be6 # bad: [7acb844a672defb15cf202a501815ec22c68c800] foo git bisect bad 7acb844a672defb15cf202a501815ec22c68c800 # good: [fb2368075b135f174264071b851330649d55f9d0] mm/damon/core: add damos_filter->allow field git bisect good fb2368075b135f174264071b851330649d55f9d0 # bad: [fc83c501e385753c90db7316faf9fd4158caaa96] minmax.h: remove some #defines that are only expanded once git bisect bad fc83c501e385753c90db7316faf9fd4158caaa96 # good: [b04d305df1171448df5e87802c4d1f1022cc5784] ocfs2: use a folio in ocfs2_map_and_dirty_page() git bisect good b04d305df1171448df5e87802c4d1f1022cc5784 # good: [7e01619507058f90ab603acec482951f3c452aaa] kthread: correct comments before kthread_queue_work() git bisect good 7e01619507058f90ab603acec482951f3c452aaa # good: [21b510a64c223707caa6db6176128779f0806a73] nilfs2: correct return value kernel-doc descriptions for ioctl functions git bisect good 21b510a64c223707caa6db6176128779f0806a73 # good: [6afb87f23458f2d4e4334ee5a4efb8b0d07af68b] nilfs2: handle errors that nilfs_prepare_chunk() may return git bisect good 6afb87f23458f2d4e4334ee5a4efb8b0d07af68b # good: [8f6d46fed0bad163e5146fea1fdff150039235b2] minmax.h: reduce the #define expansion of min(), max() and clamp() git bisect good 8f6d46fed0bad163e5146fea1fdff150039235b2 # bad: [7a70c678548d71e609b95dbddf2d411a02d13b54] minmax.h: move all the clamp() definitions after the min/max() ones git bisect bad 7a70c678548d71e609b95dbddf2d411a02d13b54 # bad: [37f375aab0c585388b90d1af6968454fc2769cb9] minmax.h: use BUILD_BUG_ON_MSG() for the lo < hi test in clamp() git bisect bad 37f375aab0c585388b90d1af6968454fc2769cb9 # first bad commit: [37f375aab0c585388b90d1af6968454fc2769cb9] minmax.h: use BUILD_BUG_ON_MSG() for the lo < hi test in clamp()