summaryrefslogtreecommitdiff
path: root/drivers/staging/rdma
diff options
context:
space:
mode:
authorShivani Bhardwaj <shivanib134@gmail.com>2015-10-15 15:14:41 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-16 23:02:55 -0700
commit6618c051b52ec108f5b5a2deacd70fbaed4b4542 (patch)
tree7b23db30ea99dc57cbe5515858d2d80bb223da8b /drivers/staging/rdma
parent065779434e59efa6252b3ed27df77f2151d47c54 (diff)
Staging: rdma: mad: Remove explicit cast
Explicit type casting is not required as compiler can type cast variables implicitly. Therefore, it should be removed. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rdma')
-rw-r--r--drivers/staging/rdma/hfi1/mad.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/rdma/hfi1/mad.c b/drivers/staging/rdma/hfi1/mad.c
index 58723fb6b8bd..1de282c989b0 100644
--- a/drivers/staging/rdma/hfi1/mad.c
+++ b/drivers/staging/rdma/hfi1/mad.c
@@ -1488,7 +1488,7 @@ static int __subn_get_opa_sl_to_sc(struct opa_smp *smp, u32 am, u8 *data,
u32 *resp_len)
{
struct hfi1_ibport *ibp = to_iport(ibdev, port);
- u8 *p = (u8 *)data;
+ u8 *p = data;
size_t size = ARRAY_SIZE(ibp->sl_to_sc); /* == 32 */
unsigned i;
@@ -1511,7 +1511,7 @@ static int __subn_set_opa_sl_to_sc(struct opa_smp *smp, u32 am, u8 *data,
u32 *resp_len)
{
struct hfi1_ibport *ibp = to_iport(ibdev, port);
- u8 *p = (u8 *)data;
+ u8 *p = data;
int i;
if (am) {
@@ -1530,7 +1530,7 @@ static int __subn_get_opa_sc_to_sl(struct opa_smp *smp, u32 am, u8 *data,
u32 *resp_len)
{
struct hfi1_ibport *ibp = to_iport(ibdev, port);
- u8 *p = (u8 *)data;
+ u8 *p = data;
size_t size = ARRAY_SIZE(ibp->sc_to_sl); /* == 32 */
unsigned i;
@@ -1553,7 +1553,7 @@ static int __subn_set_opa_sc_to_sl(struct opa_smp *smp, u32 am, u8 *data,
u32 *resp_len)
{
struct hfi1_ibport *ibp = to_iport(ibdev, port);
- u8 *p = (u8 *)data;
+ u8 *p = data;
int i;
if (am) {