mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, linux-kernel@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] ptr_ring: fix build
Date: Tue, 20 Mar 2018 10:29:51 +0800	[thread overview]
Message-ID: <62a7a572-bba8-0beb-9a4a-1a4b80b244e4@redhat.com> (raw)
In-Reply-To: <1521506496-455194-1-git-send-email-mst@redhat.com>



On 2018年03月20日 08:41, Michael S. Tsirkin wrote:
> Fixes after recent use of kvmalloc
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>   tools/virtio/ringtest/ptr_ring.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/tools/virtio/ringtest/ptr_ring.c b/tools/virtio/ringtest/ptr_ring.c
> index 477899c..2d566fb 100644
> --- a/tools/virtio/ringtest/ptr_ring.c
> +++ b/tools/virtio/ringtest/ptr_ring.c
> @@ -17,6 +17,8 @@
>   #define likely(x)    (__builtin_expect(!!(x), 1))
>   #define ALIGN(x, a) (((x) + (a) - 1) / (a) * (a))
>   #define SIZE_MAX        (~(size_t)0)
> +#define KMALLOC_MAX_SIZE SIZE_MAX
> +#define BUG_ON(x) assert(x)
>   
>   typedef pthread_spinlock_t  spinlock_t;
>   
> @@ -57,6 +59,9 @@ static void kfree(void *p)
>   		free(p);
>   }
>   
> +#define kvmalloc_array kmalloc_array
> +#define kvfree kfree
> +
>   static void spin_lock_init(spinlock_t *lock)
>   {
>   	int r = pthread_spin_init(lock, 0);

Acked-by: Jason Wang <jasowang@redhat.com>

      reply	other threads:[~2018-03-20  2:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-20  0:41 Michael S. Tsirkin
2018-03-20  2:29 ` Jason Wang [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=62a7a572-bba8-0beb-9a4a-1a4b80b244e4@redhat.com \
    --to=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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

all inboxes | Powered by JetHome®