All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <87zksfc53b.fsf@deeprootsystems.com>

diff --git a/a/1.txt b/N1/1.txt
index 8475a83..3dac76c 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -3,14 +3,14 @@ Vitaly Wool <vitalywool@gmail.com> writes:
 > On Wed, Dec 8, 2010 at 11:40 PM, Kevin Hilman
 > <khilman@deeprootsystems.com> wrote:
 >> @@ -120,8 +133,9 @@ static void omap2_enter_full_retention(void)
->>                goto no_sleep;
+>> ? ? ? ? ? ? ? ?goto no_sleep;
 >>
->>        /* Block console output in case it is on one of the OMAP UARTs */
->> -       if (try_acquire_console_sem())
->> -               goto no_sleep;
->> +       if (!is_suspending())
->> +               if (try_acquire_console_sem())
->> +                       goto no_sleep;
+>> ? ? ? ?/* Block console output in case it is on one of the OMAP UARTs */
+>> - ? ? ? if (try_acquire_console_sem())
+>> - ? ? ? ? ? ? ? goto no_sleep;
+>> + ? ? ? if (!is_suspending())
+>> + ? ? ? ? ? ? ? if (try_acquire_console_sem())
+>> + ? ? ? ? ? ? ? ? ? ? ? goto no_sleep;
 >
 > Combine into one if?
 
@@ -19,43 +19,43 @@ personal preference I guess.  I prefer it nested.
 >
 > <snip>
 >
->>        omap_uart_prepare_idle(0);
->>        omap_uart_prepare_idle(1);
+>> ? ? ? ?omap_uart_prepare_idle(0);
+>> ? ? ? ?omap_uart_prepare_idle(1);
 >> @@ -136,7 +150,8 @@ static void omap2_enter_full_retention(void)
->>        omap_uart_resume_idle(1);
->>        omap_uart_resume_idle(0);
+>> ? ? ? ?omap_uart_resume_idle(1);
+>> ? ? ? ?omap_uart_resume_idle(0);
 >>
->> -       release_console_sem();
->> +       if (!is_suspending())
->> +               release_console_sem();
+>> - ? ? ? release_console_sem();
+>> + ? ? ? if (!is_suspending())
+>> + ? ? ? ? ? ? ? release_console_sem();
 >>
->>  no_sleep:
->>        if (omap2_pm_debug) {
+>> ?no_sleep:
+>> ? ? ? ?if (omap2_pm_debug) {
 >> @@ -284,6 +299,12 @@ out:
->>        local_irq_enable();
->>  }
+>> ? ? ? ?local_irq_enable();
+>> ?}
 >>
 >> +static int omap2_pm_begin(suspend_state_t state)
 >> +{
->> +       suspend_state = state;
->> +       return 0;
+>> + ? ? ? suspend_state = state;
+>> + ? ? ? return 0;
 >> +}
 >
 > Do you really need a return code here?
 
 yes, this function prototype is defined by the driver model, not by me.
 
->>  static int omap2_pm_prepare(void)
->>  {
->>        /* We cannot sleep in idle until we have resumed */
+>> ?static int omap2_pm_prepare(void)
+>> ?{
+>> ? ? ? ?/* We cannot sleep in idle until we have resumed */
 >> @@ -333,10 +354,18 @@ static void omap2_pm_finish(void)
->>        enable_hlt();
->>  }
+>> ? ? ? ?enable_hlt();
+>> ?}
 >>
 >> +static void omap2_pm_end(void)
 >> +{
->> +       suspend_state = PM_SUSPEND_ON;
->> +       return;
+>> + ? ? ? suspend_state = PM_SUSPEND_ON;
+>> + ? ? ? return;
 >> +}
 >
 > Redundant return.
@@ -63,59 +63,55 @@ yes, this function prototype is defined by the driver model, not by me.
 but harmless
 
 >> +
->>  static struct platform_suspend_ops omap_pm_ops = {
->> +       .begin          = omap2_pm_begin,
->>        .prepare        = omap2_pm_prepare,
->>        .enter          = omap2_pm_enter,
->>        .finish         = omap2_pm_finish,
->> +       .end            = omap2_pm_end,
->>        .valid          = suspend_valid_only_mem,
->>  };
+>> ?static struct platform_suspend_ops omap_pm_ops = {
+>> + ? ? ? .begin ? ? ? ? ?= omap2_pm_begin,
+>> ? ? ? ?.prepare ? ? ? ?= omap2_pm_prepare,
+>> ? ? ? ?.enter ? ? ? ? ?= omap2_pm_enter,
+>> ? ? ? ?.finish ? ? ? ? = omap2_pm_finish,
+>> + ? ? ? .end ? ? ? ? ? ?= omap2_pm_end,
+>> ? ? ? ?.valid ? ? ? ? ?= suspend_valid_only_mem,
+>> ?};
 >>
 >> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
 >> index 0ec8a04..648b8c5 100644
 >> --- a/arch/arm/mach-omap2/pm34xx.c
 >> +++ b/arch/arm/mach-omap2/pm34xx.c
 >> @@ -50,6 +50,19 @@
->>  #include "sdrc.h"
->>  #include "control.h"
+>> ?#include "sdrc.h"
+>> ?#include "control.h"
 >>
 >> +#ifdef CONFIG_SUSPEND
 >> +static suspend_state_t suspend_state = PM_SUSPEND_ON;
 >> +static inline bool is_suspending(void)
 >> +{
->> +       return (suspend_state != PM_SUSPEND_ON);
+>> + ? ? ? return (suspend_state != PM_SUSPEND_ON);
 >> +}
 >> +#else
 >> +static inline bool is_suspending(void)
 >> +{
->> +       return false;
+>> + ? ? ? return false;
 >> +}
 >> +#endif
 >> +
->>  /* Scratchpad offsets */
->>  #define OMAP343X_TABLE_ADDRESS_OFFSET     0xc4
->>  #define OMAP343X_TABLE_VALUE_OFFSET       0xc0
+>> ?/* Scratchpad offsets */
+>> ?#define OMAP343X_TABLE_ADDRESS_OFFSET ? ? 0xc4
+>> ?#define OMAP343X_TABLE_VALUE_OFFSET ? ? ? 0xc0
 >> @@ -387,10 +400,11 @@ void omap_sram_idle(void)
->>        }
+>> ? ? ? ?}
 >>
->>        /* Block console output in case it is on one of the OMAP UARTs */
->> -       if (per_next_state < PWRDM_POWER_ON ||
->> -           core_next_state < PWRDM_POWER_ON)
->> -               if (try_acquire_console_sem())
->> -                       goto console_still_active;
->> +       if (!is_suspending())
->> +               if (per_next_state < PWRDM_POWER_ON ||
->> +                   core_next_state < PWRDM_POWER_ON)
->> +                       if (try_acquire_console_sem())
->> +                               goto console_still_active;
+>> ? ? ? ?/* Block console output in case it is on one of the OMAP UARTs */
+>> - ? ? ? if (per_next_state < PWRDM_POWER_ON ||
+>> - ? ? ? ? ? core_next_state < PWRDM_POWER_ON)
+>> - ? ? ? ? ? ? ? if (try_acquire_console_sem())
+>> - ? ? ? ? ? ? ? ? ? ? ? goto console_still_active;
+>> + ? ? ? if (!is_suspending())
+>> + ? ? ? ? ? ? ? if (per_next_state < PWRDM_POWER_ON ||
+>> + ? ? ? ? ? ? ? ? ? core_next_state < PWRDM_POWER_ON)
+>> + ? ? ? ? ? ? ? ? ? ? ? if (try_acquire_console_sem())
+>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? goto console_still_active;
 >
 > Oh well, 3 nested ifs...
 
 again, personal preference.
 
 Kevin
---
-To unsubscribe from this list: send the line "unsubscribe linux-omap" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff --git a/a/content_digest b/N1/content_digest
index 589d318..de75b11 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,12 +1,9 @@
  "ref\01291848040-23394-1-git-send-email-khilman@deeprootsystems.com\0"
  "ref\0AANLkTi=9TBbuwr4uiQb6f_f=cLxK2NvWJDJYXwr2tTxu@mail.gmail.com\0"
- "From\0Kevin Hilman <khilman@deeprootsystems.com>\0"
- "Subject\0Re: [PATCH v3] OMAP2+: PM/serial: fix console semaphore acquire during suspend\0"
+ "From\0khilman@deeprootsystems.com (Kevin Hilman)\0"
+ "Subject\0[PATCH v3] OMAP2+: PM/serial: fix console semaphore acquire during suspend\0"
  "Date\0Thu, 09 Dec 2010 07:56:40 -0800\0"
- "To\0Vitaly Wool <vitalywool@gmail.com>\0"
- "Cc\0linux-omap@vger.kernel.org"
-  Paul Walmsley <paul@pwsan.com>
- " linux-arm-kernel@lists.infradead.org\0"
+ "To\0linux-arm-kernel@lists.infradead.org\0"
  "\00:1\0"
  "b\0"
  "Vitaly Wool <vitalywool@gmail.com> writes:\n"
@@ -14,14 +11,14 @@
  "> On Wed, Dec 8, 2010 at 11:40 PM, Kevin Hilman\n"
  "> <khilman@deeprootsystems.com> wrote:\n"
  ">> @@ -120,8 +133,9 @@ static void omap2_enter_full_retention(void)\n"
- ">> \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240goto no_sleep;\n"
+ ">> ? ? ? ? ? ? ? ?goto no_sleep;\n"
  ">>\n"
- ">> \302\240 \302\240 \302\240 \302\240/* Block console output in case it is on one of the OMAP UARTs */\n"
- ">> - \302\240 \302\240 \302\240 if (try_acquire_console_sem())\n"
- ">> - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 goto no_sleep;\n"
- ">> + \302\240 \302\240 \302\240 if (!is_suspending())\n"
- ">> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 if (try_acquire_console_sem())\n"
- ">> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 goto no_sleep;\n"
+ ">> ? ? ? ?/* Block console output in case it is on one of the OMAP UARTs */\n"
+ ">> - ? ? ? if (try_acquire_console_sem())\n"
+ ">> - ? ? ? ? ? ? ? goto no_sleep;\n"
+ ">> + ? ? ? if (!is_suspending())\n"
+ ">> + ? ? ? ? ? ? ? if (try_acquire_console_sem())\n"
+ ">> + ? ? ? ? ? ? ? ? ? ? ? goto no_sleep;\n"
  ">\n"
  "> Combine into one if?\n"
  "\n"
@@ -30,43 +27,43 @@
  ">\n"
  "> <snip>\n"
  ">\n"
- ">> \302\240 \302\240 \302\240 \302\240omap_uart_prepare_idle(0);\n"
- ">> \302\240 \302\240 \302\240 \302\240omap_uart_prepare_idle(1);\n"
+ ">> ? ? ? ?omap_uart_prepare_idle(0);\n"
+ ">> ? ? ? ?omap_uart_prepare_idle(1);\n"
  ">> @@ -136,7 +150,8 @@ static void omap2_enter_full_retention(void)\n"
- ">> \302\240 \302\240 \302\240 \302\240omap_uart_resume_idle(1);\n"
- ">> \302\240 \302\240 \302\240 \302\240omap_uart_resume_idle(0);\n"
+ ">> ? ? ? ?omap_uart_resume_idle(1);\n"
+ ">> ? ? ? ?omap_uart_resume_idle(0);\n"
  ">>\n"
- ">> - \302\240 \302\240 \302\240 release_console_sem();\n"
- ">> + \302\240 \302\240 \302\240 if (!is_suspending())\n"
- ">> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 release_console_sem();\n"
+ ">> - ? ? ? release_console_sem();\n"
+ ">> + ? ? ? if (!is_suspending())\n"
+ ">> + ? ? ? ? ? ? ? release_console_sem();\n"
  ">>\n"
- ">> \302\240no_sleep:\n"
- ">> \302\240 \302\240 \302\240 \302\240if (omap2_pm_debug) {\n"
+ ">> ?no_sleep:\n"
+ ">> ? ? ? ?if (omap2_pm_debug) {\n"
  ">> @@ -284,6 +299,12 @@ out:\n"
- ">> \302\240 \302\240 \302\240 \302\240local_irq_enable();\n"
- ">> \302\240}\n"
+ ">> ? ? ? ?local_irq_enable();\n"
+ ">> ?}\n"
  ">>\n"
  ">> +static int omap2_pm_begin(suspend_state_t state)\n"
  ">> +{\n"
- ">> + \302\240 \302\240 \302\240 suspend_state = state;\n"
- ">> + \302\240 \302\240 \302\240 return 0;\n"
+ ">> + ? ? ? suspend_state = state;\n"
+ ">> + ? ? ? return 0;\n"
  ">> +}\n"
  ">\n"
  "> Do you really need a return code here?\n"
  "\n"
  "yes, this function prototype is defined by the driver model, not by me.\n"
  "\n"
- ">> \302\240static int omap2_pm_prepare(void)\n"
- ">> \302\240{\n"
- ">> \302\240 \302\240 \302\240 \302\240/* We cannot sleep in idle until we have resumed */\n"
+ ">> ?static int omap2_pm_prepare(void)\n"
+ ">> ?{\n"
+ ">> ? ? ? ?/* We cannot sleep in idle until we have resumed */\n"
  ">> @@ -333,10 +354,18 @@ static void omap2_pm_finish(void)\n"
- ">> \302\240 \302\240 \302\240 \302\240enable_hlt();\n"
- ">> \302\240}\n"
+ ">> ? ? ? ?enable_hlt();\n"
+ ">> ?}\n"
  ">>\n"
  ">> +static void omap2_pm_end(void)\n"
  ">> +{\n"
- ">> + \302\240 \302\240 \302\240 suspend_state = PM_SUSPEND_ON;\n"
- ">> + \302\240 \302\240 \302\240 return;\n"
+ ">> + ? ? ? suspend_state = PM_SUSPEND_ON;\n"
+ ">> + ? ? ? return;\n"
  ">> +}\n"
  ">\n"
  "> Redundant return.\n"
@@ -74,61 +71,57 @@
  "but harmless\n"
  "\n"
  ">> +\n"
- ">> \302\240static struct platform_suspend_ops omap_pm_ops = {\n"
- ">> + \302\240 \302\240 \302\240 .begin \302\240 \302\240 \302\240 \302\240 \302\240= omap2_pm_begin,\n"
- ">> \302\240 \302\240 \302\240 \302\240.prepare \302\240 \302\240 \302\240 \302\240= omap2_pm_prepare,\n"
- ">> \302\240 \302\240 \302\240 \302\240.enter \302\240 \302\240 \302\240 \302\240 \302\240= omap2_pm_enter,\n"
- ">> \302\240 \302\240 \302\240 \302\240.finish \302\240 \302\240 \302\240 \302\240 = omap2_pm_finish,\n"
- ">> + \302\240 \302\240 \302\240 .end \302\240 \302\240 \302\240 \302\240 \302\240 \302\240= omap2_pm_end,\n"
- ">> \302\240 \302\240 \302\240 \302\240.valid \302\240 \302\240 \302\240 \302\240 \302\240= suspend_valid_only_mem,\n"
- ">> \302\240};\n"
+ ">> ?static struct platform_suspend_ops omap_pm_ops = {\n"
+ ">> + ? ? ? .begin ? ? ? ? ?= omap2_pm_begin,\n"
+ ">> ? ? ? ?.prepare ? ? ? ?= omap2_pm_prepare,\n"
+ ">> ? ? ? ?.enter ? ? ? ? ?= omap2_pm_enter,\n"
+ ">> ? ? ? ?.finish ? ? ? ? = omap2_pm_finish,\n"
+ ">> + ? ? ? .end ? ? ? ? ? ?= omap2_pm_end,\n"
+ ">> ? ? ? ?.valid ? ? ? ? ?= suspend_valid_only_mem,\n"
+ ">> ?};\n"
  ">>\n"
  ">> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c\n"
  ">> index 0ec8a04..648b8c5 100644\n"
  ">> --- a/arch/arm/mach-omap2/pm34xx.c\n"
  ">> +++ b/arch/arm/mach-omap2/pm34xx.c\n"
  ">> @@ -50,6 +50,19 @@\n"
- ">> \302\240#include \"sdrc.h\"\n"
- ">> \302\240#include \"control.h\"\n"
+ ">> ?#include \"sdrc.h\"\n"
+ ">> ?#include \"control.h\"\n"
  ">>\n"
  ">> +#ifdef CONFIG_SUSPEND\n"
  ">> +static suspend_state_t suspend_state = PM_SUSPEND_ON;\n"
  ">> +static inline bool is_suspending(void)\n"
  ">> +{\n"
- ">> + \302\240 \302\240 \302\240 return (suspend_state != PM_SUSPEND_ON);\n"
+ ">> + ? ? ? return (suspend_state != PM_SUSPEND_ON);\n"
  ">> +}\n"
  ">> +#else\n"
  ">> +static inline bool is_suspending(void)\n"
  ">> +{\n"
- ">> + \302\240 \302\240 \302\240 return false;\n"
+ ">> + ? ? ? return false;\n"
  ">> +}\n"
  ">> +#endif\n"
  ">> +\n"
- ">> \302\240/* Scratchpad offsets */\n"
- ">> \302\240#define OMAP343X_TABLE_ADDRESS_OFFSET \302\240 \302\240 0xc4\n"
- ">> \302\240#define OMAP343X_TABLE_VALUE_OFFSET \302\240 \302\240 \302\240 0xc0\n"
+ ">> ?/* Scratchpad offsets */\n"
+ ">> ?#define OMAP343X_TABLE_ADDRESS_OFFSET ? ? 0xc4\n"
+ ">> ?#define OMAP343X_TABLE_VALUE_OFFSET ? ? ? 0xc0\n"
  ">> @@ -387,10 +400,11 @@ void omap_sram_idle(void)\n"
- ">> \302\240 \302\240 \302\240 \302\240}\n"
+ ">> ? ? ? ?}\n"
  ">>\n"
- ">> \302\240 \302\240 \302\240 \302\240/* Block console output in case it is on one of the OMAP UARTs */\n"
- ">> - \302\240 \302\240 \302\240 if (per_next_state < PWRDM_POWER_ON ||\n"
- ">> - \302\240 \302\240 \302\240 \302\240 \302\240 core_next_state < PWRDM_POWER_ON)\n"
- ">> - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 if (try_acquire_console_sem())\n"
- ">> - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 goto console_still_active;\n"
- ">> + \302\240 \302\240 \302\240 if (!is_suspending())\n"
- ">> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 if (per_next_state < PWRDM_POWER_ON ||\n"
- ">> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 core_next_state < PWRDM_POWER_ON)\n"
- ">> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 if (try_acquire_console_sem())\n"
- ">> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 goto console_still_active;\n"
+ ">> ? ? ? ?/* Block console output in case it is on one of the OMAP UARTs */\n"
+ ">> - ? ? ? if (per_next_state < PWRDM_POWER_ON ||\n"
+ ">> - ? ? ? ? ? core_next_state < PWRDM_POWER_ON)\n"
+ ">> - ? ? ? ? ? ? ? if (try_acquire_console_sem())\n"
+ ">> - ? ? ? ? ? ? ? ? ? ? ? goto console_still_active;\n"
+ ">> + ? ? ? if (!is_suspending())\n"
+ ">> + ? ? ? ? ? ? ? if (per_next_state < PWRDM_POWER_ON ||\n"
+ ">> + ? ? ? ? ? ? ? ? ? core_next_state < PWRDM_POWER_ON)\n"
+ ">> + ? ? ? ? ? ? ? ? ? ? ? if (try_acquire_console_sem())\n"
+ ">> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? goto console_still_active;\n"
  ">\n"
  "> Oh well, 3 nested ifs...\n"
  "\n"
  "again, personal preference.\n"
  "\n"
- "Kevin\n"
- "--\n"
- "To unsubscribe from this list: send the line \"unsubscribe linux-omap\" in\n"
- "the body of a message to majordomo@vger.kernel.org\n"
- More majordomo info at  http://vger.kernel.org/majordomo-info.html
+ Kevin
 
-ba4889c9babee1f707ecc737292bf1c2073b7fe174032cce77497056205f535b
+486e75c7302cb7aef056e4c226c4c0b29010d40fc2a74b367566652ec8bf102a

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.