From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 5FBA61C0BE0 for ; Tue, 22 Dec 2015 09:54:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4F97889A57 for ; Tue, 22 Dec 2015 09:54:58 +0000 (UTC) Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id crqmuRp2SHMi for ; Tue, 22 Dec 2015 09:54:53 +0000 (UTC) Received: from email.microchip.com (exsmtp03.microchip.com [198.175.253.49]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5878892444 for ; Tue, 22 Dec 2015 09:54:36 +0000 (UTC) From: Christian Gromm Subject: [PATCH 15/28] staging: most: remove tainted flag Date: Tue, 22 Dec 2015 10:52:56 +0100 Message-ID: <1450777989-5551-16-git-send-email-christian.gromm@microchip.com> In-Reply-To: <1450777989-5551-1-git-send-email-christian.gromm@microchip.com> References: <1450777989-5551-1-git-send-email-christian.gromm@microchip.com> MIME-Version: 1.0 List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" To: gregkh@linuxfoundation.org Cc: Christian Gromm , driverdev-devel@linuxdriverproject.org This patch removes the atomic tainted flag. It is needed to get rid of logical overhead. Signed-off-by: Christian Gromm --- This patch has been resent on behalf of Greg Kroah-Hartman drivers/staging/most/mostcore/core.c | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/mostcore/core.c index 782747a..58e288b 100644 --- a/drivers/staging/most/mostcore/core.c +++ b/drivers/staging/most/mostcore/core.c @@ -74,7 +74,6 @@ struct most_c_obj { struct most_inst_obj { int dev_id; - atomic_t tainted; struct most_interface *iface; struct list_head channel_list; struct most_c_obj *channel[MAX_CHANNELS]; @@ -1299,18 +1298,10 @@ _exit: */ int most_submit_mbo(struct mbo *mbo) { - struct most_c_obj *c; - struct most_inst_obj *i; - if (unlikely((!mbo) || (!mbo->context))) { pr_err("Bad MBO or missing channel reference\n"); return -EINVAL; } - c = mbo->context; - i = c->inst; - - if (unlikely(atomic_read(&i->tainted))) - return -ENODEV; nq_hdm_mbo(mbo); return 0; @@ -1436,17 +1427,8 @@ EXPORT_SYMBOL_GPL(most_get_mbo); */ void most_put_mbo(struct mbo *mbo) { - struct most_c_obj *c; - struct most_inst_obj *i; - - c = mbo->context; - i = c->inst; + struct most_c_obj *c = mbo->context; - if (unlikely(atomic_read(&i->tainted))) { - mbo->status = MBO_E_CLOSE; - trash_mbo(mbo); - return; - } if (c->cfg.direction == MOST_CH_TX) { arm_mbo(mbo); return; @@ -1602,14 +1584,6 @@ int most_stop_channel(struct most_interface *iface, int id, c->hdm_enqueue_task = NULL; mutex_unlock(&c->stop_task_mutex); - mutex_lock(&deregister_mutex); - if (atomic_read(&c->inst->tainted)) { - mutex_unlock(&deregister_mutex); - mutex_unlock(&c->start_mutex); - return -ENODEV; - } - mutex_unlock(&deregister_mutex); - if (iface->mod && modref) { module_put(iface->mod); modref--; @@ -1750,7 +1724,6 @@ struct kobject *most_register_interface(struct most_interface *iface) INIT_LIST_HEAD(&inst->channel_list); inst->iface = iface; inst->dev_id = id; - atomic_set(&inst->tainted, 0); list_add_tail(&inst->list, &instance_list); for (i = 0; i < iface->num_channels; i++) { @@ -1835,10 +1808,6 @@ void most_deregister_interface(struct most_interface *iface) c->aim1.ptr = NULL; } - mutex_lock(&deregister_mutex); - atomic_set(&i->tainted, 1); - mutex_unlock(&deregister_mutex); - while (modref) { if (iface->mod && modref) module_put(iface->mod); -- 1.7.9.5 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel