[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150723101057.GQ5371@mwanda>
Date: Thu, 23 Jul 2015 13:10:57 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Dexuan Cui <decui@...rosoft.com>
Cc: Vitaly Kuznetsov <vkuznets@...hat.com>,
"olaf@...fle.de" <olaf@...fle.de>,
"pebolle@...cali.nl" <pebolle@...cali.nl>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"jasowang@...hat.com" <jasowang@...hat.com>,
"driverdev-devel@...uxdriverproject.org"
<driverdev-devel@...uxdriverproject.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stephen@...workplumber.org" <stephen@...workplumber.org>,
"stefanha@...hat.com" <stefanha@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"apw@...onical.com" <apw@...onical.com>,
"davem@...emloft.net" <davem@...emloft.net>
Subject: Re: [PATCH V3 3/7] Drivers: hv: vmbus: add APIs to send/recv hvsock
packet and get the r/w-ability
On Thu, Jul 23, 2015 at 03:05:16AM +0000, Dexuan Cui wrote:
> The kind of usage is not rare in the kernel code:
Yeah. But it's used 5% of the time. If it's under 15% then there is a
risk that we'll write a checkpatch rule to enforce the standard way...
There are some places where != 0 is idiomatic, like when you are talking
about the number zero. strcmp() and friends should always be != 0 or
== 0.
In this specific case, writing it as "if (ret != 0)" caused the bug. If
we had written it as "if (ret) return ret;" then there are no zeroes so
wouldn't have been any temptation to return the zero instead of the ret.
> Hi Dan, I read this as a humor. :-)
:)
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists