Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp666069imm; Sat, 8 Sep 2018 06:42:28 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbOmEpuPNLX/3M8NHzz4hAoMkr55RebN2m1jdRSNRB1DmbXZF/vi8NQAoz//UE423+xex5f X-Received: by 2002:a62:6003:: with SMTP id u3-v6mr14019208pfb.114.1536414148418; Sat, 08 Sep 2018 06:42:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536414148; cv=none; d=google.com; s=arc-20160816; b=ErM1f6yKSdmAZo0xxqTt1LBDI7ee+mZfbo9t6iipBWuwgcGY3qZRmmQTfii/oScmNQ 50RAy/kmxi9cTyj1VUh7gHpg23fQVkD0HL0PrXE+QoLbnl2k6vPoiFt5KpxboJa2xBL/ QVRhXqil4VIMiWQ2ZHM4EZHfaLuM+fGp1sF8AG8R4gCK8WmzNo0EyHocPCQYZdh2oEsM tQnmZ5Uw5kZpTyJ38ZRkLK2kGt4hLczubROO1CieAx+x/Cq6NGuqOVxw0juAm+DwkHq4 ocvsZLGtO65Mh47wxiGU52ktLhb1gN4otK+iDYJigiRIhWQWp26ktMYEINBdHPaQAYh/ GPdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:importance:content-transfer-encoding :mime-version:subject:references:in-reply-to:message-id:cc:to:from :date; bh=e0o2Xj4I8pkbdrhMMotleHlX6/C04avlJ9rVm2NKLxU=; b=tV5kPLLxRiC5QgGG9SxdgjbNtd9a2+64hM12rHdUaH1k/ovfGMaFlqIB7QvNx+cW4+ 3hgUiLvJKVHjDFS4yQhQeE3G4nJfGT5bX9o0q8fhEZu6SW8jv9PDbSOIBBfLnE4YhfeI QPvtAN3ZjJ3iG0DQ2DUiBGdAud9T/JKOQJ7RM/pZVmRiux6a7MBht1tIob6mzpl+wOaQ PW44QT8fQVHRiMMIkaAysxWExI2YIqmyWDspIoVbIultkvlRgJZD29qXYnfBYNQV+Q13 Cu80sYIAPff1Ekd76NkTSSJXRKwWHN3AkeTbUlkmo/3/+v1/iXZZsPJjNqtS1GMzDYPW 1Gxg== 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 u4-v6si10881041pgr.475.2018.09.08.06.42.12; Sat, 08 Sep 2018 06:42:28 -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 S1726709AbeIHS0x (ORCPT + 99 others); Sat, 8 Sep 2018 14:26:53 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:35990 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726489AbeIHS0w (ORCPT ); Sat, 8 Sep 2018 14:26:52 -0400 Received: from null ([172.19.249.150]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N5lvf-1fmdGq0KqJ-017GEG; Sat, 08 Sep 2018 15:40:43 +0200 Date: Sat, 8 Sep 2018 15:40:41 +0200 (CEST) From: Stefan Wahren To: Takashi Iwai Cc: Eric Anholt , linux-rpi-kernel@lists.infradead.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org Message-ID: <1706035173.39231.1536414041437@email.1und1.de> In-Reply-To: <20180904155858.8001-17-tiwai@suse.de> References: <20180904155858.8001-1-tiwai@suse.de> <20180904155858.8001-17-tiwai@suse.de> Subject: Re: [PATCH 16/29] staging: bcm2835-audio: Drop superfluous mutex lock during prepare MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.4-Rev39 X-Originating-Client: open-xchange-appsuite X-Provags-ID: V03:K1:K+pzkF6JpWbsQeHFK/cTp6AT4muAOvNRqq52MxY0IR7eoelBS6C mCQAg69hXsPfHUDphBRmYIQ6KNScBIfmyru95OXkQ1NBzK0vjZKL1IEz/4qsMYt7BZRHBBT K5/olqxqsouEQ0O0y/9kU7sN9VQPNIAwcNwAdMclIG7DpmxWpi7R41Zn4AsQ/d9owfY6d9R VqMuS8aqJn4QsWDHfwp+w== X-UI-Out-Filterresults: notjunk:1;V01:K0:7S4ft3bFxbQ=:PFzBsbxSrzO4VtyG+CQ+UR RJK8NiX+HqR5ObWbghD1Khe7qCiaXSH0dB7Nu55tBbwIW+8UKvKtRFjOnZWSZ/uUp5Xgu6seO 6n6Pm3ubTbG4DX/fn4qPuMI68FnwIrrpH/SUEXc2TB/YK5YwCeoxftFYwba/6b4I3ew0jcJFa YOXmBVmFzVmQB6OCJRvQdr6+AUUJUS0mW/kKFRlRR19w7arLKAE01x2kNZcQY5OTkx3987t0F Z0vNS6wiRamJVeX/PbPOFvEy8PZxFjxWThNbn8nWhPv/Avmb2c+0DfKkoGtDBp8WuVKWjuRJr HbgtX19aAWzeIN7ypfi9mKPWFoC/dUI6g/6TBOK47L0ODX54a+2Z+jyhUOEOVx2gXE+nIlvmL IeSZX2AAHGhD1eJlutoqFIQwmI2qBR9V2DtWFh2riCHtR2IANsg+IcQbuXgB6uCuS/jyCUk0h Vt2Y2J7rHS7NruOLvIJJYQEtMNM/g2A6YZOAyDHGjNsU16zXkptIOe/7w+xHl09Q2jdE/AfZU PO8vATDfj7FVUFKisti0oGxMx8VMR/BpXRrUArliupL6SiMkTBD49B2u72qU8KlM9qP62PrkQ ghpJzzn7FRu41NdXNtYf8HqXpyLjR5LSBoDne2Gv3x9aQGfRbxapMMzaY6vP92m8q6mvaEvqE ZHLG7cDAW2tozyinT7MpExokIC1Gl0UlJu/nA/fRssRB8BwOjJvBH+R7pX2D/mttYTjYe91wz fNTAYYuG6WeSyOoN Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > Takashi Iwai hat am 4. September 2018 um 17:58 geschrieben: > > > The chip->audio_mutex is used basically for protecting the opened > stream assignment, and the prepare callback is irrelevant with it. > > Signed-off-by: Takashi Iwai > --- > drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c > index 1f9c940f1cc3..9659c25b9f9d 100644 > --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c > +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c > @@ -218,8 +218,6 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) > int channels; > int err; > > - mutex_lock(&chip->audio_mutex); > - > /* notify the vchiq that it should enter spdif passthrough mode by > * setting channels=0 (see > * https://github.com/raspberrypi/linux/issues/528) > @@ -233,7 +231,7 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) > runtime->rate, > snd_pcm_format_width(runtime->format)); > if (err < 0) > - goto out; > + return err; > > memset(&alsa_stream->pcm_indirect, 0, sizeof(alsa_stream->pcm_indirect)); > > @@ -246,9 +244,7 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) > alsa_stream->pos = 0; > alsa_stream->draining = false; > > - out: > - mutex_unlock(&chip->audio_mutex); > - return err; > + return 0; looks like your are removing code which has been added in patch #14 ? > } > > static void snd_bcm2835_pcm_transfer(struct snd_pcm_substream *substream, > -- > 2.18.0 >