mirror of
https://github.com/torvalds/linux.git
synced 2026-09-13 14:44:42 +02:00
EDAC/device_sysfs: Cleanup around edac_device_ctl_poll_msec_store()
- Align function args - Fix comment style - Fixup formatting around edac_device_reset_delay_period() too The not-too-trivial change is converting the edac_device_reset_delay_period() msec argument to unsigned int as that is what the rest of the code expects. Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
This commit is contained in:
parent
66cc9dec91
commit
9987979189
|
|
@ -342,14 +342,10 @@ static void edac_device_workq_teardown(struct edac_device_ctl_info *edac_dev)
|
|||
}
|
||||
|
||||
/*
|
||||
* edac_device_reset_delay_period
|
||||
*
|
||||
* need to stop any outstanding workq queued up at this time
|
||||
* because we will be resetting the sleep time.
|
||||
* Then restart the workq on the new delay
|
||||
* Stop any outstanding workq queued up at this time because sleep time will
|
||||
* be reset. Then restart the workq on the new delay.
|
||||
*/
|
||||
void edac_device_reset_delay_period(struct edac_device_ctl_info *edac_dev,
|
||||
unsigned long msec)
|
||||
void edac_device_reset_delay_period(struct edac_device_ctl_info *edac_dev, unsigned int msec)
|
||||
{
|
||||
edac_dev->poll_msec = msec;
|
||||
edac_dev->delay = msecs_to_jiffies(msec);
|
||||
|
|
|
|||
|
|
@ -84,17 +84,15 @@ static ssize_t edac_device_ctl_poll_msec_show(struct edac_device_ctl_info
|
|||
return sprintf(data, "%u\n", ctl_info->poll_msec);
|
||||
}
|
||||
|
||||
static ssize_t edac_device_ctl_poll_msec_store(struct edac_device_ctl_info
|
||||
*ctl_info, const char *data,
|
||||
size_t count)
|
||||
static ssize_t edac_device_ctl_poll_msec_store(struct edac_device_ctl_info *ctl_info,
|
||||
const char *data, size_t count)
|
||||
{
|
||||
unsigned int value;
|
||||
int ret;
|
||||
|
||||
/* get the value and enforce that it is non-zero, must be at least
|
||||
* one millisecond for the delay period, between scans
|
||||
* Then cancel last outstanding delay for the work request
|
||||
* and set a new one.
|
||||
/*
|
||||
* Get the value, make sure it is non-zero, must be at least one millisecond
|
||||
* for the delay period between scans.
|
||||
*/
|
||||
ret = kstrtouint(data, 0, &value);
|
||||
if (ret < 0)
|
||||
|
|
|
|||
|
|
@ -52,8 +52,7 @@ bool edac_queue_work(struct delayed_work *work, unsigned long delay);
|
|||
bool edac_stop_work(struct delayed_work *work);
|
||||
bool edac_mod_work(struct delayed_work *work, unsigned long delay);
|
||||
|
||||
extern void edac_device_reset_delay_period(struct edac_device_ctl_info
|
||||
*edac_dev, unsigned long msec);
|
||||
extern void edac_device_reset_delay_period(struct edac_device_ctl_info *edac_dev, unsigned int msec);
|
||||
extern void edac_mc_reset_delay_period(unsigned long value);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user