From patchwork Mon May 18 11:25:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 6428181 Return-Path: X-Original-To: patchwork-linux-rdma@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 F3C4C9F318 for ; Mon, 18 May 2015 11:25:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F20BC205EB for ; Mon, 18 May 2015 11:25:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0653020602 for ; Mon, 18 May 2015 11:25:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753915AbbERLZU (ORCPT ); Mon, 18 May 2015 07:25:20 -0400 Received: from mail-bn1bon0091.outbound.protection.outlook.com ([157.56.111.91]:59624 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753742AbbERLZS (ORCPT ); Mon, 18 May 2015 07:25:18 -0400 Received: from BY1PR0201CA0041.namprd02.prod.outlook.com (25.160.191.179) by BN3PR0201MB1027.namprd02.prod.outlook.com (25.161.207.149) with Microsoft SMTP Server (TLS) id 15.1.160.19; Mon, 18 May 2015 11:25:15 +0000 Received: from BY2FFO11FD014.protection.gbl (2a01:111:f400:7c0c::128) by BY1PR0201CA0041.outlook.office365.com (2a01:111:e400:4814::51) with Microsoft SMTP Server (TLS) id 15.1.166.22 via Frontend Transport; Mon, 18 May 2015 11:25:15 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.173) smtp.mailfrom=sandisk.com; mellanox.com; dkim=none (message not signed) header.d=none; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.173 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.173; helo=milsmgep12.sandisk.com; Received: from milsmgep12.sandisk.com (63.163.107.173) by BY2FFO11FD014.mail.protection.outlook.com (10.1.14.76) with Microsoft SMTP Server id 15.1.172.14 via Frontend Transport; Mon, 18 May 2015 11:25:13 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com ( [172.22.12.162]) by milsmgep12.sandisk.com (Symantec Messaging Gateway) with SMTP id 0C.27.06265.91CC9555; Mon, 18 May 2015 04:25:13 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.224.2; Mon, 18 May 2015 04:25:12 -0700 X-AuditID: ac160a69-f790f6d000001879-1d-5559cc19d40c Received: from [10.50.231.56] ( [10.177.8.100]) by milsmgip11.sandisk.com (Symantec Messaging Gateway) with SMTP id 89.E7.03643.71CC9555; Mon, 18 May 2015 04:25:12 -0700 (PDT) Message-ID: <5559CC16.1060504@sandisk.com> Date: Mon, 18 May 2015 13:25:10 +0200 From: Bart Van Assche User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Doug Ledford CC: James Bottomley , Sagi Grimberg , Sebastian Parschauer , linux-rdma , "linux-scsi@vger.kernel.org" Subject: [PATCH v2 08/12] IB/srp: Remove superfluous casts References: <5559CB3A.6060102@sandisk.com> In-Reply-To: <5559CB3A.6060102@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjkeLIzCtJLcpLzFFi42JZI8azSFfyTGSowfc5zBYvz39gtfi//jaL xbNDvSwW3dd3sFncaHvAZnHyNr8Dm8ez6YeZPA7/+MHs8efPZ2aP9/uusnl83iQXwBrFZZOS mpNZllqkb5fAlfHy9jumgk7ximMXNjA3MG4V7mLk5JAQMJG4cKaHEcIWk7hwbz0biC0kcIJR 4vFJ2S5GLiB7B6PE2z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mDk6pBsZspZUvG5l/62Z6buw8Pkuz/fsCljkzclcy25b+vl5l G39Gt0dn1Yo9/e4Zz9ru3bvneMiW/8IMtiefl56e1bSianYN29eNtw2OioTl5u7YYD/pQAzL U/0DM4+ms5xfl/XH3sMz/VffnLkzLjwXFPt95MnOOLeom3Y8Vbtd/8rXxMf29uWE+M1TYinO SDTUYi4qTgQA/4viABECAAA= X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD014; 1:Td8+VSkFHHX76O2IwUTxXCiCM2/YnF5lRa4y6tRYBpbxlLqmSzSWILfwHvom66nrYleaMA+x+QCL9DS2W4v4ZNHEwPEYsF2FcCzIKli07HUcicjJXtvDF+zvIBA42tml5tB5lGIfm4F+DH4c5ethrzmFhjhWgDPoj3fNTzk2zVxag+VoFZHkaOAYvE/mkjcKln8FNGOpvKyFLq42MQUGfnZ3LMf/RbyEKXZMNHZXNYIggAH1/FVbBrmiLGBMOVfOy2faGRorN4YOiA/hxEF8aEE8GUA07/vwSoZEdPJod0ghjZyOtOS76NMxFZriMu9sUeB2inca8dTK/HMZrC6QZQ== X-Forefront-Antispam-Report: CIP:63.163.107.173; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(438002)(199003)(189002)(87936001)(92566002)(33656002)(229853001)(46102003)(83506001)(59896002)(64126003)(23676002)(106466001)(86362001)(110136002)(4001350100001)(189998001)(5001830100001)(5001960100002)(5001920100001)(50986999)(76176999)(64706001)(87266999)(54356999)(47776003)(65956001)(65816999)(65806001)(5001860100001)(77096005)(4001540100001)(19580395003)(19580405001)(80316001)(77156002)(62966003)(69596002)(50466002)(68736005)(81156007)(97736004)(36756003)(2950100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0201MB1027; H:milsmgep12.sandisk.com; FPR:; SPF:Pass; PTR:ErrorRetry; A:1; MX:1; LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0201MB1027; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:BN3PR0201MB1027; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0201MB1027; X-Forefront-PRVS: 058043A388 X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2015 11:25:13.0600 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.173]; Helo=[milsmgep12.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0201MB1027 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@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 A long time ago the data type int64_t was declared as long long on x86 systems and as long on PPC systems. Today that data type is declared as long long on all Linux architectures. This means that the casts from uint64_t into unsigned long long are superfluous. Remove these superfluous casts. Signed-off-by: Bart Van Assche Reviewed-by: Sagi Grimberg Cc: Sebastian Parschauer --- drivers/infiniband/ulp/srp/ib_srp.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 982e329..6025fb8 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -796,7 +796,7 @@ static int srp_send_req(struct srp_rdma_ch *ch, bool multich) shost_printk(KERN_DEBUG, target->scsi_host, PFX "Topspin/Cisco initiator port ID workaround " "activated for target GUID %016llx\n", - (unsigned long long) be64_to_cpu(target->ioc_guid)); + be64_to_cpu(target->ioc_guid)); memset(req->priv.initiator_port_id, 0, 8); memcpy(req->priv.initiator_port_id + 8, &target->srp_host->srp_dev->dev->node_guid, 8); @@ -2574,8 +2574,7 @@ static ssize_t show_id_ext(struct device *dev, struct device_attribute *attr, { struct srp_target_port *target = host_to_target(class_to_shost(dev)); - return sprintf(buf, "0x%016llx\n", - (unsigned long long) be64_to_cpu(target->id_ext)); + return sprintf(buf, "0x%016llx\n", be64_to_cpu(target->id_ext)); } static ssize_t show_ioc_guid(struct device *dev, struct device_attribute *attr, @@ -2583,8 +2582,7 @@ static ssize_t show_ioc_guid(struct device *dev, struct device_attribute *attr, { struct srp_target_port *target = host_to_target(class_to_shost(dev)); - return sprintf(buf, "0x%016llx\n", - (unsigned long long) be64_to_cpu(target->ioc_guid)); + return sprintf(buf, "0x%016llx\n", be64_to_cpu(target->ioc_guid)); } static ssize_t show_service_id(struct device *dev, @@ -2592,8 +2590,7 @@ static ssize_t show_service_id(struct device *dev, { struct srp_target_port *target = host_to_target(class_to_shost(dev)); - return sprintf(buf, "0x%016llx\n", - (unsigned long long) be64_to_cpu(target->service_id)); + return sprintf(buf, "0x%016llx\n", be64_to_cpu(target->service_id)); } static ssize_t show_pkey(struct device *dev, struct device_attribute *attr, @@ -2784,7 +2781,7 @@ static int srp_add_target(struct srp_host *host, struct srp_target_port *target) target->state = SRP_TARGET_SCANNING; sprintf(target->target_name, "SRP.T10:%016llX", - (unsigned long long) be64_to_cpu(target->id_ext)); + be64_to_cpu(target->id_ext)); if (scsi_add_host(target->scsi_host, host->srp_dev->dev->dma_device)) return -ENODEV;