From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 5F3FF189BB6 for ; Wed, 25 Mar 2026 00:22:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774398157; cv=none; b=GolIe+T6X5iT49Wb1iy6qeX2kY6iIt+z08zHbgbG5TN5Q1znjIyO2dBXxbjamOtrXV/Qq8PA8BfVVYCO8d4qr5FrPICNs0+9IHeo79kU/K9iSJ+wtX0hTyolQ9Bdinw3rtrc1pq/3DnOA/aeSd7hpl22tw5EeAuGZWQYckIqUrI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774398157; c=relaxed/simple; bh=C/gC1RsuIfC8njdMKE3omVveD/LHB1wKAyLzaOf575Q=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VbV3rv7LBxYJuIOKLxUPnt6l9yta68//2rodnqhE9whZnqwxRlMIJxE4ujtPiZhCu3MPyZ21Cs0iRqlIzL5/ZKH6t3CXljym41MQVM1FaUbKZKhK/DQ6XCX+tcbS7dXcO1sdAgTSw8LlRDAG1ZOz/yq+hyGl12nHkbHNyTBrPZc= 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=qrQg87yH; arc=none smtp.client-ip=209.85.128.43 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="qrQg87yH" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-486b96760easo16720565e9.2 for ; Tue, 24 Mar 2026 17:22:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774398155; x=1775002955; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=D3jYf8Bnnp8/yLh5y/kKlLzKOcooQBVfzdC+8/FhSVs=; b=qrQg87yHAUL46K0i1kpNqSYIyYg95isv1XEaKrGtwi9XeLbEOzLyraJWrHFtGNKKPE 1+4oL2apc6ZxzhqKPhll3Sk3TOvXgvvRtBVqVd9UGZYKUarzzdZSdvZ85iBGd1WLxeVw Q2RaRhAYWCGOBKhRTtqNnwi7Qobm39GT0Bz53HFlftExnt6HVfAYtTZ8Yjx3+ZGJ+OhP PK/YtbQ3T5y9o5yb69stikaJKQnb+SWQb2yVuuBkHgXE/y01L1UwgB1cwtWGc08oKo4F oDP9WT5CzmCaUCEX0iuvmeAXzMFbJpr988wLGtvy9aXLhgiZxuKtM6BKMkp4MdncuJUq ZoCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774398155; x=1775002955; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=D3jYf8Bnnp8/yLh5y/kKlLzKOcooQBVfzdC+8/FhSVs=; b=qLNbnFVGToBeowMsqamY+52L0hyciwAf6+dIi7G1iyEzIsYsIovXrg3LDEj8JLKNpA vfVgSuLO4LgoGTDyocfB+Y7r7EBbJhq+oQ7zgOikFVlqKi9sXgLBeMZ4k+1kafnbKWen Ac0ZfSJoTPnKo84fGb2in+CQnWg0wayo6eyr8AeuEyjHGLoySHmQPxQIyvgBmosAKTFf KsupPZPuoYTvplE/lM8K/G4tzwLyoRPdNyzRhIl4wm7kgqBNvu5gFnkrRb4/3aSQ+EFF lKACis+a3EltAJdPA1ViRyOzerJZFweeEy/whU5pnEbYAWqImu+rqP9b4lpO5gWADEHN +l5w== X-Forwarded-Encrypted: i=1; AJvYcCXeacfaMra+5JjDgVxt418HHEVkYqtG6YaljDNSiC92DPXCXHRJ01i1bBltUURn9FSWkiLCb1N85Q0YGcE=@vger.kernel.org X-Gm-Message-State: AOJu0YzCita6hjLW9Kza7e/MGqWbgNo0st4JceWknS+lVs1aXOZot8I4 p9Y+kI2om/L8//XHJr5seA6GhQWc48DZeIX+vBwK3ztfYYYCe0D4vVpY X-Gm-Gg: ATEYQzw6Nxrx5p2H8S98Oo4JVTk0g4nG9aoLGQJW/bNiHkl0DoivYhPto7EnGcSb5vU 8HriCW5iGcqriJSIVfpuYbbwugUzBAQyScEJ0qJCuVPwN+7Z7LYs0mrcpu64T3FkaKBYodx+SrF vrrTk00f82sfckGMPnF3c/45GSbOXcgVPoayGCCGxbw5B911ycJ4TJs4eqygU0Ms43qNAAJWcn0 86MQx1cgUb2LN7sSoSB8CJTc79k4OXr/bYkZxGAs9YR6oIl60wxOFEQwl1gd07SqBHzJ+sRno0D uGCB5ctlqTpHefhT+689qZCdicnUJbZE3R8aaOCfsl8QRRRdTk5yaMRVofT6KTCV5yjCRDhxOTS yy8YzBy8X3Sw0c7WWuiXnMvOdDESm1nqysBMNeoA1eOMN5rxZd4vo25tZZSaUiCB4uqe5O6Xwip Rk68GstPSCmbwre5nU4nBiXGsB5JvcQNtCQcPZvz8RgZgyz2Dfcw+iV/ZcaL6ho0E9iPiNyLO5E KP407zVgTVI5Q== X-Received: by 2002:a05:600c:3e8c:b0:477:b642:9dc1 with SMTP id 5b1f17b1804b1-48716051e15mr22818325e9.20.1774398154499; Tue, 24 Mar 2026 17:22:34 -0700 (PDT) Received: from [192.168.1.122] (cpc159313-cmbg20-2-0-cust161.5-4.cable.virginm.net. [82.0.78.162]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4871736befbsm5605825e9.25.2026.03.24.17.22.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Mar 2026 17:22:33 -0700 (PDT) Message-ID: <9763c19d-131c-45ca-8976-a6473539240a@gmail.com> Date: Wed, 25 Mar 2026 00:22:32 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] net: sfc: avoid format string warning To: Arnd Bergmann , Arnd Bergmann , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Nathan Chancellor , Jeff Garzik , Ben Hutchings Cc: Nick Desaulniers , Bill Wendling , Justin Stitt , Brett Creeley , Breno Leitao , Kees Cook , Netdev , linux-net-drivers@amd.com, linux-kernel@vger.kernel.org, llvm@lists.linux.dev References: <20260320151924.3474821-1-arnd@kernel.org> <90a03d3c-def3-4e34-89a0-6e952d3b0d7a@gmail.com> <61de3aea-26b3-4c00-8598-3a137ebef1bc@app.fastmail.com> Content-Language: en-GB From: Edward Cree In-Reply-To: <61de3aea-26b3-4c00-8598-3a137ebef1bc@app.fastmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 20/03/2026 20:48, Arnd Bergmann wrote: > Right, I took a bit of a shortcut there. How about changing it > so the other format string is just a name that gets joined with the > number? That would work, but all those -1s are a bit unsightly. Like I said, I'd rather have two different efx_fill_test() functions, one which takes a unit_id and one which doesn't. (Also you need to change the kdoc description of unit_name.) > There are not a lot of good options here, and splitting the line seems > better than an overlong line to me. I don't really have a strong opinion > on where the __printf attribute should go either, but I do see that > after the return type is probably the least common, so I'll change > that. How about having the specifiers on one line and > the type in front of the name? that seems faily common. > > static __printf(7, 8) > void ef4_fill_test(unsigned int test_index, u8 *strings, u64 *data, I'd rather just have static void __printf(7, 8) ef4_fill_test(unsigned int test_index, Admittedly that puts the ( further over so fewer params fit on each line, but I definitely feel the function name should always appear on the first line of the definition. -ed