Received: by 10.213.65.68 with SMTP id h4csp234608imn; Fri, 23 Mar 2018 03:32:46 -0700 (PDT) X-Google-Smtp-Source: AG47ELvZVdNEq5Ffqn5b246VuISMWh7GrNJRM6fBzZ3R+xR7f2oEd/+gxYCtWPQD5M6WWs22qg1+ X-Received: by 2002:a17:902:5388:: with SMTP id c8-v6mr18061144pli.90.1521801165984; Fri, 23 Mar 2018 03:32:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521801165; cv=none; d=google.com; s=arc-20160816; b=Z8wbfOKivRu8g4daya6p78+Nfni4ep8RLWRgWvhjUX/BPw72jEAGk72L28NyCpHv3K m15F0EH++5d60nArBSQjn5FkXH2HaNQS/9YN55qvYe/gY5qtGFl7MNzfmwn8NwZToZLH is1JazxvX5qsudh6S85ExXbBdIwCnw87nfzMYRK5cWZwCw1p5+ib4L8hFQ1l59a90JWM cCsO1G8R6UHqMW1KHSvThxhASPlhjdR56LjGScQVPFTAic9uMgkYBYBGsR79D/jevglb 3XVYLvCJpx3BRJBM3nJ9uyTNBBonEgggSwEXbVuL1jse2XVsqR8FrTJ0mnPrQRWJVKsI KXaw== 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:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject:arc-authentication-results; bh=j9LK30LelhN87v3ss/OT3h31slG9u3PlMi6QUrKKVtI=; b=q5kOePEUiJfZySNFYNoNhDU7WK+qoMlMLRs5Tr+Nxwixy6C5yrZLLHic9Uib48mQFB LY2hrYo/psYponPiGGsQY2W0gBE1pPzSAw9zo7alixYoej4f+J0TSHlgrORAFCg9O7kZ s0w4iFnP4qNHAhIGMkDiTTbOfMBzyxax35hL21E5GH1H8g/io9WK5p9iUPPa0UkEHQKT uyQBvPOhHwONhnTypEpgZfr7oRG7K1tPji4dHUK0QZcLr/+cdfBvW7UtuOXqan9rmVir IYG5MnFbK29/umH0Xe+Gjb9FIVnAs4Oqpj6lRlUlqK5jJRinH1bzLDs5iPMejsoLRZjY 7cdw== 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 b31-v6si2441970pla.170.2018.03.23.03.32.31; Fri, 23 Mar 2018 03:32:45 -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 S933612AbeCWKbn (ORCPT + 99 others); Fri, 23 Mar 2018 06:31:43 -0400 Received: from dd39320.kasserver.com ([85.13.155.146]:46184 "EHLO dd39320.kasserver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753848AbeCWKbl (ORCPT ); Fri, 23 Mar 2018 06:31:41 -0400 X-Greylist: delayed 539 seconds by postgrey-1.27 at vger.kernel.org; Fri, 23 Mar 2018 06:31:41 EDT Received: from [192.168.0.32] (109.125.99.188.dynamic.cablesurf.de [109.125.99.188]) by dd39320.kasserver.com (Postfix) with ESMTPSA id 993EE2CE013C; Fri, 23 Mar 2018 11:22:39 +0100 (CET) Subject: Re: [PATCH] staging: pi433: add descriptions for mutex locks To: Valentin Vidic , Greg Kroah-Hartman Cc: =?UTF-8?Q?Simon_Sandstr=c3=b6m?= , Marcus Wolf , =?UTF-8?Q?Luca_S=c3=b6the?= , Marcin Ciupak , Michael Panzlaff , Derek Robson , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <20180323094725.4904-1-Valentin.Vidic@CARNet.hr> From: Marcus Wolf Message-ID: Date: Fri, 23 Mar 2018 11:22:39 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180323094725.4904-1-Valentin.Vidic@CARNet.hr> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Valentin, could you please decribe in short words, why you think, that hte lock isn't obsolete? I wasn't sure, but close to remove the lock. That's why I putted the comment. Thanks, Marcus Am 23.03.2018 um 10:47 schrieb Valentin Vidic: > Removes TODO for tx_fifo_lock as tx_fifo is modified from > both pi433_tx_thread and pi433_write. > > Fixes checkpatch warning: > > CHECK: struct mutex definition without comment > > Signed-off-by: Valentin Vidic > --- > drivers/staging/pi433/pi433_if.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c > index d1e0ddbc79ce..f6f106a3ff8e 100644 > --- a/drivers/staging/pi433/pi433_if.c > +++ b/drivers/staging/pi433/pi433_if.c > @@ -87,7 +87,7 @@ struct pi433_device { > > /* tx related values */ > STRUCT_KFIFO_REC_1(MSG_FIFO_SIZE) tx_fifo; > - struct mutex tx_fifo_lock; // TODO: check, whether necessary or obsolete > + struct mutex tx_fifo_lock; /* serialize access to tx_fifo */ > struct task_struct *tx_task_struct; > wait_queue_head_t tx_wait_queue; > u8 free_in_fifo; > @@ -100,7 +100,7 @@ struct pi433_device { > u32 rx_bytes_to_drop; > u32 rx_bytes_dropped; > unsigned int rx_position; > - struct mutex rx_lock; > + struct mutex rx_lock; /* serialize read requests */ > wait_queue_head_t rx_wait_queue; > > /* fifo wait queue */ > -- Smarthome-Wolf UG (haftungsbeschränkt) Helene-Lange-Weg 23 80637 München Amtsgericht München, HRB 223529 Umastzsteuer-ID: DE304719911 Geschäftsführer: Marcus Wolf