From patchwork Fri Mar 22 15:43:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 160916 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp959336jan; Fri, 22 Mar 2019 08:45:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkfJIqHysWXMzDIgFAAbs7GGESibpmlGwup6XMQZfRZ3IEb8S9ZdeeMiLjZV10o8R9HMFn X-Received: by 2002:a17:902:850c:: with SMTP id bj12mr9892050plb.69.1553269507626; Fri, 22 Mar 2019 08:45:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553269507; cv=none; d=google.com; s=arc-20160816; b=AD1e6RwVCadjN+/TvfVYzvTs63yiNo+3ynCf7xsoJr4EfxGOq+CePUgPZa9bgPlxx+ irpOVM0r2e9ZsrgDxkM3gyBYDL+KmSTvFwXQVMyBSDv8OOxLHark/OmUfwhkBm/izhZD 26OBWYLC3p/fYZ76vsT9dfOq1cKk7qZYNSltu4E7n3mmL2obGo7OKZ+t0JL+gFVBe9hm nmA5GMvyaPbgo8vO5lLdKLZjKZejhiu9O6CBTSmEAS/aSy43IAd62pzN0e15YbaDS0ui NRnd4woxX8X6a0REMBDvdT72Sb64Utqpw4yGdZuQMlMfsCuhrDhQEZAo8XMDS8P12eF/ dhCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=r7TWXvSkzg9FDtBISdMFiTn+mY7s6jTZFKqn8rlCQgo=; b=QXkmcas6oe1nhYZto+eLrd/HkOH+jrSonlBvimAYqQdjHzL0cvVZkmi89KwvYGZWyL RBtKJcHi4iTBoYuGoAFKy+q6vXKjjeBjo61KQ9LP/FwCjYclg/8yhw6Vq8hGOf7KZuZO vazRNIJvGpvHOvWeBwqMJT9+3KIgTBMdaup4b3RtaLoy/ODOLNQH1qt16q+0J73ZMb66 batfBi9fbE9BUrK7oVRiS7huvJM4swo+a2KDA5/OHOUvTLqyrztXpYqioFydL0qOoS0d lHrwXVQ4hIBadBkn3GyrHLZIXxYvsrQ+riD0CnnfDp/Tny6RXktoaxcSPog6eIpUhaDm vsxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w19si6763487ply.264.2019.03.22.08.45.07; Fri, 22 Mar 2019 08:45:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727439AbfCVPpG (ORCPT + 14 others); Fri, 22 Mar 2019 11:45:06 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:45359 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725981AbfCVPpG (ORCPT ); Fri, 22 Mar 2019 11:45:06 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1M2w8Y-1h8TLT0ncK-003KEI; Fri, 22 Mar 2019 16:44:59 +0100 From: Arnd Bergmann To: stable@vger.kernel.org, Ulf Hansson , Janusz Krzysztofik , Linus Walleij , "Tobin C. Harding" , Geert Uytterhoeven Cc: Julia Lawall , Arnd Bergmann , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [BACKPORT 4.4.y 01/25] mmc: pwrseq: constify mmc_pwrseq_ops structures Date: Fri, 22 Mar 2019 16:43:52 +0100 Message-Id: <20190322154425.3852517-2-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190322154425.3852517-1-arnd@arndb.de> References: <20190322154425.3852517-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:oe8376lywJ1RlgN89xWJQlf+8ZN8YDWsg4NYJjq+An/jq+TA3OO iRU3TJcxTNCk2RPXuCFKIGL03nBVIEj79YFJiDLmz1HJZhgoAroXmEqJjWtOS8rjBwBABhY IWwRX0wx8cMrHa1cZE6u1U9/XXHYduegiEDbHGGRXfwewHHR0nZdYOGyZo1bJxrkm++SImw H0m9QaPU7eMWkeR79GdVQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:W4KUOBxIZrU=:yV+7BtWADOH09wsWx39kaZ wHIZrDycVFQIt7W3f2Pdi4h5KFryWkZWTFjBkkANQXkdqErAZgiFsf4vdTyGCjzw+sxfeNPrj 4wssvVI9T1x9Pkb1MuE9+qI3FhzdqfaBhSRzqzz68qtjz74VjzONMZO9VmlhA378jrSxv/ipX CWjeQ45empv1htdOXAmjM4DNn/CtXw6aIVBizPH6nWqihoglMVbt/H0i9ZhxRKoJUMdYOMwq6 V+shWTBgqwMuTcFMkR8B+B89yi7QaJsfJKEidra36l7lH7kMH70fyF33xdJusJl3x20rZyMX0 WlAYYCb5nDBi3dY0U7iNbufDdRIbd+46gy1zClKr2DdnWgeoDG92FuO5p0fcGn8SBmjpIQPB2 1GAGQuAm8kfUO8tiepI090EpKmX4qbV23kcQxFH14uCiZCSJeqZ7Pz8lfAolVaOakcbhtFrte u5xEmuhQab+OJYeXrHWjbkr9TNXaeInF3/w8MjllwayfX9P/87Hd0pow/gnhR+XvgCWCGgkbQ wg44V6CnYv5UFAE7mB60set1WbYe6o0Ziu6qOACWRewly+hxSKt7ozDnATQjqQY3Tb+ws8/Uf 9du26OULb4lXQaQRbunR3X/fFksm/gqxgjv30JlFmJCjzYkP8+bM4DZAPI2zUfWw7nB5Eq303 qArUwlLDqYMBfiCDTMQZC5VtBnDU7086Am6DsJF6xXhBuByFotzII8Jf+NISofo8knykflgvW g2Hh3O6gyq6tpAdlDuFQA0XnGK9OwD+g1UNP/g== Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Julia Lawall The mmc_pwrseq_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Ulf Hansson (cherry picked from commit ffedbd2210f2f4cba490a9205adc11fd1b89a852) Signed-off-by: Arnd Bergmann --- drivers/mmc/core/pwrseq.h | 2 +- drivers/mmc/core/pwrseq_emmc.c | 2 +- drivers/mmc/core/pwrseq_simple.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- 2.20.0 diff --git a/drivers/mmc/core/pwrseq.h b/drivers/mmc/core/pwrseq.h index 096da48c6a7e..133de0426687 100644 --- a/drivers/mmc/core/pwrseq.h +++ b/drivers/mmc/core/pwrseq.h @@ -16,7 +16,7 @@ struct mmc_pwrseq_ops { }; struct mmc_pwrseq { - struct mmc_pwrseq_ops *ops; + const struct mmc_pwrseq_ops *ops; }; #ifdef CONFIG_OF diff --git a/drivers/mmc/core/pwrseq_emmc.c b/drivers/mmc/core/pwrseq_emmc.c index ad4f94ec7e8d..4a82bc77fe49 100644 --- a/drivers/mmc/core/pwrseq_emmc.c +++ b/drivers/mmc/core/pwrseq_emmc.c @@ -51,7 +51,7 @@ static void mmc_pwrseq_emmc_free(struct mmc_host *host) kfree(pwrseq); } -static struct mmc_pwrseq_ops mmc_pwrseq_emmc_ops = { +static const struct mmc_pwrseq_ops mmc_pwrseq_emmc_ops = { .post_power_on = mmc_pwrseq_emmc_reset, .free = mmc_pwrseq_emmc_free, }; diff --git a/drivers/mmc/core/pwrseq_simple.c b/drivers/mmc/core/pwrseq_simple.c index d10538bb5e07..2b16263458af 100644 --- a/drivers/mmc/core/pwrseq_simple.c +++ b/drivers/mmc/core/pwrseq_simple.c @@ -87,7 +87,7 @@ static void mmc_pwrseq_simple_free(struct mmc_host *host) kfree(pwrseq); } -static struct mmc_pwrseq_ops mmc_pwrseq_simple_ops = { +static const struct mmc_pwrseq_ops mmc_pwrseq_simple_ops = { .pre_power_on = mmc_pwrseq_simple_pre_power_on, .post_power_on = mmc_pwrseq_simple_post_power_on, .power_off = mmc_pwrseq_simple_power_off,