kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Preceding a method call with (void)
@ 2015-09-10  4:52 Kevin Wilson
  2015-09-10  5:00 ` Greg KH
  2015-09-10  6:39 ` Valdis.Kletnieks at vt.edu
  0 siblings, 2 replies; 5+ messages in thread
From: Kevin Wilson @ 2015-09-10  4:52 UTC (permalink / raw)
  To: kernelnewbies

Hi all,

I intend to send a patch to the kernel, and my question is about
preceding a method with (void).

In several OpenSource UserSpace projects, I encountered usage of
preceding a method invocation with (void).

For example:

(void) myFunc(param1);

I did not encounter such cases in the kernel code that I read, thus far.

On the other hand, I did not saw in the kernel coding style doc
anything which prohibits such usage.

If I remember, using (void) before the method name is a way to tell
explicitly that this method does not return any value,
but I am not sure as for the exact reasons it is used (in userspace).

My question is:
Will sending a patch to the kernel with code with (void) preceding
method calls make sense ?
or should I avoid it in  the first place (again, I did not saw such a
pattern in the kernel)

Regards,
Kevin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-18 15:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-10  4:52 Preceding a method call with (void) Kevin Wilson
2015-09-10  5:00 ` Greg KH
2015-09-10  6:39 ` Valdis.Kletnieks at vt.edu
2015-09-18 14:04   ` Rami Rosen
2015-09-18 15:02     ` Valdis.Kletnieks at vt.edu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).