[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110831165224.GF3705@shale.localdomain>
Date: Wed, 31 Aug 2011 19:52:24 +0300
From: Dan Carpenter <error27@...il.com>
To: Oren Weil <oren.jer.weil@...el.com>
Cc: gregkh@...e.de, devel@...verdev.osuosl.org,
linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org,
tomas.winkler@...el.com, alan@...ux.intel.com
Subject: Re: [PATCH 05/12] staging: mei: adding watchdog ping
On Wed, Aug 31, 2011 at 04:42:41PM +0300, Oren Weil wrote:
> +static int mei_wd_ops_ping(struct watchdog_device *wd_dev)
> +{
> + int ret = 0;
> + struct mei_device *dev;
> + dev = pci_get_drvdata(mei_device);
> +
> + if (!dev)
> + return -ENODEV;
> +
> + mutex_lock(&dev->device_lock);
> +
> + if (dev->wd_cl.state != MEI_FILE_CONNECTED) {
> + dev_dbg(&dev->pdev->dev, "wd is not connected.\n");
> + ret = -ENODEV;
> + goto end;
> + }
> +
> + /* Check if we can send the ping to HW*/
> + if (dev->mei_host_buffer_is_empty &&
> + mei_flow_ctrl_creds(dev, &dev->wd_cl) > 0) {
> + dev->mei_host_buffer_is_empty = false;
^^^^^^^^^^^^^^^^
This is a two tab indent. Don't do that.
regards,
dan carpenter
> + dev_dbg(&dev->pdev->dev, "sending watchdog ping\n");
> +
> + if (mei_wd_send(dev)) {
> + dev_dbg(&dev->pdev->dev, "wd send failed.\n");
> + ret = -EIO;
> + goto end;
> + }
> +
> + if (mei_flow_ctrl_reduce(dev, &dev->wd_cl)) {
> + dev_dbg(&dev->pdev->dev, "mei_flow_ctrl_reduce() failed.\n");
> + ret = -EIO;
> + goto end;
> + }
> +
> + } else {
> + dev->wd_pending = true;
> + }
> +
> +end:
> + mutex_unlock(&dev->device_lock);
> + return ret;
> +}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists