Received: by 10.223.164.202 with SMTP id h10csp1124951wrb; Fri, 10 Nov 2017 23:57:27 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ+IBhkx4e/VnWE/w3X6bZfGqk0mQr6eEDhxBOY57UMPoSlLiR5oY+w2aNk5Q9ihirfbgN+ X-Received: by 10.99.44.214 with SMTP id s205mr2790701pgs.80.1510387047319; Fri, 10 Nov 2017 23:57:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510387047; cv=none; d=google.com; s=arc-20160816; b=XpENlxLp2PgB7VKfO5B3SFNJxbeHAb/Po7CfRovJizQmPullE0qqzWPCwz9Gr/wmHN fOHY3GET++Z+a5BvzMyyCKb6aiivpbZIWdFd7u38IgRswgVlWPz7Z9n+ZoR9Y/N5Usw0 SgI+KmZd57csnryj3UvmhYxw3IY3lgLqObmwhgm3pBkDdpAAiFk3uM0qhVz/JY04Z3Yb GPj5KaLzdEJgueguhdWWic5f65O1MtRRZliRqcPg1kwSUEnTYSNURYotOcADqqpVFEx+ lL4mIN+qHeh9nM/1ANoJGvWreUaY1dm78GQPohNT/Aod11WsaOWmA33P4hyC6wqdpQo4 NVxA== 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=a8A6Y9Tt5x3sg8FjEVd8YVRK8GYAA3BOSd7RTM9fSao=; b=mYbIgiLNa7b18p6LPB7FvDeYYheNWX9uxe0YwmmtqRZ3RUY3JHFl501I6Na4LxllHr F/q6SoCWqUTGT/PqpbdLGVchkHoTVjGLSIGdS2T5PyyJHS1diS5pJLzIn13ulw+l80XL uC0zcVrizlbdJbsfSfasXXN0NWJxMOpC9f7RRd4gz7pfyukMGXmvRYasnPAGJKVVNquH DFqzlTqf8bq93bXCT8R1P0IkxVJ4/IshEKDsDyt/r4qdMN6dopuB6ylAXv+7zQNkgfF9 8yy4WuVEFiR41iymEniCwAh1g1JAcmmqqT9SJNUIZNCE2+lS9WMWJ6BoAybA7Oon/Qq+ A4dA== 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 w71si11372404pfd.262.2017.11.10.23.56.55; Fri, 10 Nov 2017 23:57:27 -0800 (PST) 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 S1751494AbdKKHzg (ORCPT + 83 others); Sat, 11 Nov 2017 02:55:36 -0500 Received: from dd39320.kasserver.com ([85.13.155.146]:46258 "EHLO dd39320.kasserver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751280AbdKKHzf (ORCPT ); Sat, 11 Nov 2017 02:55:35 -0500 Received: from [192.168.0.36] (109.125.99.188.dynamic.cablesurf.de [109.125.99.188]) by dd39320.kasserver.com (Postfix) with ESMTPSA id 440042CE05BA; Sat, 11 Nov 2017 08:55:33 +0100 (CET) Subject: Re: staging: pi433: Possible bug in rf69.c To: Dan Carpenter Cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <709d3e3f-be3b-aa98-1cf6-6a048ef14d7b@smarthome-wolf.de> <20171110193258.qv6dbokqpjrrq3yb@mwanda> From: Marcus Wolf Message-ID: Date: Sat, 11 Nov 2017 08:55:30 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171110193258.qv6dbokqpjrrq3yb@mwanda> 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 Dan, I checked it on my local SVN. You are right. I submitted the code with '&'. Accodring to a check-in message on my SVN, there was a bugreport end of July and most probably a patch - either from me, you, Joseph Wright, Colin King or Julia Lawall, changing '&' to '|'. I guess the patch for some reason wasn't accepted, but fortunatley I introduced the change to my SVN. So from my point of view, we need a change from '&' to '|'. I could prepare such a patch, but I am still unsure, which repo to use. Shortly befor I fell ill, you proposed me to use Gregs staging for my further development. But Colin yesterday was working on a repo, called linux-next. Can you (or anyone else) please tell me, when (or for which kind of patches) to use the Gregs staging and wehen (or for which kind of patches) to use the linux-next? Sorry for not being familiar with that stuff! Thanks a lot, Marcus Am 10.11.2017 um 20:32 schrieb Dan Carpenter: > On Fri, Nov 10, 2017 at 06:23:32PM +0100, Marcus Wolf wrote: >> Hi everybody! >> >> Just comparing the master of Gregs statging of pi433 with my local SVN >> to review all changes, that were done the last monthes. >> >> I am not sure, but maybe we imported a bug in rf69.c lines 378 and >> following: >> >> Gregs repo: >> case automatic: return WRITE_REG(REG_LNA, ( (READ_REG(REG_LNA) & ~MASK_LNA_GAIN) & LNA_GAIN_AUTO) ); >> my repo: >> case automatic: return WRITE_REG(REG_LNA, ( (READ_REG(REG_LNA) & ~MASK_LNA_GAIN) | LNA_GAIN_AUTO) ); > > I edited the lines for clarity. The difference is that your repo does > a bitwise OR "| LNA_GAIN_AUTO" and the kernel.org code does a bitwise > "& LNA_GAIN_AUTO". > > The kernel repo hasn't changed since you sent us the driver in commit > 874bcba65f9a ('staging: pi433: New driver'). I agree that & doesn't > seem to make sense and I'm disapointed that it doesn't cause a Smatch > warning. > > But LNA_GAIN_AUTO is zero so maybe | BIT(LNA_GAIN_AUTO) was intended > instead of | LNA_GAIN_AUTO. I don't know... No one on this list knows > the answer probably. :/ > > regards, > dan caprenter > From 1583708946020503532@xxx Fri Nov 10 19:35:46 +0000 2017 X-GM-THRID: 1583700679179870250 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread