linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] acpi: acpica: utstate:  Remove unused function
@ 2015-01-02 21:01 Rickard Strandqvist
  2015-01-05  8:39 ` Zheng, Lv
  0 siblings, 1 reply; 4+ messages in thread
From: Rickard Strandqvist @ 2015-01-02 21:01 UTC (permalink / raw)
  To: Robert Moore, Lv Zheng
  Cc: Rickard Strandqvist, Rafael J. Wysocki, Len Brown, linux-acpi,
	devel, linux-kernel

Remove the function acpi_ut_create_pkg_state_and_push() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 drivers/acpi/acpica/acutils.h |    8 --------
 drivers/acpi/acpica/utstate.c |   33 ---------------------------------
 2 files changed, 41 deletions(-)

diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index 486d342..ef2ad3c 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -539,14 +539,6 @@ acpi_ut_create_update_state_and_push(union acpi_operand_object *object,
 				     u16 action,
 				     union acpi_generic_state **state_list);
 
-#ifdef	ACPI_FUTURE_USAGE
-acpi_status
-acpi_ut_create_pkg_state_and_push(void *internal_object,
-				  void *external_object,
-				  u16 index,
-				  union acpi_generic_state **state_list);
-#endif				/* ACPI_FUTURE_USAGE */
-
 union acpi_generic_state *acpi_ut_create_control_state(void);
 
 void acpi_ut_delete_generic_state(union acpi_generic_state *state);
diff --git a/drivers/acpi/acpica/utstate.c b/drivers/acpi/acpica/utstate.c
index 1cc97a7..fa932e9 100644
--- a/drivers/acpi/acpica/utstate.c
+++ b/drivers/acpi/acpica/utstate.c
@@ -49,39 +49,6 @@ ACPI_MODULE_NAME("utstate")
 
 /*******************************************************************************
  *
- * FUNCTION:    acpi_ut_create_pkg_state_and_push
- *
- * PARAMETERS:  object          - Object to be added to the new state
- *              action          - Increment/Decrement
- *              state_list      - List the state will be added to
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Create a new state and push it
- *
- ******************************************************************************/
-acpi_status
-acpi_ut_create_pkg_state_and_push(void *internal_object,
-				  void *external_object,
-				  u16 index,
-				  union acpi_generic_state **state_list)
-{
-	union acpi_generic_state *state;
-
-	ACPI_FUNCTION_ENTRY();
-
-	state =
-	    acpi_ut_create_pkg_state(internal_object, external_object, index);
-	if (!state) {
-		return (AE_NO_MEMORY);
-	}
-
-	acpi_ut_push_generic_state(state_list, state);
-	return (AE_OK);
-}
-
-/*******************************************************************************
- *
  * FUNCTION:    acpi_ut_push_generic_state
  *
  * PARAMETERS:  list_head           - Head of the state stack
-- 
1.7.10.4


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

* RE: [PATCH] acpi: acpica: utstate:  Remove unused function
  2015-01-02 21:01 [PATCH] acpi: acpica: utstate: Remove unused function Rickard Strandqvist
@ 2015-01-05  8:39 ` Zheng, Lv
  2015-01-05 23:30   ` Rafael J. Wysocki
  0 siblings, 1 reply; 4+ messages in thread
From: Zheng, Lv @ 2015-01-05  8:39 UTC (permalink / raw)
  To: Rickard Strandqvist, Moore, Robert
  Cc: Wysocki, Rafael J, Len Brown, linux-acpi, devel, linux-kernel

Hi, Richard

> From: Rickard Strandqvist [mailto:rickard_strandqvist@spectrumdigital.se]
> Sent: Saturday, January 03, 2015 5:01 AM
> 
> Remove the function acpi_ut_create_pkg_state_and_push() that is not used anywhere.
> 
> This was partially found by using a static code analysis program called cppcheck.

acpi_ut_create_pkg_state_and_push() is not even used in ACPICA.
We can remove it now.

Thanks and best regards
-Lv

> 
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
>  drivers/acpi/acpica/acutils.h |    8 --------
>  drivers/acpi/acpica/utstate.c |   33 ---------------------------------
>  2 files changed, 41 deletions(-)
> 
> diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
> index 486d342..ef2ad3c 100644
> --- a/drivers/acpi/acpica/acutils.h
> +++ b/drivers/acpi/acpica/acutils.h
> @@ -539,14 +539,6 @@ acpi_ut_create_update_state_and_push(union acpi_operand_object *object,
>  				     u16 action,
>  				     union acpi_generic_state **state_list);
> 
> -#ifdef	ACPI_FUTURE_USAGE
> -acpi_status
> -acpi_ut_create_pkg_state_and_push(void *internal_object,
> -				  void *external_object,
> -				  u16 index,
> -				  union acpi_generic_state **state_list);
> -#endif				/* ACPI_FUTURE_USAGE */
> -
>  union acpi_generic_state *acpi_ut_create_control_state(void);
> 
>  void acpi_ut_delete_generic_state(union acpi_generic_state *state);
> diff --git a/drivers/acpi/acpica/utstate.c b/drivers/acpi/acpica/utstate.c
> index 1cc97a7..fa932e9 100644
> --- a/drivers/acpi/acpica/utstate.c
> +++ b/drivers/acpi/acpica/utstate.c
> @@ -49,39 +49,6 @@ ACPI_MODULE_NAME("utstate")
> 
>  /*******************************************************************************
>   *
> - * FUNCTION:    acpi_ut_create_pkg_state_and_push
> - *
> - * PARAMETERS:  object          - Object to be added to the new state
> - *              action          - Increment/Decrement
> - *              state_list      - List the state will be added to
> - *
> - * RETURN:      Status
> - *
> - * DESCRIPTION: Create a new state and push it
> - *
> - ******************************************************************************/
> -acpi_status
> -acpi_ut_create_pkg_state_and_push(void *internal_object,
> -				  void *external_object,
> -				  u16 index,
> -				  union acpi_generic_state **state_list)
> -{
> -	union acpi_generic_state *state;
> -
> -	ACPI_FUNCTION_ENTRY();
> -
> -	state =
> -	    acpi_ut_create_pkg_state(internal_object, external_object, index);
> -	if (!state) {
> -		return (AE_NO_MEMORY);
> -	}
> -
> -	acpi_ut_push_generic_state(state_list, state);
> -	return (AE_OK);
> -}
> -
> -/*******************************************************************************
> - *
>   * FUNCTION:    acpi_ut_push_generic_state
>   *
>   * PARAMETERS:  list_head           - Head of the state stack
> --
> 1.7.10.4


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

* Re: [PATCH] acpi: acpica: utstate:  Remove unused function
  2015-01-05  8:39 ` Zheng, Lv
@ 2015-01-05 23:30   ` Rafael J. Wysocki
  2015-01-13  2:33     ` Zheng, Lv
  0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2015-01-05 23:30 UTC (permalink / raw)
  To: Zheng, Lv
  Cc: Rickard Strandqvist, Moore, Robert, Wysocki, Rafael J, Len Brown,
	linux-acpi, devel, linux-kernel

On Monday, January 05, 2015 08:39:37 AM Zheng, Lv wrote:
> Hi, Richard
> 
> > From: Rickard Strandqvist [mailto:rickard_strandqvist@spectrumdigital.se]
> > Sent: Saturday, January 03, 2015 5:01 AM
> > 
> > Remove the function acpi_ut_create_pkg_state_and_push() that is not used anywhere.
> > 
> > This was partially found by using a static code analysis program called cppcheck.
> 
> acpi_ut_create_pkg_state_and_push() is not even used in ACPICA.
> We can remove it now.

Let's first remove it in upstream ACPICA, then, I suppose.


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* RE: [PATCH] acpi: acpica: utstate:  Remove unused function
  2015-01-05 23:30   ` Rafael J. Wysocki
@ 2015-01-13  2:33     ` Zheng, Lv
  0 siblings, 0 replies; 4+ messages in thread
From: Zheng, Lv @ 2015-01-13  2:33 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rickard Strandqvist
  Cc: Moore, Robert, Wysocki, Rafael J, Len Brown, linux-acpi, devel,
	linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1142 bytes --]

Hi,

I've added this patch into the 201501 ACPICA materials for review:
https://github.com/acpica/acpica/pull/61
If it is merged, it will appear in Linux kernel after 201501 ACPICA release.
Thanks for reporting.

Best regards
-Lv

> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net]
> Sent: Tuesday, January 06, 2015 7:30 AM
> 
> On Monday, January 05, 2015 08:39:37 AM Zheng, Lv wrote:
> > Hi, Richard
> >
> > > From: Rickard Strandqvist [mailto:rickard_strandqvist@spectrumdigital.se]
> > > Sent: Saturday, January 03, 2015 5:01 AM
> > >
> > > Remove the function acpi_ut_create_pkg_state_and_push() that is not used anywhere.
> > >
> > > This was partially found by using a static code analysis program called cppcheck.
> >
> > acpi_ut_create_pkg_state_and_push() is not even used in ACPICA.
> > We can remove it now.
> 
> Let's first remove it in upstream ACPICA, then, I suppose.
> 
> 
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

end of thread, other threads:[~2015-01-13  2:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-02 21:01 [PATCH] acpi: acpica: utstate: Remove unused function Rickard Strandqvist
2015-01-05  8:39 ` Zheng, Lv
2015-01-05 23:30   ` Rafael J. Wysocki
2015-01-13  2:33     ` Zheng, Lv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).