All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: reword documentation of possible pci_device_id struct
Date: Tue, 28 Aug 2018 12:30:00 -0700	[thread overview]
Message-ID: <20180828192959.GB5459@ldmartin-desk.jf.intel.com> (raw)
In-Reply-To: <153547954622.28885.9906605177165561736@skylake-alporthouse-com>

On Tue, Aug 28, 2018 at 07:05:46PM +0100, Chris Wilson wrote:
> Quoting Lucas De Marchi (2018-08-28 18:41:46)
> > Document it like a real struct for ease of copy and paste, remove
> > comment of C99 compatibility and document that in some cases the first 2
> 
> I do recall that we couldn't use either C99 or class due to userspace

you can't actually use a c++ compiler.

For C it works with any of -std=c99, gnu99, c11, gnu11, c17, gnu17.
Tested with both gcc and clang. I've never heard of class being a
reserved keyword and section 6.4.5 of said standard doesn't list it
neither.

Here the struct definition is in a *comment*... i.e. the user will copy
and paste somewhere else and probably change __u16 to uint16_t in
userspace. If he's building with g++, he can name the field to something
else.

If it was something we were defining in this header than I would agree
with you... to retain compatibility with c++, not c99.

Lucas De Marchi

> compatibility... The essence is that we need a reminder that we can't
> assume the relaxed nature of kcc here.
> -Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-08-28 19:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-28 17:41 [PATCH 1/2] drm/i915: make field unsigned Lucas De Marchi
2018-08-28 17:41 ` [PATCH 2/2] drm/i915: reword documentation of possible pci_device_id struct Lucas De Marchi
2018-08-28 18:05   ` Chris Wilson
2018-08-28 19:30     ` Lucas De Marchi [this message]
2018-09-04 13:24       ` Jani Nikula
2018-08-28 18:06   ` Ville Syrjälä
2018-08-28 19:34     ` Lucas De Marchi
2018-09-05 20:19     ` [PATCH v2] " Lucas De Marchi
2018-09-15  0:10       ` Lucas De Marchi
2018-08-28 18:15 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: make field unsigned Patchwork
2018-08-28 18:34 ` ✓ Fi.CI.BAT: success " Patchwork
2018-08-28 22:33 ` ✓ Fi.CI.IGT: " Patchwork
2018-09-05 21:05 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: make field unsigned (rev2) Patchwork
2018-09-05 21:38   ` Lucas De Marchi
2018-09-05 21:23 ` ✓ Fi.CI.BAT: success " Patchwork
2018-09-06  6:04 ` ✓ Fi.CI.IGT: " Patchwork
2018-10-31 18:12 ` [PATCH 1/2] drm/i915: make field unsigned Lucas De Marchi

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=20180828192959.GB5459@ldmartin-desk.jf.intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.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.