Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3650506ybl; Mon, 19 Aug 2019 23:37:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzqgASOf62bGBZ76iPKwssziqsjgeRjTPPJDQJgGNZSvJeQg6V5KADe3ZGgooW5QrK9LdQ2 X-Received: by 2002:a17:90a:170c:: with SMTP id z12mr21237230pjd.119.1566283065156; Mon, 19 Aug 2019 23:37:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566283065; cv=none; d=google.com; s=arc-20160816; b=W7xu9ijDcf8nhuaXkpPJ64mlmq92047VQrpOwItnc3/5NTHphw+vIPqS/YBMlgKX7o FfUrTAH7JFXRJbrhlbNQqtaOkLAzuXHn+K7T2pq0dLN9I+WMtsZ26xnB288LqdR3XF01 6qEOfEVQ1FA2SWH8byPFfQkv9snCX1uwCGwSagjGrEvHT535mh6kZlIHtgwvhzh5tWc7 2UNYZuEsayH8PZ2lyVB4+agpJnOfU/aJGkk/bpVXlxP35Hvyi3SmTsBfKpJL2FH4QQys 8bF9DnOian2gmeuv3ggAuFTBP5Sj36vpk4Nenw54ijdjm0MzcV61t0/bmEgGt/WD/r9A /dcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:organization:subject:cc:to:from:date :content-transfer-encoding:mime-version; bh=g1/MhFFovNKnlv52zPaQshDMsDF9ZVFla40+bEBISOs=; b=qhvz/xd/0Ky7maQe7w+OfawRHDnyw0j9MRZo0QuNsaz3VojdaXcyaIJIguEkeb7k1s 5Fk25KEf2huP6t0+xsoeA0AMcY3bK9euHkwmyXT9voQZfB4sa2y0hfHK5Kn01DiHVHLe 3dEV5/GaMFioDkiYkSKPw59TfI3I2D0GlTRz6m4QFUyUK9kxtF3w7Ofc+GUBfYSc0V45 TBjWJlLkEBQh/yX/KMU/1m7viG5bbjPEqr8CSwxZ5gZ7ZkJjaTZ6NuKbcDAqRfph31XA M4HrKP+NPp6AtKIjIT61OYkN9gOuAi5VECIlXeRIm7BL57H68bf1qfemjGt/IhltO8BY XiPg== 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 bg5si10724190plb.46.2019.08.19.23.37.30; Mon, 19 Aug 2019 23:37:45 -0700 (PDT) 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 S1729211AbfHTGgG (ORCPT + 99 others); Tue, 20 Aug 2019 02:36:06 -0400 Received: from protonic.xs4all.nl ([83.163.252.89]:37344 "EHLO protonic.nl" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728657AbfHTGgG (ORCPT ); Tue, 20 Aug 2019 02:36:06 -0400 X-Greylist: delayed 454 seconds by postgrey-1.27 at vger.kernel.org; Tue, 20 Aug 2019 02:36:05 EDT Received: from webmail.promanet.nl (edge2.prtnl [192.168.1.170]) by sparta (Postfix) with ESMTP id DD9E744A00CB; Tue, 20 Aug 2019 08:30:25 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 20 Aug 2019 08:28:29 +0200 From: Robin van der Gracht To: Nishka Dasgupta Cc: miguel.ojeda.sandonis@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] auxdisplay: ht16k33: Make ht16k33_fb_fix and ht16k33_fb_var constant Organization: Protonic Holland In-Reply-To: <20190819075126.870-1-nishkadg.linux@gmail.com> References: <20190819075126.870-1-nishkadg.linux@gmail.com> Message-ID: <894371cda58112ee77cc0c8a5d336d2d@protonic.nl> X-Sender: robin@protonic.nl User-Agent: Roundcube Webmail/1.3.6 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-08-19 09:51, Nishka Dasgupta wrote: > The static structures ht16k33_fb_fix and ht16k33_fb_var, of types > fb_fix_screeninfo and fb_var_screeninfo respectively, are not used > except to be copied into other variables. Hence make both of them > constant to prevent unintended modification. > Issue found with > Coccinelle. > > Signed-off-by: Nishka Dasgupta > --- > drivers/auxdisplay/ht16k33.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/auxdisplay/ht16k33.c > b/drivers/auxdisplay/ht16k33.c > index 9c0bb771751d..a2fcde582e2a 100644 > --- a/drivers/auxdisplay/ht16k33.c > +++ b/drivers/auxdisplay/ht16k33.c > @@ -74,7 +74,7 @@ struct ht16k33_priv { > struct ht16k33_fbdev fbdev; > }; > > -static struct fb_fix_screeninfo ht16k33_fb_fix = { > +static const struct fb_fix_screeninfo ht16k33_fb_fix = { > .id = DRIVER_NAME, > .type = FB_TYPE_PACKED_PIXELS, > .visual = FB_VISUAL_MONO10, > @@ -85,7 +85,7 @@ static struct fb_fix_screeninfo ht16k33_fb_fix = { > .accel = FB_ACCEL_NONE, > }; > > -static struct fb_var_screeninfo ht16k33_fb_var = { > +static const struct fb_var_screeninfo ht16k33_fb_var = { > .xres = HT16K33_MATRIX_LED_MAX_ROWS, > .yres = HT16K33_MATRIX_LED_MAX_COLS, > .xres_virtual = HT16K33_MATRIX_LED_MAX_ROWS, ACK Robin