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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 15 Mar 2013 09:00:19 -0400
From:	Eduardo Valentin <eduardo.valentin@...com>
To:	<gregkh@...uxfoundation.org>
CC:	<devel@...verdev.osuosl.org>, <linux-omap@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <linux-pm@...r.kernel.org>,
	Eduardo Valentin <eduardo.valentin@...com>
Subject: [PATCH 31/50] staging: omap-thermal: refactor temp_sensor_unmask_interrupts

This change improves temp_sensor_unmask_interrupts by:
. renaming it to omap_bandgap_unmask_interrupts
. making it a void function, as there is nothing really to report an error.

Signed-off-by: Eduardo Valentin <eduardo.valentin@...com>
---
 drivers/staging/omap-thermal/omap-bandgap.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap-bandgap.c
index f86c104..26d36f3 100644
--- a/drivers/staging/omap-thermal/omap-bandgap.c
+++ b/drivers/staging/omap-thermal/omap-bandgap.c
@@ -338,8 +338,8 @@ exit:
 /***   Helper functions handling device Alert/Shutdown signals   ***/
 
 /* Talert masks. Call it only if HAS(TALERT) is set */
-static int temp_sensor_unmask_interrupts(struct omap_bandgap *bg_ptr, int id,
-					 u32 t_hot, u32 t_cold)
+static void omap_bandgap_unmask_interrupts(struct omap_bandgap *bg_ptr, int id,
+					   u32 t_hot, u32 t_cold)
 {
 	struct temp_sensor_registers *tsr;
 	u32 temp, reg_val;
@@ -360,8 +360,6 @@ static int temp_sensor_unmask_interrupts(struct omap_bandgap *bg_ptr, int id,
 	else
 		reg_val &= ~tsr->mask_cold_mask;
 	omap_bandgap_writel(bg_ptr, reg_val, tsr->bgap_mask_ctrl);
-
-	return 0;
 }
 
 /* Talert Thot threshold. Call it only if HAS(TALERT) is set */
@@ -399,7 +397,9 @@ int temp_sensor_configure_thot(struct omap_bandgap *bg_ptr, int id, int t_hot)
 		return -EIO;
 	}
 
-	return temp_sensor_unmask_interrupts(bg_ptr, id, t_hot, cold);
+	omap_bandgap_unmask_interrupts(bg_ptr, id, t_hot, cold);
+
+	return 0;
 }
 
 /* Talert Tcold threshold. Call it only if HAS(TALERT) is set */
@@ -438,7 +438,9 @@ int temp_sensor_configure_tcold(struct omap_bandgap *bg_ptr, int id,
 		return -EIO;
 	}
 
-	return temp_sensor_unmask_interrupts(bg_ptr, id, hot, t_cold);
+	omap_bandgap_unmask_interrupts(bg_ptr, id, hot, t_cold);
+
+	return 0;
 }
 
 #define bandgap_is_valid(b)						\
-- 
1.7.7.1.488.ge8e1c

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ