[Mesa-dev] [PATCH v2 01/11] util: Remove u_math from u_vector

Emil Velikov emil.l.velikov at gmail.com
Fri Jul 14 11:16:45 UTC 2017


On 13 July 2017 at 17:25, Eric Engestrom <eric.engestrom at imgtec.com> wrote:
> On Thursday, 2017-07-13 15:38:11 +0200, Lucas Stach wrote:
>> Am Donnerstag, den 13.07.2017, 12:12 +0100 schrieb Daniel Stone:
>> > u_vector.h doesn't actually use anything from u_math, but it does mean
>> > everyone has to pull in src/gallium/auxiliary/util includes.
>> >
>> > Just remove it, adding a <string.h> include to u_vector.c to cover
>> > memcpy.
>> >
>> > Signed-off-by: Daniel Stone <daniels at collabora.com>
>> > ---
>> >  src/util/u_vector.c | 3 +++
>> >  src/util/u_vector.h | 1 -
>> >  2 files changed, 3 insertions(+), 1 deletion(-)
>> >
>> > v2: Add u_math.h include for u_vector.c so we get power_of_two.
>> >
>> > diff --git a/src/util/u_vector.c b/src/util/u_vector.c
>> > index 37c4245ebe..4dc7bc22b6 100644
>> > --- a/src/util/u_vector.c
>> > +++ b/src/util/u_vector.c
>> > @@ -20,6 +20,9 @@
>> >   * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
>> >   * IN THE SOFTWARE.
>> >   */
>> > +
>> > +#include <string.h>
>>
>> I don't think we need the string.h include if we are going to include
>> u_math.h.
>
> "include what you use" is a well-accepted best practice.
IWYU is a very great to strive for. Can we keep patch as-is?

With the missing BO_FORMATS in 6/11 back in the series is
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

Jason has very good questions in 11/11. If the protocol lacks the
required functionality, it might be worth merging as-is while
linux-dmabuf is getting polished.

Thanks
Emil


More information about the mesa-dev mailing list