Message ID | 20150526180623.6527.66942.stgit@tlendack-t1.amdoffice.net (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show
Return-Path: <linux-crypto-owner@kernel.org> X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 736009F38C for <patchwork-linux-crypto@patchwork.kernel.org>; Tue, 26 May 2015 18:21:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 932A72065F for <patchwork-linux-crypto@patchwork.kernel.org>; Tue, 26 May 2015 18:21:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 76B042065E for <patchwork-linux-crypto@patchwork.kernel.org>; Tue, 26 May 2015 18:21:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751168AbbEZSVz (ORCPT <rfc822;patchwork-linux-crypto@patchwork.kernel.org>); Tue, 26 May 2015 14:21:55 -0400 Received: from mail-bn1bbn0103.outbound.protection.outlook.com ([157.56.111.103]:50329 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750845AbbEZSVz (ORCPT <rfc822;linux-crypto@vger.kernel.org>); Tue, 26 May 2015 14:21:55 -0400 X-Greylist: delayed 919 seconds by postgrey-1.27 at vger.kernel.org; Tue, 26 May 2015 14:21:54 EDT Received: from BY2PR02CA0088.namprd02.prod.outlook.com (10.242.32.46) by BN3PR02MB1112.namprd02.prod.outlook.com (25.162.168.142) with Microsoft SMTP Server (TLS) id 15.1.172.22; Tue, 26 May 2015 18:06:39 +0000 Received: from BN1AFFO11FD036.protection.gbl (2a01:111:f400:7c10::110) by BY2PR02CA0088.outlook.office365.com (2a01:111:e400:2c2a::46) with Microsoft SMTP Server (TLS) id 15.1.172.22 via Frontend Transport; Tue, 26 May 2015 18:06:26 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.221) smtp.mailfrom=amd.com; davemloft.net; dkim=none (message not signed) header.d=none; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from atltwp01.amd.com (165.204.84.221) by BN1AFFO11FD036.mail.protection.outlook.com (10.58.52.240) with Microsoft SMTP Server id 15.1.172.14 via Frontend Transport; Tue, 26 May 2015 18:06:25 +0000 X-WSS-ID: 0NOYYAP-07-FHH-02 X-M-MSG: Received: from satlvexedge01.amd.com (satlvexedge01.amd.com [10.177.96.28]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by atltwp01.amd.com (Axway MailGate 5.3.1) with ESMTPS id 284F5CAE7BC; Tue, 26 May 2015 14:06:24 -0400 (EDT) Received: from SATLEXDAG06.amd.com (10.181.40.13) by satlvexedge01.amd.com (10.177.96.28) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 26 May 2015 13:06:43 -0500 Received: from tlendack-t1.amdoffice.net (10.180.168.240) by satlexdag06.amd.com (10.181.40.13) with Microsoft SMTP Server id 14.3.195.1; Tue, 26 May 2015 14:06:24 -0400 Subject: [PATCH v1 1/3] crypto: ccp - Remove manual check and set of dma_mask pointer From: Tom Lendacky <thomas.lendacky@amd.com> To: <linux-crypto@vger.kernel.org> CC: Herbert Xu <herbert@gondor.apana.org.au>, David Miller <davem@davemloft.net> Date: Tue, 26 May 2015 13:06:24 -0500 Message-ID: <20150526180623.6527.66942.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20150526180612.6527.53332.stgit@tlendack-t1.amdoffice.net> References: <20150526180612.6527.53332.stgit@tlendack-t1.amdoffice.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD036; 1:LnZlYmVlt3tDSaU5FhTqeel0EvQOGFZKAxvZymDpwW8/GlBpAtW2ZV/UooB4VEh8hQNwnRbAUSaqG1l3PP8PsmtkSBGbdWFlQwRkntnqMcxzdPV0ujA/HYCnCkUQMWjZXOn26AfgC3L8rELyOo1A4kvRzFhixVmPqS31OKsbNfAFq+qpw3wPsNwBJnHnzNcW7benskiNuud1sGGzsBZowTB7Pd0RANEFwT4PBYSXHcZMnHSFkb5kTxp4T99ZJ19QFkpCZJLJpZZdxKg2C7Xy+ebDVX64ALiMjVL0tmmCYehgEeJrIF0C+PQqNmq80/bn X-Forefront-Antispam-Report: CIP:165.204.84.221; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(428002)(189002)(199003)(76176999)(54356999)(50986999)(77156002)(62966003)(105586002)(46102003)(23676002)(2351001)(53416004)(33646002)(101416001)(229853001)(103116003)(47776003)(106466001)(64706001)(4001350100001)(50466002)(5001920100001)(83506001)(68736005)(86362001)(77096005)(575784001)(19580405001)(2950100001)(97746001)(97736004)(189998001)(110136002)(92566002)(87936001)(5001830100001)(5001860100001)(19580395003)(4001540100001)(71626006); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR02MB1112; H:atltwp01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR02MB1112; X-Microsoft-Antispam-PRVS: <BN3PR02MB1112BE2CD16081F2630DC9D6ECCC0@BN3PR02MB1112.namprd02.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(520002)(3002001); SRVR:BN3PR02MB1112; BCL:0; PCL:0; RULEID:; SRVR:BN3PR02MB1112; X-Forefront-PRVS: 0588B2BD96 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2015 18:06:25.6366 (UTC) X-MS-Exchange-CrossTenant-Id: fde4dada-be84-483f-92cc-e026cbee8e96 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fde4dada-be84-483f-92cc-e026cbee8e96; Ip=[165.204.84.221]; Helo=[atltwp01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR02MB1112 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: <linux-crypto.vger.kernel.org> X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/crypto/ccp/ccp-platform.c b/drivers/crypto/ccp/ccp-platform.c index b1c20b2..c0aa5c5 100644 --- a/drivers/crypto/ccp/ccp-platform.c +++ b/drivers/crypto/ccp/ccp-platform.c @@ -174,8 +174,6 @@ static int ccp_platform_probe(struct platform_device *pdev) } ccp->io_regs = ccp->io_map; - if (!dev->dma_mask) - dev->dma_mask = &dev->coherent_dma_mask; ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(48)); if (ret) { dev_err(dev, "dma_set_mask_and_coherent failed (%d)\n", ret);
The underlying device support will set the device dma_mask pointer if DMA is set up properly for the device. Remove the check for and assignment of dma_mask when it is null. Instead, just error out if the dma_set_mask_and_coherent function fails because dma_mask is null. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> --- drivers/crypto/ccp/ccp-platform.c | 2 -- 1 file changed, 2 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