From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BE60C636CC for ; Tue, 31 Jan 2023 13:32:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230315AbjAaNc4 (ORCPT ); Tue, 31 Jan 2023 08:32:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231990AbjAaNcy (ORCPT ); Tue, 31 Jan 2023 08:32:54 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF17151427 for ; Tue, 31 Jan 2023 05:32:40 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4ACC961519 for ; Tue, 31 Jan 2023 13:32:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10316C433EF; Tue, 31 Jan 2023 13:32:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675171959; bh=d+6BT8JVSgEFjcy1nrHUrWL1dja7eV7LU+hE8XcgdKc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pes9sHnLghuyBq1lbURcdB7zDnGTSwRDZB0+EKBLqNBJDecx1Cu/zl4o8EY0/Uiuv WKhq36iRnN6nSXRZ2D6GioT3mL1abMVkS2QWeFWW4FQ5B7ivByXinVfjUUjUmPodO2 B8W7wPuWnl8qIkhQV5nTb9Xrrw4SJo1pKmfA+Ae4kAhnnd9FEGj6qt1eR8ahXbCI6P E/vqHZoF/3IbFvS66BdgoNX139/lYg3nsLblW/d/TD+f/9gOUZjCDk5Pxb9wCOKpM7 kv+KIuRw3xZExMXpAzDm9LIKwSPiNIyEQSFTPwIcA6kKjQK01t9K3B6vgUFRs0Uagf zLPzlAW+BnFAg== Date: Tue, 31 Jan 2023 15:32:35 +0200 From: Leon Romanovsky To: Paolo Abeni Cc: "David S . Miller" , Jakub Kicinski , Andrew Lunn , bridge@lists.linux-foundation.org, Eric Dumazet , Florian Fainelli , Herbert Xu , netdev@vger.kernel.org, Nikolay Aleksandrov , Roopa Prabhu , Steffen Klassert , Vladimir Oltean Subject: Re: [PATCH net-next v2] netlink: provide an ability to set default extack message Message-ID: References: <801a4a44f0fb6e37f79037eae9a3db50191cdb12.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <801a4a44f0fb6e37f79037eae9a3db50191cdb12.camel@redhat.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Jan 31, 2023 at 12:47:03PM +0100, Paolo Abeni wrote: > Hello, > > On Sun, 2023-01-29 at 18:51 +0200, Leon Romanovsky wrote: > > In netdev common pattern, extack pointer is forwarded to the drivers > > to be filled with error message. However, the caller can easily > > overwrite the filled message. > > > > Instead of adding multiple "if (!extack->_msg)" checks before any > > NL_SET_ERR_MSG() call, which appears after call to the driver, let's > > add new macro to common code. > > > > [1] https://lore.kernel.org/all/Y9Irgrgf3uxOjwUm@unreal > > Signed-off-by: Leon Romanovsky > > I'm sorry for nit-picking, but checkpatch complains the author > (leon@kernel.org) does not match the SoB tag. A v3 with a suitable > From: tag should fix that. Sure, will resend. > > Thanks, > > Paolo >