All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] acpi: compare of array
@ 2012-10-25 14:57 Alan Cox
  2012-10-28 15:44 ` Lekensteyn
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2012-10-25 14:57 UTC (permalink / raw)
  To: lenb, linux-acpi

From: Alan Cox <alan@linux.intel.com>

This serves no purpose as it's an array not a pointer

Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 drivers/acpi/event.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c
index 1442737..f84df83 100644
--- a/drivers/acpi/event.c
+++ b/drivers/acpi/event.c
@@ -67,8 +67,7 @@ acpi_system_read_event(struct file *file, char __user * buffer, size_t count,
 			return result;
 
 		chars_remaining = sprintf(str, "%s %s %08x %08x\n",
-					  event.device_class ? event.
-					  device_class : "<unknown>",
+					  event.device_class : "<unknown>",
 					  event.bus_id ? event.
 					  bus_id : "<unknown>", event.type,
 					  event.data);


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

* Re: [PATCH] acpi: compare of array
  2012-10-25 14:57 [PATCH] acpi: compare of array Alan Cox
@ 2012-10-28 15:44 ` Lekensteyn
  0 siblings, 0 replies; 2+ messages in thread
From: Lekensteyn @ 2012-10-28 15:44 UTC (permalink / raw)
  To: Alan Cox; +Cc: lenb, linux-acpi

On Thursday 25 October 2012 15:57:50 Alan Cox wrote:
> From: Alan Cox <alan@linux.intel.com>
> 
> This serves no purpose as it's an array not a pointer
> 
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> ---
> 
>  drivers/acpi/event.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c
> index 1442737..f84df83 100644
> --- a/drivers/acpi/event.c
> +++ b/drivers/acpi/event.c
> @@ -67,8 +67,7 @@ acpi_system_read_event(struct file *file, char __user *
> buffer, size_t count, return result;
> 
>  		chars_remaining = sprintf(str, "%s %s %08x %08x\n",
> -					  event.device_class ? event.
> -					  device_class : "<unknown>",
> +					  event.device_class : "<unknown>",
: "<unknown>" should be removed too to avoid a compile error. If it is an 
array, is it not better to check event.device_class[0] != 0 (an empty string)?

>  					  event.bus_id ? event.
>  					  bus_id : "<unknown>", event.type,
>  					  event.data);

Regards,
Peter

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

end of thread, other threads:[~2012-10-28 15:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-25 14:57 [PATCH] acpi: compare of array Alan Cox
2012-10-28 15:44 ` Lekensteyn

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.