All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: "Darrick J. Wong" <djwong@kernel.org>, sandeen@redhat.com
Cc: xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH V2] xfsprogs: move stubbed-out kernel functions out of xfs_shared.h
Date: Wed, 3 Nov 2021 22:33:58 -0500	[thread overview]
Message-ID: <d5bf39e3-c1d0-192b-89bc-bc74f1c43460@sandeen.net> (raw)
In-Reply-To: <20211104031411.GS24307@magnolia>



On 11/3/21 10:14 PM, Darrick J. Wong wrote:
> On Wed, Nov 03, 2021 at 09:59:57PM -0500, Eric Sandeen wrote:
>> Move kernel stubs out of libxfs/xfs_shared.h, which is kernel
>> libxfs code and should not have userspace shims in it.
>>
>> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>> ---
>>
>> V2: fix spdx and copyright
>>
>> diff --git a/include/libxfs.h b/include/libxfs.h
>> index 24424d0e..64b44af8 100644
>> --- a/include/libxfs.h
>> +++ b/include/libxfs.h
>> @@ -11,6 +11,7 @@
>>   #include "platform_defs.h"
>>   #include "xfs.h"
>> +#include "stubs.h"
>>   #include "list.h"
>>   #include "hlist.h"
>>   #include "cache.h"
>> diff --git a/include/stubs.h b/include/stubs.h
>> new file mode 100644
>> index 00000000..d80e8de0
>> --- /dev/null
>> +++ b/include/stubs.h
>> @@ -0,0 +1,29 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +/*
>> + * Copyright (c) 2021 Red Hat, Inc.
>> + * All Rights Reserved.
>> + */
>> +#ifndef STUBS_H
>> +#define STUBS_H
>> +
>> +/* Stub out unimplemented and unneeded kernel functions */
>> +struct rb_root {
>> +};
>> +
>> +#define RB_ROOT 		(struct rb_root) { }
> 
> Please to remove  ^ this unnecessary space.
> 
>> +
>> +typedef struct wait_queue_head {
>> +} wait_queue_head_t;
>> +
>> +#define init_waitqueue_head(wqh)	do { } while(0)
>> +
>> +struct rhashtable {
>> +};
>> +
>> +struct delayed_work {
>> +};
>> +
>> +#define INIT_DELAYED_WORK(work, func)	do { } while(0)
>> +#define cancel_delayed_work_sync(work)	do { } while(0)
>> +
>> +#endif
> 
> This probably ought to be '#endif /* STUBS_H */' just to keep it clear
> which #ifdef it goes with.

Yup I spotted and added that already. I'm so rusty.

> With those two things fixed,
> Reviewed-by: Darrick J. Wong <djwong@kernel.org>

Thanks,
-Eric

  reply	other threads:[~2021-11-04  3:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04  2:21 [PATCH] xfsprogs: move stubbed-out kernel functions out of xfs_shared.h Eric Sandeen
2021-11-04  2:28 ` Darrick J. Wong
2021-11-04  2:55   ` Eric Sandeen
2021-11-04  2:59 ` [PATCH V2] " Eric Sandeen
2021-11-04  3:14   ` Darrick J. Wong
2021-11-04  3:33     ` Eric Sandeen [this message]
2021-11-04 17:15 ` [PATCH V3 RFC] xfsprogs: remove stubbed-out kernel functions out from xfs_shared.h Eric Sandeen
2021-11-04 19:08   ` Darrick J. Wong
2021-11-04 22:38   ` Dave Chinner
2021-11-05 16:40     ` Eric Sandeen
2021-11-07 22:58       ` Dave Chinner

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=d5bf39e3-c1d0-192b-89bc-bc74f1c43460@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.