]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
crypto: ccp - constify ccp_actions structure
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 1 May 2016 11:52:55 +0000 (13:52 +0200)
committerSomasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Thu, 24 Aug 2017 17:54:07 +0000 (10:54 -0700)
Orabug: 26644685

The ccp_actions structure is never modified, so declare it as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Gary Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit bc197b2a9c7e0129fa0ec1961881e2a0b3bef967)
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
drivers/crypto/ccp/ccp-dev-v3.c
drivers/crypto/ccp/ccp-dev.h

index 597fc50bdaa61d9ca593b2aea811983dad50447f..d7a71034796705c4c98f7f56b796fe80628bfc94 100644 (file)
@@ -526,7 +526,7 @@ static irqreturn_t ccp_irq_handler(int irq, void *data)
        return IRQ_HANDLED;
 }
 
-static struct ccp_actions ccp3_actions = {
+static const struct ccp_actions ccp3_actions = {
        .perform_aes = ccp_perform_aes,
        .perform_xts_aes = ccp_perform_xts_aes,
        .perform_sha = ccp_perform_sha,
index 5d986c9d72eb4a9e3d477c09aea94954bb1e40d7..bd41ffceff82fecacfd878bfddd0056067cf7632 100644 (file)
@@ -162,7 +162,7 @@ struct ccp_actions {
 /* Structure to hold CCP version-specific values */
 struct ccp_vdata {
        unsigned int version;
-       struct ccp_actions *perform;
+       const struct ccp_actions *perform;
 };
 
 extern struct ccp_vdata ccpv3;