lkml.org 
[lkml]   [2014]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 04/11] arm: Support restart through restart handler call chain
Am 22.08.2014 04:19, schrieb Guenter Roeck:
> On Fri, Aug 22, 2014 at 03:32:42AM +0200, Andreas Färber wrote:
>> Am 20.08.2014 02:45, schrieb Guenter Roeck:
>>> The kernel core now supports a restart handler call chain for system
>>> restart functions.
>>>
>>> With this change, the arm_pm_restart callback is now optional, so
>>> drop its initialization and check if it is set before calling it.
>>> Only call the kernel restart handler if arm_pm_restart is not set.
>> [...]
>>> diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
>>> index 81ef686..ea279f7 100644
>>> --- a/arch/arm/kernel/process.c
>>> +++ b/arch/arm/kernel/process.c
>>> @@ -114,17 +114,13 @@ void soft_restart(unsigned long addr)
>>> BUG();
>>> }
>>>
>>> -static void null_restart(enum reboot_mode reboot_mode, const char *cmd)
>>> -{
>>> -}
>>> -
>>> /*
>>> * Function pointers to optional machine specific functions
>>> */
>>> void (*pm_power_off)(void);
>>> EXPORT_SYMBOL(pm_power_off);
>>>
>>> -void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd) = null_restart;
>>> +void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
>>
>> Stupid newbie question maybe, but isn't this variable uninitialized now,
>> like any non-static variable in C99? Or does the kernel assure that all
>> such "fields" are zero-initialized?
>>
> It is initialized with NULL, like all other global and static variables in the
> kernel (and like pm_power_off a few lines above).

Thanks for the explanation. In that case FWIW

Reviewed-by: Andreas Färber <afaerber@suse.de>

Andreas

--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-08-23 19:41    [W:0.066 / U:1.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site