public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: intel-gfx@lists.freedesktop.org,
	Ben Widawsky <benjamin.widawsky@intel.com>
Subject: Re: [PATCH 2/9] drm/i915: [sparse] don't use variable size arrays
Date: Wed, 18 Apr 2012 11:05:29 +0200	[thread overview]
Message-ID: <20120418090529.GG5315@phenom.ffwll.local> (raw)
In-Reply-To: <20120417192035.5b3e58a4@bwidawsk.net>

On Tue, Apr 17, 2012 at 07:20:35PM -0700, Ben Widawsky wrote:
> On Tue, 17 Apr 2012 22:39:15 -0300
> Paulo Zanoni <przanoni@gmail.com> wrote:
> 
> > 2012/4/16 Ben Widawsky <ben@bwidawsk.net>:
> > > Sparse doesn't like:
> > > "error: bad constant expression"
> > >
> > 
> > <bikeshedding>
> > I know you'll hate me for asking, but: how difficult is it to fix sparse?
> > Adding those mallocs/frees increases the code complexity, making it
> > harder to read...
> > </bikeshedding>
> > 
> 
> I don't consider this a bikeshed. I've always been "under the
> impression" C99 was sort of taboo in the kernel. In this case
> specifically, it's never a great idea to allocate an unknown amount of
> stack space as it probably messes with some of the static tools and
> such.
> 
> In other words, I believe the right thing to do here is not to fix
> sparse. Plus there is precedent in other drivers to fix this kind of
> thing for sparse. I originally had this patch create an arbitrarily
> large object on the stack and fail if the args_len was too big. I can
> go back to that certainly if people prefer.

I've picked up the first 2 patches of this series for -next, with a tiny
bikeshed on the 2nd one. I've gotten stuck while reviewing the next one,
I think it'd be good if we can quickly discuss these on irc.
-Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

  reply	other threads:[~2012-04-18  9:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-16 21:07 [PATCH 0/9] i915 fixes for sparse warnings Ben Widawsky
2012-04-16 21:07 ` [PATCH 1/9] drm/i915: [sparse] trivial sparse fixes Ben Widawsky
2012-04-16 21:13   ` Chris Wilson
2012-04-16 21:07 ` [PATCH 2/9] drm/i915: [sparse] don't use variable size arrays Ben Widawsky
2012-04-18  1:39   ` Paulo Zanoni
2012-04-18  2:20     ` Ben Widawsky
2012-04-18  9:05       ` Daniel Vetter [this message]
2012-04-16 21:07 ` [PATCH 3/9] drm/i915: [sparse] __iomem fixes for opregion Ben Widawsky
2012-04-16 21:07 ` [PATCH 4/9] drm/i915: [sparse] __iomem fixes for overlay Ben Widawsky
2012-04-16 21:07 ` [PATCH 5/9] drm/i915: [sparse] __iomem fixes for debugfs Ben Widawsky
2012-04-16 21:07 ` [PATCH 6/9] drm/i915: [sparse] __iomem fixes for ringbuffer Ben Widawsky
2012-04-16 21:28   ` Chris Wilson
2012-04-16 21:07 ` [PATCH 7/9] drm/i915: [sparse] forced __iomem ringbuffer fixes Ben Widawsky
2012-04-16 21:07 ` [PATCH 8/9] drm/i915: [sparse] __iomem fixes for gem Ben Widawsky
2012-04-16 21:07 ` [PATCH 9/9] drm/i915: [sparse] __iomem fixes for intel_bios Ben Widawsky
2012-04-21 20:59 ` [PATCH 0/9] i915 fixes for sparse warnings Daniel Vetter

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=20120418090529.GG5315@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=ben@bwidawsk.net \
    --cc=benjamin.widawsky@intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox