Re: [PATCH 1/2] HID: hid-lg4ff: Use Private Data

From
Jiri Slaby <hidden>
Date
2012-04-02 17:30:49
Also in
lkml
Reply to
unknown sender, 2012-04-02
On 04/02/2012 07:01 PM, simon@mungewell.org wrote:
quoted
quoted
+	struct lg4ff_device_entry *uninitialized_var(entry);
+	struct lg_drv_data *uninitialized_var(drv_data);
You don't need uninitialized_var bloat anymroe, right?
I guess I don't fully understand the 'unitialized_var()' macro, and was
just following the previous uses in the code.

Google'ing doesn't really help either. Is there a definitive guide as when
to use and not?
The simple answer is: never.

It serves the purpose to shut up the compiler when it complains that the
variable might be uninitialized, but the programmer is sure it cannot.
In your case, the compiler should not even complain about that.

Advantage of the macro is that it adds no assembly, but still silents
the compiler.

thanks,
-- 
js
suse labs

Thread (12 messages) 12 messages, 4 authors, last reply 2012-04-03
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help