From patchwork Wed Aug 9 07:48:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9889757 X-Patchwork-Delegate: bhelgaas@google.com 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 4AF1460363 for ; Wed, 9 Aug 2017 07:49:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F34F284F2 for ; Wed, 9 Aug 2017 07:49:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3412928782; Wed, 9 Aug 2017 07:49:20 +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 0D7A3284F2 for ; Wed, 9 Aug 2017 07:49:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752324AbdHIHtF (ORCPT ); Wed, 9 Aug 2017 03:49:05 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:37867 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752213AbdHIHtE (ORCPT ); Wed, 9 Aug 2017 03:49:04 -0400 Received: by mail-pg0-f67.google.com with SMTP id 83so5238319pgb.4; Wed, 09 Aug 2017 00:49:04 -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; bh=OsFzbEA4hiayQO9aYcV93Z/EM/a2wn32yyMZATH1zyA=; b=ppu87nasaAWFPCMMmfxxTGnXZYOrbE+Z2FlS3PHssK5pAvmVXNYfl+2LqOp6rmQQRJ Jc4V9vKlK8bde8T/3jTu0hs9McR0S6gx58BL5n/fxAfgSzRHK7bNWthlJ+gPRh5DRedf 0458sw7M7sF8H0WkDj/PbgLHogTCUWURmBXzWU97FoIL+Lb0q9VD71yF8ej4cvwzcq3O OcX9A3wLg1j3oA2jEv4nKYd66txn9tvRv4E82pdr0SnkFM6Xk7dxbn9Ckj9Zen9iD1VG vEcU1PQAPzHKW86VtKwY28uorjvNv8tlot68QTqmXqXXKI2JQWz0eyUDvI3ucm/NAxuj l92Q== 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=OsFzbEA4hiayQO9aYcV93Z/EM/a2wn32yyMZATH1zyA=; b=UIo+XyOphEKMH/wqLJ4LVBXXe7e3ujZ7ylvOeWGumEHIQIXOFYmIhSROuYIPNeRrrx g1Y9n2LUigd5/HavsNO/T5a6ChWd88MCPoFJbuiB/I2Fs248tZyXc6ANfRIAPZ7m8wrq uIRqMLrSz4ickW5aJNvZCkJdAnNfwLz9WA5txmNTWDf5v8niKmHrN87YELlXWl1WLVvl ayRbWhkw3rBcflAss2nK30ho/L0KG5LME/cSvK67LGLSRdAteYyj6ZQoTmX14NZh2k6e 0eTeUbX4g4Jl3Ajc3b5jewbCM/KFPn13q03nm/QAHmySZchWpU7ciGs7Dkb9kffAWa8L geNw== X-Gm-Message-State: AHYfb5gU1BPQyqHqyP3THXcU7LFyhZ2bwEUu4o8VmQY8IPjZCjJfq/+c 4QFEYsc4FMsxnQ== X-Received: by 10.98.152.77 with SMTP id q74mr7306624pfd.40.1502264944112; Wed, 09 Aug 2017 00:49:04 -0700 (PDT) Received: from gmail.com ([117.248.117.140]) by smtp.gmail.com with ESMTPSA id c7sm6357423pfa.174.2017.08.09.00.48.58 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 09 Aug 2017 00:49:02 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Wed, 09 Aug 2017 13:18:52 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, wangzhou1@hisilicon.com, gabriele.paoloni@huawei.com, bhelgaas@google.com, songxiaowei@hisilicon.com, wangbinghui@hisilicon.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] PCI: dwc: make dw_pcie_host_ops const Date: Wed, 9 Aug 2017 13:18:48 +0530 Message-Id: <1502264928-30004-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make these structures const as they are only stored in the ops field of a pcie_port structure, which is of type const. Done using Coccinelle. Signed-off-by: Bhumika Goyal --- drivers/pci/dwc/pcie-hisi.c | 2 +- drivers/pci/dwc/pcie-kirin.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/dwc/pcie-hisi.c b/drivers/pci/dwc/pcie-hisi.c index e51acee..518cd7e 100644 --- a/drivers/pci/dwc/pcie-hisi.c +++ b/drivers/pci/dwc/pcie-hisi.c @@ -223,7 +223,7 @@ static int hisi_pcie_link_up(struct dw_pcie *pci) return hisi_pcie->soc_ops->hisi_pcie_link_up(hisi_pcie); } -static struct dw_pcie_host_ops hisi_pcie_host_ops = { +static const struct dw_pcie_host_ops hisi_pcie_host_ops = { .rd_own_conf = hisi_pcie_cfg_read, .wr_own_conf = hisi_pcie_cfg_write, }; diff --git a/drivers/pci/dwc/pcie-kirin.c b/drivers/pci/dwc/pcie-kirin.c index 33fddb9..a623f96 100644 --- a/drivers/pci/dwc/pcie-kirin.c +++ b/drivers/pci/dwc/pcie-kirin.c @@ -441,7 +441,7 @@ static void kirin_pcie_host_init(struct pcie_port *pp) .link_up = kirin_pcie_link_up, }; -static struct dw_pcie_host_ops kirin_pcie_host_ops = { +static const struct dw_pcie_host_ops kirin_pcie_host_ops = { .rd_own_conf = kirin_pcie_rd_own_conf, .wr_own_conf = kirin_pcie_wr_own_conf, .host_init = kirin_pcie_host_init,