Re: [PATCH 5/6] drm/i915/sdvo: Reduce the size of the on stack buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
> > 
> > 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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux