Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2382538ybl; Mon, 19 Aug 2019 00:52:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzc1AqM3y3ZlJFb4pbYTGw8bNzoFVhVoeTgQbGScos4hLLHr54n54RkZfx10xL0o6EojhVe X-Received: by 2002:a63:2b84:: with SMTP id r126mr19212241pgr.308.1566201175488; Mon, 19 Aug 2019 00:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566201175; cv=none; d=google.com; s=arc-20160816; b=moCP3avjisQZCKcQTbxFzhQRSogs9tZibnF/PlxW3Rj45sQVMwV6WCLPgfWlWihpEK DJy1ufTDcZAKdMqN8Gs/s7KsQTyszg2tiGsECkytTYiOB/poHSfS0vtPWlQOeT1mBvwr /O411CmvSWv5Sg8iN/RD9qKVgRc3IwxwBT+N26Yg4zAB1HIafpxqEIERd/Ci27OCSO2W +Yk/BvG9IhxRA1iibGN6toaO6WgCZ9j1TF/ukT38vOxc/mRZpE0an9YmOj2JGM7Sjvci nRvOHtFbYI1+WU2oRx0q8Eop8jTp9uDPgDjISS29GMUwPyyNLnktJw1xRrawj0r1Q5VY jbMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=XneCY7KFk+nNdkDMfEbOgnq2lgPlJvwgpvOixbVWXec=; b=ulkXqjdnqH9K1cWMsJ8/XvWJsEd3eVqXPNGpGBGLSIALn5GoksNNgd0bWxaaqKsHsO xotIhFS6WSNjQ0H1GIF9V/Ah3dN14znKSm8WVbXoG0Jnv0WArOj7SRzPwwLPJ//NCXgU fZnyWYMlA0J2tKNq5d0+g9qGXQR65whkQYVETkZNzZCNzR3THS0AqqjHGh/4JZ0AD0g5 ECD0UYk0ptqpVR3pl49eN6eItMoi/SKMNc+rmEXP0ZhV+tPTuDbb2M80yqfmge3tKkRi 7zDN8iK5xd6fDHJGsjPYmoX4hoS+G+xtNEClmCuuR3LKeqgY+ctoZrNwfe0oMBvnvkVk KhqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AdzYwGZU; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r16si9251744pgv.466.2019.08.19.00.52.40; Mon, 19 Aug 2019 00:52:55 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AdzYwGZU; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726964AbfHSHvi (ORCPT + 99 others); Mon, 19 Aug 2019 03:51:38 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:34889 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725790AbfHSHvi (ORCPT ); Mon, 19 Aug 2019 03:51:38 -0400 Received: by mail-pf1-f194.google.com with SMTP id d85so700689pfd.2 for ; Mon, 19 Aug 2019 00:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XneCY7KFk+nNdkDMfEbOgnq2lgPlJvwgpvOixbVWXec=; b=AdzYwGZUoq1zdTVwWIsLrEYcFhh73xZMOkgFZ6yRdgH7BMao94DWXyzvKFbOxXbnm2 7OBJBbdOWdIIVjZuHAuG3zTyisw7driMXkIpe6tPgZmkMk63KrKMoBMpICBvHC7D8xVA /pYpKGNQYOMg7J6baCRHk5kNzzPp3i99Kcq8gIRVdqDZ68RsfiF6xQV7aYiVNNxIJyHu Lv1VaIZFWVNUWGXSkF557SHFFIWuKx7mmEvoUDinUt5DMH84tU9Ti0yA9NCuCo5XbG/W E4NOI89NWhYdyeysxMhgTtH/Mvy57hKIqNaTlkbf8uZy9lqvWx8l8UISGRBpMJquwt9O a8iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XneCY7KFk+nNdkDMfEbOgnq2lgPlJvwgpvOixbVWXec=; b=Les6KVYtNe/UizvicI5UsKh1Y04fddt0RoVsJ+K+t03PmbBeOYKiv7AWv+RZKBjiXS 3ihPm/lG6YtPyK5g7oFsiXubcZrY4AtPtwdHlCJpmcIbOYmGJoxEjmHiuzZPi2asqSpG gzsWM85nc1XtJbx/y+2TTY9b+M2IJWQacug/vDy7yP5u/Mx/s/zq/OoWuxdJBU3HRmLT BeDr7JTwZlJ96xIzs00CVixHDdF0+mqcjb9sXXKS6SNuk03++emkCKz8xERu047FQBHd r547Hdh/tCNSC/iC8swPRCg29F/hVmAufyYRoIU2owX8ICmg1vfp1oql0R9pr66OYbsW n8OA== X-Gm-Message-State: APjAAAUuIY1RD5h5/TOMPI+QAQGMFNORPEM8JzawSvRW4E+2b1XEEc9i 6uLtyg9puYuT5YXu7P9GKV4= X-Received: by 2002:a17:90a:24ed:: with SMTP id i100mr19391388pje.47.1566201097246; Mon, 19 Aug 2019 00:51:37 -0700 (PDT) Received: from localhost.localdomain ([110.225.16.165]) by smtp.gmail.com with ESMTPSA id b126sm16273886pfa.177.2019.08.19.00.51.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 00:51:36 -0700 (PDT) From: Nishka Dasgupta To: robin@protonic.nl, miguel.ojeda.sandonis@gmail.com, linux-kernel@vger.kernel.org Cc: Nishka Dasgupta Subject: [PATCH] auxdisplay: ht16k33: Make ht16k33_fb_fix and ht16k33_fb_var constant Date: Mon, 19 Aug 2019 13:21:26 +0530 Message-Id: <20190819075126.870-1-nishkadg.linux@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, -- 2.19.1