From patchwork Thu Apr 20 22:55:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13219270 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 91935C77B73 for ; Thu, 20 Apr 2023 22:56:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233288AbjDTW4h (ORCPT ); Thu, 20 Apr 2023 18:56:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233181AbjDTW4Y (ORCPT ); Thu, 20 Apr 2023 18:56:24 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2063.outbound.protection.outlook.com [40.107.21.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CFB24210; Thu, 20 Apr 2023 15:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ACsisWJCnoDHxh5/JjCSc1sZt9BowMUY2rnX+j2PeNLM3AqK/oZDC9mE7/+daJzdKsN1d0EHI2R+DXFrGKnvi8npX2KkQklnX+UcvyukRT4DCJsyY0C7Tqt/CxXhFDo9BP+KKR+XxhGdSpPSp26Ir5N+nd1CVmBNFv6pIs+JNuWXObjRBJ/Fs3f0wIGXupbC+S21oyYyF7JO+hVdJPJTeV56VwsBVdrsPnct0vxeZ2459ztkVgXQfyYPvpRxCyqOdxUFPPUcL8U0owJqUrw6OA1AbXI27O12oOlt0Xt4Tsw+i0Mkf4nUGsSTw0yfT0TonfWvhEQzCOCFsQ4whUBKMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ht3ZUyEsnFLqae0qeYKxYb5wG/dLKpYEg1K7SawcTQM=; b=Z+gA+hvjGASJiT6OHMJevrUqtLYAVYCGHFJCPKHQgAX6c/w+oN+9Z2mmpjqKFAHV08uvnIdc1+6GLBzClDgedUCyz5naUntLH80u7CHrUlKce0lUZp7DWpurQ1SXbuDzbOxsd4L1oJ97E9Qs09+bzjsjjYCHI1etGWe7Zia5UInpP70clEKN3KlwVcSLkk3LJ6WgivU3zeyuxwKbRV5F7AZ/N+2tnneHrjLzqPcLAp7OtJI2ahDWzov3jAX4iGy0iJW9dlKb3bQWA2wRzOgWe4CPXX9AvvqAO1QOp1O09G964TNwakdgflE25TYVWFDelik5Pr+oUbqd3QNE/8FX1Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ht3ZUyEsnFLqae0qeYKxYb5wG/dLKpYEg1K7SawcTQM=; b=TyWdVBmT0w1jMtSm4Z0x1JgwKgZOgU+xDfRTHPS75ckkktSqeXlrxDWDeYjC9e8VJhkyr8zDSiqFlsa5Fqx5pcMnT1C1LmGNYfzMKz4Kp7uuwI6TiwGwrmowG6u+vrc0KHCwHkYPqUWtTJrEOL1cSCg2tQ6sa0cuXWIhzTmhwbM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by GV1PR04MB9213.eurprd04.prod.outlook.com (2603:10a6:150:28::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.22; Thu, 20 Apr 2023 22:56:17 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::245a:9272:b30a:a21c]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::245a:9272:b30a:a21c%3]) with mapi id 15.20.6319.022; Thu, 20 Apr 2023 22:56:17 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Florian Fainelli , linux-kernel@vger.kernel.org, Simon Horman Subject: [PATCH v2 net-next 7/9] net: dsa: tag_sja1105: replace skb_mac_header() with vlan_eth_hdr() Date: Fri, 21 Apr 2023 01:55:59 +0300 Message-Id: <20230420225601.2358327-8-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230420225601.2358327-1-vladimir.oltean@nxp.com> References: <20230420225601.2358327-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: AM0PR03CA0088.eurprd03.prod.outlook.com (2603:10a6:208:69::29) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|GV1PR04MB9213:EE_ X-MS-Office365-Filtering-Correlation-Id: 123f41be-90d4-4d09-57c0-08db41f27324 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qVafDPoKD5si6kd1o7lqlo0UhJwGhjwVW7bF44XBX6JDR117UE2uhpUEAe0Qq+RqcwirkoUrx9+zeiGnE9FAbIDuXd98ineJLALL/xVScFv/tNIpM14xLmcyH2rt40/0vmwSvhCH5smY2VAPDyX0uX9fq/Al6a6p/r4RH4Tl+oY6ECJakRqGZGcNBSWmb3aymLf4k0YJsRc9j/MUk/GXKpQ3h13Lhv9JRWuwFttifbt+Uret7IEVYo5Cnt35oePyebCbowgCKSJ5HbFT+teS2P/NEg/DBeFlNnBCVmKlu4520WGlsEOmiAPLCy0cjbFUMMcLHGLoGCXjsfiwSoTrWeGi8+XAGkwUVxesQdhn0bxu4z3GQF98SB1xKCqsSPuBLyEgWzhTQUx75jbPQVcs/8zJ+aJv2Of/VqqsatP9fIkb7+n69+pasp763cinAkb2su+o71JIvcbgweuOyWqPOc+YN1yTcL/Kj/uz09h9vuMHTqhY57QUOMAOCg7N0LigO4dzgPxaDVA5nNsna5sLC5pz7x8rFmIzd8mUKCcPmdcl9wo3BueWs4HFa+qy999KLWPTKdLw8GSNXBZ2leS+310EOIAf2B96rUBR6nEVmSZlRw7M9HUdDbi3COQBlZb8 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(346002)(396003)(366004)(136003)(39860400002)(451199021)(2906002)(4744005)(38350700002)(38100700002)(86362001)(66899021)(478600001)(54906003)(316002)(41300700001)(66476007)(66946007)(66556008)(6916009)(4326008)(26005)(1076003)(6506007)(6512007)(6666004)(6486002)(52116002)(186003)(36756003)(8936002)(8676002)(83380400001)(5660300002)(2616005)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kFTG3VWyKjJ/OEwdx58yfskuzYk4slUOhKwvj4LCgz4pHSgFCUKEt7EY5j9X3IZbHDIMJ+ty/hPNRZdG2ih9OdrsIblL9K/LkFdCJ55RWmIzvSZu0sNbzRMTy/bCT+Pnl2TbuQl00olS4LICmvGtW4FeKk4vowodG88QV3Xye5pjceYtdJZoNPJxUgeoEWn0e4y0gyKDkF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Cu51eI+fC7kvPUSNFv/X7SWTuzSnWZu3Uclbo8hWZnL13RpqwDGajzTXyNwUKyHKbVLDHOwk6X9/WGbzTnUjDomAMZ1+TMQISzyqUM9OTTGowJyhU1+PdJ4GNRsZ3xACcwe4ojqR4B6xF9MIQ46aszMeVOqm3xEAzihWQaiWoWvtRi6cHgvDxfPMfs4q7CtrLtVflvWcy2L1KyhTbwgAliXnZyJ+AoJN5G/+z7WUdpQfWJfEPk4fWK3IgKjTHMerqqH7ZxCEe8e2Ovie9EaUVvUodefhvJ3K/R/N/H2a3id07BVjuKJfILd6xM0rd7uP6SkuDTCPnk10LH4zVsRduKG+D9A== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 123f41be-90d4-4d09-57c0-08db41f27324 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2023 22:56:17.4071 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gy8e903hwW4gZYRRxkF+G7Ym2CEXgx9a4tINcMIxXxplUi+EJnlDLh7QR0zVICRLFn4IMRqjp3TuUNn+oZEsXQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB9213 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This is a cosmetic patch which consolidates the code to use the helper function offered by if_vlan.h. Signed-off-by: Vladimir Oltean Reviewed-by: Eric Dumazet Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli --- net/dsa/tag_sja1105.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/tag_sja1105.c b/net/dsa/tag_sja1105.c index a7ca97b7ac9e..a5f3b73da417 100644 --- a/net/dsa/tag_sja1105.c +++ b/net/dsa/tag_sja1105.c @@ -516,7 +516,7 @@ static bool sja1110_skb_has_inband_control_extension(const struct sk_buff *skb) static void sja1105_vlan_rcv(struct sk_buff *skb, int *source_port, int *switch_id, int *vbid, u16 *vid) { - struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)skb_mac_header(skb); + struct vlan_ethhdr *hdr = vlan_eth_hdr(skb); u16 vlan_tci; if (skb_vlan_tag_present(skb))