mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cyril Roelandt <tipecaml@gmail.com>
To: kernel-janitors@vger.kernel.org, gregkh@linuxfoundation.org,
	andreas.dilger@intel.com, tao.peng@emc.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Cc: Cyril Roelandt <tipecaml@gmail.com>
Subject: [PATCH] staging: lustre: fix return type of lo_release.
Date: Thu, 16 May 2013 18:06:20 +0200	[thread overview]
Message-ID: <1368720380-20974-1-git-send-email-tipecaml@gmail.com> (raw)

The return type of block_device_operations.release() changed to void in commit
db2a144b.

Found with the following Coccinelle patch:
<smpl>
@has_release_func@
identifier i;
identifier release_func;
@@
struct block_device_operations i = {
 .release = release_func
};

@depends on has_release_func@
identifier has_release_func.release_func;
@@
- int
+ void
release_func(...) {
...
- return ...;
}
</smpl>

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
---
 drivers/staging/lustre/lustre/llite/lloop.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/lloop.c b/drivers/staging/lustre/lustre/llite/lloop.c
index b72f257..9d4c17e 100644
--- a/drivers/staging/lustre/lustre/llite/lloop.c
+++ b/drivers/staging/lustre/lustre/llite/lloop.c
@@ -596,15 +596,13 @@ static int lo_open(struct block_device *bdev, fmode_t mode)
 	return 0;
 }
 
-static int lo_release(struct gendisk *disk, fmode_t mode)
+static void lo_release(struct gendisk *disk, fmode_t mode)
 {
 	struct lloop_device *lo = disk->private_data;
 
 	mutex_lock(&lo->lo_ctl_mutex);
 	--lo->lo_refcnt;
 	mutex_unlock(&lo->lo_ctl_mutex);
-
-	return 0;
 }
 
 /* lloop device node's ioctl function. */
-- 
1.7.10.4


             reply	other threads:[~2013-05-16 16:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-16 16:06 Cyril Roelandt [this message]
2013-05-16 19:01 ` Greg KH
2013-05-16 21:09   ` Cyril Roelandt
2013-05-17  3:03   ` Peng, Tao
2013-05-17  0:56 ` Peng, Tao

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=1368720380-20974-1-git-send-email-tipecaml@gmail.com \
    --to=tipecaml@gmail.com \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tao.peng@emc.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

all inboxes | Powered by JetHome®