* [PATCH] Staging: comedi: fix brace coding style issue in jr3_pci.c This is a patch to the jr3_pci.c file that fixes up a brace warning found by the checkpatch.pl tool Signed-off-by: Stephane Pajot <pajot.stephane@gmail.com>
@ 2011-05-09 13:51 Stephane Pajot
2011-05-09 14:57 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Stephane Pajot @ 2011-05-09 13:51 UTC (permalink / raw)
To: gregkh, arun.thomas, ruben.smits, abbotti, ext-andriy.shevchenko
Cc: devel, linux-kernel, Stephane Pajot
---
drivers/staging/comedi/drivers/jr3_pci.c | 27 +++++++++------------------
1 files changed, 9 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c
index 5c6c727..d96140c 100644
--- a/drivers/staging/comedi/drivers/jr3_pci.c
+++ b/drivers/staging/comedi/drivers/jr3_pci.c
@@ -193,9 +193,8 @@ static void set_transforms(volatile struct jr3_channel *channel,
set_s16(&channel->transforms[num].link[i].link_amount,
transf.link[i].link_amount);
udelay(1);
- if (transf.link[i].link_type == end_x_form) {
+ if (transf.link[i].link_type == end_x_form)
break;
- }
}
}
@@ -460,9 +459,8 @@ static int jr3_download_firmware(struct comedi_device *dev, const u8 * data,
unsigned int count, addr;
more = more
&& read_idm_word(data, size, &pos, &count);
- if (more && count == 0xffff) {
+ if (more && count == 0xffff)
break;
- }
more = more
&& read_idm_word(data, size, &pos, &addr);
printk("Loading#%d %4.4x bytes at %4.4x\n", i,
@@ -793,9 +791,8 @@ static int jr3_pci_attach(struct comedi_device *dev,
}
result = alloc_private(dev, sizeof(struct jr3_pci_dev_private));
- if (result < 0) {
+ if (result < 0)
return -ENOMEM;
- }
card = NULL;
devpriv = dev->private;
init_timer(&devpriv->timer);
@@ -851,9 +848,8 @@ static int jr3_pci_attach(struct comedi_device *dev,
}
result = comedi_pci_enable(card, "jr3_pci");
- if (result < 0) {
+ if (result < 0)
return -EIO;
- }
devpriv->pci_enabled = 1;
devpriv->iobase = ioremap(pci_resource_start(card, 0),
@@ -922,9 +918,8 @@ static int jr3_pci_attach(struct comedi_device *dev,
result = comedi_load_firmware(dev, "jr3pci.idm", jr3_download_firmware);
printk("Firmare load %d\n", result);
- if (result < 0) {
+ if (result < 0)
goto out;
- }
/*
* TODO: use firmware to load preferred offset tables. Suggested
* format:
@@ -973,21 +968,17 @@ static int jr3_pci_detach(struct comedi_device *dev)
del_timer_sync(&devpriv->timer);
if (dev->subdevices) {
- for (i = 0; i < devpriv->n_channels; i++) {
+ for (i = 0; i < devpriv->n_channels; i++)
kfree(dev->subdevices[i].private);
- }
}
- if (devpriv->iobase) {
+ if (devpriv->iobase)
iounmap((void *)devpriv->iobase);
- }
- if (devpriv->pci_enabled) {
+ if (devpriv->pci_enabled)
comedi_pci_disable(devpriv->pci_dev);
- }
- if (devpriv->pci_dev) {
+ if (devpriv->pci_dev)
pci_dev_put(devpriv->pci_dev);
- }
}
return 0;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Staging: comedi: fix brace coding style issue in jr3_pci.c This is a patch to the jr3_pci.c file that fixes up a brace warning found by the checkpatch.pl tool Signed-off-by: Stephane Pajot <pajot.stephane@gmail.com>
2011-05-09 13:51 [PATCH] Staging: comedi: fix brace coding style issue in jr3_pci.c This is a patch to the jr3_pci.c file that fixes up a brace warning found by the checkpatch.pl tool Signed-off-by: Stephane Pajot <pajot.stephane@gmail.com> Stephane Pajot
@ 2011-05-09 14:57 ` Andy Shevchenko
2011-05-09 15:23 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2011-05-09 14:57 UTC (permalink / raw)
To: Stephane Pajot
Cc: gregkh, arun.thomas, ruben.smits, abbotti, ext-andriy.shevchenko,
devel, linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 4720 bytes --]
On Mon, May 9, 2011 at 4:51 PM, Stephane Pajot <pajot.stephane@gmail.com> wrote:
Please, split the subject and description with Signed-off-by lines.
> ---
> Â drivers/staging/comedi/drivers/jr3_pci.c | Â 27 +++++++++------------------
> Â 1 files changed, 9 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c
> index 5c6c727..d96140c 100644
> --- a/drivers/staging/comedi/drivers/jr3_pci.c
> +++ b/drivers/staging/comedi/drivers/jr3_pci.c
> @@ -193,9 +193,8 @@ static void set_transforms(volatile struct jr3_channel *channel,
> Â Â Â Â Â Â Â Â set_s16(&channel->transforms[num].link[i].link_amount,
> Â Â Â Â Â Â Â Â Â Â Â Â transf.link[i].link_amount);
> Â Â Â Â Â Â Â Â udelay(1);
> - Â Â Â Â Â Â Â if (transf.link[i].link_type == end_x_form) {
> + Â Â Â Â Â Â Â if (transf.link[i].link_type == end_x_form)
> Â Â Â Â Â Â Â Â Â Â Â Â break;
> - Â Â Â Â Â Â Â }
> Â Â Â Â }
> Â }
>
> @@ -460,9 +459,8 @@ static int jr3_download_firmware(struct comedi_device *dev, const u8 * data,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â unsigned int count, addr;
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â more = more
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â && read_idm_word(data, size, &pos, &count);
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â if (more && count == 0xffff) {
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â if (more && count == 0xffff)
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â break;
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â }
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â more = more
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â && read_idm_word(data, size, &pos, &addr);
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â printk("Loading#%d %4.4x bytes at %4.4x\n", i,
> @@ -793,9 +791,8 @@ static int jr3_pci_attach(struct comedi_device *dev,
> Â Â Â Â }
>
> Â Â Â Â result = alloc_private(dev, sizeof(struct jr3_pci_dev_private));
> - Â Â Â if (result < 0) {
> + Â Â Â if (result < 0)
> Â Â Â Â Â Â Â Â return -ENOMEM;
> - Â Â Â }
> Â Â Â Â card = NULL;
> Â Â Â Â devpriv = dev->private;
> Â Â Â Â init_timer(&devpriv->timer);
> @@ -851,9 +848,8 @@ static int jr3_pci_attach(struct comedi_device *dev,
> Â Â Â Â }
>
> Â Â Â Â result = comedi_pci_enable(card, "jr3_pci");
> - Â Â Â if (result < 0) {
> + Â Â Â if (result < 0)
> Â Â Â Â Â Â Â Â return -EIO;
> - Â Â Â }
>
> Â Â Â Â devpriv->pci_enabled = 1;
> Â Â Â Â devpriv->iobase = ioremap(pci_resource_start(card, 0),
> @@ -922,9 +918,8 @@ static int jr3_pci_attach(struct comedi_device *dev,
> Â Â Â Â result = comedi_load_firmware(dev, "jr3pci.idm", jr3_download_firmware);
> Â Â Â Â printk("Firmare load %d\n", result);
>
> - Â Â Â if (result < 0) {
> + Â Â Â if (result < 0)
> Â Â Â Â Â Â Â Â goto out;
> - Â Â Â }
I guess it better to leave blank line here.
> Â /*
> Â * TODO: use firmware to load preferred offset tables. Suggested
> Â * format:
> @@ -973,21 +968,17 @@ static int jr3_pci_detach(struct comedi_device *dev)
> Â Â Â Â Â Â Â Â del_timer_sync(&devpriv->timer);
>
> Â Â Â Â Â Â Â Â if (dev->subdevices) {
> - Â Â Â Â Â Â Â Â Â Â Â for (i = 0; i < devpriv->n_channels; i++) {
> + Â Â Â Â Â Â Â Â Â Â Â for (i = 0; i < devpriv->n_channels; i++)
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â kfree(dev->subdevices[i].private);
> - Â Â Â Â Â Â Â Â Â Â Â }
> Â Â Â Â Â Â Â Â }
>
> - Â Â Â Â Â Â Â if (devpriv->iobase) {
> + Â Â Â Â Â Â Â if (devpriv->iobase)
> Â Â Â Â Â Â Â Â Â Â Â Â iounmap((void *)devpriv->iobase);
> - Â Â Â Â Â Â Â }
> - Â Â Â Â Â Â Â if (devpriv->pci_enabled) {
> + Â Â Â Â Â Â Â if (devpriv->pci_enabled)
> Â Â Â Â Â Â Â Â Â Â Â Â comedi_pci_disable(devpriv->pci_dev);
> - Â Â Â Â Â Â Â }
>
> - Â Â Â Â Â Â Â if (devpriv->pci_dev) {
> + Â Â Â Â Â Â Â if (devpriv->pci_dev)
> Â Â Â Â Â Â Â Â Â Â Â Â pci_dev_put(devpriv->pci_dev);
> - Â Â Â Â Â Â Â }
> Â Â Â Â }
> Â Â Â Â return 0;
> Â }
> --
> 1.7.1
>
> --
> 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/
>
--
With Best Regards,
Andy Shevchenko
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Staging: comedi: fix brace coding style issue in jr3_pci.c This is a patch to the jr3_pci.c file that fixes up a brace warning found by the checkpatch.pl tool Signed-off-by: Stephane Pajot <pajot.stephane@gmail.com>
2011-05-09 14:57 ` Andy Shevchenko
@ 2011-05-09 15:23 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2011-05-09 15:23 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Stephane Pajot, arun.thomas, ruben.smits, abbotti,
ext-andriy.shevchenko, devel, linux-kernel
On Mon, May 09, 2011 at 05:57:30PM +0300, Andy Shevchenko wrote:
> On Mon, May 9, 2011 at 4:51 PM, Stephane Pajot <pajot.stephane@gmail.com> wrote:
>
> Please, split the subject and description with Signed-off-by lines.
It's an issue with git, I need to fix it one of these days...
Don't worry, I can take the original patch and edit it just fine,
thanks, I'll queue it up in a few days.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-09 15:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-09 13:51 [PATCH] Staging: comedi: fix brace coding style issue in jr3_pci.c This is a patch to the jr3_pci.c file that fixes up a brace warning found by the checkpatch.pl tool Signed-off-by: Stephane Pajot <pajot.stephane@gmail.com> Stephane Pajot
2011-05-09 14:57 ` Andy Shevchenko
2011-05-09 15:23 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).