From patchwork Thu Sep 1 20:11:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 9309763 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 4062560760 for ; Thu, 1 Sep 2016 21:32:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08EE329406 for ; Thu, 1 Sep 2016 21:32:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F18EC2954E; Thu, 1 Sep 2016 21:32:29 +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=unavailable 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 417FB29406 for ; Thu, 1 Sep 2016 21:32:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934175AbcIAVaV (ORCPT ); Thu, 1 Sep 2016 17:30:21 -0400 Received: from smtprelay0198.hostedemail.com ([216.40.44.198]:43465 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933523AbcIAVaS (ORCPT ); Thu, 1 Sep 2016 17:30:18 -0400 Received: from smtprelay.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by smtpgrave01.hostedemail.com (Postfix) with ESMTP id 5C7365E8F1; Thu, 1 Sep 2016 20:11:43 +0000 (UTC) Received: from filter.hostedemail.com (unknown [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id 05FAD268E13; Thu, 1 Sep 2016 20:11:41 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: quiet41_65bfe2ccc5a57 X-Filterd-Recvd-Size: 7606 Received: from joe-laptop.perches.com (unknown [96.251.125.34]) (Authenticated sender: joe@perches.com) by omf04.hostedemail.com (Postfix) with ESMTPA; Thu, 1 Sep 2016 20:11:38 +0000 (UTC) From: Joe Perches To: Jens Axboe , "Rafael J. Wysocki" , Len Brown , Sebastian Ott , Peter Oberparleiter , Miklos Szeredi , Jiri Kosina Cc: Martin Schwidefsky , Heiko Carstens , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-s390@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH] trivial treewide: Convert dev_set_uevent_suppress argument to bool Date: Thu, 1 Sep 2016 13:11:36 -0700 Message-Id: <699402ce4c488995b4ddabff0f3b262851cf56ac.1472760613.git.joe@perches.com> X-Mailer: git-send-email 2.10.0.rc2.1.g053435c Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Assigning an int to a bitfield:1 can lose precision. Change the caller argument uses from 1/0 to true/false. No change to objects. Signed-off-by: Joe Perches --- block/genhd.c | 4 ++-- block/partition-generic.c | 4 ++-- drivers/acpi/dock.c | 2 +- drivers/s390/cio/chsc_sch.c | 2 +- drivers/s390/cio/css.c | 4 ++-- drivers/s390/cio/device.c | 4 ++-- drivers/s390/cio/eadm_sch.c | 2 +- fs/fuse/cuse.c | 4 ++-- include/linux/device.h | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/block/genhd.c b/block/genhd.c index a178c8e..b242eb5 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -519,7 +519,7 @@ static void register_disk(struct device *parent, struct gendisk *disk) dev_set_name(ddev, "%s", disk->disk_name); /* delay uevents, until we scanned partition table */ - dev_set_uevent_suppress(ddev, 1); + dev_set_uevent_suppress(ddev, true); if (device_add(ddev)) return; @@ -562,7 +562,7 @@ static void register_disk(struct device *parent, struct gendisk *disk) exit: /* announce disk after possible partitions are created */ - dev_set_uevent_suppress(ddev, 0); + dev_set_uevent_suppress(ddev, false); kobject_uevent(&ddev->kobj, KOBJ_ADD); /* announce possible partitions */ diff --git a/block/partition-generic.c b/block/partition-generic.c index 71d9ed9..4465d81 100644 --- a/block/partition-generic.c +++ b/block/partition-generic.c @@ -344,7 +344,7 @@ struct hd_struct *add_partition(struct gendisk *disk, int partno, pdev->devt = devt; /* delay uevent until 'holders' subdir is created */ - dev_set_uevent_suppress(pdev, 1); + dev_set_uevent_suppress(pdev, true); err = device_add(pdev); if (err) goto out_put; @@ -354,7 +354,7 @@ struct hd_struct *add_partition(struct gendisk *disk, int partno, if (!p->holder_dir) goto out_del; - dev_set_uevent_suppress(pdev, 0); + dev_set_uevent_suppress(pdev, false); if (flags & ADDPART_FLAG_WHOLEDISK) { err = device_create_file(pdev, &dev_attr_whole_disk); if (err) diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 0c00208..6add25f 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -623,7 +623,7 @@ void acpi_dock_add(struct acpi_device *adev) INIT_LIST_HEAD(&dock_station->dependent_devices); /* we want the dock device to send uevents */ - dev_set_uevent_suppress(&dd->dev, 0); + dev_set_uevent_suppress(&dd->dev, false); if (acpi_dock_match(handle)) dock_station->flags |= DOCK_IS_DOCK; diff --git a/drivers/s390/cio/chsc_sch.c b/drivers/s390/cio/chsc_sch.c index 735052e..f767d0b 100644 --- a/drivers/s390/cio/chsc_sch.c +++ b/drivers/s390/cio/chsc_sch.c @@ -97,7 +97,7 @@ static int chsc_subchannel_probe(struct subchannel *sch) kfree(private); } else { if (dev_get_uevent_suppress(&sch->dev)) { - dev_set_uevent_suppress(&sch->dev, 0); + dev_set_uevent_suppress(&sch->dev, false); kobject_uevent(&sch->dev.kobj, KOBJ_ADD); } } diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 3d2b20e..2b26626 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c @@ -310,7 +310,7 @@ int css_register_subchannel(struct subchannel *sch) * the subchannel driver can decide itself when it wants to inform * userspace of its existence. */ - dev_set_uevent_suppress(&sch->dev, 1); + dev_set_uevent_suppress(&sch->dev, true); css_update_ssd_info(sch); /* make it known to the system */ ret = css_sch_device_register(sch); @@ -325,7 +325,7 @@ int css_register_subchannel(struct subchannel *sch) * a fitting driver module may be loaded based on the * modalias. */ - dev_set_uevent_suppress(&sch->dev, 0); + dev_set_uevent_suppress(&sch->dev, false); kobject_uevent(&sch->dev.kobj, KOBJ_ADD); } return ret; diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 6a58bc8..bfe8056 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c @@ -868,7 +868,7 @@ static void io_subchannel_register(struct ccw_device *cdev) * Now we know this subchannel will stay, we can throw * our delayed uevent. */ - dev_set_uevent_suppress(&sch->dev, 0); + dev_set_uevent_suppress(&sch->dev, false); kobject_uevent(&sch->dev.kobj, KOBJ_ADD); /* make it known to the system */ ret = ccw_device_add(cdev); @@ -1077,7 +1077,7 @@ static int io_subchannel_probe(struct subchannel *sch) * Throw the delayed uevent for the subchannel, register * the ccw_device and exit. */ - dev_set_uevent_suppress(&sch->dev, 0); + dev_set_uevent_suppress(&sch->dev, false); kobject_uevent(&sch->dev.kobj, KOBJ_ADD); cdev = sch_get_cdev(sch); rc = ccw_device_add(cdev); diff --git a/drivers/s390/cio/eadm_sch.c b/drivers/s390/cio/eadm_sch.c index b3f44bc..fcccd74 100644 --- a/drivers/s390/cio/eadm_sch.c +++ b/drivers/s390/cio/eadm_sch.c @@ -251,7 +251,7 @@ static int eadm_subchannel_probe(struct subchannel *sch) spin_unlock_irq(&list_lock); if (dev_get_uevent_suppress(&sch->dev)) { - dev_set_uevent_suppress(&sch->dev, 0); + dev_set_uevent_suppress(&sch->dev, false); kobject_uevent(&sch->dev.kobj, KOBJ_ADD); } out: diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c index c5b6b71..be3867f 100644 --- a/fs/fuse/cuse.c +++ b/fs/fuse/cuse.c @@ -350,7 +350,7 @@ static void cuse_process_init_reply(struct fuse_conn *fc, struct fuse_req *req) goto err_region; device_initialize(dev); - dev_set_uevent_suppress(dev, 1); + dev_set_uevent_suppress(dev, true); dev->class = cuse_class; dev->devt = devt; dev->release = cuse_gendev_release; @@ -391,7 +391,7 @@ static void cuse_process_init_reply(struct fuse_conn *fc, struct fuse_req *req) mutex_unlock(&cuse_lock); /* announce device availability */ - dev_set_uevent_suppress(dev, 0); + dev_set_uevent_suppress(dev, false); kobject_uevent(&dev->kobj, KOBJ_ADD); out: kfree(arg); diff --git a/include/linux/device.h b/include/linux/device.h index 38f0281..69e3c19 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -929,7 +929,7 @@ static inline unsigned int dev_get_uevent_suppress(const struct device *dev) return dev->kobj.uevent_suppress; } -static inline void dev_set_uevent_suppress(struct device *dev, int val) +static inline void dev_set_uevent_suppress(struct device *dev, bool val) { dev->kobj.uevent_suppress = val; }