Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp169574imd; Fri, 26 Oct 2018 06:52:01 -0700 (PDT) X-Google-Smtp-Source: AJdET5esSBGqB+qy35vmU/IHv3q3vh+FwKtA8zPmM42cKRk6qfN3obbHWzvBDiYOV/boBNsdJ3bL X-Received: by 2002:a62:7d81:: with SMTP id y123-v6mr3755579pfc.245.1540561921584; Fri, 26 Oct 2018 06:52:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540561921; cv=none; d=google.com; s=arc-20160816; b=sTGar3EEhNvSKpKVvujyaCtyJ4OSU1d8HaqRD1kL9uasJcUwaeRXNBb9QO5WlsXXyZ vzniWJyQJ1Lce6i15hft9q+TIwirSe6EUDDT/qMaYqfR/PlMPly4Tey/ULwlD+3gUGI+ 52EX3TDhze3jWkq6Rx7RohPUQInIDIuD7xttbMDKtZIExrVDvbX7AdjWJTVH2+nlQ8M5 486JaqtLdfzvHM7HaB6q2mlPoGhLLsqrA1d7CSF7BCntr/PZ9AGUCDE+oa5avT0T9dCU uSlWtSbrfIL1Zdl1VO0TXujPbAM/N0z/LgfE74WSgCKSUzA49cJjS6UIr+1FG8dyXhT5 k/qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=d9xq5l5cmYG0Ez3BzcGuITaMcKzRisA6CMY+ZdGeWd4=; b=rpwyQKi9N5iIKN+PkH9Ls0dS2bJMiDZk2YLsC1gV1wqux+qfxIap04aPd+RJFJkCKF q39iolzhScZRPInTT6N47D68wDR2VemY2UkHbjE1jtI7iMDLFeze0uP8+NLVzhTZ0SF4 H4FuNpZiU99QBTIP3YkNF+TlpjPLb8LxYgVYKfSlNhB6LhjGPCc7o6O6XVYNHR+Vo8M8 G+rMKii2mUeKl0/9gWvc1LNnd356sHI/4O5hGBmca0tt3aXbF+32u1wZsH+cdW6KQPLr AIN0jjBMWCa/HWUeWXGZfB8U7Rbj1M3/bNL4OF8nIiMXKm8kE/ouwSd05Tcr6qj5kwx5 IcFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5-v6si11677667pgm.448.2018.10.26.06.51.45; Fri, 26 Oct 2018 06:52:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727521AbeJZWZo (ORCPT + 99 others); Fri, 26 Oct 2018 18:25:44 -0400 Received: from mx2.suse.de ([195.135.220.15]:44886 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726998AbeJZWZo (ORCPT ); Fri, 26 Oct 2018 18:25:44 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1E497B04C; Fri, 26 Oct 2018 13:48:35 +0000 (UTC) From: Nicolas Saenz Julienne To: stefan.wahren@i2se.com, eric@anholt.net, dave.stevenson@raspberrypi.org Cc: nsaenzjulienne@suse.de, linux-rpi-kernel@lists.infradead.org, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH RFC 09/18] staging: vchiq_core: do not initialize semaphores twice Date: Fri, 26 Oct 2018 15:48:04 +0200 Message-Id: <20181026134813.7775-10-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181026134813.7775-1-nsaenzjulienne@suse.de> References: <20181026134813.7775-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org vchiq_init_state() initialises a series of semaphores to then call remote_event_create() on the same semaphores, which initializes them again. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index dee5ea7bfe4f..6242357735b9 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -2200,11 +2200,6 @@ vchiq_init_state(VCHIQ_STATE_T *state, VCHIQ_SLOT_ZERO_T *slot_zero) sema_init(&state->connect, 0); mutex_init(&state->mutex); - sema_init(&state->trigger_event, 0); - sema_init(&state->recycle_event, 0); - sema_init(&state->sync_trigger_event, 0); - sema_init(&state->sync_release_event, 0); - mutex_init(&state->slot_mutex); mutex_init(&state->recycle_mutex); mutex_init(&state->sync_mutex); -- 2.19.1