From patchwork Mon Jan 8 11:51:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rakesh Pandit X-Patchwork-Id: 10149285 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8A93C60210 for ; Mon, 8 Jan 2018 11:51:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F4D227F8F for ; Mon, 8 Jan 2018 11:51:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63D28286A2; Mon, 8 Jan 2018 11:51:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 498F427F8F for ; Mon, 8 Jan 2018 11:51:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754588AbeAHLvX (ORCPT ); Mon, 8 Jan 2018 06:51:23 -0500 Received: from mx2.mpynet.fi ([82.197.21.85]:43961 "EHLO mx2.mpynet.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754572AbeAHLvX (ORCPT ); Mon, 8 Jan 2018 06:51:23 -0500 Date: Mon, 8 Jan 2018 13:51:20 +0200 From: Rakesh Pandit To: , CC: Jens Axboe , Bart Van Assche , Omar Sandoval , Jan Kara Subject: [PATCH] block: remove unused return type for invalidate_partitions Message-ID: <20180108115119.GA3852@dhcp-108-107.ws.tuxera.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.7.1 (2016-10-04) X-ClientProxiedBy: tuxera-exch.ad.tuxera.com (10.20.48.11) To tuxera-exch.ad.tuxera.com (10.20.48.11) Received-SPF: none Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Rakesh Pandit --- block/partition-generic.c | 8 ++++---- include/linux/genhd.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/block/partition-generic.c b/block/partition-generic.c index 91622db..8df0d03 100644 --- a/block/partition-generic.c +++ b/block/partition-generic.c @@ -623,16 +623,16 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev) return 0; } -int invalidate_partitions(struct gendisk *disk, struct block_device *bdev) +void invalidate_partitions(struct gendisk *disk, struct block_device *bdev) { int res; if (!bdev->bd_invalidated) - return 0; + return; res = drop_partitions(disk, bdev); if (res) - return res; + return; set_capacity(disk, 0); check_disk_size_change(disk, bdev); @@ -640,7 +640,7 @@ int invalidate_partitions(struct gendisk *disk, struct block_device *bdev) /* tell userspace that the media / partition table may have changed */ kobject_uevent(&disk_to_dev(disk)->kobj, KOBJ_CHANGE); - return 0; + return; } unsigned char *read_dev_sector(struct block_device *bdev, sector_t n, Sector *p) diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 5144ebe..683de33 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -584,7 +584,8 @@ extern char *disk_name (struct gendisk *hd, int partno, char *buf); extern int disk_expand_part_tbl(struct gendisk *disk, int target); extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); -extern int invalidate_partitions(struct gendisk *disk, struct block_device *bdev); +extern void invalidate_partitions(struct gendisk *disk, struct block_device + *bdev); extern struct hd_struct * __must_check add_partition(struct gendisk *disk, int partno, sector_t start, sector_t len, int flags,