From patchwork Tue Jan 24 19:24:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9535741 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 1D8816042D for ; Tue, 24 Jan 2017 19:24:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19FC026E3A for ; Tue, 24 Jan 2017 19:24:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0EBF526E51; Tue, 24 Jan 2017 19:24:22 +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=-1.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BDC7926E3A for ; Tue, 24 Jan 2017 19:24:21 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6203981F07; Tue, 24 Jan 2017 11:24:21 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AE4C281F07 for ; Tue, 24 Jan 2017 11:24:20 -0800 (PST) Received: by mail-pf0-x242.google.com with SMTP id e4so12627999pfg.0 for ; Tue, 24 Jan 2017 11:24:20 -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=m4O+vi9NnIdczNyZsLvktM1U0eC8DYoURKau1VZ0JHU=; b=iaAcZTbeZkWtPyfWgjXR5tXST2W4mIebSHC0FCTAm34gruu6t0VvSwG/N9ZehWqwYV DwK30RGPbeWvgQpGsGngUeRun6qvmcFM4xonnXZUpnD6chiYOsBWl9w534WHWj8ZHcqx xMHBz3SOEMyF0TFW0CNF688jLYaLie8UFsuAZNEM3l9YkmidEYkdLwMdw+ehu/3SII7q QqR7iExuS9O8vYU0IdDvGVqcLKBIw3uVB0MznycwULHWEucdNWjW4aLNf7QhCbMKOsNl flmSUkHggNHbQ/pjRMBzNtkw3rlwbXr99//Fgelvp00pVeG1cqecaQhQAYZCGuJLQKW1 YIvQ== 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=m4O+vi9NnIdczNyZsLvktM1U0eC8DYoURKau1VZ0JHU=; b=MYPcv16FixpUsSSa4T/9nvJ95f2hwWidibZHX8HZVz4vbDVxEKCgekn8akyZ4xYJez KD90nrma2BwBvTRjZ12InUQsTKCfKpqkotm4Vh3gRF8xsH2LqWX9/jynCeXfLoXMKf9R w6v6JbPNpzXowkKnV//6g75gPlzPuS8a/XQWVppxKdkEDqW7CU7xXcRGD9KZOCDofz6p alBKDSMARuwRBVii5ZlsjNg/rSud6sYBKoaSCWZ70Iiegsb3C6FYE2jogkJq+2GBKLv5 Pz9YWVXfOXxQD/9JXcdnr8Wb/bQCo/qfmvX2Na5irTh5CvQF0yR9dXPAhQb2V6k5Q6/f QQrg== X-Gm-Message-State: AIkVDXJPLCj8dCeUsFtCNydDw5CboOmXbDpWBsVpQsJTwYl7O0ifkdFcUqq+jpap7m6J5g== X-Received: by 10.99.161.17 with SMTP id b17mr42184179pgf.72.1485285860353; Tue, 24 Jan 2017 11:24:20 -0800 (PST) Received: from gmail.com ([2405:204:5408:7e99:9576:d8ed:2c32:e1f9]) by smtp.gmail.com with ESMTPSA id b10sm7581883pga.21.2017.01.24.11.24.16 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 24 Jan 2017 11:24:19 -0800 (PST) Received: by gmail.com (sSMTP sendmail emulation); Wed, 25 Jan 2017 00:54:13 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, dan.j.williams@intel.com, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org Subject: [PATCH] nvdimm: constify device_type structures Date: Wed, 25 Jan 2017 00:54:07 +0530 Message-Id: <1485285847-7006-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bhumika Goyal MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP Declare device_type structure as const as it is only stored in the type field of a device structure. This field is of type const, so add const to declaration of device_type structure. File size before: text data bss dec hex filename 19278 3199 16 22493 57dd nvdimm/namespace_devs.o File size after: text data bss dec hex filename 19929 3160 16 23105 5a41 nvdimm/namespace_devs.o Signed-off-by: Bhumika Goyal --- drivers/nvdimm/namespace_devs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c index 6307088..b8c40b8 100644 --- a/drivers/nvdimm/namespace_devs.c +++ b/drivers/nvdimm/namespace_devs.c @@ -52,17 +52,17 @@ static void namespace_blk_release(struct device *dev) kfree(nsblk); } -static struct device_type namespace_io_device_type = { +static const struct device_type namespace_io_device_type = { .name = "nd_namespace_io", .release = namespace_io_release, }; -static struct device_type namespace_pmem_device_type = { +static const struct device_type namespace_pmem_device_type = { .name = "nd_namespace_pmem", .release = namespace_pmem_release, }; -static struct device_type namespace_blk_device_type = { +static const struct device_type namespace_blk_device_type = { .name = "nd_namespace_blk", .release = namespace_blk_release, };