Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp797857img; Fri, 22 Mar 2019 08:46:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqygOmdkXZ7yGkNPgneURK4X/T21g43db8f/ZC5CSPPWhBHVZj4cOKT6//xG2iPYkfNF0pUp X-Received: by 2002:a62:5a42:: with SMTP id o63mr10288668pfb.170.1553269616161; Fri, 22 Mar 2019 08:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553269616; cv=none; d=google.com; s=arc-20160816; b=wHcZ3MGVmFL85+Pv3DEegbAyBaoszXkwZncl7v6LllsCGQSUrT1CsoHKYDwNrtMeUI M6BeOGwSx1y3IwpouwXvETVBZs2x/Zt+o60HjdUFlm5BTGUo9koyUa+jGMV6CcV0GeUv HfSq5BN2winqwdx1hP5/d3x1SKLuQfIZ1ufrxasF278QrkDw6/Z23Z2mg5bFh2ZdveLD B0VXwpNVciZji0O3DN+sDBkqpyQprc2NTk8w/ErVgFsS1zENvGwzgrPByYtkgkHNE/Ce ucY8o0RW0Z23MUB2k4YFCmbDw1r0nbWWxg3J+LabLEJ+D/MC7Pd0mXGinmuv8xUV+p9f QQiQ== 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=u8j482EuvojbpuHVJXLt08K/Ov0CM3J0WhC2HNh5vv2mdo9p4j9/wOnklYcAD6cN/l LTAgXrsWI0GEWNUsgxtihaQo6fT8q4sWfCvbn9LpdMIXxVa42qzU9XWVJLYASdONHC+G MX1wqDxnO3YY/6kNuTkqBHlDRuxMkjG65BXdI9Bzvypcx2TV4gQbaGXNUmOtDTfm0tGB phzRkul+eK8MHDvKP+HTNKUy57WdMRZvdi2Z12E007+JX0XOGDMQ1ZjdRKThuHOXnFtp HOViZxgEdwNlvnQXAshU+l5Qd0a/WchEetBcqpWsRh8h3eocUlNq6qktHtlfVnu8wZJk zNzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 p19si7276872plq.29.2019.03.22.08.46.40; Fri, 22 Mar 2019 08:46:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727524AbfCVPpH (ORCPT + 99 others); Fri, 22 Mar 2019 11:45:07 -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 Content-Transfer-Encoding: 8bit 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) 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, -- 2.20.0