Received: by 10.223.185.111 with SMTP id b44csp164034wrg; Fri, 9 Mar 2018 03:00:59 -0800 (PST) X-Google-Smtp-Source: AG47ELvb7xJHYcOna0///Oe4Yhm4oFBVPKPGwLahbsxuCqPh7pcqJNdQoNDOAdBAD5mdsQYDEYox X-Received: by 2002:a17:902:7082:: with SMTP id z2-v6mr23905666plk.130.1520593258962; Fri, 09 Mar 2018 03:00:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520593258; cv=none; d=google.com; s=arc-20160816; b=MN49Qr6y+OnYICV1oordjiUnpIadZEUFZBJUDNPd9I8gBCr2GR8SmgtxAEdkNjpNX5 EYYkIw68vVTRCOFkY9fjgFUHEJRwpprLmU5qOa2I1DM7xcSyJwL+/Su0tRj4PzUaH/+n L5LhuXDrhwS6jnaSASZxEIHtXatmgMuTXZMHGE7anv/eZYAW/IX6hF+fjpHf5mTb/an8 AMAGyeokWdZDKcRAG7W8PD5wwvEpzi0c7lseq82wiMAQgo3lJdlpXGmmlOHonFwUvtoY EjXEl4hSNxMEldKS4wJZrpunT9pws1HiNZHgZeD50ygyDu3EZCML/m66Bxqv+S9haNy+ sx5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=p/bo8UgyjPjFhzmqdS0LHeu8xJdQ2nNsbDbUVOkQ2Qs=; b=Axd7INPsj2JiZ7Y/isK9QLAwMLfsMwr/aTSR/QHRUBpzx1EmP2yPtzrITsUf7hDkEg eLxdUY6YCdfOSb6IqnYR9S8JYRByKk2Dc2/5b4TohGfy1ba4KeHinoRxP37vrJ/CWgKf KSHeCACpUGzW9fRroM9Xohxnc/K9cZRpz3AzoUoQ5j3J5JJZP418Nq1WDNGt8G3NCxFo OmlaaDAeQ6hxsIF6Oy6qoAwzAgyIOI/51XIuqCgo2Dp9yRjAlkIWy8rkxNXAQ3j+UPT/ UpHb0uHfcibnU4xf75oZXqvK4efwisfBifvrLgWk+GLB66NdQgrXhZn7t+/+WrJG0edg VMSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f3-v6si652295plb.717.2018.03.09.03.00.44; Fri, 09 Mar 2018 03:00:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751058AbeCIK7o (ORCPT + 99 others); Fri, 9 Mar 2018 05:59:44 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:31996 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750898AbeCIK7n (ORCPT ); Fri, 9 Mar 2018 05:59:43 -0500 Received: from hhmail02.hh.imgtec.org (unknown [10.100.10.20]) by Forcepoint Email with ESMTP id D443EEBE0AB2F; Fri, 9 Mar 2018 10:59:37 +0000 (GMT) Received: from imgtec.com (10.60.4.28) by hhmail02.hh.imgtec.org (10.100.10.21) with Microsoft SMTP Server (TLS) id 14.3.382.0; Fri, 9 Mar 2018 10:59:40 +0000 Date: Fri, 9 Mar 2018 10:59:40 +0000 From: Eric Engestrom To: "Gustavo A. R. Silva" CC: Emil Velikov , Florian Tobias Schandinat , Bartlomiej Zolnierkiewicz , , Kees Cook , , , , "Gustavo A. R. Silva" Subject: Re: [PATCH] video: fbdev: via: remove VLA usage Message-ID: <20180309105940.22hd2uy2mv7wahzb@imgtec.com> References: <20180308173949.GA19305@embeddedgus> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <20180308173949.GA19305@embeddedgus> User-Agent: NeoMutt/20171215 X-Originating-IP: [10.60.4.28] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, 2018-03-08 11:39:49 -0600, Gustavo A. R. Silva wrote: > In preparation to enabling -Wvla, remove VLA usage. > > Also, fixed as part of the directive to remove all VLAs from > the kernel: https://lkml.org/lkml/2018/3/7/621 > > Signed-off-by: Gustavo A. R. Silva Sorry for my reply on v1, I missed that Emil already replied to another post of the same patch (side note on that, making use of `-vX` and `--in-reply-to` helps track the evolution of patches) This looks good to me: Reviewed-by: Eric Engestrom > --- > drivers/video/fbdev/via/via_aux_sii164.c | 2 +- > drivers/video/fbdev/via/via_aux_vt1631.c | 2 +- > drivers/video/fbdev/via/via_aux_vt1632.c | 2 +- > drivers/video/fbdev/via/via_aux_vt1636.c | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/video/fbdev/via/via_aux_sii164.c b/drivers/video/fbdev/via/via_aux_sii164.c > index ca1b35f..c27f62c 100644 > --- a/drivers/video/fbdev/via/via_aux_sii164.c > +++ b/drivers/video/fbdev/via/via_aux_sii164.c > @@ -36,7 +36,7 @@ static void probe(struct via_aux_bus *bus, u8 addr) > .name = name}; > /* check vendor id and device id */ > const u8 id[] = {0x01, 0x00, 0x06, 0x00}, len = ARRAY_SIZE(id); > - u8 tmp[len]; > + u8 tmp[ARRAY_SIZE(id)]; > > if (!via_aux_read(&drv, 0x00, tmp, len) || memcmp(id, tmp, len)) > return; > diff --git a/drivers/video/fbdev/via/via_aux_vt1631.c b/drivers/video/fbdev/via/via_aux_vt1631.c > index 06e742f..32978a0 100644 > --- a/drivers/video/fbdev/via/via_aux_vt1631.c > +++ b/drivers/video/fbdev/via/via_aux_vt1631.c > @@ -36,7 +36,7 @@ void via_aux_vt1631_probe(struct via_aux_bus *bus) > .name = name}; > /* check vendor id and device id */ > const u8 id[] = {0x06, 0x11, 0x91, 0x31}, len = ARRAY_SIZE(id); > - u8 tmp[len]; > + u8 tmp[ARRAY_SIZE(id)]; > > if (!via_aux_read(&drv, 0x00, tmp, len) || memcmp(id, tmp, len)) > return; > diff --git a/drivers/video/fbdev/via/via_aux_vt1632.c b/drivers/video/fbdev/via/via_aux_vt1632.c > index d24f4cd..cec8cc4 100644 > --- a/drivers/video/fbdev/via/via_aux_vt1632.c > +++ b/drivers/video/fbdev/via/via_aux_vt1632.c > @@ -36,7 +36,7 @@ static void probe(struct via_aux_bus *bus, u8 addr) > .name = name}; > /* check vendor id and device id */ > const u8 id[] = {0x06, 0x11, 0x92, 0x31}, len = ARRAY_SIZE(id); > - u8 tmp[len]; > + u8 tmp[ARRAY_SIZE(id)]; > > if (!via_aux_read(&drv, 0x00, tmp, len) || memcmp(id, tmp, len)) > return; > diff --git a/drivers/video/fbdev/via/via_aux_vt1636.c b/drivers/video/fbdev/via/via_aux_vt1636.c > index 9e015c1..2b10bc2 100644 > --- a/drivers/video/fbdev/via/via_aux_vt1636.c > +++ b/drivers/video/fbdev/via/via_aux_vt1636.c > @@ -36,7 +36,7 @@ void via_aux_vt1636_probe(struct via_aux_bus *bus) > .name = name}; > /* check vendor id and device id */ > const u8 id[] = {0x06, 0x11, 0x45, 0x33}, len = ARRAY_SIZE(id); > - u8 tmp[len]; > + u8 tmp[ARRAY_SIZE(id)]; > > if (!via_aux_read(&drv, 0x00, tmp, len) || memcmp(id, tmp, len)) > return; > -- > 2.7.4 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel