All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: "Ksenija Stanojević" <ksenija.stanojevic@gmail.com>
Cc: outreachy-kernel <outreachy-kernel@googlegroups.com>
Subject: Re: [Outreachy kernel] [PATCH 1/2] Staging: comedi: ni_mio_common: Fix endian sparse warning
Date: Sat, 31 Oct 2015 12:11:48 +0530	[thread overview]
Message-ID: <20151031064127.GA5145@sudip-pc> (raw)
In-Reply-To: <CAL7P5j+v+ovje8fnEMz046CdmDsNKXR+HUETXSYFS20mErzTRg@mail.gmail.com>

On Fri, Oct 30, 2015 at 08:01:27AM -0700, Ksenija Stanojević wrote:
> HI Sudip,
> 
> On Fri, Oct 30, 2015 at 12:15 AM, Sudip Mukherjee
> <sudipm.mukherjee@gmail.com> wrote:
> > On Thu, Oct 29, 2015 at 10:22:45PM -0700, Ksenija Stanojevic wrote:
> >> Data is pointer of type void and can be used to store any type of data.
> >> In function ni_ai_munge:
> >> barray and array have the same 16 bit offset.
> >> blarray and larray have the same 32 bit offset.
> >>
> >> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
> >> ---
> >
> > Yes, it introduces build warning. You will have to do the change in such
> > a way that it does not introduce any new warnings.
> 
> My idea was to place declaration of buf and barray within #ifdef PCIDMA
> but in that case I have a new warning:
> warning: ISO C90 forbids mixed declarations and code
> [-Wdeclaration-after-statement]
>    __le16 buf, *barray = data;
>    ^
> 
> So, I'm not sure what to do and if it's possible to avoid introducing warnings.

Keep the declaration where you have kept it, add another #ifdef PCIDMA
just before the declaration of buf and barray and #endif just after
the declaration.

regards
sudip


  reply	other threads:[~2015-10-31  6:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30  5:07 [PATCH 0/2] Staging: comedi: Fix sparse warnings Ksenija Stanojevic
2015-10-30  5:22 ` [PATCH 1/2] Staging: comedi: ni_mio_common: Fix endian sparse warning Ksenija Stanojevic
2015-10-30  7:15   ` [Outreachy kernel] " Sudip Mukherjee
2015-10-30 15:01     ` Ksenija Stanojević
2015-10-31  6:41       ` Sudip Mukherjee [this message]
2015-10-31 13:39         ` Ksenija Stanojević
2015-10-30  5:26 ` [PATCH 2/2] Staging: comedi: adl_pci9118: " Ksenija Stanojevic

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=20151031064127.GA5145@sudip-pc \
    --to=sudipm.mukherjee@gmail.com \
    --cc=ksenija.stanojevic@gmail.com \
    --cc=outreachy-kernel@googlegroups.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.