From patchwork Mon Jan 23 23:02:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Rothwell X-Patchwork-Id: 13113140 X-Patchwork-Delegate: kuba@kernel.org 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 0654BC54EAA for ; Mon, 23 Jan 2023 23:03:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232174AbjAWXDk (ORCPT ); Mon, 23 Jan 2023 18:03:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231953AbjAWXDg (ORCPT ); Mon, 23 Jan 2023 18:03:36 -0500 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 216233A593; Mon, 23 Jan 2023 15:03:06 -0800 (PST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4P15Gz3bSfz4xyF; Tue, 24 Jan 2023 10:02:51 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1674514972; bh=mSntX7M1BWnx+3X6vSUMHIbBpo2Tej3Z/vVUQjj9+rc=; h=Date:From:To:Cc:Subject:From; b=B+SqX6tvMvGq3WSbJLrGhnYqWq2851XFXiISLtiDYdMUHJKXM4uMrXN17YnHIxU5m QX1Djq6T8C2C7ZlThUBgWPV8KiJWLzDxWaGNK6hos7PlLR/WdBcpnr3/PC6tvj7yOk ovHTz01zcrSKvxWJ+ftRlLGn30WgY86Kcux8mW2GiPAjyChazXFqyeyf4OABVdo7Gl y3K2gGSYWoWWBHVeTN9BXNu3nhFY+9rkImasYTQeSnvZn4FuKDhFb+EJaZYsITMbZ6 GJE/VUuS03eE/qikH6HzP3HueJFhwVNkMrxrfNdUQoaWeUeysykr1AeGzgCr01cljW tVbuAfDSgmtMg== Date: Tue, 24 Jan 2023 10:02:49 +1100 From: Stephen Rothwell To: David Miller , Networking Cc: Vladimir Oltean , Linux Kernel Mailing List , Linux Next Mailing List Subject: linux-next: build failure after merge of the net-next tree Message-ID: <20230124100249.5ec4512c@canb.auug.org.au> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Hi all, After merging the net-next tree, today's linux-next build (powerpc ppc64_defconfig) failed like this: In file included from net/ethtool/netlink.c:6: net/ethtool/netlink.h:177:20: error: redefinition of 'ethnl_update_bool' 177 | static inline void ethnl_update_bool(bool *dst, const struct nlattr *attr, | ^~~~~~~~~~~~~~~~~ net/ethtool/netlink.h:125:20: note: previous definition of 'ethnl_update_bool' with type 'void(bool *, const struct nlattr *, bool *)' {aka 'void(_Bool *, const struct nlattr *, _Bool *)'} 125 | static inline void ethnl_update_bool(bool *dst, const struct nlattr *attr, | ^~~~~~~~~~~~~~~~~ Caused by commit dc0b98a1758f ("ethtool: Add and use ethnl_update_bool.") merging badly with commit 7c494a7749a7 ("net: ethtool: netlink: introduce ethnl_update_bool()") from the net tree. I applied the following merge fix up. From: Stephen Rothwell Date: Tue, 24 Jan 2023 09:58:16 +1100 Subject: [PATCH] fix up for "ethtool: Add and use ethnl_update_bool." interacting with "net: ethtool: netlink: introduce ethnl_update_bool()" Signed-off-by: Stephen Rothwell --- net/ethtool/netlink.h | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/net/ethtool/netlink.h b/net/ethtool/netlink.h index 4992fab0d06b..b01f7cd542c4 100644 --- a/net/ethtool/netlink.h +++ b/net/ethtool/netlink.h @@ -111,32 +111,6 @@ static inline void ethnl_update_u8(u8 *dst, const struct nlattr *attr, *mod = true; } -/** - * ethnl_update_bool() - update bool from NLA_U8 attribute - * @dst: value to update - * @attr: netlink attribute with new value or null - * @mod: pointer to bool for modification tracking - * - * Use the u8 value from NLA_U8 netlink attribute @attr to set bool variable - * pointed to by @dst to false (if zero) or 1 (if not); do nothing if @attr is - * null. Bool pointed to by @mod is set to true if this function changed the - * logical value of *dst, otherwise it is left as is. - */ -static inline void ethnl_update_bool(bool *dst, const struct nlattr *attr, - bool *mod) -{ - u8 val; - - if (!attr) - return; - val = !!nla_get_u8(attr); - if (*dst == val) - return; - - *dst = val; - *mod = true; -} - /** * ethnl_update_bool32() - update u32 used as bool from NLA_U8 attribute * @dst: value to update