Linux kernel staging patches
 help / color / mirror / Atom feed
From: Alex Elder <elder@ieee.org>
To: Ahamed Husni <ahamedhusni73@gmail.com>,
	Greg KH <gregkh@linuxfoundation.org>
Cc: elder@kernel.org, greybus-dev@lists.linaro.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [greybus-dev] Re: [PATCH] staging: greybus: loopback: Fix Coding Style Error
Date: Wed, 2 Mar 2022 09:49:10 -0600	[thread overview]
Message-ID: <b4d057fd-cccc-571a-0941-061c6a26cbf0@ieee.org> (raw)
In-Reply-To: <CAFjpAKqy908scQTRJPkMhEz8OyNiR3-N8XD2hiGa+VBLhUf0VA@mail.gmail.com>

On 2/17/22 10:52 PM, Ahamed Husni wrote:
> Hi Greg,
> 
> On Fri, Feb 18, 2022 at 12:56 AM Greg KH <gregkh@linuxfoundation.org> 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.
> 
> 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.

You should understand that you cannot contribute to the Linux
kernel if you don't understand details of the C language well.
And you really must test your changes (certainly a build test)
before you send them for review.

To answer your question, the macro you changed does not
expand into code that is itself incorporated in an executable
block.  The macro is used to generate entire functions in a
unified way.

					-Alex

> 
> Thanks,
> Husni.
> _______________________________________________
> greybus-dev mailing list -- greybus-dev@lists.linaro.org
> To unsubscribe send an email to greybus-dev-leave@lists.linaro.org


      parent reply	other threads:[~2022-03-02 15:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17 19:07 [PATCH] staging: greybus: loopback: Fix Coding Style Error Husni Faiz
2022-02-17 19:26 ` Greg KH
2022-02-18  4:52   ` Ahamed Husni
2022-02-18  7:10     ` Greg KH
2022-03-02 15:49     ` Alex Elder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4d057fd-cccc-571a-0941-061c6a26cbf0@ieee.org \
    --to=elder@ieee.org \
    --cc=ahamedhusni73@gmail.com \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox