From patchwork Wed Jan 1 07:43:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 60956 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1imZFB-007QeQ-15; Wed, 01 Jan 2020 08:20:41 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726640AbgAAIUN (ORCPT + 1 other); Wed, 1 Jan 2020 03:20:13 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:56920 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725916AbgAAIUM (ORCPT ); Wed, 1 Jan 2020 03:20:12 -0500 X-IronPort-AV: E=Sophos;i="5.69,382,1571695200"; d="scan'208";a="429578752" Received: from palace.rsr.lip6.fr (HELO palace.lip6.fr) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 01 Jan 2020 09:20:08 +0100 From: Julia Lawall To: Antti Palosaari Cc: kernel-janitors@vger.kernel.org, Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/16] [media] anysee: constify copied structure Date: Wed, 1 Jan 2020 08:43:21 +0100 Message-Id: <1577864614-5543-4-git-send-email-Julia.Lawall@inria.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1577864614-5543-1-git-send-email-Julia.Lawall@inria.fr> References: <1577864614-5543-1-git-send-email-Julia.Lawall@inria.fr> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The anysee_tda18212_config and anysee_tda18212_config2 structures are only copied into other structures, so make them const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/usb/dvb-usb-v2/anysee.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/anysee.c b/drivers/media/usb/dvb-usb-v2/anysee.c index fb6d99dea31a..94b8d3e5d8f7 100644 --- a/drivers/media/usb/dvb-usb-v2/anysee.c +++ b/drivers/media/usb/dvb-usb-v2/anysee.c @@ -318,14 +318,14 @@ static struct tda10023_config anysee_tda10023_tda18212_config = { .deltaf = 0xba02, }; -static struct tda18212_config anysee_tda18212_config = { +static const struct tda18212_config anysee_tda18212_config = { .if_dvbt_6 = 4150, .if_dvbt_7 = 4150, .if_dvbt_8 = 4150, .if_dvbc = 5000, }; -static struct tda18212_config anysee_tda18212_config2 = { +static const struct tda18212_config anysee_tda18212_config2 = { .if_dvbt_6 = 3550, .if_dvbt_7 = 3700, .if_dvbt_8 = 4150, From patchwork Wed Jan 1 07:43:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 60953 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1imZEw-007Qde-A6; Wed, 01 Jan 2020 08:20:26 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727141AbgAAIUO (ORCPT + 1 other); Wed, 1 Jan 2020 03:20:14 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:56920 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbgAAIUO (ORCPT ); Wed, 1 Jan 2020 03:20:14 -0500 X-IronPort-AV: E=Sophos;i="5.69,382,1571695200"; d="scan'208";a="429578755" Received: from palace.rsr.lip6.fr (HELO palace.lip6.fr) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 01 Jan 2020 09:20:08 +0100 From: Julia Lawall To: "Lad Prabhakar" Cc: kernel-janitors@vger.kernel.org, Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/16] media: isif: constify copied structure Date: Wed, 1 Jan 2020 08:43:23 +0100 Message-Id: <1577864614-5543-6-git-send-email-Julia.Lawall@inria.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1577864614-5543-1-git-send-email-Julia.Lawall@inria.fr> References: <1577864614-5543-1-git-send-email-Julia.Lawall@inria.fr> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The isif_config_defaults structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall Acked-by: Lad Prabhakar --- drivers/media/platform/davinci/isif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/davinci/isif.c b/drivers/media/platform/davinci/isif.c index b49378b18e5d..c98edb67cfb2 100644 --- a/drivers/media/platform/davinci/isif.c +++ b/drivers/media/platform/davinci/isif.c @@ -29,7 +29,7 @@ #include "ccdc_hw_device.h" /* Defaults for module configuration parameters */ -static struct isif_config_params_raw isif_config_defaults = { +static const struct isif_config_params_raw isif_config_defaults = { .linearize = { .en = 0, .corr_shft = ISIF_NO_SHIFT, From patchwork Wed Jan 1 07:43:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 60955 X-Patchwork-Delegate: sakari.ailus@iki.fi Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1imZF9-007QeQ-3a; Wed, 01 Jan 2020 08:20:39 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727425AbgAAIVQ (ORCPT + 1 other); Wed, 1 Jan 2020 03:21:16 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:56955 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725916AbgAAIUO (ORCPT ); Wed, 1 Jan 2020 03:20:14 -0500 X-IronPort-AV: E=Sophos;i="5.69,382,1571695200"; d="scan'208";a="429578756" Received: from palace.rsr.lip6.fr (HELO palace.lip6.fr) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 01 Jan 2020 09:20:08 +0100 From: Julia Lawall To: Jacopo Mondi Cc: kernel-janitors@vger.kernel.org, Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/16] media: mt9v111: constify copied structure Date: Wed, 1 Jan 2020 08:43:24 +0100 Message-Id: <1577864614-5543-7-git-send-email-Julia.Lawall@inria.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1577864614-5543-1-git-send-email-Julia.Lawall@inria.fr> References: <1577864614-5543-1-git-send-email-Julia.Lawall@inria.fr> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The mt9v111_def_fmt structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall Acked-by: Jacopo Mondi --- drivers/media/i2c/mt9v111.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c index bb41bea950ac..61ae6a0d5679 100644 --- a/drivers/media/i2c/mt9v111.c +++ b/drivers/media/i2c/mt9v111.c @@ -103,7 +103,7 @@ #define MT9V111_MAX_CLKIN 27000000 /* The default sensor configuration at startup time. */ -static struct v4l2_mbus_framefmt mt9v111_def_fmt = { +static const struct v4l2_mbus_framefmt mt9v111_def_fmt = { .width = 640, .height = 480, .code = MEDIA_BUS_FMT_UYVY8_2X8, From patchwork Wed Jan 1 07:43:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 60952 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1imZEa-007Qcr-Hw; Wed, 01 Jan 2020 08:20:04 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727234AbgAAIUR (ORCPT + 1 other); Wed, 1 Jan 2020 03:20:17 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:56920 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727186AbgAAIUR (ORCPT ); Wed, 1 Jan 2020 03:20:17 -0500 X-IronPort-AV: E=Sophos;i="5.69,382,1571695200"; d="scan'208";a="429578761" Received: from palace.rsr.lip6.fr (HELO palace.lip6.fr) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 01 Jan 2020 09:20:08 +0100 From: Julia Lawall To: Mauro Carvalho Chehab Cc: kernel-janitors@vger.kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/16] media: cx231xx: constify copied structure Date: Wed, 1 Jan 2020 08:43:29 +0100 Message-Id: <1577864614-5543-12-git-send-email-Julia.Lawall@inria.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1577864614-5543-1-git-send-email-Julia.Lawall@inria.fr> References: <1577864614-5543-1-git-send-email-Julia.Lawall@inria.fr> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The hauppauge_955q_lgdt3306a_config structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/usb/cx231xx/cx231xx-dvb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c index e205f7f0a56a..0037b4b1381e 100644 --- a/drivers/media/usb/cx231xx/cx231xx-dvb.c +++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c @@ -147,7 +147,7 @@ static struct tda18271_config pv_tda18271_config = { .small_i2c = TDA18271_03_BYTE_CHUNK_INIT, }; -static struct lgdt3306a_config hauppauge_955q_lgdt3306a_config = { +static const struct lgdt3306a_config hauppauge_955q_lgdt3306a_config = { .qam_if_khz = 4000, .vsb_if_khz = 3250, .spectral_inversion = 1,