Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752165AbdLFOXA (ORCPT ); Wed, 6 Dec 2017 09:23:00 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:59594 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751989AbdLFOW7 (ORCPT ); Wed, 6 Dec 2017 09:22:59 -0500 Date: Wed, 6 Dec 2017 15:23:05 +0100 From: Greg KH To: Marcus Wolf Cc: Marcus Wolf , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, dan.carpenter@oracle.com Subject: Re: [PATCH] staging: pi433: Fixes issue with bit shift in rf69_get_modulation Message-ID: <20171206142305.GA15920@kroah.com> References: <1510161236-30840-1-git-send-email-linux@wolf-entwicklungen.de> <20171206090228.GA9137@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1559 Lines: 49 On Wed, Dec 06, 2017 at 12:02:13PM +0200, Marcus Wolf wrote: > > > Am 06.12.2017 um 11:02 schrieb Greg KH: > > On Wed, Nov 08, 2017 at 07:13:56PM +0200, Marcus Wolf wrote: > > > Fixes issue with bit shift in rf69_get_modulation > > > > What "issue"? > > > > > > > > Signed-off-by: Marcus Wolf > > > --- > > > drivers/staging/pi433/rf69.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c > > > index 290b419..c945b4b 100644 > > > --- a/drivers/staging/pi433/rf69.c > > > +++ b/drivers/staging/pi433/rf69.c > > > @@ -102,7 +102,7 @@ enum modulation rf69_get_modulation(struct spi_device *spi) > > > currentValue = READ_REG(REG_DATAMODUL); > > > - switch (currentValue & MASK_DATAMODUL_MODULATION_TYPE >> 3) { // TODO improvement: change 3 to define > > > + switch (currentValue & MASK_DATAMODUL_MODULATION_TYPE) { > > > > Doesn't this change the logic here? > > > > thanks, > > > > greg k-h > > > > Hi Greg, > > yes, it does. > > This is one of the very few changes to pi433 driver, that does not modify > the architecture or optics of the code, but really fixes a bug. This > function wasn't working from the very beginning, and we had already several > reports and patches (from me and otheres), announcing or trying to fix the > bug. But so far all patches were skipped for some reason. > > > Please take the patch. Ok, then this should go into 4.15-final, I'll queue it up to that tree. thanks, greg k-h