From patchwork Wed Sep 28 15:49:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary R Hook X-Patchwork-Id: 9354371 X-Patchwork-Delegate: herbert@gondor.apana.org.au 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 CE5386077A for ; Wed, 28 Sep 2016 17:21:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B1A9B2973B for ; Wed, 28 Sep 2016 17:21:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A58AF29770; Wed, 28 Sep 2016 17:21:31 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham 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 4A3162973B for ; Wed, 28 Sep 2016 17:21:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933121AbcI1RV3 (ORCPT ); Wed, 28 Sep 2016 13:21:29 -0400 Received: from mail-sn1nam01on0076.outbound.protection.outlook.com ([104.47.32.76]:62202 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932977AbcI1RV2 (ORCPT ); Wed, 28 Sep 2016 13:21:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=8EdIF9GDO6Jb9f7RBv9QPI1lfglGvh1lZIbuAY4jt/M=; b=ysBWuXHTqws4+H74TZcNsuobUJFXYye4yxZPd5FYVdUmWoS4y5d4eIhRK8d4UQeIPBRvWNqbtC+JtpQYqOyf8p8Qf1vwyi8J7VDyUEdiotCI2tO1aVP+5AXqVLuuRs84zyaXeiZftCy1CaZ2Ab62+91aEF6K7MpjwqreL8aBbQg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gary.Hook@amd.com; Received: from [10.236.19.42] (165.204.77.1) by MWHPR12MB1406.namprd12.prod.outlook.com (10.169.206.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.629.8; Wed, 28 Sep 2016 15:49:25 +0000 Subject: [PATCH 1/2] crypto: ccp - data structure cleanup From: Gary R Hook To: CC: , , Date: Wed, 28 Sep 2016 10:49:21 -0500 Message-ID: <20160928154921.22138.76929.stgit@taos> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BY2PR21CA0001.namprd21.prod.outlook.com (10.162.74.139) To MWHPR12MB1406.namprd12.prod.outlook.com (10.169.206.17) X-MS-Office365-Filtering-Correlation-Id: bfbd9826-feb6-487b-e2ed-08d3e7b7067a X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1406; 2:qz/Q3JvcETVyMq4vjjJWB1BvdL1fpaiCCMPPiLk/BZa5XUr0Uey5k6EHhslvMFZgjvV/xiJaI6dK+guqaXbr/au/bBWse7ZOG+iPNbU2M0TaN+kpZg+Op4Dcsds4yWDje10FwvehETsXdZAAktMIoERggJT0TvNrdGblnYo5zaf9Pah2BBq6UEz2h6y7kfEA; 3:zvysWThix/EdwbUtUyC+8aUGju9EQkzHRgMdHDd4cQ7Ux4Eo156d5YSUyg79ZZApW3oivzWS2LVTwygO8B8PeP9XoQKpBPSEXB078p/nnIcNGAzCImOpPLC8n8YJjXrJ; 25:8HA8z7J6V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Se65yX70TSsMjhgHp+wGifWkPNLGpYl6A1T7srSp01biERbZFa7Iz/CJfkL7Ze7ceAiPSYH+vYeOQsyHrMedzFEngTC0Ijx9xTEZIYdHustdI5JnPCXc/uy/szXzRTNcMcyKmDyoszPy0QDp2nyY/adLtScfHqISliwbSn4KB2GXS0xHx0/nNtemaLVI+ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:MWHPR12MB1406; BCL:0; PCL:0; RULEID:; SRVR:MWHPR12MB1406; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1406; 4:hrBVmwCxcJJDg/RJvxU4PWOCLyAvVoTwYINWjdrYU9faJAlZMg6Kp96Pe25AI1JjL2EB2XpdLtgghV6yyZ74twt9UipUFgEtnQX0gK/U1NhQ7aMZFNtOvbuJVhlq4RuvEXImmR+QMZot3s313IZ5BPaFAVM5GKRDn6eYV36+wuquciO98/ExdOlQcp1rBiao9Ul9u/1X7zh81mMcW3dgpBiOk+IoR4qL5s1fkF3tsYlIxFsor2jgAtHRE5Ccv3c+fRAz8HXTpCuSYd8lDFli9jq4SZATwvBk7JxGKsZEWJstDvBWmPgxW+5c70FmqlxUK4g+STk7FiZqzDhoojPRNWZE6qH/KfxY1Or1j/L9sgI1U9LMM/dYvbyENHrEP9Eoxeqad+Ga1qKwlNm3C+HV3bG/aBTFPgRc2hG5Bl8RcnP2Vn9nlhYf1pcvyByFxTf+ X-Forefront-PRVS: 0079056367 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6049001)(6009001)(7916002)(189002)(199003)(229853001)(54356999)(68736007)(2351001)(83506001)(189998001)(103116003)(9686002)(86362001)(42186005)(105586002)(33716001)(33646002)(586003)(106356001)(77096005)(81166006)(81156014)(97746001)(101416001)(50986999)(230700001)(5660300001)(50466002)(1076002)(23676002)(110136003)(19580405001)(19580395003)(8676002)(7736002)(66066001)(4001350100001)(47776003)(3846002)(4326007)(6916009)(6116002)(305945005)(2906002)(97736004)(92566002)(7846002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1406; H:[10.236.19.42]; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxNDA2OzIzOjdiSEt1Vk9NdHcwck9QYTBMRDN6dzZMUmVw?= =?utf-8?B?RGxwZ1AyRHJZNVVWRjRVNExENng4WDJBOFo1OFN5OU1wOUowMkQrVlZRUkVY?= =?utf-8?B?MytkcFh4NmZUb2ZpckpiTFZOdzZQSzRUV3lobkdBeEpBYTdRNllkL1NiM1JC?= =?utf-8?B?L250OWNXWTVpZlk3NGdLWXUwRWd0cDlUT3NSUTRwUHFuSkYzcUpRQ2NyeGFI?= =?utf-8?B?OWlkNS9qYkRwcUdtWEZvQmkyTDZVbjN4bW56QU5LUFBGbHd0S0hqMGV5eTVS?= =?utf-8?B?Q3hwVzZGNzFwRjg0MkZLRlhIOVdwUTJncnlVWk1zS3NYb3p4RWJwb2ZzWGww?= =?utf-8?B?YThhUXhWR20rSXJNR0ZITEhpbktTRHhCUkcrUHJ0bEV1bnl6K2JXNTBBcGd4?= =?utf-8?B?T1pFOG96TUE5ek5FdW00ZFJ6MEMwQ2VoQ1h0SFJxQVQvcW9JTDN5MTJLaHZm?= =?utf-8?B?aENQVEMzaTkrcU42MXJNbFFmcHJWWWJML2hvbW5Tc1ZtU0M2K0hzeHFFTnNE?= =?utf-8?B?Vm5ta09qanlGeEE4elNnUlVQd2RDaGFFRllOYzhiWVhRdlVGQkluQ1RwYTNz?= =?utf-8?B?Vi9ZMThkLzUycmYzZDdhVGFFbllzUHdqMCtWSHBWZVoxVFRLRUcxWUJEQ3dC?= =?utf-8?B?MG1jeEw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amDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1406; 20:Md38JxJj89YQHTOOXcKvzIlbUwWSXFM02F0F1+JZdHvJeNhujGcyKKHAcjARleTAqXIGu8McfY7QCewEH7dkMR0CX56/Q618jVAKZuSdhvVhsgeYLlkiWa0pQWlsOWj7UKt760n+uOFG2nn7RtE4QGsQRgXcFbMScSiH1uClssyBta1vG9Y9G26z6Gm+qs7DvR88OTYdf+Hs5qFxJ2KOYor5TWCnMfjmzwr2CgbdmxI1o9jENKAu/lGrncNTmhrM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2016 15:49:25.8866 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1406 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Change names of data structure instances; add const keyword where appropriate. Signed-off-by: Gary R Hook --- drivers/crypto/ccp/ccp-dev-v3.c | 2 +- drivers/crypto/ccp/ccp-dev-v5.c | 7 +++++-- drivers/crypto/ccp/ccp-dev.h | 6 +++--- drivers/crypto/ccp/ccp-pci.c | 4 ++-- 4 files changed, 11 insertions(+), 8 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/crypto/ccp/ccp-dev-v3.c b/drivers/crypto/ccp/ccp-dev-v3.c index 578522d..b6615b1 100644 --- a/drivers/crypto/ccp/ccp-dev-v3.c +++ b/drivers/crypto/ccp/ccp-dev-v3.c @@ -566,7 +566,7 @@ static const struct ccp_actions ccp3_actions = { .irqhandler = ccp_irq_handler, }; -struct ccp_vdata ccpv3 = { +const struct ccp_vdata ccpv3 = { .version = CCP_VERSION(3, 0), .setup = NULL, .perform = &ccp3_actions, diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c index 9df1526..a90ca9e 100644 --- a/drivers/crypto/ccp/ccp-dev-v5.c +++ b/drivers/crypto/ccp/ccp-dev-v5.c @@ -839,6 +839,9 @@ static int ccp5_init(struct ccp_device *ccp) return 0; +e_hwrng: + ccp_unregister_rng(ccp); + e_kthread: for (i = 0; i < ccp->cmd_q_count; i++) if (ccp->cmd_q[i].kthread) @@ -994,7 +997,7 @@ static const struct ccp_actions ccp5_actions = { .irqhandler = ccp5_irq_handler, }; -struct ccp_vdata ccpv5 = { +const struct ccp_vdata ccpv5a = { .version = CCP_VERSION(5, 0), .setup = ccp5_config, .perform = &ccp5_actions, @@ -1002,7 +1005,7 @@ struct ccp_vdata ccpv5 = { .offset = 0x0, }; -struct ccp_vdata ccpv5other = { +const struct ccp_vdata ccpv5b = { .version = CCP_VERSION(5, 0), .setup = ccp5other_config, .perform = &ccp5_actions, diff --git a/drivers/crypto/ccp/ccp-dev.h b/drivers/crypto/ccp/ccp-dev.h index ebc9365..08f58b0 100644 --- a/drivers/crypto/ccp/ccp-dev.h +++ b/drivers/crypto/ccp/ccp-dev.h @@ -639,8 +639,8 @@ struct ccp_vdata { const unsigned int offset; }; -extern struct ccp_vdata ccpv3; -extern struct ccp_vdata ccpv5; -extern struct ccp_vdata ccpv5other; +extern const struct ccp_vdata ccpv3; +extern const struct ccp_vdata ccpv5a; +extern const struct ccp_vdata ccpv5b; #endif diff --git a/drivers/crypto/ccp/ccp-pci.c b/drivers/crypto/ccp/ccp-pci.c index 239cbf2..28a9996 100644 --- a/drivers/crypto/ccp/ccp-pci.c +++ b/drivers/crypto/ccp/ccp-pci.c @@ -325,8 +325,8 @@ static int ccp_pci_resume(struct pci_dev *pdev) static const struct pci_device_id ccp_pci_table[] = { { PCI_VDEVICE(AMD, 0x1537), (kernel_ulong_t)&ccpv3 }, - { PCI_VDEVICE(AMD, 0x1456), (kernel_ulong_t)&ccpv5 }, - { PCI_VDEVICE(AMD, 0x1468), (kernel_ulong_t)&ccpv5other }, + { PCI_VDEVICE(AMD, 0x1456), (kernel_ulong_t)&ccpv5a }, + { PCI_VDEVICE(AMD, 0x1468), (kernel_ulong_t)&ccpv5b }, /* Last entry must be zero */ { 0, } };