Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4422416pxt; Wed, 11 Aug 2021 05:51:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkB/BozQ2Xk2/kbNwvSgroQU639clVQEjoTFv4aLUO0YjNXkHF9i3IVCs0FIMTXDmRbeY9 X-Received: by 2002:a05:6402:1385:: with SMTP id b5mr11143876edv.276.1628686316369; Wed, 11 Aug 2021 05:51:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628686316; cv=none; d=google.com; s=arc-20160816; b=W3w5sUsPmNVrrZJftlBwrUANGWiKqiIfiMasac9b/WUqT4Fiucph8N3OwOLgPQqH4Z DpQ2DxOO9544bp/fCx9lCDOD0BPJ1fQkRZn6yq9TIivujSp48pESVbnAaQdOsFxXWWEN iyIzqdsOXABuWGk2wqdjE80Yhq1/LFQGGjsAFl9s4xCk45VhtlYqe22mt/4TubuHPasD MunVWFNZuYKWfyX0F7Wt1zmoXv1vy01ApHHaHydM+vDmJrQnE+xiETu+9LCOqARd+aSr rJu0t6X/4kCRDBazCJj5g0in4QCqZmhqz/YycezBMdqtA9dy/+F3cPAf/Kvs4uZUGORx 9w6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=vHP2EAod4lDI1mF1Yo9F8h9U25zKihHDXYnRrfmXLRc=; b=rLZsqCkCDTFkXB7edh7NP0ys3h4gjGiG+4p19OkxRNww96A2zr5MBK3xMvrm7qRgCJ onLuV+D/Xd9LPJhB+vgJGI16BJ8qdzUPedZBtBUGqSsDN7KKtuDcdEXDE/dL+Ml47V4b e5h235ALjSIydJJ21LcjaNuAnj4JZnumyi32Hekct2Zae8z/7rArNeT2m0r7L/BgUpcV csFnZdCCpKAr4uqAj35AaJo3wjBT0MBbXCemZ/LyjrrVt4fO1OkSPcF6lPx1sZQ2Jjcp lRoiQ7axHQKEi15tITTuEX9899vmqMK7wkzjNsXBd/iDy0QOVV+Cr7N0YcM6wP0kmiTX GeVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Y+w3d+Fn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r16si13917646edc.356.2021.08.11.05.51.32; Wed, 11 Aug 2021 05:51:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Y+w3d+Fn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230376AbhHKMtn (ORCPT + 99 others); Wed, 11 Aug 2021 08:49:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:49146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229989AbhHKMtm (ORCPT ); Wed, 11 Aug 2021 08:49:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C58976056C; Wed, 11 Aug 2021 12:49:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628686159; bh=uVK2r72Kdo771r0eBjABRDmj6TjTuVDRF7ffm6kFzkw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Y+w3d+FndGpxn3c0N0AgGHVo4U4EspeAH9f8jFW2EHsOLOu15zaLUh+jvY4gZ9wJA jiOVDbjH8dLklPkkFM0jGOLuRgHasdjzXCJOpBLKH2eYia29Ut3itBqksJYFvjAyz+ 2jpMWKW4duIQD18KUL64dkgmjb+U5E2bu6uytjJulBCM4fVOp+t8iQXKSXNolgaTvV WlJCXwlTAyzjysxfcl12f66sjYF4QvuS/2tZ2v8POHqIHJbm2yDXczlmFr8Un2Jn3j NWThV09P060VUNkTF9119P88siLHm58TFqSoQDa9F39TfMFBEKaBzhRJ0bxWwMN9Mo 1srC7s53Xmewg== Date: Wed, 11 Aug 2021 05:49:17 -0700 From: Jakub Kicinski To: Joe Perches Cc: Jonathan Toppins , netdev@vger.kernel.org, leon@kernel.org, Jay Vosburgh , Veaceslav Falico , Andy Gospodarek , "David S. Miller" , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2 2/2] bonding: combine netlink and console error messages Message-ID: <20210811054917.722bd988@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 Aug 2021 20:27:01 -0700 Joe Perches wrote: > > +#define BOND_NL_ERR(bond_dev, extack, errmsg) do { \ > > + if (extack) \ > > + NL_SET_ERR_MSG(extack, errmsg); \ > > + else \ > > + netdev_err(bond_dev, "Error: %s\n", errmsg); \ > > +} while (0) > > + > > +#define SLAVE_NL_ERR(bond_dev, slave_dev, extack, errmsg) do { \ > > + if (extack) \ > > + NL_SET_ERR_MSG(extack, errmsg); \ > > + else \ > > + slave_err(bond_dev, slave_dev, "Error: %s\n", errmsg); \ > > +} while (0) > > Ideally both of these would be static functions and not macros. That may break our ability for NL_SET_ERR_MSG to place strings back in a static buffer, no?