[Intel-gfx] [PATCH 5/6] drm/i915/sdvo: Reduce the size of the on stack buffers
Ville Syrjälä
ville.syrjala at linux.intel.com
Mon Jun 24 16:40:36 UTC 2019
On Wed, Jun 19, 2019 at 07:21:48PM +0100, Chris Wilson wrote:
> Quoting Ville Syrjala (2019-06-19 19:03:11)
> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> >
> > The strings we want to print to the on stack buffers should
> > be no more than
> > 8 * 3 + strlen("(GET_SCALED_HDTV_RESOLUTION_SUPPORT)") + 1 = 61
> > bytes. So let's shrink the buffers down to 64 bytes.
> >
>
> max args_len does seem to 8, and it gets padded out to 8.
>
> > Also switch the BUG_ON()s to WARN_ON()s if I made a mistake in
> > my arithmentic.
>
> With the command name macro, could it not do some thing like
> BUILD_BUG_ON(sizeof(#cmd) > DBG_LEN) ?
I couldn't think of a way to do that with the current struct
initialization, but we could borrow the I915_PARAMS_FOR_EACH()
trick here. Not sure it's worth the hassle though.
--
Ville Syrjälä
Intel
More information about the Intel-gfx
mailing list