All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sumitra Sharma <sumitraartsy@gmail.com>
To: Ira Weiny <ira.weiny@intel.com>
Cc: Julia Lawall <julia.lawall@inria.fr>, outreachy@lists.linux.dev
Subject: Re: Warn on macros with flow control statements
Date: Wed, 22 Mar 2023 23:28:53 -0700	[thread overview]
Message-ID: <20230323062853.GB155612@sumitra.com> (raw)
In-Reply-To: <641557e06a958_28dc5f294d7@iweiny-mobl.notmuch>

On Fri, Mar 17, 2023 at 11:19:12PM -0700, Ira Weiny wrote:
> Julia Lawall wrote:
> > > Based on the flow control I would do something like this.  It is a bit more
> > > verbose but is very clear what is happening.
> > >
> > 
> > Ira, what do you think of my suggestion of
> > 
> > err = err || qlge_fill_seg_(...);
> > 
> > It would avoid 40 lines of ifs, and would still avoid calling
> > qlge_fill_seg_ as soon as there is a failure.  On ther other hand, I don't
> > recall this being done elsewhere, so maybe all the ifs would be
> > preferable.
> 
> Oh sorry.  I miss read your suggestion and I thought it was going to
> continue running qlge_fill_seg_() for all the other calls.  I read this
> as:
> 
> err = err | qlge_fill_seg_(...);
> 
> Not sure why.  Just late I guess.
> 
> Yes your suggestion would work.  I do think it is a bit odd though.
>

Hi Ira,

I would like to know why do you think this is odd? 

PS: I was trying to implement your suggestion and was able to connect to
what julia wrote here. 

For reference this is the link to your suggestion https://lore.kernel.org/outreachy/64154d438f0c8_28ae5229421@iweiny-mobl.notmuch/

Regards,
Sumitra

> Ira

  reply	other threads:[~2023-03-23  6:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16  8:08 Warn on macros with flow control statements Sumitra Sharma
2023-03-16  8:26 ` Julia Lawall
2023-03-17  7:23   ` Sumitra Sharma
2023-03-18  5:33 ` Ira Weiny
2023-03-18  6:05   ` Julia Lawall
2023-03-18  6:19     ` Ira Weiny
2023-03-23  6:28       ` Sumitra Sharma [this message]
2023-03-23  8:15         ` Julia Lawall
2023-03-23 16:25           ` Ira Weiny
2023-03-23 16:19         ` Ira Weiny

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=20230323062853.GB155612@sumitra.com \
    --to=sumitraartsy@gmail.com \
    --cc=ira.weiny@intel.com \
    --cc=julia.lawall@inria.fr \
    --cc=outreachy@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 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.