Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752235AbdGaMyk (ORCPT ); Mon, 31 Jul 2017 08:54:40 -0400 Received: from mailout01.webmailer.hosteurope.de ([80.237.138.57]:37071 "EHLO mailout01.webmailer.hosteurope.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751037AbdGaMyj (ORCPT ); Mon, 31 Jul 2017 08:54:39 -0400 X-Squirrel-UserHash: EhVcX1pHQwdXWkQFBhENSgEKLlwACw== X-Squirrel-FromHash: UwYMDVdAFAo= X-Squirrel-ProxyHash: BlRbDA1JFwA= Message-ID: In-Reply-To: <1501496473-11499-1-git-send-email-rishabheudyptula@gmail.com> References: <1501496473-11499-1-git-send-email-rishabheudyptula@gmail.com> Date: Mon, 31 Jul 2017 14:54:37 +0200 Subject: Re: [PATCH] staging/pi433: Solved some coding style issues in pi433_if.c From: "Wolf Entwicklungen" To: "RishabhHardas" Cc: gregkh@linuxfoundation.org, linux@Wolf-Entwicklungen.de, colin.king@canonical.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, "RishabhHardas" Reply-To: Marcus.Wolf@Wolf-Entwicklungen.de User-Agent: Host Europe Webmailer/1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Priority: 3 (Normal) Importance: Normal X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Status: not scanned, license restriction X-KLMS-AntiPhishing: not scanned, license restriction X-KLMS-AntiVirus: Kaspersky Security 8.0 for Linux Mail Server, version 8.0.1.721, bases: 2017/07/30 23:18:00 #10232146; khse: 2015-01-01 01:01:01 X-KLMS-AntiVirus-Status: Clean, skipped X-HE-Access: Yes X-bounce-key: webpack.hosteurope.de;marcus.wolf@wolf-entwicklungen.de;1501505677;c5d1e7fc; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1998 Lines: 69 Reviewed-by: Marcus Wolf Thank you Rishabh! Marcus Am Mo, 31.07.2017, 12:21 schrieb RishabhHardas: > From: RishabhHardas > > Solved a few coding style issues, used BIT macro to set MINORBITS. > > Signed-off-by: RishabhHardas > --- > drivers/staging/pi433/pi433_if.c | 24 ++++++++++++++---------- > 1 file changed, 14 insertions(+), 10 deletions(-) > > diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c > index d9328ce..f10ffc3 100644 > --- a/drivers/staging/pi433/pi433_if.c > +++ b/drivers/staging/pi433/pi433_if.c > @@ -47,18 +47,18 @@ > #include > #include > #include > +#include > #ifdef CONFIG_COMPAT > -#include > +#include > #endif > > #include "pi433_if.h" > #include "rf69.h" > > - > -#define N_PI433_MINORS (1U << MINORBITS) /*32*/ /* ... up to 256 */ > -#define MAX_MSG_SIZE 900 /* min: FIFO_SIZE! */ > -#define MSG_FIFO_SIZE 65536 /* 65536 = 2^16 */ > -#define NUM_DIO 2 > +#define N_PI433_MINORS BIT(MINORBITS) /*32*/ /* ... up to 256 */ > +#define MAX_MSG_SIZE 900 /* min: FIFO_SIZE! */ > +#define MSG_FIFO_SIZE 65536 /* 65536 = 2^16 */ > +#define NUM_DIO 2 > > static dev_t pi433_dev; > static DEFINE_IDR(pi433_idr); > @@ -66,10 +66,14 @@ > > static struct class *pi433_class; /* mainly for udev to create /dev/pi433 */ > > -/* tx config is instance specific > - so with each open a new tx config struct is needed */ > -/* rx config is device specific > - so we have just one rx config, ebedded in device struct */ > +/* > + * tx config is instance specific > + * so with each open a new tx config struct is needed > + */ > +/* > + * rx config is device specific > + * so we have just one rx config, ebedded in device struct > + */ > struct pi433_device { > /* device handling related values */ > dev_t devt; > -- > 1.9.1 > > >