Thread (11 messages) read the whole thread 11 messages, 8 authors, 2006-08-21

Re: [2.6.19 PATCH 4/7] ehea: ethtool interface

From: Michael Ellerman <hidden>
Date: 2006-08-19 06:18:29
Also in: lkml, netdev

On Fri, 2006-08-18 at 17:41 +0200, Thomas Klein wrote:
Hi Alexey,

first of all thanks a lot for the extensive review.


Alexey Dobriyan wrote:
quoted
quoted
+	u64 hret = H_HARDWARE;
Useless assignment here and everywhere.
Initializing returncodes to errorstate is a cheap way to prevent
accidentally returning (uninitalized) success returncodes which
can lead to catastrophic misbehaviour.
If you try to return an uninitialized value the compiler will warn you,
you'll then look at the code and realise you missed a case, you might
save yourself a bug. By unconditionally initialising you are lying to
the compiler, and it can no longer help you.

cheers

-- 
Michael Ellerman
IBM OzLabs

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help