All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-riscv@lists.infradead.org, speakup@linux-speakup.org,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH 2/2] speakup: only build serialio when ISA is enabled
Date: Tue, 4 Aug 2020 18:11:35 +0200	[thread overview]
Message-ID: <20200804161135.pgwqbaahdtxhe7cq@function> (raw)
In-Reply-To: <20200804154952.GB495852@kroah.com>

Greg KH, le mar. 04 août 2020 17:49:52 +0200, a ecrit:
> > #define inb(c)		({ u8  __v; __io_pbr(); __v = readb_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
> > 
> > and thus yes it's arithmetic over a (void*) pointer, the caller cannot
> > do anything about it.
> 
> And that's fine, math with pointers, even void ones, is ok.

C++ doesn't like it, but in general compilers provide some semantic for
it, yes.

> I wonder why riscv was complaining about that.  It's not nice, but it is
> valid C.

Strictly C speaking, no, but GNU C yes.

> Let's see if any of their developers care about it :)

Ok :) In the meanwhile I sent a v2 series that should fix the different
link cases, just not the particular riscv warning.

Samuel

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

WARNING: multiple messages have this Message-ID (diff)
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-serial@vger.kernel.org, speakup@linux-speakup.org
Subject: Re: [PATCH 2/2] speakup: only build serialio when ISA is enabled
Date: Tue, 4 Aug 2020 18:11:35 +0200	[thread overview]
Message-ID: <20200804161135.pgwqbaahdtxhe7cq@function> (raw)
In-Reply-To: <20200804154952.GB495852@kroah.com>

Greg KH, le mar. 04 août 2020 17:49:52 +0200, a ecrit:
> > #define inb(c)		({ u8  __v; __io_pbr(); __v = readb_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
> > 
> > and thus yes it's arithmetic over a (void*) pointer, the caller cannot
> > do anything about it.
> 
> And that's fine, math with pointers, even void ones, is ok.

C++ doesn't like it, but in general compilers provide some semantic for
it, yes.

> I wonder why riscv was complaining about that.  It's not nice, but it is
> valid C.

Strictly C speaking, no, but GNU C yes.

> Let's see if any of their developers care about it :)

Ok :) In the meanwhile I sent a v2 series that should fix the different
link cases, just not the particular riscv warning.

Samuel

  reply	other threads:[~2020-08-04 16:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-04 11:13 [PATCH 2/2] speakup: only build serialio when ISA is enabled Samuel Thibault
2020-08-04 11:32 ` Greg KH
2020-08-04 11:34 ` Greg KH
2020-08-04 11:49   ` Samuel Thibault
2020-08-04 11:56     ` Greg KH
2020-08-04 11:58     ` Greg KH
2020-08-04 15:35       ` Samuel Thibault
2020-08-04 15:35         ` Samuel Thibault
2020-08-04 15:49         ` Greg KH
2020-08-04 15:49           ` Greg KH
2020-08-04 16:11           ` Samuel Thibault [this message]
2020-08-04 16:11             ` Samuel Thibault

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=20200804161135.pgwqbaahdtxhe7cq@function \
    --to=samuel.thibault@ens-lyon.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=speakup@linux-speakup.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.