From: Jens Axboe <[email protected]>
To: Stefano Garzarella <[email protected]>,
YueHaibing <[email protected]>
Cc: [email protected], [email protected],
[email protected], [email protected]
Subject: Re: [PATCH -next] io_uring: Fix unused function warnings
Date: Wed, 4 Mar 2020 11:37:45 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <20200304164806.3bsr2v7cvpq7sw5e@steredhat>
On 3/4/20 9:48 AM, Stefano Garzarella wrote:
> On Wed, Mar 04, 2020 at 03:53:52PM +0800, YueHaibing wrote:
>> If CONFIG_NET is not set, gcc warns:
>>
>> fs/io_uring.c:3110:12: warning: io_setup_async_msg defined but not used [-Wunused-function]
>> static int io_setup_async_msg(struct io_kiocb *req,
>> ^~~~~~~~~~~~~~~~~~
>>
>> There are many funcions wraped by CONFIG_NET, move them
>> together to simplify code, also fix this warning.
>>
>> Reported-by: Hulk Robot <[email protected]>
>> Signed-off-by: YueHaibing <[email protected]>
>> ---
>> fs/io_uring.c | 98 ++++++++++++++++++++++++++++++++++-------------------------
>> 1 file changed, 57 insertions(+), 41 deletions(-)
>>
>
> Since the code under the ifdef/else/endif blocks now are huge, would it make
> sense to add some comments for better readability?
>
> I mean something like this:
>
> #if defined(CONFIG_NET)
> ...
> #else /* !CONFIG_NET */
> ...
> #endif /* CONFIG_NET */
I applied it with that addition. Also had to adapt it quite a bit, as
the prototypes changed. I'm guessing the branch used was a few days
old?
--
Jens Axboe
prev parent reply other threads:[~2020-03-04 18:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-04 7:53 [PATCH -next] io_uring: Fix unused function warnings YueHaibing
2020-03-04 16:48 ` Stefano Garzarella
2020-03-04 18:37 ` Jens Axboe [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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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