Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751802AbbHTIVI (ORCPT ); Thu, 20 Aug 2015 04:21:08 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]:34416 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750981AbbHTIVF (ORCPT ); Thu, 20 Aug 2015 04:21:05 -0400 MIME-Version: 1.0 In-Reply-To: <1434632512-128161-1-git-send-email-marcinch7@gmail.com> References: <1434632512-128161-1-git-send-email-marcinch7@gmail.com> Date: Thu, 20 Aug 2015 10:21:04 +0200 X-Google-Sender-Auth: dmO7nsWGwRxYOcrvPWoP0QnSkUQ Message-ID: Subject: Re: [PATCH] fbdev: remove unnecessary memset in vfb From: Geert Uytterhoeven To: Marcin Chojnacki Cc: Jean-Christophe PLAGNIOL-VILLARD , Tomi Valkeinen , Linux Fbdev development list , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1708 Lines: 45 On Thu, Jun 18, 2015 at 3:01 PM, Marcin Chojnacki wrote: > In vfb_probe memory is allocated using rvmalloc which automatically > sets the allocated memory to zero. This patch removes the second > unnecessary memset in vfb_probe. > > Signed-off-by: Marcin Chojnacki > --- > drivers/video/fbdev/vfb.c | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/drivers/video/fbdev/vfb.c b/drivers/video/fbdev/vfb.c > index 70a897b..b2d38b7 100644 > --- a/drivers/video/fbdev/vfb.c > +++ b/drivers/video/fbdev/vfb.c > @@ -490,14 +490,6 @@ static int vfb_probe(struct platform_device *dev) > if (!(videomemory = rvmalloc(videomemorysize))) > return retval; > > - /* > - * VFB must clear memory to prevent kernel info > - * leakage into userspace > - * VGA-based drivers MUST NOT clear memory if > - * they want to be able to take over vgacon > - */ > - memset(videomemory, 0, videomemorysize); > - As vfb also serves as a sample driver, I think it would be worthwhile to move the comment to rvmalloc(). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/