All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: yanjun.zhu@linux.dev, mustafa.ismail@intel.com,
	shiraz.saleem@intel.com, linux-rdma@vger.kernel.org
Subject: Re: [PATCH 1/1] RDMA/irdma: Remove the redundant return
Date: Mon, 10 Jan 2022 15:03:36 +0200	[thread overview]
Message-ID: <YdwuqDCMQjLKRESJ@unreal> (raw)
In-Reply-To: <20220110125407.GE6467@ziepe.ca>

On Mon, Jan 10, 2022 at 08:54:07AM -0400, Jason Gunthorpe wrote:
> On Sun, Jan 09, 2022 at 08:44:55PM +0200, Leon Romanovsky wrote:
> > On Mon, Jan 10, 2022 at 02:37:33AM -0500, yanjun.zhu@linux.dev wrote:
> > > From: Zhu Yanjun <yanjun.zhu@linux.dev>
> > > 
> > > The type of the function i40iw_remove is void. So remove
> > > the unnecessary return.
> > > 
> > > Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
> > >  drivers/infiniband/hw/irdma/i40iw_if.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/infiniband/hw/irdma/i40iw_if.c b/drivers/infiniband/hw/irdma/i40iw_if.c
> > > index d219f64b2c3d..43e962b97d6a 100644
> > > +++ b/drivers/infiniband/hw/irdma/i40iw_if.c
> > > @@ -198,7 +198,7 @@ static void i40iw_remove(struct auxiliary_device *aux_dev)
> > >  							       aux_dev);
> > >  	struct i40e_info *cdev_info = i40e_adev->ldev;
> > >  
> > > -	return i40e_client_device_unregister(cdev_info);
> > > +	i40e_client_device_unregister(cdev_info);
> > 
> > I'm surprised that compiler didn't warn about extra parameter to return.
> 
> It is odd, but valid, C to return void like this..

Any idea where such C expression can be useful?

Thanks

> 
> Jason

  reply	other threads:[~2022-01-10 13:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10  7:37 [PATCH 1/1] RDMA/irdma: Remove the redundant return yanjun.zhu
2022-01-09 18:44 ` Leon Romanovsky
2022-01-10 12:54   ` Jason Gunthorpe
2022-01-10 13:03     ` Leon Romanovsky [this message]
2022-01-10 13:25 ` Saleem, Shiraz
2022-01-10 16:49 ` Jason Gunthorpe

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=YdwuqDCMQjLKRESJ@unreal \
    --to=leon@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mustafa.ismail@intel.com \
    --cc=shiraz.saleem@intel.com \
    --cc=yanjun.zhu@linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.