From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) (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 D01853148B7 for ; Tue, 18 Nov 2025 16:02:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763481766; cv=none; b=PDjaLkEecoByqiSygzKDRkU2WJrvIcxf9aniFGujMdggjdzDOkP1U8RfFCGKpR8YDbOei0w6F/m9HQ7HUKbiizGeQT+3l0pPlM6jHnGiM+W3/goRSIpvwoP0lzaJdyHORlNxmFfmbPGjbYeMOu4hYU/54mGy1kgmVy6BqDHqqLk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763481766; c=relaxed/simple; bh=GfqTXkXVrEJpb5atUqf8HNxbs/hLvVCpb7QwD8IwGVE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XpBcV8UzyBiRVVyGa9WEhKuo/UrS7d7eR4Hq7bAJHJL5Nu9jiVY+DtU3PM+mk3gh6P1P4L9dBMs1rBPw5nfXOiLbt+elAelppk6nrj8TQe8ptMdk9rm3QJTVA9Mw3xUYFG2wKZDnk2mkWmifLNYqc1hMUhbq54fanhEdrnBjEwY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org; spf=pass smtp.mailfrom=networkplumber.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b=0q6a7PMk; arc=none smtp.client-ip=209.85.215.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b="0q6a7PMk" Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-bc17d39ccd2so2928349a12.3 for ; Tue, 18 Nov 2025 08:02:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1763481764; x=1764086564; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=ScVXv43JwkQ2uSjub0/NPG71+GfionxesRG+Ys4Pw6s=; b=0q6a7PMkXHrqRHhWMGxESP8cRK4F95AsW9LEeaI5g15NY7UV+d4oYJcwOR2wLPVBTy jYNdU6VW0xUagisL4kDsfmLQryyAB5FYn4zdridgBFeVQOWnWntW1zA6yd8peogg3RPa bPERdrgF7g2dnU1Ff4hZqxmoo/DLwZzwakNV1OqhI1j6hcmQi1Qd2UVZHNS4p0BGJtG8 qgPMdX2umV+qVRQ8tpowOl8O8AXwlrqJyFr4ezn6BE/d5trzi5lmaAOzZ2e7EOjwQ6UA UMxYVWpea+viU7yDw5f8AXPfFb5liN5HObF14sOnqWnBGmtXWq6RJrMfuQFlLhg0pZc4 vZyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763481764; x=1764086564; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ScVXv43JwkQ2uSjub0/NPG71+GfionxesRG+Ys4Pw6s=; b=MYGv2pdZnwGcjTpUrHnI3vzPgAfT/1VFJlrMpWjmelSc8GsOJLnfPQSA8YiyyvOCzw DuCvRxygDO3lQPXi11JdfOH4U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j/2s630xXVH64J45zJA2cOLe+A== X-Received: by 2002:a05:693c:6090:b0:2a4:3593:467a with SMTP id 5a478bee46e88-2a4abd973bamr8027943eec.22.1763481763720; Tue, 18 Nov 2025 08:02:43 -0800 (PST) Received: from phoenix.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2a49dad0aefsm45188960eec.3.2025.11.18.08.02.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Nov 2025 08:02:43 -0800 (PST) Date: Tue, 18 Nov 2025 08:02:39 -0800 From: Stephen Hemminger To: Daniel Zahka Cc: Jiri Pirko , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Simon Horman , Donald Hunter , David Ahern , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH iproute2-next 1/2] devlink: Pull the value printing logic out of pr_out_param_value() Message-ID: <20251118080239.405507d6@phoenix.local> In-Reply-To: <20251117-param-defaults-v1-1-c99604175d09@gmail.com> References: <20251117-param-defaults-v1-0-c99604175d09@gmail.com> <20251117-param-defaults-v1-1-c99604175d09@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 17 Nov 2025 16:40:02 -0800 Daniel Zahka wrote: > - print_uint(PRINT_ANY, "value", " value %u", > + snprintf(format_str, sizeof(format_str), " %s %%u", label); > + print_uint(PRINT_ANY, label, format_str, The problem with generating format strings is that it makes it difficult to impossible to use any of the compiler format validation flags.