From patchwork Wed Jan 6 23:17:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 357976 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA672C433DB for ; Wed, 6 Jan 2021 23:19:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7FE8723139 for ; Wed, 6 Jan 2021 23:19:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727898AbhAFXTQ (ORCPT ); Wed, 6 Jan 2021 18:19:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727880AbhAFXTL (ORCPT ); Wed, 6 Jan 2021 18:19:11 -0500 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1439C06135C for ; Wed, 6 Jan 2021 15:18:06 -0800 (PST) Received: by mail-ej1-x62c.google.com with SMTP id qw4so7215729ejb.12 for ; Wed, 06 Jan 2021 15:18:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=M2VqyHG2HX9apOvyYcN1fNwb6SDnXCbaKG0Lb94i9BU=; b=qPFC4Fd88p0lJ8qSJWPwy03M8rZNicZ0ZHsgHS1btlUfzVy5Ci3olfKX5CKeajwIDJ /0A8IAv6SLQgLFHlA/1H+yJRvFlDfEAIMSWou7Ugohhj1dz5gPEvZ+o2Kq3/rIOc/8Av bI3aFrnAmpkRBNvBF5f9Si3dQeVHbw1UDDFi/f5ssJ8tbo1i74Afh5RnCnHNKpXz89EZ ayz7Bfw24YGZK/zGlHVr7Pvw5psbn3/ia5lg2xgYF+uvfPq6lNuSM6z7A7ZH94P+GPIv MN7wrXEcpMeTRiAyQwr1Si7lXdc8KpN7qW6h7xuQYXf/8Pk5AErXs2NL3dqy8ScPfYxA wzrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=M2VqyHG2HX9apOvyYcN1fNwb6SDnXCbaKG0Lb94i9BU=; b=QYlm1ZnFF4p2cLLwZ8DrBSrSt3dpKNNigG/6iWgJtXYG1cexrLAXfXaUvvR0Su87VG Vsk3Fq/rSMhC8r6ocAcXekGTJq3od88Bvw8zAne1NURA472EIkbdKU/xDLNweRVeD9NY PKYboBw3ymJPp8mz6/QmM/Ez5kLhkTAWPfUHhVuqdPT66gegqPLW9ZcRlvVB3vJKjFhE SB6Ufu2FDN2TxiZeN1wPtNAVJTK2EkSE706jqaxMpAzVP7ySdeFFiSHHr16n1q6HG0Pw JKwlX0JFl2Rq9LO7Nrz/rUE4JsCFvL9qC3qwLVX4RV4UegYe8469qB62ZlwGYtygg0PY VMbw== X-Gm-Message-State: AOAM5324RZy7+zhw3PsfsBUAFmXw6GuLolw37FwjM1ah/Z5qEgWBYhBp UKGDUMcfHOIGRQe3l14wVq4= X-Google-Smtp-Source: ABdhPJwAuKrpWhW0ZiAc/1SqSWeJjpsfpz2y1MP7P+qBEs46BQQTTPYA88N62KaI6NmkVU25WI8Rfw== X-Received: by 2002:a17:906:26d7:: with SMTP id u23mr4353061ejc.210.1609975085662; Wed, 06 Jan 2021 15:18:05 -0800 (PST) Received: from localhost.localdomain (5-12-227-87.residential.rdsnet.ro. [5.12.227.87]) by smtp.gmail.com with ESMTPSA id a6sm1958263edv.74.2021.01.06.15.18.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jan 2021 15:18:05 -0800 (PST) From: Vladimir Oltean To: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: Florian Fainelli , Andrew Lunn , Vivien Didelot , Vladimir Oltean , Kurt Kanzenbach , Hauke Mehrtens , Woojung Huh , Microchip Linux Driver Support , Sean Wang , Landen Chao , Claudiu Manoil , Alexandre Belloni , Linus Walleij , Vadym Kochan , Taras Chornyi , Jiri Pirko , Ido Schimmel , Grygorii Strashko , Ioana Ciornei , Ivan Vecera Subject: [PATCH v3 net-next 11/11] net: switchdev: delete the transaction object Date: Thu, 7 Jan 2021 01:17:28 +0200 Message-Id: <20210106231728.1363126-12-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210106231728.1363126-1-olteanv@gmail.com> References: <20210106231728.1363126-1-olteanv@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vladimir Oltean Now that all users of struct switchdev_trans have been modified to do without it, we can remove this structure and the two helpers to determine the phase. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Ido Schimmel Acked-by: Linus Walleij Acked-by: Jiri Pirko --- Changes in v3: None. Changes in v2: None. include/net/switchdev.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/include/net/switchdev.h b/include/net/switchdev.h index f873e2c5e125..88fcac140966 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h @@ -16,20 +16,6 @@ #define SWITCHDEV_F_SKIP_EOPNOTSUPP BIT(1) #define SWITCHDEV_F_DEFER BIT(2) -struct switchdev_trans { - bool ph_prepare; -}; - -static inline bool switchdev_trans_ph_prepare(struct switchdev_trans *trans) -{ - return trans && trans->ph_prepare; -} - -static inline bool switchdev_trans_ph_commit(struct switchdev_trans *trans) -{ - return trans && !trans->ph_prepare; -} - enum switchdev_attr_id { SWITCHDEV_ATTR_ID_UNDEFINED, SWITCHDEV_ATTR_ID_PORT_STP_STATE,