All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Michael Clark <michaeljclark@mac.com>
Cc: RISC-V Patches <patches@groups.riscv.org>,
	Linux RISC-V <linux-riscv@lists.infradead.org>
Subject: Re: [PATCH 1/3] RISC-V: implement xchg_small and cmpxchg_small for char and short
Date: Mon, 11 Feb 2019 23:17:26 -0800	[thread overview]
Message-ID: <20190212071726.GA15079@infradead.org> (raw)
In-Reply-To: <20190211043829.30096-2-michaeljclark@mac.com>

>  
> +extern unsigned long __xchg_relaxed_small(volatile void *ptr, unsigned long new,
> +					  unsigned int size);
> +extern unsigned long __xchg_acquire_small(volatile void *ptr, unsigned long new,

No need for any of the externs on function declarations.

> +++ b/arch/riscv/kernel/cmpxchg.c
> @@ -0,0 +1,118 @@
> +/*
> + * Copyright (C) 2017 Imagination Technologies
> + * Author: Paul Burton <paul.burton@mips.com>
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation;  either version 2 of the  License, or (at your
> + * option) any later version.
> + */

Please use an SPDX tag instead of the GPL boilerplate.

Also this code seems to be entirely generic and very similar to the
mips code.  Did you consider making it a generic library routine
in lib/ instead?

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2019-02-12  7:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11  4:38 [PATCH 0/3] RISC-V: use generic spinlock and rwlock Michael Clark
2019-02-11  4:38 ` [PATCH 1/3] RISC-V: implement xchg_small and cmpxchg_small for char and short Michael Clark
2019-02-12  7:17   ` Christoph Hellwig [this message]
2019-02-24 21:03     ` Michael Clark
2019-02-11  4:38 ` [PATCH 2/3] RISC-V: convert custom spinlock/rwlock to generic qspinlock/qrwlock Michael Clark
2019-02-11  4:38 ` [PATCH 3/3] MIPS: fix truncation in __cmpxchg_small for short values Michael Clark
2019-02-11 12:37   ` Jonas Gorski
2019-02-11 20:20     ` Paul Burton
2019-02-24  0:09       ` Michael Clark
2019-02-11 20:03   ` Paul Burton
2019-02-11 20:03     ` Paul Burton

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=20190212071726.GA15079@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=michaeljclark@mac.com \
    --cc=patches@groups.riscv.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 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.