From patchwork Fri Nov 17 13:38:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Tudor X-Patchwork-Id: 10062733 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A906D60352 for ; Fri, 17 Nov 2017 13:39:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98D6A2A1AD for ; Fri, 17 Nov 2017 13:39:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D57C2A25C; Fri, 17 Nov 2017 13:39:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D1F352A1AD for ; Fri, 17 Nov 2017 13:39:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=U/gHdo8Vpl9bbs3Cgh3RUC8ZyE4kRIXOyUzx/n1LxJs=; b=lUDvhIRwFOOcnj JWkWsL0r8rq4WzS8JAFpR057EsSVQqTDnncACmJxrUAMX6mQ7SJY23DDR893UXsNvD8nPhKZb0uf/ FcjiW+U8J4cdcBViKrt3Fa4auqtZFE0WzdBmzDKwnkLXS5tGGeWMTBSZAqx+1QC4lYgcvtmrTe85B ch+kIMtL4WfY8AbXRH5SISgH0piHLQiJb3B0Szj4/SrgjLZlEcyxwmrv150hZ1GhTTbq6WwJbABa3 2620J0h8C//xEtRd8BzURZ6GkEgOp679r4vPOdac7Lp6mesrUyCOt/T1Jr0QOpYqCuq/cSm7Jgg0f ZbbmR8Vad8H3vfu/uPkA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eFgrx-00079e-37; Fri, 17 Nov 2017 13:39:45 +0000 Received: from mail-by2nam01on0060.outbound.protection.outlook.com ([104.47.34.60] helo=NAM01-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eFgrW-0006Wq-IO for linux-arm-kernel@lists.infradead.org; Fri, 17 Nov 2017 13:39:21 +0000 Received: from BN3PR03CA0103.namprd03.prod.outlook.com (10.174.66.21) by MWHPR03MB2704.namprd03.prod.outlook.com (10.168.207.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.239.5; Fri, 17 Nov 2017 13:38:44 +0000 Received: from BL2FFO11FD039.protection.gbl (2a01:111:f400:7c09::126) by BN3PR03CA0103.outlook.office365.com (2603:10b6:400:4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.239.5 via Frontend Transport; Fri, 17 Nov 2017 13:38:44 +0000 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; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD039.mail.protection.outlook.com (10.173.161.135) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.197.9 via Frontend Transport; Fri, 17 Nov 2017 13:38:44 +0000 Received: from fsr-fed1964-102.ea.freescale.net (fsr-fed1964-102.ea.freescale.net [10.171.73.17]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vAHDcbAl004692; Fri, 17 Nov 2017 06:38:41 -0700 From: To: , Subject: [PATCH 02/10] staging: fsl-mc/dpio: remove incomplete refcount implementation Date: Fri, 17 Nov 2017 15:38:26 +0200 Message-ID: <20171117133834.4635-2-laurentiu.tudor@nxp.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20171117133834.4635-1-laurentiu.tudor@nxp.com> References: <20171117133834.4635-1-laurentiu.tudor@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131553995246910619; (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)(7966004)(39380400002)(346002)(39860400002)(376002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(53936002)(8936002)(77096006)(86362001)(316002)(8676002)(305945005)(2950100002)(33646002)(81156014)(1076002)(81166006)(86152003)(6666003)(2876002)(50226002)(36756003)(106466001)(4326008)(2906002)(85426001)(6636002)(5003940100001)(7416002)(39060400002)(105606002)(110136005)(47776003)(104016004)(54906003)(97736004)(76176999)(356003)(50986999)(8656006)(16586007)(50466002)(189998001)(5660300001)(48376002)(498600001)(68736007); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2704; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD039; 1:aYEFP9y4Hl1WeyKHcx+7mNfcGb7Ae36NZQwAIJSHogsNHSlLyoIuG298mfGgZaxIvAcdY2ddJZjrOc3h2R9oHBc0h+rwoOvMBHIO6K/LwtHlfiMeGs7wb3TwYfZd3kwz MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: deaa2e1b-13c8-49a6-bc9b-08d52dc085f0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4628075)(201703131517081)(2017052603258); SRVR:MWHPR03MB2704; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2704; 3:rISNgkqlMMo2gcXEF/90Ns9QcAlrdeueRstKv+66Ll8s4wp05V40wjhg6noEh8Ata6j5/MYwODU7BULqgXMMimoFGvdYkhJkJSW5DLQpORXMyl9wb2nylKrXQUCm1tNjUxkn2VfSKvzV0EOSRdDLmqMJKsddcdd28Hhp9iGA0tEdpGrovvWJQizQy7xygYWMTFhLHwN1jVzg+Gy4tqTQ+7MLOXgkQMBj078Wr2EJJaoJehy3vfQbrgnkE/MiHmBzxIcNSH/Xwwwy4+pZgFg77z1kHLY9zUggUV2nUBesC2ZVMJSgwINZJCMviDCh11Cz2apQBZlMDX3rE/myIV6hdt+Q8cevjp5Lbd093K/ymkg=; 25:AwzqsIxecm6QVMIVaS5HdQ8GhUcOIaY5t9fBxW4z0pd8REiDyGIa8MEr/F1OF/OiK4S+3oP5vZJf+9Y5zkvNLSGh5aiUb6kcVMd09rxLgg4mJ+0dU1cNlARJbzuJtXKpJwZWPj9Qpk1ogWYbpvYPgO+ANPDX2MHcgi5FS4gL044gfpSC2o7T7D75is3lPifhLKsNyzBrEVGclZisMiVULbJ4b0kSX+N3v3tpdxtLO+seqlEqd+Ix/rXJImci5m/zDbQv1hruv8xkcoF/vk8bbEummXLdodVaH8rjtfsDn33SyD2pyMOsnHHPa425dmpTb29WwKqgs6LAV3lgwxW3fQ== X-MS-TrafficTypeDiagnostic: MWHPR03MB2704: X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2704; 31:6u1NEN+e+68udyJVtCxPaM1yJlVt+trvrl1JIAd0mBSRdjamY6agoC+zfaC9rk2cirFOfCFOtKSBj21y3dUylPo9QUU+bd7yfbATqLM1jMj5C6V+qtkSQr8UIn+KKKhQtv1x1XjpCtPtO5cu/RDeLxAFoqHklmhMQR43C+TQCgM6zY/CsM0d9/FKVw/45NoWwTUQBzIp5C+BDPpp7Gsd4oJlg62ka8Is9VFW7s59J80=; 4:S7plEN9A5P/65usuCDbLcrdSiRxIr2jzLri5Ulxh5DK59dOQA6+d59n86d33zl5ww7IjRx+vZ1VwVmrVaMUtb6pywMYMSbpjBeZX+q0dB/KmKfNDZToBb+1Utd7SaAK7+jQoaMbTW8YZEGDvA1dAuteIneO48uNRFiWfZIXi8G0TU0JrAy757r98vEo82F40zgstKvvIjOPZp2S601LhBp3PpZhWwWodYNB9+T2Yh+DL1+TsuOp3SR1v/oiU5TYwubUcpnliFLmRFC6Gpy35/Z57mRU0ONTxKdLhpsnY4Rp3K4TgbnlRKERlukWMDqfX 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)(2401047)(8121501046)(5005006)(3002001)(3231022)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6096035)(20161123556025)(20161123559100)(20161123563025)(20161123561025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR03MB2704; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR03MB2704; X-Forefront-PRVS: 049486C505 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR03MB2704; 23:KfM1/1ZGvIiQh816Mxyr+PWQhqxyHZh0D1cnK4QBI?= =?us-ascii?Q?kndjuLDjWYDjYOX6N7hYuzeDl0O2ADOEkqYMiGwTay5Gp0H6nLZfkVXnxzJd?= =?us-ascii?Q?4fRVNDW7JD4OjBu4F22fYgR1/tTzxrfs45QPtfX0FzvNFufode6p5FnwrWr/?= =?us-ascii?Q?Jzfo/hFJsL2FofCsWRukEVtdonIG72u5L7dC31HyteDFXXMOGQtDDLaeYaVd?= =?us-ascii?Q?jZ5CG1ZUFG5P564xrmkFVbPmr0Q4kzN+YIDJxbrrnlXOsms9L1cMintZn60Y?= =?us-ascii?Q?vKTqruh97XJSGkYQ4z/U82bgLeOQJP4MD3m7ipR0uES+TBN3DLbuySi6KNDr?= =?us-ascii?Q?/f2a7YAd6n3bJFd001/2etH+p+U+93nG1JW9Tcc2k1WFUR9M6eTriShWGE63?= =?us-ascii?Q?V3sktklg/MR3MqTKmiM55bDyQslfJrFmykCFZ8PkKjKvSf1x38bk4RHCRdaQ?= =?us-ascii?Q?IWyZEXhLG3CdGIBiKsaHFuprEWc+5v1lXr+eXiuWwufoCkLPHHe+MAgDLkbq?= =?us-ascii?Q?xDiS7hz3ZO6i9uagKRzLxFIBqNcJs+1ZMW0D0AgU8xamX3BYo5sKk7YrgROc?= =?us-ascii?Q?Je5VFx6H1AmDRe74XY05+2XkvD05d/uP9ds0oeDpZ+XUA4x7buPRe1MLIH0A?= =?us-ascii?Q?/iZPUilIpFh3O1m1ucrRrzYytMGQeuYSM6AVyz100nW6AWirvR/aAqhHGPcg?= =?us-ascii?Q?ncUWvhPK8JYHorNiDk7sSiAAJ0VW3WisNz61VprckVrLA1YInFBqm3QacOWN?= =?us-ascii?Q?QSd6ZA/fIrXlPgo1fgqcS8gGbzxvZiz7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CAxX3QWvo1buPYW0knb4pby1t2+xRLGNM0XqRIONUhbyjyGPtJxtmVbwiKucoyAX8QdDpFEfY8i1vJwy6MQIjCTYclwWp6mfSGcEyT7tPbXjINvadCWv+lXeqY42jGFlE=; 24:oGW2p71l23zRsjlhcLCl6Fst7kQC3g5vMyFTrh9c3tEmdj7lo7LxvKUOcC1HLCXVzrKePzZClmixmoYV0fCOGCq7pZg9li1ERjiIjzXDN4I=; 7:xMctqviT4SLjA9dbgyrwdHuxeFO3YrzcawSD8B79owtvhXgJOWrX9k9y05UOqnoLB9lTaMWI/+aCAW0qH48n0DWOllbUaM7gc8Saq82RhkLrEb+yLbPj2pLf7skEK8zax0KXHqN7OAv0lMHoQP9lZVmhmIZtGaw1Wp3dX564ssEoBPk3CIyKTnBcWg42qRyC8v96AMPngS/fo1D3bLElwmhyM8mHAR1DAKpUqsxPfeTncwmeovgd6WypuM77P372 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2017 13:38:44.5194 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: deaa2e1b-13c8-49a6-bc9b-08d52dc085f0 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: MWHPR03MB2704 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171117_053918_702518_A172C156 X-CRM114-Status: GOOD ( 11.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, stuyoder@gmail.com, roy.pledge@nxp.com, linux-kernel@vger.kernel.org, leoyang.li@nxp.com, bogdan.purcareata@nxp.com, linux-arm-kernel@lists.infradead.org, Laurentiu Tudor Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Laurentiu Tudor There's an unfinished implementation of reference counting for dpaa2_io structure using atomics. Since it's unused lets remove it for now and, if needed at a later time, make use of krefs instead of rolling our own refcounting. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c index a609ec8..591d8b7 100644 --- a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c +++ b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c @@ -43,7 +43,6 @@ #include "qbman-portal.h" struct dpaa2_io { - atomic_t refs; struct dpaa2_io_desc dpio_desc; struct qbman_swp_desc swp_desc; struct qbman_swp *swp; @@ -126,7 +125,6 @@ struct dpaa2_io *dpaa2_io_create(const struct dpaa2_io_desc *desc) return NULL; } - atomic_set(&obj->refs, 1); obj->dpio_desc = *desc; obj->swp_desc.cena_bar = obj->dpio_desc.regs_cena; obj->swp_desc.cinh_bar = obj->dpio_desc.regs_cinh; @@ -171,8 +169,6 @@ EXPORT_SYMBOL(dpaa2_io_create); */ void dpaa2_io_down(struct dpaa2_io *d) { - if (!atomic_dec_and_test(&d->refs)) - return; kfree(d); } EXPORT_SYMBOL(dpaa2_io_down);