Received: by 10.213.65.68 with SMTP id h4csp523722imn; Sun, 25 Mar 2018 06:02:09 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/EvD9fl+MGCkgKZDEl+NcnJ7qAIyyiUY6F+24YyAr2OFT2BFJKNyDaRudWByugTv9sgCsr X-Received: by 10.101.72.11 with SMTP id h11mr948490pgs.120.1521982929317; Sun, 25 Mar 2018 06:02:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521982929; cv=none; d=google.com; s=arc-20160816; b=bCA0hB2v4QtO5KvThyKBnGjst8JRjF9nN1FeR/FxGgpAjDD4aPXJxQ9jC5wcrup9Ql WdK/jWBVrQmIXVdHdjwCRBV2utpV4/COA3ypsg9YT3wv2cpL0B+QdmPMEElQHJoaNIvy jA/BGYAD/0mqEfsAzs3CU0lNKzNMXGFPz7PgHVEmddb+bwAB53EFXyWRDD1M4guUxKqe q7cc8FGz9/O/cnpVk8UQCb+2eIl8nyD+c/rK7ArHTUOJqCgGEf+7AEwcW+kI/+1exq9L ib6Gf136qnnPbhr5x44uEAwIc90JPNpCQ0R4Hs2OOnwT422tzGhvJhL3EfuSB3p85M34 OZbA== 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=G4oWVCVoYdS6hlszMMBHzBP2+9jx5z/suOVqaC3OBaY=; b=YJJBwY9hzaT/hcLlz07Pq8D/4ILGrX+5xicNkjE54a4INd9FC2NwlLE0owW8tbQmgr Y42BgHWZgVd9Y6SNsi6fQ/52TpqcuVa7izjrz7RiP02miNwMdEhhla1KN2T002sCwQKj BnK6pJP5aFjfcbasGby8iLmsaZwS9UcDXDJYzpk7wynlQOn4zZaEO/4jIdgHbPrlxoEI p4Gti4YrssPymgFikzAPlvfwaaLRGjJBh8tWT9K2JCD+svPoIVU222ySn+YON2aybguV 0pnfO60U4Cpz5Q1VKb3L7oDp0vGj82Kx/OOBHGwm+LNU08oHUuStKqh8TPAQYnDie4aW hiaQ== 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 l63-v6si13195140plb.466.2018.03.25.06.01.40; Sun, 25 Mar 2018 06:02:09 -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 S1752749AbeCYNAO (ORCPT + 99 others); Sun, 25 Mar 2018 09:00:14 -0400 Received: from dd39320.kasserver.com ([85.13.155.146]:52536 "EHLO dd39320.kasserver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752142AbeCYNAN (ORCPT ); Sun, 25 Mar 2018 09:00:13 -0400 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 5944E2CE0676; Sun, 25 Mar 2018 15:00:11 +0200 (CEST) Subject: Re: [PATCH] staging: pi433: add descriptions for mutex locks To: Valentin Vidic Cc: Greg Kroah-Hartman , =?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> <20180323114254.GL31333@gavran.carpriv.carnet.hr> <9442615c-5606-328a-f8cc-ad389af55ee3@smarthome-wolf.de> <20180323180027.GM31333@gavran.carpriv.carnet.hr> <20180323221821.GP31333@gavran.carpriv.carnet.hr> From: Marcus Wolf Message-ID: <8544b858-673f-0f59-0d8b-0474036068ce@smarthome-wolf.de> Date: Sun, 25 Mar 2018 15:00:09 +0200 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: <20180323221821.GP31333@gavran.carpriv.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, > But I have an idea to remove this kfifo_reset call in pi433_write > handling partial message writes: > > kfifo_reset(&device->tx_fifo); // TODO: maybe find a solution, not to discard already stored, valid entries > > The writer could acquire the lock and than use kfifo_avail to check if > there is enough space to write the whole message. What do you think? Unfortunaly I can't find the time to have a closer look on the code this weekend - still busy with tax stuff :-( Idea sounds great. I'll try to look at the code and think about it during Easter hollidays. Cheers, Marcus -- 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