From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout-b-105.mailbox.org (mout-b-105.mailbox.org [195.10.208.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00AAD38656E for ; Mon, 23 Mar 2026 09:19:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.10.208.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774257586; cv=none; b=Jmx9VrmGz1olzLt7uQ63ZKiPHZ9GeuRs752sMbpQzATmNKbGS6ynshbfPDu84JN1fBQ11WtyCXSzDXBM5eRomFGgQrj9PYEOybMEzaTsatyrksM9CCNOcDDYgc8ZIeSdhoZXA7lm4zidZcuAD0R7xzXUQqHLsPEiRc0+2oLvdHc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774257586; c=relaxed/simple; bh=mB0fy8+NXTKs5qW7nge+/0gGT7dLjvyHcDs1G///Xw8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=M4mjGsI2+PMLoqpAHyEzFwEBg2OT0Fw4Ad+4WjCSflRkpaWhisp+rsKeAgG/uVYWHLtMdy+yHr5xy5rsmdd0YkOgZuTzZByuynttr0CKQpLfVsA35CafVps8vPOklTii7o4evMfRFfx3qEmA8ahf1aHgfbyZUEulZAvTc5o8wwc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mandelbit.com; spf=pass smtp.mailfrom=mandelbit.com; dkim=pass (2048-bit key) header.d=mandelbit.com header.i=@mandelbit.com header.b=MONLSQTy; arc=none smtp.client-ip=195.10.208.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mandelbit.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mandelbit.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mandelbit.com header.i=@mandelbit.com header.b="MONLSQTy" Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-b-105.mailbox.org (Postfix) with ESMTPS id 4ffSKy6mkDz9xhR; Mon, 23 Mar 2026 10:19:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com; s=MBO0001; t=1774257575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+2PC5ubhzl5X9RNqdiCSXZI6JZbcjRsxPbvhMYtbJg8=; b=MONLSQTyXU/GrsxFTnTBSZ20odCb0/B8aX8w+riewK8VHAurRuxJNZtQsKbGJGR8aWIops 76EJFM51Lqaml54ykPMNePNpXysT7ypJJi/VwMS9ME6+ucVzwqHN6ry5u4mdd8XhMeZTUG 6O2t0aBfTrWXYxRLA9V4bCec1b9RyGrUTvquXGFsIxoDWNPzssmICaAQ4UTq8E4OArGFBd /G1qmEUO5lOlSqmpJlJziBgG0HA7vPKx95XLGQctFId9VDTuQWaS5xviCXUre8n5r8/AjP ACHuB9XzAHxvyYP64Tj4dm+NxH+j05u7UX3O9MPF4b0vZfLYBnkrjK3qRj4Kkg== Message-ID: <33fdce98-a3fa-4830-8023-53fdfcaf1644@mandelbit.com> Date: Mon, 23 Mar 2026 10:19:29 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [RFC] .clang-format: avoid call wrapping that triggers OPEN_ENDED_LINE To: Miguel Ojeda Cc: ojeda@kernel.org, linux-kernel@vger.kernel.org References: Content-Language: en-US From: Ralf Lici In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 3/22/26 12:06, Miguel Ojeda wrote: > On Mon, Mar 16, 2026 at 9:29 AM Ralf Lici wrote: >> >> Therefore I wanted to ask whether maintainers think this class of >> formatting is worth addressing at all, and if so, whether there is any >> openness to adjusting the existing cost model while keeping the current >> clang-format compatibility expectations, or revisiting the minimum >> supported clang-format version for .clang-format so that more specific >> options can be used. > > Yeah, we can definitely use options up to the usual LLVM minimum > (currently 15), and yeah, we can tweak things since `clang-format` is > opt-in. > > Some maintainers already use `clang-format` to format full files, so > we should be mindful of big changes; but if they are worth it, the > sooner we do it, the better. I tested PenaltyBreakOpenParenthesis across a few representative files, varying the value and counting lines ending with '(' after formatting. The results show that the value needed to suppress open-paren breaks varies widely across files, from a few hundred (e.g. net/core/skbuff.c) to tens of thousands (e.g. fs/ext4/super.c). The issue is not just the scale of the option value: constructs like TP_STRUCT__entry( use the open-paren break intentionally, as part of their formatting structure. A global penalty cannot distinguish between those and the cases this RFC was originally motivated by. Therefore I will drop this approach for now, unless someone has ideas for a more targeted solution. Sorry for the extra churn, and thanks for the feedback. Cheers, -- Ralf Lici Mandelbit Srl