Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1417892
| Path | csiph.com!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | David Kershner <david.kershner@unisys.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH v4 01/29] staging: unisys: visorbus: remove return values for write_vbus functions |
| Date | Wed, 08 Jun 2016 23:30:01 +0200 |
| Message-ID | <rHTcZ-5vo-7@gated-at.bofh.it> (permalink) |
| References | <rHT3k-5qw-5@gated-at.bofh.it> |
| X-Brightmail-Tracker | H4sIAAAAAAAAA+NgFtrNIsWRWlGSWpSXmKPExsVywNY2U3dbV0S 4wcVmTYuFbUtYLC7vmsPmwOTxeZNcAGMUa2ZeUn5FAmvGuSnSBQskKu4f/8rawHhMpIuRi0NI YBejRN/rSWwQzn5GiR+/nkI5lxgl5k05zQThrGWUOLf4HyOEs4VRonHuI6AMJwebgIHEzDt32 UFsEYHzLBJPb+V2MXJwCAskSTy9lAISZhFQkXhycD8riM0r4ClxcvlcFhBbQkBO4uSxyWBxTg EviYe/1oKNFAKqaXn3mB3CVpM4fPYRG8hICYFgiU0HVSDGCEqcnPkEbAyzgITEwRcvmCcwCs5 CkpqFJLWAkWkVo0ZxalFZapGuoZleUlFmekZJbmJmjq6hgYVebmpxcWJ6ak5iUrFecn7uJkZg oNYzMDDuYJyw2/0QoyQHk5Iob5l7RLgQX1J+SmVGYnFGfFFpTmrxIUYZDg4lCd7kTqCcYFFqe mpFWmYOMGZg0hIcPEoivCdB0rzFBYm5xZnpEKlTjIpS4ryLQRICIImM0jy4NlicXmKUlRLmZW RgYBDiKUgtys0sQZV/xSjOwagkzLsMZApPZl4J3PRXQIuZgBYvPxIOsrgkESEl1cCYViPu/3e Ro/IDBZElOezBm1iZW4tUPZ9tkN+WIrx0ipV/QL/b05hT+mEri17xnuC0P/hL38h1hpLw6zML rUu0t2yPKQtzfvDv5iaNCTyntrSeW9Y1K55525Hc/urHOqechRXa5LckPVgVea2fddu6xef53 Mr8lN6sMt4XyXROS6ZG8NVmrQIlluKMREMt5qLiRABH3YcEzgIAAA== |
| X-Env-Sender | David.Kershner@unisys.com |
| X-Msg-Ref | server-14.tower-46.messagelabs.com!1465420467!29094340!11 |
| X-Originating-IP | [192.61.61.105] |
| X-Starscan-Version | 8.46; banners=-,-,- |
| X-Viruschecked | Checked |
| X-Mailer | git-send-email 1.9.1 |
| X-Originalarrivaltime | 08 Jun 2016 21:14:27.0325 (UTC) FILETIME=[BD4252D0:01D1C1CA] |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 96 |
| Organization | linux.* mail to news gateway |
| X-Original-Date | Wed, 8 Jun 2016 17:13:55 -0400 |
| X-Original-Message-ID | <1465420463-24982-2-git-send-email-david.kershner@unisys.com> |
| X-Original-References | <1465420463-24982-1-git-send-email-david.kershner@unisys.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1417892 |
Show key headers only | View raw
From: Erik Arfvidson <erik.arfvidson@unisys.com> This patch removes the return values from the write_vbus_* channel functions. Nobody was checking the return values and the value stored into the vbus info is not critical to the functioning of the device. Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <Timothy.Sell@unisys.com> --- drivers/staging/unisys/visorbus/visorbus_main.c | 33 ++++++++++++++----------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index d32b898..2ed9628 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -866,9 +866,12 @@ get_vbus_header_info(struct visorchannel *chan, /* Write the contents of <info> to the struct * spar_vbus_channel_protocol.chp_info. + * + * Returns void since this is debug information and not needed for + * device functionality. */ -static int +static void write_vbus_chp_info(struct visorchannel *chan, struct spar_vbus_headerinfo *hdr_info, struct ultra_vbus_deviceinfo *info) @@ -876,18 +879,19 @@ write_vbus_chp_info(struct visorchannel *chan, int off = sizeof(struct channel_header) + hdr_info->chp_info_offset; if (hdr_info->chp_info_offset == 0) - return -EFAULT; + return; - if (visorchannel_write(chan, off, info, sizeof(*info)) < 0) - return -EFAULT; - return 0; + visorchannel_write(chan, off, info, sizeof(*info)); } /* Write the contents of <info> to the struct * spar_vbus_channel_protocol.bus_info. + * + * Returns void since this is debug information and not needed for + * device functionality. */ -static int +static void write_vbus_bus_info(struct visorchannel *chan, struct spar_vbus_headerinfo *hdr_info, struct ultra_vbus_deviceinfo *info) @@ -895,17 +899,18 @@ write_vbus_bus_info(struct visorchannel *chan, int off = sizeof(struct channel_header) + hdr_info->bus_info_offset; if (hdr_info->bus_info_offset == 0) - return -EFAULT; + return; - if (visorchannel_write(chan, off, info, sizeof(*info)) < 0) - return -EFAULT; - return 0; + visorchannel_write(chan, off, info, sizeof(*info)); } /* Write the contents of <info> to the * struct spar_vbus_channel_protocol.dev_info[<devix>]. + * + * Returns void since this is debug information and not needed for + * device functionality. */ -static int +static void write_vbus_dev_info(struct visorchannel *chan, struct spar_vbus_headerinfo *hdr_info, struct ultra_vbus_deviceinfo *info, int devix) @@ -915,11 +920,9 @@ write_vbus_dev_info(struct visorchannel *chan, (hdr_info->device_info_struct_bytes * devix); if (hdr_info->dev_info_offset == 0) - return -EFAULT; + return; - if (visorchannel_write(chan, off, info, sizeof(*info)) < 0) - return -EFAULT; - return 0; + visorchannel_write(chan, off, info, sizeof(*info)); } /* For a child device just created on a client bus, fill in -- 1.9.1
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH v4 01/29] staging: unisys: visorbus: remove return values for write_vbus functions David Kershner <david.kershner@unisys.com> - 2016-06-08 23:30 +0200
csiph-web