All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] toshiba_haps: Small updates to driver code
@ 2016-09-07 15:28 Azael Avalos
  2016-09-07 15:28 ` [PATCH 1/2] toshiba_haps: Split ACPI status error check from HDD protection support Azael Avalos
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Azael Avalos @ 2016-09-07 15:28 UTC (permalink / raw)
  To: Darren Hart, platform-driver-x86, linux-kernel; +Cc: Azael Avalos

These two patches make some small changes to the driver code, the first
splits the error check fro the ACPI status and the HDD protection, and
the second simply changes the printing level of two strings from info
to debug.

Azael Avalos (2):
  toshiba_haps: Split ACPI status error check from HDD protection
    support
  toshiba_haps: Change the error logging level from info to debug

 drivers/platform/x86/toshiba_haps.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] toshiba_haps: Split ACPI status error check from HDD protection support
  2016-09-07 15:28 [PATCH 0/2] toshiba_haps: Small updates to driver code Azael Avalos
@ 2016-09-07 15:28 ` Azael Avalos
  2016-09-07 15:28 ` [PATCH 2/2] toshiba_haps: Change the error logging level from info to debug Azael Avalos
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Azael Avalos @ 2016-09-07 15:28 UTC (permalink / raw)
  To: Darren Hart, platform-driver-x86, linux-kernel; +Cc: Azael Avalos

Currently the code checking for the ACPI status is mixed along with
the actual HDD protection status check.

This patch splits those two checks are they are not related, printing
an error string in case the ACPI call failed, and then check for
actual HDD protection status.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
---
 drivers/platform/x86/toshiba_haps.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/toshiba_haps.c b/drivers/platform/x86/toshiba_haps.c
index 7f2afc6..094f3a8 100644
--- a/drivers/platform/x86/toshiba_haps.c
+++ b/drivers/platform/x86/toshiba_haps.c
@@ -168,9 +168,13 @@ static int toshiba_haps_available(acpi_handle handle)
 	 * A non existent device as well as having (only)
 	 * Solid State Drives can cause the call to fail.
 	 */
-	status = acpi_evaluate_integer(handle, "_STA", NULL,
-				       &hdd_present);
-	if (ACPI_FAILURE(status) || !hdd_present) {
+	status = acpi_evaluate_integer(handle, "_STA", NULL, &hdd_present);
+	if (ACPI_FAILURE(status)) {
+		pr_err("ACPI call to query HDD protection failed\n");
+		return 0;
+	}
+
+	if (!hdd_present) {
 		pr_info("HDD protection not available or using SSD\n");
 		return 0;
 	}
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] toshiba_haps: Change the error logging level from info to debug
  2016-09-07 15:28 [PATCH 0/2] toshiba_haps: Small updates to driver code Azael Avalos
  2016-09-07 15:28 ` [PATCH 1/2] toshiba_haps: Split ACPI status error check from HDD protection support Azael Avalos
@ 2016-09-07 15:28 ` Azael Avalos
  2016-09-07 15:28 ` [PATCH] toshiba_bluetooth: Decouple an error checking status code Azael Avalos
  2016-09-23 23:19 ` [PATCH 0/2] toshiba_haps: Small updates to driver code Darren Hart
  3 siblings, 0 replies; 6+ messages in thread
From: Azael Avalos @ 2016-09-07 15:28 UTC (permalink / raw)
  To: Darren Hart, platform-driver-x86, linux-kernel; +Cc: Azael Avalos

Two of the internal functions are printing an info message, one
whenever the HDD protection level changes, and another when the
driver receives an ACPI event.

This patch changes those two prints to debug, as that information
is more pertaining to debuging purposes.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
---
 drivers/platform/x86/toshiba_haps.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/toshiba_haps.c b/drivers/platform/x86/toshiba_haps.c
index 094f3a8..b3dec52 100644
--- a/drivers/platform/x86/toshiba_haps.c
+++ b/drivers/platform/x86/toshiba_haps.c
@@ -59,7 +59,7 @@ static int toshiba_haps_protection_level(acpi_handle handle, int level)
 		return -EIO;
 	}
 
-	pr_info("HDD protection level set to: %d\n", level);
+	pr_debug("HDD protection level set to: %d\n", level);
 
 	return 0;
 }
@@ -141,7 +141,7 @@ static struct attribute_group haps_attr_group = {
  */
 static void toshiba_haps_notify(struct acpi_device *device, u32 event)
 {
-	pr_info("Received event: 0x%x", event);
+	pr_debug("Received event: 0x%x", event);
 
 	acpi_bus_generate_netlink_event(device->pnp.device_class,
 					dev_name(&device->dev),
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] toshiba_bluetooth: Decouple an error checking status code
  2016-09-07 15:28 [PATCH 0/2] toshiba_haps: Small updates to driver code Azael Avalos
  2016-09-07 15:28 ` [PATCH 1/2] toshiba_haps: Split ACPI status error check from HDD protection support Azael Avalos
  2016-09-07 15:28 ` [PATCH 2/2] toshiba_haps: Change the error logging level from info to debug Azael Avalos
@ 2016-09-07 15:28 ` Azael Avalos
  2016-09-23 23:19   ` Darren Hart
  2016-09-23 23:19 ` [PATCH 0/2] toshiba_haps: Small updates to driver code Darren Hart
  3 siblings, 1 reply; 6+ messages in thread
From: Azael Avalos @ 2016-09-07 15:28 UTC (permalink / raw)
  To: Darren Hart, platform-driver-x86, linux-kernel; +Cc: Azael Avalos

This patch simply decouples te error checking of the ACPI status and
the actual BT status, as those two were nested in an if/else check,
but are completely unrelated.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
---
 drivers/platform/x86/toshiba_bluetooth.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/toshiba_bluetooth.c b/drivers/platform/x86/toshiba_bluetooth.c
index 5db495dd..be1d137 100644
--- a/drivers/platform/x86/toshiba_bluetooth.c
+++ b/drivers/platform/x86/toshiba_bluetooth.c
@@ -80,7 +80,9 @@ static int toshiba_bluetooth_present(acpi_handle handle)
 	if (ACPI_FAILURE(result)) {
 		pr_err("ACPI call to query Bluetooth presence failed\n");
 		return -ENXIO;
-	} else if (!bt_present) {
+	}
+
+	if (!bt_present) {
 		pr_info("Bluetooth device not present\n");
 		return -ENODEV;
 	}
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] toshiba_haps: Small updates to driver code
  2016-09-07 15:28 [PATCH 0/2] toshiba_haps: Small updates to driver code Azael Avalos
                   ` (2 preceding siblings ...)
  2016-09-07 15:28 ` [PATCH] toshiba_bluetooth: Decouple an error checking status code Azael Avalos
@ 2016-09-23 23:19 ` Darren Hart
  3 siblings, 0 replies; 6+ messages in thread
From: Darren Hart @ 2016-09-23 23:19 UTC (permalink / raw)
  To: Azael Avalos; +Cc: platform-driver-x86, linux-kernel

On Wed, Sep 07, 2016 at 09:28:12AM -0600, Azael Avalos wrote:
> These two patches make some small changes to the driver code, the first
> splits the error check fro the ACPI status and the HDD protection, and
> the second simply changes the printing level of two strings from info
> to debug.

Queued, thanks Azael.

After reviewing the history of this tree and following the approach of the ACPI
tree, I've started prefixing commit subjects with "platform/x86: DRIVERNAME:
MESSAGE". Please use this format in the future (not a big deal, but it's nice
when your subject is the same as the one I submit).

Thanks (and sorry for the delay).

> 
> Azael Avalos (2):
>   toshiba_haps: Split ACPI status error check from HDD protection
>     support
>   toshiba_haps: Change the error logging level from info to debug
> 
>  drivers/platform/x86/toshiba_haps.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> -- 
> 2.9.3
> 
> 

-- 
Darren Hart
Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] toshiba_bluetooth: Decouple an error checking status code
  2016-09-07 15:28 ` [PATCH] toshiba_bluetooth: Decouple an error checking status code Azael Avalos
@ 2016-09-23 23:19   ` Darren Hart
  0 siblings, 0 replies; 6+ messages in thread
From: Darren Hart @ 2016-09-23 23:19 UTC (permalink / raw)
  To: Azael Avalos; +Cc: platform-driver-x86, linux-kernel

On Wed, Sep 07, 2016 at 09:28:15AM -0600, Azael Avalos wrote:
> This patch simply decouples te error checking of the ACPI status and
> the actual BT status, as those two were nested in an if/else check,
> but are completely unrelated.
> 
> Signed-off-by: Azael Avalos <coproscefalo@gmail.com>

Queued, thanks.

-- 
Darren Hart
Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-09-23 23:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-07 15:28 [PATCH 0/2] toshiba_haps: Small updates to driver code Azael Avalos
2016-09-07 15:28 ` [PATCH 1/2] toshiba_haps: Split ACPI status error check from HDD protection support Azael Avalos
2016-09-07 15:28 ` [PATCH 2/2] toshiba_haps: Change the error logging level from info to debug Azael Avalos
2016-09-07 15:28 ` [PATCH] toshiba_bluetooth: Decouple an error checking status code Azael Avalos
2016-09-23 23:19   ` Darren Hart
2016-09-23 23:19 ` [PATCH 0/2] toshiba_haps: Small updates to driver code Darren Hart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.