From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752349AbdEIHrI (ORCPT ); Tue, 9 May 2017 03:47:08 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:21842 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750825AbdEIHrC (ORCPT ); Tue, 9 May 2017 03:47:02 -0400 Date: Tue, 9 May 2017 10:46:18 +0300 From: Dan Carpenter To: Harinath Nampally Cc: lars@metafoo.de, devel@driverdev.osuosl.org, Michael.Hennerich@analog.com, linux-iio@vger.kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, pmeerw@pmeerw.net, knaack.h@gmx.de, jic23@kernel.org Subject: Re: [PATCH 1/3] staging: iio: meter: Add the comment for mutex definition Message-ID: <20170509074617.x6bdqs7innxhrude@mwanda> References: <3aa61726d979dbaf85a116341d169a933218904b.1494293664.git.harinath922@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3aa61726d979dbaf85a116341d169a933218904b.1494293664.git.harinath922@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 08, 2017 at 10:00:37PM -0400, Harinath Nampally wrote: > This patch fixes below checkpatch.pl warning: > CHECK: struct mutex definition without comment > > Signed-off-by: Harinath Nampally > --- > drivers/staging/iio/meter/ade7753.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/iio/meter/ade7753.c b/drivers/staging/iio/meter/ade7753.c > index b71fbd3..cffe6bf 100644 > --- a/drivers/staging/iio/meter/ade7753.c > +++ b/drivers/staging/iio/meter/ade7753.c > @@ -78,12 +78,13 @@ > /** > * struct ade7753_state - device instance specific data > * @us: actual spi_device > + * @buf_lock: mutex to protect tx and rx > * @tx: transmit buffer > * @rx: receive buffer > - * @buf_lock: mutex to protect tx and rx > **/ > struct ade7753_state { > struct spi_device *us; > + /* mutex to protect tx and rx */ Not aligned. We don't need two duplicate comments anyway. > struct mutex buf_lock; regards, dan carpenter