From patchwork Thu Feb 15 19:34:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 10223477 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 0696B6055C for ; Thu, 15 Feb 2018 19:35:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBBA3289D1 for ; Thu, 15 Feb 2018 19:35:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E010B294DA; Thu, 15 Feb 2018 19:35:17 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI 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 B8E7629474 for ; Thu, 15 Feb 2018 19:35:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755507AbeBOTfP (ORCPT ); Thu, 15 Feb 2018 14:35:15 -0500 Received: from mail-dm3nam03on0047.outbound.protection.outlook.com ([104.47.41.47]:58919 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755500AbeBOTfO (ORCPT ); Thu, 15 Feb 2018 14:35:14 -0500 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=Ei/yan/5ve7j5rHnATwA6Y+rjWboZsepkO16EvK+5DU=; b=gDqSdbI0eMC6W38i/oKLWCek5FWGe0s8PdgBcrD5Zqqw2aaEZ5WyxmTcH2Y2oEQIQOcPU6OqtyklBOURG/vzqxmUqVEBiTM+a34K0hXlqGgQkhooFAvahYA6cIfIbgj/TZKfP4R15aYa6GVJ4GFThD0JHYh6wz9/CgWRuWj2Q0c= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from wsp141597wss.amd.com (165.204.78.1) by SN1PR12MB0157.namprd12.prod.outlook.com (10.162.3.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.506.18; Thu, 15 Feb 2018 19:35:10 +0000 From: Brijesh Singh To: linux-crypto@vger.kernel.org Cc: Brijesh Singh , Borislav Petkov , Herbert Xu , Gary Hook , Tom Lendacky Subject: [PATCH 1/2] crypto: ccp: Fix sparse, use plain integer as NULL pointer Date: Thu, 15 Feb 2018 13:34:44 -0600 Message-Id: <20180215193445.40046-1-brijesh.singh@amd.com> X-Mailer: git-send-email 2.14.3 MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: MWHPR1601CA0006.namprd16.prod.outlook.com (10.172.93.16) To SN1PR12MB0157.namprd12.prod.outlook.com (10.162.3.144) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 2c2fb788-6aef-487e-1c77-08d574ab3ae2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:SN1PR12MB0157; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0157; 3:M3IrIQ7KcMGE1yb2CXaSZqT384XQOcZrLmNZQh1jMyOvoMjBo+LycL/rwhYLMrvEspBs2HUVD7tSmhyRccjJR310pRO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Xj3MqJZtlLHfh7tXOXcA4VuvFpDaLNRfKpDsgXU7KSm8Msq3LYvGAfXyutzBfypYlNUTrlS+/1BciA2F11NnwVQfeQT2GN8rh4t+/yMeLvnfF95XXqRKE0tNd500U+6cFdjcVk1VaHhh3se945KOj8RDRZDbEuMWDkWY3XGJhs+w5VHA0LNYEpJW/9Sc1PxRPn8N7WLGJlMT7R+62H3r7kS4v+hcMSZTwhvkOrDMj4tUs4xH+Cu; 4:77wfcVpx65552/V9H2N3dPB223gq4Ai200BA9z8RRbBJGf8olHkZ3R0lmHjH26MbpKQVm/qFrqFvUzKLxt0ZvIEj75RjHltIqJ6yim0SX0luU4nUToZTvZENI9rhSCAPw3Z5Frj53hXw7vo8wZEACXiU6Sxwl7B9egprh6SvZI2fKeDTaEjuKkTb0Fb9his0n5BwB2yc0Q1r+ozchUyF2EdRRCcOAYouIT2/Shjl94w+tXNhr60I1lS8arfCK++RQcXX2UOYu++UjqJv42Zk/V1X5FPxxPSGV6ZeaQiFrJcxD+J+SCbVvnPQG6atPGuX X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231101)(944501161)(6055026)(6041288)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:SN1PR12MB0157; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB0157; X-Forefront-PRVS: 058441C12A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(346002)(376002)(396003)(39380400002)(189003)(199004)(26005)(8936002)(3846002)(5660300001)(186003)(16526019)(316002)(6666003)(1076002)(54906003)(6116002)(48376002)(50466002)(478600001)(386003)(8676002)(59450400001)(68736007)(86362001)(16586007)(2906002)(50226002)(7736002)(6916009)(2351001)(52116002)(106356001)(51416003)(25786009)(97736004)(4326008)(6486002)(2361001)(36756003)(81166006)(53416004)(66066001)(53936002)(81156014)(47776003)(305945005)(105586002)(7696005); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0157; H:wsp141597wss.amd.com; 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: =?us-ascii?Q?1; SN1PR12MB0157; 23:/V4+YPY6YQZL+F0N8TXyqP1ovf0qRhN6gS6pIepsK?= =?us-ascii?Q?0cpZ9SLt3t1DjDT0enKJ0QDkwdfVZGz8CJtQ5CZGI/PZnBzLr59u+9oSgDVs?= =?us-ascii?Q?EhEz5mpWVPe7+XASMtXImv6fLGsg/9X45Jnl/kRodAwRVNPbbk9OUBHkI2cE?= =?us-ascii?Q?lZUe6Z4F6d+x6Cr4LHv+6K1ajkt2tUBFJWWcsZvLpICPJy4Z/VaUnBOdoWEd?= =?us-ascii?Q?vvs6JBm1WQBLF6tCTdljSoN9oeB87BP5Vq2PVIq//GdghXrr+8Ki28433Fer?= =?us-ascii?Q?48NQhyvjdWLDlEWOy3ohbEdjxG5tx1ijpzpncN5IwseSHbQHGhw9qXWBINBp?= =?us-ascii?Q?HS9c4bVkp6E5QguQa9yJXJXQ5id+FcSWYJx/2we8Jxxv4MNa5baEHt72zIs5?= =?us-ascii?Q?IuPHcuXB2rjEVfK14i+FGyJbNP353MbRPxCuIMrQtSriY08iWXd0DwfSPM8f?= =?us-ascii?Q?KHLK/+nQdF542HXBCMRYRNYJJBBQgCy55xwZ04X4e6Rc1oxzHWKynHByMwBu?= =?us-ascii?Q?D3SZcKZ4O4wySprNTdKLziyDO6b3dBIqtgEHrQDe/G8xqmX89v3SP+XF7BKE?= =?us-ascii?Q?U3Py5IjqvX+x4+jOaApZezjbEAX9BYrXvcBXQaqZrOX/2tM+B2U2hv2AoLqn?= =?us-ascii?Q?Unz3D95XE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G054cX/kZnt/8ZD3uJQiZmU/72uAa2H0xWAW+Z/QiBTxKglDIYgAQED6OXqAbksRldIsJQo4FJUGGFf5741sNNgk7xBjIyLMb9sfv6zvi/NQDpeT3jfZm8Rn3gsdjbl8gA=; 24:5g3nDbK/r1VOo1Not9V//mN+ZfPU1XySaM8CGTmGDe6TwFDDNBXjgn9dnBI9dLJqWTteG2MJf50kqiqtLaxHCwokyLYlvY+3wPfISaBBeMs=; 7:J/oP19BbUvKTu16EQYo3cdRyKmPU1HFn7qrPqsgJwArUnLjL9oHMJJs4j74t4FOpgQabtfWAK6Ob8KiRWk79+AoMNx5OnGT2HPTtsGwnu2iK75BFpNQ1CWCBV1D3Z6/12Bb7HFOSxgibnHwxzHLFAkg7SKWWco0KmieGbTYZZPpAobtXDrifIbni6WJDrjQimv2zq5M6fNPhzwgoAXDl7/NOnOcJipn/yNWyZ3y35+Jzl+UwjUVV89Me3Y9lwQji SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0157; 20:mO5F8nJSMia2K3qp8ZUC5pgR7LDpOlA1b64U04oPwX+OMG6lUriiCBl1jwuQPQzUl/vu9PquQR1bLbimFkWG21VI+q+Bq2BVCiDpp1J15sd5mYaM4tqdqjGZtEdDoMKOtKvjWLFEW5j1JjQnqqWOSfBL/zg4BkT/nI991q7DrTXNc556m2EfeoyV04+gdgsplp/ifq8IjJAsiFKqOoUCjnDJat7jlPZ/P3BD3Z0b5SQ2MbT37PBZgJvkim2oU6R2 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2018 19:35:10.8763 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2c2fb788-6aef-487e-1c77-08d574ab3ae2 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0157 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 Fix sparse warning: Using plain integer as NULL pointer. Replaces assignment of 0 to pointer with NULL assignment. Fixes: 200664d5237f (Add Secure Encrypted Virtualization ...) Cc: Borislav Petkov Cc: Herbert Xu Cc: Gary Hook Cc: Tom Lendacky Signed-off-by: Brijesh Singh Acked-by: Gary R Hook --- drivers/crypto/ccp/psp-dev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/ccp/psp-dev.c b/drivers/crypto/ccp/psp-dev.c index fcfa5b1eae61..b3afb6cc9d72 100644 --- a/drivers/crypto/ccp/psp-dev.c +++ b/drivers/crypto/ccp/psp-dev.c @@ -211,7 +211,7 @@ static int __sev_platform_shutdown_locked(int *error) { int ret; - ret = __sev_do_cmd_locked(SEV_CMD_SHUTDOWN, 0, error); + ret = __sev_do_cmd_locked(SEV_CMD_SHUTDOWN, NULL, error); if (ret) return ret; @@ -271,7 +271,7 @@ static int sev_ioctl_do_reset(struct sev_issue_cmd *argp) return rc; } - return __sev_do_cmd_locked(SEV_CMD_FACTORY_RESET, 0, &argp->error); + return __sev_do_cmd_locked(SEV_CMD_FACTORY_RESET, NULL, &argp->error); } static int sev_ioctl_do_platform_status(struct sev_issue_cmd *argp) @@ -299,7 +299,7 @@ static int sev_ioctl_do_pek_pdh_gen(int cmd, struct sev_issue_cmd *argp) return rc; } - return __sev_do_cmd_locked(cmd, 0, &argp->error); + return __sev_do_cmd_locked(cmd, NULL, &argp->error); } static int sev_ioctl_do_pek_csr(struct sev_issue_cmd *argp) @@ -624,7 +624,7 @@ EXPORT_SYMBOL_GPL(sev_guest_decommission); int sev_guest_df_flush(int *error) { - return sev_do_cmd(SEV_CMD_DF_FLUSH, 0, error); + return sev_do_cmd(SEV_CMD_DF_FLUSH, NULL, error); } EXPORT_SYMBOL_GPL(sev_guest_df_flush);