From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751609AbcFDR2n (ORCPT ); Sat, 4 Jun 2016 13:28:43 -0400 Received: from mail1.bemta12.messagelabs.com ([216.82.251.10]:28059 "EHLO mail1.bemta12.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751141AbcFDR1u (ORCPT ); Sat, 4 Jun 2016 13:27:50 -0400 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrNIsWRWlGSWpSXmKPExsVywNY2U3cCf3C 4wYrrohYL25awWFzeNYfNgcnj8ya5AMYo1sy8pPyKBNaMlpfzmAo6JSpW/LvO0sC4VqSLkYtD SGAXo8T8yX+ZIZxDjBJbpixhhHM2XVzOBuFcYpRoOLCJFcJZC5RpXABVtoVRYs3LBexdjJwcb AIGEjPv3AWzRQTOs0g8vZULYgsLeEts33mKBcRmEVCRmLPpBBuIzSvgKfF96kxWEFtCQE7i5L HJYDangJfElQdLmUBsIaCaPft7mCFsNYnDZx+xQdQHS3x4thVqjqDEyZlPwOYzC0hIHHzxgnk Co9AsJKlZSFILGJlWMWoUpxaVpRbpGhnoJRVlpmeU5CZm5ugaGhrp5aYWFyemp+YkJhXrJefn bmIEBnI9AwPjDsZZjV6HGCU5mJREeafODwoX4kvKT6nMSCzOiC8qzUktPsQow8GhJMH7nzc4X EiwKDU9tSItMwcYUzBpCQ4eJRFeIz6gNG9xQWJucWY6ROoUo6KUOG83SEIAJJFRmgfXBovjS4 yyUsK8jAwMDEI8BalFuZklqPKvGMU5GJWEeRlApvBk5pXATX8FtJgJaHHBI3+QxSWJCCmpBsZ pZpeuXC+OnSb20vOuWhlru8PSbY6VmdG1f+8pn23dX/g4y2W9knXhSUvOHSyzXcLXuf+dExOy 7IXwzZ+r4+y8NzEbMiw2vh7LtJx3WmcEQ/6C5KU7p/1//1JcVHhf5neRlo/BvV4nAl/lKAsGn yxze3nw1idHwcwJhxZt1pV629r++Ovm75pKLMUZiYZazEXFiQCSS8HD3gIAAA== X-Env-Sender: David.Kershner@unisys.com X-Msg-Ref: server-10.tower-200.messagelabs.com!1465061259!5341973!12 X-Originating-IP: [192.61.61.105] X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked From: David Kershner To: , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v3 01/30] staging: unisys: visorbus change -1 return values Date: Sat, 4 Jun 2016 13:27:01 -0400 Message-ID: <1465061250-18551-2-git-send-email-david.kershner@unisys.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465061250-18551-1-git-send-email-david.kershner@unisys.com> References: <1465061250-18551-1-git-send-email-david.kershner@unisys.com> X-OriginalArrivalTime: 04 Jun 2016 17:27:35.0899 (UTC) FILETIME=[62908AB0:01D1BE86] MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Erik Arfvidson This patch removes the vague -1 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 Signed-off-by: David Kershner Reviewed-by: Tim Sell --- 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 3a147db..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 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 -1; + return; - if (visorchannel_write(chan, off, info, sizeof(*info)) < 0) - return -1; - return 0; + visorchannel_write(chan, off, info, sizeof(*info)); } /* Write the contents of 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 -1; + return; - if (visorchannel_write(chan, off, info, sizeof(*info)) < 0) - return -1; - return 0; + visorchannel_write(chan, off, info, sizeof(*info)); } /* Write the contents of to the * struct spar_vbus_channel_protocol.dev_info[]. + * + * 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 -1; + return; - if (visorchannel_write(chan, off, info, sizeof(*info)) < 0) - return -1; - return 0; + visorchannel_write(chan, off, info, sizeof(*info)); } /* For a child device just created on a client bus, fill in -- 1.9.1