On Fri, Aug 26, 2016 at 11:45:12AM -0500, Don Brace wrote:
> From: Kevin Barnett <kevin.barn...@microsemi.com>
> 
> minor tweaks to update time support
> 
> Reviewed-by: Scott Teel <scott.t...@microsemi.com>
> Reviewed-by: Scott Benesh <scott.ben...@microsemi.com>
> Signed-off-by: Kevin Barnett <kevin.barn...@microsemi.com>
> Signed-off-by: Don Brace <don.br...@microsemi.com>
> ---
>  drivers/scsi/smartpqi/smartpqi_init.c |    8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/scsi/smartpqi/smartpqi_init.c 
> b/drivers/scsi/smartpqi/smartpqi_init.c
> index 2759c90..a8b8671 100644
> --- a/drivers/scsi/smartpqi/smartpqi_init.c
> +++ b/drivers/scsi/smartpqi/smartpqi_init.c
> @@ -588,10 +588,6 @@ static void pqi_update_time_worker(struct work_struct 
> *work)
>       ctrl_info = container_of(to_delayed_work(work), struct pqi_ctrl_info,
>               update_time_work);
>  
> -     if (!ctrl_info) {
> -             printk("%s: NULL controller pointer.\n", __func__);
> -             return;
> -     }
>       rc = pqi_write_current_time_to_host_wellness(ctrl_info);
>       if (rc)
>               dev_warn(&ctrl_info->pci_dev->dev,
> @@ -602,9 +598,9 @@ static void pqi_update_time_worker(struct work_struct 
> *work)
>  }
>  
>  static inline void pqi_schedule_update_time_worker(
> -                     struct pqi_ctrl_info *ctrl_info)
> +     struct pqi_ctrl_info *ctrl_info)
>  {
> -     schedule_delayed_work(&ctrl_info->update_time_work, 120);
> +     schedule_delayed_work(&ctrl_info->update_time_work, 0);
>  }

Why are you using schedule_delayed_work() if you have a timeout of 0?
>From __queue_delayed_work():
1513         /*
1514          * If @delay is 0, queue @dwork->work immediately.  This is for
1515          * both optimization and correctness.  The earliest @timer can
1516          * expire is on the closest next tick and delayed_work users depend
1517          * on that there's no such delay when @delay is 0.
1518          */
1519         if (!delay) {
1520                 __queue_work(cpu, wq, &dwork->work);
1521                 return;
1522         }


-- 
Johannes Thumshirn                                          Storage
jthumsh...@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to