From: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
To: cristian andres vargas gonzalez <vargascristian@americana.edu.co>
Cc: "kernelnewbies@kernelnewbies.org" <kernelnewbies@kernelnewbies.org>
Subject: Re: functions with empty body in file /kernel/events/core
Date: Sat, 08 Aug 2020 15:56:49 -0400 [thread overview]
Message-ID: <57068.1596916609@turing-police> (raw)
In-Reply-To: <122F362A-07B8-41C0-BAAA-A7ED15405361@hxcore.ol>
[-- Attachment #1.1: Type: text/plain, Size: 977 bytes --]
On Sat, 08 Aug 2020 12:48:08 -0500, cristian andres vargas gonzalez said:
> Who have an empty body,
Which is a reasonable thing to have, if the function doesn't do anything on a given
architecture or configuration.
> I understand that they are inside a conditional created by the preprocessor
> directives and also that they are called in some parts of the code , but would
> it really be necessary that when the directive is not true to leave the
> function with the body empty, would it be a solution?
I admit being confoozled here - would leaving a function with an empty body be
a solution? Obviously it *would* be one, because the kernel currently does
that.
> Or is it just missing to eliminate those functions without a body?
Feel free to try it and see what happens. :) (Make sure to try two different
configs, one that includes the version that has the non-empty body, and
one that tries to call the eliminated function without a body).
[-- Attachment #1.2: Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
prev parent reply other threads:[~2020-08-08 19:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-08 17:48 functions with empty body in file /kernel/events/core cristian andres vargas gonzalez
2020-08-08 19:56 ` Valdis Klētnieks [this message]
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=57068.1596916609@turing-police \
--to=valdis.kletnieks@vt.edu \
--cc=kernelnewbies@kernelnewbies.org \
--cc=vargascristian@americana.edu.co \
/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 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).