From mboxrd@z Thu Jan 1 00:00:00 1970 From: Moni Shoua Subject: Re: [patch] IB/rxe: Remove unneeded cast in rxe_srq_from_attr() Date: Thu, 17 Nov 2016 15:51:17 +0200 Message-ID: References: <20161117110005.GB32143@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <20161117110005.GB32143@mwanda> Sender: kernel-janitors-owner@vger.kernel.org To: Dan Carpenter Cc: Doug Ledford , Sean Hefty , Hal Rosenstock , linux-rdma , kernel-janitors@vger.kernel.org List-Id: linux-rdma@vger.kernel.org On Thu, Nov 17, 2016 at 1:00 PM, Dan Carpenter wrote: > It makes me nervous when we cast pointer parameters. I would estimate > that around 50% of the time, it indicates a bug. Here the cast is not > needed becaue u32 and and unsigned int are the same thing. Removing the > cast makes the code more robust and future proof in case any of the > types change. > > Signed-off-by: Dan Carpenter Acked-by: Moni Shoua From mboxrd@z Thu Jan 1 00:00:00 1970 From: Moni Shoua Date: Thu, 17 Nov 2016 13:51:17 +0000 Subject: Re: [patch] IB/rxe: Remove unneeded cast in rxe_srq_from_attr() Message-Id: List-Id: References: <20161117110005.GB32143@mwanda> In-Reply-To: <20161117110005.GB32143@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Dan Carpenter Cc: Doug Ledford , Sean Hefty , Hal Rosenstock , linux-rdma , kernel-janitors@vger.kernel.org On Thu, Nov 17, 2016 at 1:00 PM, Dan Carpenter wrote: > It makes me nervous when we cast pointer parameters. I would estimate > that around 50% of the time, it indicates a bug. Here the cast is not > needed becaue u32 and and unsigned int are the same thing. Removing the > cast makes the code more robust and future proof in case any of the > types change. > > Signed-off-by: Dan Carpenter Acked-by: Moni Shoua