From patchwork Sat Aug 19 08:22:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9910185 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 CBFF860386 for ; Sat, 19 Aug 2017 08:23:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE7FA28C9D for ; Sat, 19 Aug 2017 08:23:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B310E28DA1; Sat, 19 Aug 2017 08:23:24 +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=unavailable 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 65EFD28C9D for ; Sat, 19 Aug 2017 08:23:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751892AbdHSIXV (ORCPT ); Sat, 19 Aug 2017 04:23:21 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35504 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751808AbdHSIXN (ORCPT ); Sat, 19 Aug 2017 04:23:13 -0400 Received: by mail-pf0-f193.google.com with SMTP id j68so2595409pfc.2; Sat, 19 Aug 2017 01:23:13 -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:in-reply-to:references; bh=0AdzTsS4ilIG27aYDe4WtaeD6YQz0DIzGOq+M7JV5ZQ=; b=H1MS3K/K1Wzi7I32GULP+/06R1jiNhJDbmU66dJxKp3kNdPUvjYJHVCapJi/KCJKO7 v+nvmENJmMaswDnRlrRa3nDHGEFJxj+Zo8sTj5GT5bm6jKJetifvojdp+rbaMHIsDWsJ MRDDJuTk5H0GsR6cyQPfitjnukiu+QszzmeBF81a3kbEoNR1PxImZ76q1DFImjPQ05yx IGpSA34U5Q3jdtXku2IxtmNJTW0VPuthn+GlVhOkk/wda6k2wkz9vhzh29QtLMoCp9aZ c6+5hgqBn76/Zsl8PZ0mSmlqqNYjutVXlLaClyXCpjtQyYii28ft/xiKNRfBj31BaBD/ 2Wgw== 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:in-reply-to :references; bh=0AdzTsS4ilIG27aYDe4WtaeD6YQz0DIzGOq+M7JV5ZQ=; b=gHpklOcAMYajWLa44CAiZASj75wMX+K2mcOk5xpKL1Kc8dHTnkbO2bHdMKuUhOzoFs dB47OFOAa7jgulmM5Uj1mKLtnhJESrsxqaFTEOy0EKHagDOma3IdO7VPbkBzKC9wN13a 2FQdsb86lU4QEc/MWRmZ3z981aw7iGugaNdKt6RXX0FlNk0XqhpL1CNFJG0KtKgz+FE6 VnXuDl+nybvPLWimRUaMoa4wgTCkNwMt9tmSiEx0GJP2xJ/4cWo8pK/3SwpFLHo673mC 9DEIapSNWNykT14Tj9ihA3/IVgZF6FsNJZcfntEbF1RLDBwCUfCxOlGBPEcjyKFPPFcv nNLA== X-Gm-Message-State: AHYfb5h6fHSlajsyd5V0nNnPL94FXS/rfkEAa1NkArYY53oG1d2OI1CA AtMMA7D0zGCRww== X-Received: by 10.98.15.201 with SMTP id 70mr11234942pfp.116.1503130992650; Sat, 19 Aug 2017 01:23:12 -0700 (PDT) Received: from gmail.com ([59.94.206.141]) by smtp.gmail.com with ESMTPSA id j9sm18762991pfk.30.2017.08.19.01.22.54 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 19 Aug 2017 01:23:11 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Sat, 19 Aug 2017 13:52:51 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, bp@alien8.de, mchehab@kernel.org, daniel.vetter@intel.com, jani.nikula@linux.intel.com, seanpaul@chromium.org, airlied@linux.ie, g.liakhovetski@gmx.de, tomas.winkler@intel.com, dwmw2@infradead.org, computersforpeace@gmail.com, boris.brezillon@free-electrons.com, marek.vasut@gmail.com, richard@nod.at, cyrille.pitchen@wedev4u.fr, peda@axentia.se, kishon@ti.com, bhelgaas@google.com, thierry.reding@gmail.com, jonathanh@nvidia.com, dvhart@infradead.org, andy@infradead.org, ohad@wizery.com, bjorn.andersson@linaro.org, freude@de.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, jth@kernel.org, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, lduncan@suse.com, cleech@redhat.com, johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org, heikki.krogerus@linux.intel.com, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linux-mtd@lists.infradead.org, linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-s390@vger.kernel.org, fcoe-devel@open-fcoe.org, linux-scsi@vger.kernel.org, open-iscsi@googlegroups.com, greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-usb@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH 01/15] EDAC: make device_type const Date: Sat, 19 Aug 2017 13:52:12 +0530 Message-Id: <1503130946-2854-2-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1503130946-2854-1-git-send-email-bhumirks@gmail.com> References: <1503130946-2854-1-git-send-email-bhumirks@gmail.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make these const as they are only stored in the type field of a device structure, which is const. Done using Coccinelle. Signed-off-by: Bhumika Goyal --- drivers/edac/edac_mc_sysfs.c | 8 ++++---- drivers/edac/i7core_edac.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index dbc6446..e4fcfa8 100644 --- a/drivers/edac/edac_mc_sysfs.c +++ b/drivers/edac/edac_mc_sysfs.c @@ -304,7 +304,7 @@ static void csrow_attr_release(struct device *dev) kfree(csrow); } -static struct device_type csrow_attr_type = { +static const struct device_type csrow_attr_type = { .groups = csrow_attr_groups, .release = csrow_attr_release, }; @@ -644,7 +644,7 @@ static void dimm_attr_release(struct device *dev) kfree(dimm); } -static struct device_type dimm_attr_type = { +static const struct device_type dimm_attr_type = { .groups = dimm_attr_groups, .release = dimm_attr_release, }; @@ -920,7 +920,7 @@ static void mci_attr_release(struct device *dev) kfree(mci); } -static struct device_type mci_attr_type = { +static const struct device_type mci_attr_type = { .groups = mci_attr_groups, .release = mci_attr_release, }; @@ -1074,7 +1074,7 @@ static void mc_attr_release(struct device *dev) kfree(dev); } -static struct device_type mc_attr_type = { +static const struct device_type mc_attr_type = { .release = mc_attr_release, }; /* diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index d36cc84..c16c3b9 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c @@ -1094,7 +1094,7 @@ static void addrmatch_release(struct device *device) kfree(device); } -static struct device_type addrmatch_type = { +static const struct device_type addrmatch_type = { .groups = addrmatch_groups, .release = addrmatch_release, }; @@ -1125,7 +1125,7 @@ static void all_channel_counts_release(struct device *device) kfree(device); } -static struct device_type all_channel_counts_type = { +static const struct device_type all_channel_counts_type = { .groups = all_channel_counts_groups, .release = all_channel_counts_release, };