From patchwork Fri Nov 30 02:11:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 10705651 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 76364181D for ; Fri, 30 Nov 2018 02:11:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A74A2FCAA for ; Fri, 30 Nov 2018 02:11:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E1AE2FCBF; Fri, 30 Nov 2018 02:11:44 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9ADF2FCA9 for ; Fri, 30 Nov 2018 02:11:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726161AbeK3NTT (ORCPT ); Fri, 30 Nov 2018 08:19:19 -0500 Received: from bin-mail-out-05.binero.net ([195.74.38.228]:14004 "EHLO bin-mail-out-05.binero.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726549AbeK3NTT (ORCPT ); Fri, 30 Nov 2018 08:19:19 -0500 X-Halon-ID: 2f54b711-f445-11e8-9adf-005056917a89 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (unknown [89.233.230.99]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA id 2f54b711-f445-11e8-9adf-005056917a89; Fri, 30 Nov 2018 03:11:11 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: Steve Longerbeam , Sakari Ailus , Hans Verkuil , linux-media@vger.kernel.org Cc: Laurent Pinchart , linux-renesas-soc@vger.kernel.org, =?utf-8?q?Niklas_S=C3=B6derlund?= Subject: [PATCH] v4l2: async: remove locking when initializing async notifier Date: Fri, 30 Nov 2018 03:11:07 +0100 Message-Id: <20181130021107.32264-1-niklas.soderlund+renesas@ragnatech.se> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no need to hold the list_lock when initializing the local asd_list of a notifier. Remove the lock handling to simplify the code and remove a potential LOCKDEP warning. Signed-off-by: Niklas Söderlund Reported-by: Jacopo Mondi --- drivers/media/v4l2-core/v4l2-async.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c index a6d91370838d9342..15b0c44a76e7f6c3 100644 --- a/drivers/media/v4l2-core/v4l2-async.c +++ b/drivers/media/v4l2-core/v4l2-async.c @@ -424,11 +424,7 @@ static int v4l2_async_notifier_asd_valid(struct v4l2_async_notifier *notifier, void v4l2_async_notifier_init(struct v4l2_async_notifier *notifier) { - mutex_lock(&list_lock); - INIT_LIST_HEAD(¬ifier->asd_list); - - mutex_unlock(&list_lock); } EXPORT_SYMBOL(v4l2_async_notifier_init);