lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 4 Jun 2016 13:27:01 -0400
From:	David Kershner <david.kershner@...sys.com>
To:	<corbet@....net>, <tglx@...utronix.de>, <mingo@...hat.com>,
	<hpa@...or.com>, <david.kershner@...sys.com>,
	<gregkh@...uxfoundation.org>, <erik.arfvidson@...sys.com>,
	<timothy.sell@...sys.com>, <hofrat@...dl.org>,
	<dzickus@...hat.com>, <jes.sorensen@...hat.com>,
	<alexander.curtin@...sys.com>, <janani.rvchndrn@...il.com>,
	<sudipm.mukherjee@...il.com>, <prarit@...hat.com>,
	<david.binder@...sys.com>, <nhorman@...hat.com>,
	<dan.j.williams@...el.com>, <linux-kernel@...r.kernel.org>,
	<linux-doc@...r.kernel.org>,
	<driverdev-devel@...uxdriverproject.org>,
	<sparmaintainer@...sys.com>
Subject: [PATCH v3 01/30] staging: unisys: visorbus change -1 return values

From: Erik Arfvidson <erik.arfvidson@...sys.com>

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 <erik.arfvidson@...sys.com>
Signed-off-by: David Kershner <david.kershner@...sys.com>
Reviewed-by: Tim Sell <Timothy.Sell@...sys.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 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 <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 -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 <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 -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 <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 -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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ