Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Huacai Chen <chenhc@lemote.com>
Cc: "open list:MIPS" <linux-mips@vger.kernel.org>,
	Fuxin Zhang <zhangfx@lemote.com>,
	Zhangjin Wu <wuzhangjin@gmail.com>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	"Maciej W . Rozycki" <macro@linux-mips.org>
Subject: Re: [PATCH] MIPS: Fix build warning about "PTR_STR" redefinition
Date: Sat, 30 May 2020 11:05:43 +0200	[thread overview]
Message-ID: <20200530090543.GA3202@alpha.franken.de> (raw)
In-Reply-To: <CAAhV-H41SPVQzRmQAVYpgW_dChz+QXwTZHKGWJQv4B7JjQ5gjA@mail.gmail.com>

On Sat, May 30, 2020 at 12:43:17PM +0800, Huacai Chen wrote:
> Hi, Thomas,
> 
> On Fri, May 29, 2020 at 7:19 PM Thomas Bogendoerfer
> <tsbogend@alpha.franken.de> wrote:
> >
> > On Fri, May 29, 2020 at 04:22:10PM +0800, Huacai Chen wrote:
> > >  arch/mips/include/asm/inst.h      | 779 ------------------------------------
> > >  arch/mips/include/asm/unaligned.h | 802 ++++++++++++++++++++++++++++++++++++++
> >
> > please use a different filename for this to avoid another disaster
> > because asm/unaligned.h is already used.
> It seems like unaligned.h is the best place, because LoadXX/StoreXX is
> nearly the same thing as get_unaligned/put_unaligned in the original
> unaligned.h. For PTR_STR, the only confliction comes from
> lib/test_printf.c, but lib/test_printf.c doesn't include unaligned.h.
> And it seems there is no future problem, because unaligned.h has only
> one new macro (i.e., PTR_STR, while LoadXX/StoreXX has no problems).

this approach has two things I don't like. First it duplicates code
from asm-generic/unaligned.h and second it again risks to leak PTR_STR
since asm/unaligned.h is included by other kernel code.

I took your patch renamed unaligned.h to unaligned-emul.h, included 
asm/asm.h and replaced PTR_STR by STR(PTR). I've pushed it to mips-next
with a Co-developed by you.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

  reply	other threads:[~2020-05-30  9:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29  8:22 [PATCH] MIPS: Fix build warning about "PTR_STR" redefinition Huacai Chen
2020-05-29  8:34 ` WANG Xuerui
2020-05-29  9:12   ` Huacai Chen
2020-05-29  9:20     ` WANG Xuerui
2020-05-29 11:18 ` Thomas Bogendoerfer
2020-05-30  4:43   ` Huacai Chen
2020-05-30  9:05     ` Thomas Bogendoerfer [this message]
2020-05-30 10:26       ` Huacai Chen

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=20200530090543.GA3202@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=chenhc@lemote.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-mips@vger.kernel.org \
    --cc=macro@linux-mips.org \
    --cc=wuzhangjin@gmail.com \
    --cc=zhangfx@lemote.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox