mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <laurentiu.tudor@nxp.com>
To: <gregkh@linuxfoundation.org>, <ruxandra.radulescu@nxp.com>
Cc: <devel@driverdev.osuosl.org>, <linux-kernel@vger.kernel.org>,
	<bogdan.purcareata@nxp.com>, <leoyang.li@nxp.com>,
	<stuyoder@gmail.com>, <roy.pledge@nxp.com>,
	<linux-arm-kernel@lists.infradead.org>,
	Laurentiu Tudor <laurentiu.tudor@nxp.com>
Subject: [PATCH 02/10] staging: fsl-mc/dpio: remove incomplete refcount implementation
Date: Fri, 17 Nov 2017 15:38:26 +0200	[thread overview]
Message-ID: <20171117133834.4635-2-laurentiu.tudor@nxp.com> (raw)
In-Reply-To: <20171117133834.4635-1-laurentiu.tudor@nxp.com>

From: Laurentiu Tudor <laurentiu.tudor@nxp.com>

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 <laurentiu.tudor@nxp.com>
---
 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);
-- 
2.9.4

  reply	other threads:[~2017-11-17 13:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-17 13:38 [PATCH 01/10] staging: fsl-mc: drop unused dpcon APIs laurentiu.tudor
2017-11-17 13:38 ` laurentiu.tudor [this message]
2017-11-17 13:38 ` [PATCH 03/10] staging: fsl-mc/dpio: drop EXPORT_SYMBOL() for a few functions laurentiu.tudor
2017-11-17 13:38 ` [PATCH 04/10] staging: fsl-mc/dpio: remove couple of unused functions laurentiu.tudor
2017-11-17 13:38 ` [PATCH 05/10] staging: fsl-mc: consistently use EXPORT_SYMBOL_GPL() laurentiu.tudor
2017-11-17 13:38 ` [PATCH 06/10] staging: fsl-mc/dpio: change to " laurentiu.tudor
2017-11-17 13:38 ` [PATCH 07/10] staging: fsl-mc: remove some superfluous WARN_ONs laurentiu.tudor
2017-11-17 13:38 ` [PATCH 08/10] staging: fsl-mc: remove debug WARN_ONs doubling error checks laurentiu.tudor
2017-11-17 13:38 ` [PATCH 09/10] staging: fsl-mc: add support for device type laurentiu.tudor
2017-11-17 13:38 ` [PATCH 10/10] staging: fsl-mc: use device_type instead of strcmp() laurentiu.tudor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171117133834.4635-2-laurentiu.tudor@nxp.com \
    --to=laurentiu.tudor@nxp.com \
    --cc=bogdan.purcareata@nxp.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roy.pledge@nxp.com \
    --cc=ruxandra.radulescu@nxp.com \
    --cc=stuyoder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®