From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DABDE3234 for ; Fri, 18 Feb 2022 07:10:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1C81C340E9; Fri, 18 Feb 2022 07:10:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645168247; bh=d+hIdbP4FcjzoABr76JeTKbmnhBBCfqZICtBBkTZUKQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=u+JysrmpF0/EDrB5xHfEaEQ6p9cdUqaBWI3XOenDKrL3YPKrprayM0DrAhAMyHm72 xhUPRFlZ0XpJ3ImhtOCNfALdfoGePbAZA7axG/E4Gk6OPilGgS6D60yTbsn++jGpZK m37+jsURk0HWwEul1S4mfx94va1vtToF+WAZmr9s= Date: Fri, 18 Feb 2022 08:10:40 +0100 From: Greg KH To: Ahamed Husni Cc: Bryan O'Donoghue , elder@kernel.org, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: greybus: loopback: Fix Coding Style Error Message-ID: References: <20220217190722.44894-1-ahamedhusni73@gmail.com> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Feb 18, 2022 at 10:22:28AM +0530, Ahamed Husni wrote: > Hi Greg, > > On Fri, Feb 18, 2022 at 12:56 AM Greg KH wrote: > > Did you try to build this change? > > I am a newbie kernel dev and trying to understand how things work. > I did not build this change by the time I sent you this, thinking this > is just a style change. > I should have tested the build. I am sorry. You always have to build-test your changes, as you have found out. > Now I built the changes by setting the following configurations. > CONFIG_GREYBUS > CONFIG_STAGING > CONFIG_GREYBUS_LOOPBACK > > My change introduces the following error. > '''' > drivers/staging/greybus/loopback.c:166:2: error: expected identifier > or ‘(’ before ‘do’ > 166 | do { \ > | ^~ > '''' > I could not fix or find the reason for this error. Please guide me in > this regard. There is nothing wrong with the original code here. Remember that checkpatch is a perl script that gives good advice, but it is not always correct. You must always manually check it based on your knowledge of the C language. I recommend learning a bit more C before working on kernel code. Best of luck! greg k-h