All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Joe Perches <joe@perches.com>
Cc: Will Tange <bh34rt@gmail.com>,
	gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: silicom: fix 'return is not a function, parentheses are not required' in bpctl_mod.c
Date: Fri, 6 Dec 2013 10:11:12 +0300	[thread overview]
Message-ID: <20131206071112.GF5443@mwanda> (raw)
In-Reply-To: <1386286162.10003.24.camel@joe-AO722>

On Thu, Dec 05, 2013 at 03:29:22PM -0800, Joe Perches wrote:
> On Fri, 2013-12-06 at 02:21 +0300, Dan Carpenter wrote:
> > On Thu, Dec 05, 2013 at 03:09:15PM -0800, Joe Perches wrote:
> > > On Fri, 2013-12-06 at 01:50 +0300, Dan Carpenter wrote:
> > > > On Thu, Dec 05, 2013 at 10:23:53PM +0100, Will Tange wrote:
> 
> Ah.
> 
> Then maybe use a single ?: or a ! instead
> 
> 	return ret ? 0 : 1;
> or
> 	return !ret;
> 

You still have to handle the negative.

	if (ret < 0)
		return ret;

	return !ret;

regards,
dan carpenter

  reply	other threads:[~2013-12-06  7:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-05 21:23 [PATCH] staging: silicom: fix 'return is not a function, parentheses are not required' in bpctl_mod.c Will Tange
2013-12-05 22:50 ` Dan Carpenter
2013-12-05 23:09   ` Joe Perches
2013-12-05 23:21     ` Dan Carpenter
2013-12-05 23:29       ` Joe Perches
2013-12-06  7:11         ` Dan Carpenter [this message]
2013-12-06  7:18           ` Joe Perches

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=20131206071112.GF5443@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=bh34rt@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.