From patchwork Sun Feb 19 18:04:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9581711 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 93D936045A for ; Sun, 19 Feb 2017 18:07:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B33E286BE for ; Sun, 19 Feb 2017 18:07:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6DC47286BD; Sun, 19 Feb 2017 18:07:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE553286BD for ; Sun, 19 Feb 2017 18:07:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751031AbdBSSHG (ORCPT ); Sun, 19 Feb 2017 13:07:06 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34090 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750844AbdBSSHF (ORCPT ); Sun, 19 Feb 2017 13:07:05 -0500 Received: by mail-pg0-f65.google.com with SMTP id v184so9943739pgv.1; Sun, 19 Feb 2017 10:04:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=MQzXvA1/1nJxoaWrnmjDOmpURRu/1uV05tjmx0p8NLk=; b=LPDn4IQ8DaaH48a7ov4wCujeSi/v/ftbjJeN5IFYp3ahS2gTwx53T5Oxs8jWiqiO9S gLrL9XaQ7BCJTm9QCs1I9oSDyAPVsxXKrNP8f1OKJKQR4Bc+h4aLRvLqr9mo9k/tO4Sz Zu3hTq/K1NwlNHis/C0sByRsI/GG80cLoyl+aFTmVPwCF4n+KLYEUvE6u14SBpIusliR 5GwoOetqQY0GMKqHgFzTOT5/D6pxoTn0EiWhAp1m/Qn5ZISCAN5FWH2M71d6ecXpPHB7 Go7+yTk0I3ovu+nhgBsDZSlwlmyH2kLjNI6PRgvDNaiHsFZJ+UPyF2eLcOmWTmMJiqLL JTaA== 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; bh=MQzXvA1/1nJxoaWrnmjDOmpURRu/1uV05tjmx0p8NLk=; b=YcUgwqVrxBbEcnhtrtiHDjVwa904ZWB0/q98hoilFkPaCQpdwRES13LnOzJUek7xyj D7MqQRPKG9GY82VoHe8WpTH0RIEXasfMYNlP+XQDTWmRq1OWMTrGSthdmx1fjVYO8qPU yWX+I2jMWq1VrTjbUbalyHX4Kr376I8PSlCkin/7K/36DG06JqYZ8vto559hi9ft5nLn uP5UzfedGpha8zVeJ8mRD7N5B0qv23F0e77cyJoN7klBJxumk56T8FNIl7+CG6COMLCC DY7BuMsDRgNChOq30tICF8dMD4z/1ArASmOgKyXGn0AJZfXiOA/ixGdtLCQ46tbHrbjT 1u8Q== X-Gm-Message-State: AMke39k4RxJ5Ifp76asoemKIMKLIyKH0MFWKc9tkVqRWC4YgQGQ4wWVSdtaEFv+BkOi8QQ== X-Received: by 10.98.196.1 with SMTP id y1mr21383261pff.105.1487527490567; Sun, 19 Feb 2017 10:04:50 -0800 (PST) Received: from gmail.com ([2405:204:5502:c42f:904b:4bb3:300a:c260]) by smtp.gmail.com with ESMTPSA id q90sm30476049pfk.73.2017.02.19.10.04.45 (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 19 Feb 2017 10:04:49 -0800 (PST) Received: by gmail.com (sSMTP sendmail emulation); Sun, 19 Feb 2017 23:34:42 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, mchehab@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] media: pci: constify stv0299_config structures Date: Sun, 19 Feb 2017 23:34:41 +0530 Message-Id: <1487527481-20392-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Declare stv0299_config structures as const as they are only passed as an argument to the function dvb_attach. dvb_attach calls its first argument on the rest of its arguments. The first argument of dvb_attach in the changed cases is stv0299_attach and the parameter of this function to which the object references are passed is of type const. So, stv0299_config structures having this property can be made const. First line shows the file size before patching and second one shows size after patching. text data bss dec hex filename 9572 926 40 10538 292a media/pci/dm1105/dm1105.o 9636 862 40 10538 292a media/pci/dm1105/dm1105.o 15133 5408 0 20541 503d media/pci/ttpci/budget-av.o 15389 5152 0 20541 503d media/pci/ttpci/budget-av.o 15703 2326 36 18065 4691 media/pci/ttpci/budget-ci.o 15767 2262 36 18065 4691 media/pci/ttpci/budget-ci.o 10555 1918 4 12477 30bd drivers/media/pci/ttpci/budget.o 10683 1822 4 12509 30dd drivers/media/pci/ttpci/budget.o Signed-off-by: Bhumika Goyal --- drivers/media/pci/dm1105/dm1105.c | 2 +- drivers/media/pci/ttpci/budget-av.c | 8 ++++---- drivers/media/pci/ttpci/budget-ci.c | 2 +- drivers/media/pci/ttpci/budget.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/media/pci/dm1105/dm1105.c b/drivers/media/pci/dm1105/dm1105.c index a589aa7..c97a98b 100644 --- a/drivers/media/pci/dm1105/dm1105.c +++ b/drivers/media/pci/dm1105/dm1105.c @@ -820,7 +820,7 @@ static void dm1105_hw_exit(struct dm1105_dev *dev) dm1105_dma_unmap(dev); } -static struct stv0299_config sharp_z0194a_config = { +static const struct stv0299_config sharp_z0194a_config = { .demod_address = 0x68, .inittab = sharp_z0194a_inittab, .mclk = 88000000UL, diff --git a/drivers/media/pci/ttpci/budget-av.c b/drivers/media/pci/ttpci/budget-av.c index 896c66d..48ea605 100644 --- a/drivers/media/pci/ttpci/budget-av.c +++ b/drivers/media/pci/ttpci/budget-av.c @@ -580,7 +580,7 @@ static int philips_su1278_ty_ci_tuner_set_params(struct dvb_frontend *fe) 0xff, 0xff }; -static struct stv0299_config typhoon_config = { +static const struct stv0299_config typhoon_config = { .demod_address = 0x68, .inittab = typhoon_cinergy1200s_inittab, .mclk = 88000000UL, @@ -593,7 +593,7 @@ static int philips_su1278_ty_ci_tuner_set_params(struct dvb_frontend *fe) }; -static struct stv0299_config cinergy_1200s_config = { +static const struct stv0299_config cinergy_1200s_config = { .demod_address = 0x68, .inittab = typhoon_cinergy1200s_inittab, .mclk = 88000000UL, @@ -605,7 +605,7 @@ static int philips_su1278_ty_ci_tuner_set_params(struct dvb_frontend *fe) .set_symbol_rate = philips_su1278_ty_ci_set_symbol_rate, }; -static struct stv0299_config cinergy_1200s_1894_0010_config = { +static const struct stv0299_config cinergy_1200s_1894_0010_config = { .demod_address = 0x68, .inittab = typhoon_cinergy1200s_inittab, .mclk = 88000000UL, @@ -879,7 +879,7 @@ static int philips_sd1878_ci_set_symbol_rate(struct dvb_frontend *fe, return 0; } -static struct stv0299_config philips_sd1878_config = { +static const struct stv0299_config philips_sd1878_config = { .demod_address = 0x68, .inittab = philips_sd1878_inittab, .mclk = 88000000UL, diff --git a/drivers/media/pci/ttpci/budget-ci.c b/drivers/media/pci/ttpci/budget-ci.c index 20ad93b..ff8a60e 100644 --- a/drivers/media/pci/ttpci/budget-ci.c +++ b/drivers/media/pci/ttpci/budget-ci.c @@ -696,7 +696,7 @@ static int philips_su1278_tt_tuner_set_params(struct dvb_frontend *fe) return 0; } -static struct stv0299_config philips_su1278_tt_config = { +static const struct stv0299_config philips_su1278_tt_config = { .demod_address = 0x68, .inittab = philips_su1278_tt_inittab, diff --git a/drivers/media/pci/ttpci/budget.c b/drivers/media/pci/ttpci/budget.c index 3091b48..83510df 100644 --- a/drivers/media/pci/ttpci/budget.c +++ b/drivers/media/pci/ttpci/budget.c @@ -400,7 +400,7 @@ static int s5h1420_tuner_set_params(struct dvb_frontend *fe) .xtal_freq = TDA10086_XTAL_16M, }; -static struct stv0299_config alps_bsru6_config_activy = { +static const struct stv0299_config alps_bsru6_config_activy = { .demod_address = 0x68, .inittab = alps_bsru6_inittab, .mclk = 88000000UL, @@ -410,7 +410,7 @@ static int s5h1420_tuner_set_params(struct dvb_frontend *fe) .set_symbol_rate = alps_bsru6_set_symbol_rate, }; -static struct stv0299_config alps_bsbe1_config_activy = { +static const struct stv0299_config alps_bsbe1_config_activy = { .demod_address = 0x68, .inittab = alps_bsbe1_inittab, .mclk = 88000000UL,