From: Bart Van Assche <bart.vanassche@sandisk.com>
To: Doug Ledford <dledford@redhat.com>
Cc: James Bottomley <jbottomley@odin.com>,
Sagi Grimberg <sagig@mellanox.com>,
Sebastian Parschauer <sebastian.riemer@profitbricks.com>,
linux-rdma <linux-rdma@vger.kernel.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: [PATCH v2 08/12] IB/srp: Remove superfluous casts
Date: Mon, 18 May 2015 13:25:10 +0200 [thread overview]
Message-ID: <5559CC16.1060504@sandisk.com> (raw)
In-Reply-To: <5559CB3A.6060102@sandisk.com>
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 <bart.vanassche@sandisk.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com>
---
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;
--
2.1.4
next prev parent reply other threads:[~2015-05-18 11:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-18 11:21 [PATCH v2 00/12] IB/srp patches for kernel v4.2 Bart Van Assche
2015-05-18 11:22 ` [PATCH v2 01/12] scsi_transport_srp: Introduce srp_wait_for_queuecommand() Bart Van Assche
2015-05-18 11:24 ` [PATCH v2 06/12] IB/srp: Fix reconnection failure handling Bart Van Assche
2015-05-18 11:25 ` Bart Van Assche [this message]
[not found] ` <5559CB3A.6060102-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2015-05-18 11:22 ` [PATCH v2 02/12] scsi_transport_srp: Fix a race condition Bart Van Assche
2015-05-18 11:23 ` [PATCH v2 03/12] IB/srp: Remove an extraneous scsi_host_put() from an error path Bart Van Assche
2015-05-18 11:23 ` [PATCH v2 04/12] IB/srp: Fix a connection setup race Bart Van Assche
2015-05-18 11:23 ` [PATCH v2 05/12] IB/srp: Fix connection state tracking Bart Van Assche
2015-05-18 11:24 ` [PATCH v2 07/12] scsi_transport_srp: Reduce failover time Bart Van Assche
2015-05-18 11:25 ` [PATCH v2 09/12] IB/srp: Rearrange module description Bart Van Assche
2015-05-18 11:25 ` [PATCH v2 10/12] IB/srp: Remove a superfluous check from srp_free_req_data() Bart Van Assche
2015-05-18 11:26 ` [PATCH v2 11/12] IB/srp: Remove !ch->target tests from the reconnect code Bart Van Assche
2015-05-18 11:27 ` [PATCH v2 12/12] IB/srp: Add 64-bit LUN support Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5559CC16.1060504@sandisk.com \
--to=bart.vanassche@sandisk.com \
--cc=dledford@redhat.com \
--cc=jbottomley@odin.com \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=sagig@mellanox.com \
--cc=sebastian.riemer@profitbricks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox