Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751884AbdFFPDk (ORCPT ); Tue, 6 Jun 2017 11:03:40 -0400 Received: from mail-dm3nam03on0064.outbound.protection.outlook.com ([104.47.41.64]:13462 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751431AbdFFPAq (ORCPT ); Tue, 6 Jun 2017 11:00:46 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Ioana Radulescu To: CC: , , , , , , , , Subject: [PATCH 06/18] staging: fsl-dpaa2/eth: Minor cleanup in dpaa2_eth_set_hash Date: Tue, 6 Jun 2017 10:00:29 -0500 Message-ID: <20170606150041.10955-7-ruxandra.radulescu@nxp.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170606150041.10955-1-ruxandra.radulescu@nxp.com> References: <20170606150041.10955-1-ruxandra.radulescu@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131412348446630835;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(39410400002)(39400400002)(39850400002)(39840400002)(39860400002)(39450400003)(39380400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(33646002)(54906002)(305945005)(6666003)(2950100002)(8936002)(6916009)(36756003)(189998001)(47776003)(50986999)(110136004)(8656002)(38730400002)(356003)(106466001)(39060400002)(53936002)(2351001)(8676002)(104016004)(5003940100001)(105606002)(77096006)(85426001)(76176999)(7416002)(81166006)(50466002)(48376002)(2906002)(5660300001)(4326008)(86362001)(498600001)(50226002)(1076002)(15760500002);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR03MB176;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;A:1;MX:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD006;1:ZKV5ss6IO8p7Fffqb+YKJkSb7URoiFrze5XER6FyMlX2JtAxtb7XG9vlZhxT4pXFHcMlGqpDLBDzVsC1u/QriWfb8zlqC+0l6sdqWYIhps+8l8jC/9XBhiCWxpzOwWyCr0FbeLEP4sliaKsZ58ibnsB0GASIkkiwgq6T/qwDYrGRun1MyBj9YBONZqkX0YUTVC++qKoADg6gF+Fp3cN1wPw41SZzcKeP3FEet2dUcXp2THzzfufRZraulJtQH5CBAOhE3atY9ZT2iz6Hqmo3FeR0KtaUCqNhj6c1S403uty9PDZEZ9ZSeGjfI/0wGYonYL0RTtDvfhWlTiMIQH4BBprOCLFkBBbqqxMMJoP4+ZkSr0U+vhFbOL6HLsmcQS9kG3F9ehRr60q7RvuWBUfKS8ZXq/9kQjLhRvrmeWhVuDOfPCv5lgqkD1CFEVUhTPZK7xsQnN6Vdf/DKstf4Q18vbgmJf9450OOy1COLI66NfQfeKLLsGWmpahvbLGR75Cm1oGFX7YlRZfSnqom+2d+FDaPDgzzvVOdg9Lp5gW7D2aBsUMwczO9uh6AtjLX3lZsqNR1XZ92mtSNWbfAxBnubFfmiuJlKFvoTSCNNhQAI9zfjTSgzPompsH0nUbGPfEgNMq0M6SHTduct8Q5TerdgnJK1XmprGgMer8zzBaap1uAQwIa2h4KK2GgSY33i84s MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY2PR03MB176: X-MS-Office365-Filtering-Correlation-Id: 490fde26-40c0-4158-8252-08d4acecceb7 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131430075)(201703131517081);SRVR:BY2PR03MB176; X-Microsoft-Exchange-Diagnostics: 1;BY2PR03MB176;3:mJPgaGLOGej/PeusKG6E0o9vPf+2lVk6QuiUjp3gy8fNzg4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c9udsZ7nUCPp4JTap7UG3K4U4ElV1vXO2xUudECtH72Mq8NuaxtAnmcnliwqrUgvsOLsjUOyAm3QF6tJwoWDWEe82lPPhuBgWIucW6iel2GjGWx4FZkwA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(13018025)(8121501046)(5005006)(13016025)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6055026)(6096035)(20161123559100)(20161123563025)(20161123561025)(20161123565025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123556025)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BY2PR03MB176;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BY2PR03MB176; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR03MB176;4:OnsTA5urbEIzuZAhxwkabiXuJml6Oe+4WZUJP3svKQH?= =?us-ascii?Q?+PVHMXRQMHF3fory4hhxDQIoHunLeYg02exftj5B/RGKxWczg+YtUedDIino?= =?us-ascii?Q?PO0asp5oagw3tvOmCM0KjJQNM5gYD9OnbzdUwIElS0Nt5Hty6ycqzhVLgWIh?= =?us-ascii?Q?7tx7zs16WrIXK8nOJpq1gOvSrbD/61DAZsz+RvDTVjty5Q6MEUGKUGoK7x9O?= =?us-ascii?Q?xRhLgKqDsd1MBpgZXs7m7BkWFmiS+HgXHI4fu2RZIh0kac4CNN+7hJ7wPtLC?= =?us-ascii?Q?Z2aMprd8exmdTcoiVfDT82mHu6EZidDbmmE6vlRkVJcSrE/HSsVmYEDI6Aid?= =?us-ascii?Q?wv1KLaPiVU9tX8SJi6MX2YkUcEqJf+dzEK88iZImPxLHn3f3Z2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vUD9sgJPS59m?= X-Forefront-PRVS: 033054F29A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR03MB176;23:n7AryYvc6sdKOFL0/uERca5E8D/JZsPP9MSe7S/C2I?= =?us-ascii?Q?CFvGKH1r3zQtJJ8Gi2u8K0+gl7sF5co+jQNoxIvzVzEfxQ/4Jfy07na4hddi?= =?us-ascii?Q?dblTmHSgHrlYa1sv0EJHZsu9N1v+ICcdse/32Kh8I/3rUf6PDeYzwjXenk2S?= =?us-ascii?Q?PCTddQSsF/s6+fmEAGLdgA5Oh9jFBbIWS25ykRMSlqdMplCmRBOPqi81bBrO?= =?us-ascii?Q?8+qrKJ5yQ9I1gzEsWY6MCKTLEQDgJncE7QqB+PrXZcSBWOU1A3y6i+wNMQi9?= =?us-ascii?Q?ogzM0uCpUeYuidOH2CqIz4k+XKgjkRO8NzC0Y48vw4GUw9rNuskB8qlb/Hy9?= =?us-ascii?Q?HmyDascb9m67hpgjDD2LpSutdkiGH9sqtZCrCmBig1YosdFmr9aPEuhuuk62?= =?us-ascii?Q?oQ6FYEVdHUJjLbrydv4kVkBOA2spbPp9XKVrql0oApi2nS75r0st/Bv4Bzgd?= =?us-ascii?Q?SGgy6Mad8gRTB7VTfdxvV1k6TW8Xajc9d2lZSI16lfQwMBabx2Qs+p1gCXVE?= =?us-ascii?Q?tMVBcwtALalUPAQN82gNletA9R2Wn90/iEJVWKsukNeCBdWnZscJd1+3tEfS?= =?us-ascii?Q?ptgLuOr7ndMR7xxddrmMXMvIsq1a+9XJ+biLCGmjejMFQ/IJAmFtuSMIESpm?= =?us-ascii?Q?jonuyOVTwtvDdIVVSm8w7NTq2XS+ZXOI+rlrE6dWJ9gEkkVPeI5FBqJA6c28?= =?us-ascii?Q?T/KT4MLMzVyQFK7HKcQ7Nio/V5kGJnTtsK2iTR59LkGQQrdgTgTpIkQuY+Td?= =?us-ascii?Q?4YvE9mOTBXgWLRIVc67WGkRagSDnNgD0AED/7kLNy7/NxRqtH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Wb+ZmLz3wFKahtUdfOu5gaP1wbpVorSPypmEbGlP6s/MOaksI1e3HUzjC0JbQ1KzQuae2MSxvZMZDuELeB71syZqF8xJsAx8EJfaskfOlBNaX+oYMkCkXpcdIk8qZ56eCqep+iP7I0jLx1/bEWaOcLUYBg== X-Microsoft-Exchange-Diagnostics: 1;BY2PR03MB176;5:4f3TsOAMBv4knshM1VzQHnGJn0AkY0UzZl2bs9rE+g+HBXaVjVx7PlpqObhfk4yNf2pkk2qRdxBrsV9z9wR2IEtCu5SxJKsvIKJy89HPaHkShclzZ/p8XUroRJ8E4T0DyiXZASMIXk4AwOYPPGS+p7ZBu2kWtKlo1v6Yi3BuGJPzLiUpy/afq/YrwOYx/dKxZyO41ooZedquPDMmEj/N1EAJG4Qg0gXirbqYNtQ/4aTheD3GeqqsiZoqyvmuLrNV51hVjMqOui/XRuNTIiayks1AnX0W7ntXSNr7ZgetVyT/dxVGc/nYWohaD5JcH+1YzA7qpev1LEkG8SVA5YvTo6MgBHy7DX2oe7FyMtUWxyNavnoO1oGXxqSibElbSo0LdPCv26AAd5oGVgkhB5jJ3UPzbnhgjJIFQu1FKWj1Wg3upsXl4PaQsrNfaSfV+pb2+2PZOsQ9zv8nagqwsGkoTRbsoBy6yYoLj+mwBweUqx1AVUxyitUz8LT09azreLPYtJoXBrvdmkeFVPo20Mjqyw==;24:NSLLS1dpi2Mud/rpXHlI/6fQbSPy0bU/ba+Os4QJwBHS8NL5ddCfhjALtVaJYAdrvrpBcNKJD8DLV29VSaD0Rr30WjV/+Ge0tTe52/+3OXo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY2PR03MB176;7:4z3neVM/CF2BayXyszYnZXaec1III47+xYaPYg7ri0TSNseC8yG++99Eruv/lajJUGHStj53EOnXIlDyAhKaiHVwTByQmHQQnU3saPYKOJnFAlhW44cK9ZtrUVnB2Cw8QbObWjqsG+Law2ILvvtxW8NIkPnqXRx8R26BSmV4jRcA6279Q3eFwE3P8YqTMJZow5EkRuCkiw51fN3DGGw6YP3DmMjps1ilIdjUM4urQVyaxGxtD81cL5KmBOfKUuO9jOg5x+IGqd99iMUOp2Ziw4NtRXblxClYwANQiXlT48L9Eb7dJ/aiQiMypxrG+mjPQNIw65L3uk8bFX3OKsj62g== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2017 15:00:44.4758 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB176 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1534 Lines: 36 We already have a variable for the DMA mapping device, so use that directly. Signed-off-by: Ioana Radulescu --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index c4252f47d57d..bf6f300affa7 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -2009,10 +2009,10 @@ static int dpaa2_eth_set_hash(struct net_device *net_dev, u64 flags) memset(&dist_cfg, 0, sizeof(dist_cfg)); /* Prepare for setting the rx dist */ - dist_cfg.key_cfg_iova = dma_map_single(net_dev->dev.parent, dma_mem, + dist_cfg.key_cfg_iova = dma_map_single(dev, dma_mem, DPAA2_CLASSIFIER_DMA_SIZE, DMA_TO_DEVICE); - if (dma_mapping_error(net_dev->dev.parent, dist_cfg.key_cfg_iova)) { + if (dma_mapping_error(dev, dist_cfg.key_cfg_iova)) { dev_err(dev, "DMA mapping failed\n"); err = -ENOMEM; goto err_dma_map; @@ -2022,7 +2022,7 @@ static int dpaa2_eth_set_hash(struct net_device *net_dev, u64 flags) dist_cfg.dist_mode = DPNI_DIST_MODE_HASH; err = dpni_set_rx_tc_dist(priv->mc_io, 0, priv->mc_token, 0, &dist_cfg); - dma_unmap_single(net_dev->dev.parent, dist_cfg.key_cfg_iova, + dma_unmap_single(dev, dist_cfg.key_cfg_iova, DPAA2_CLASSIFIER_DMA_SIZE, DMA_TO_DEVICE); if (err) dev_err(dev, "dpni_set_rx_tc_dist() error %d\n", err); -- 2.11.0