* [PATCH] ata: remove unnecessary code
@ 2011-06-16 16:39 Greg Dietsche
2011-07-09 15:21 ` Greg Dietsche
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Greg Dietsche @ 2011-06-16 16:39 UTC (permalink / raw)
To: jgarzik; +Cc: linux-ide, kernel-janitors, Greg Dietsche
Compile tested.
remove unnecessary code that matches this coccinelle pattern
if (...)
return ret;
return ret;
Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
---
drivers/ata/pata_acpi.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c
index 91949d9..54145ed 100644
--- a/drivers/ata/pata_acpi.c
+++ b/drivers/ata/pata_acpi.c
@@ -195,8 +195,6 @@ static int pacpi_port_start(struct ata_port *ap)
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
struct pata_acpi *acpi;
- int ret;
-
if (ap->acpi_handle == NULL)
return -ENODEV;
@@ -205,11 +203,7 @@ static int pacpi_port_start(struct ata_port *ap)
return -ENOMEM;
acpi->mask[0] = pacpi_discover_modes(ap, &ap->link.device[0]);
acpi->mask[1] = pacpi_discover_modes(ap, &ap->link.device[1]);
- ret = ata_bmdma_port_start(ap);
- if (ret < 0)
- return ret;
-
- return ret;
+ return ata_bmdma_port_start(ap);
}
static struct scsi_host_template pacpi_sht = {
--
1.7.2.5
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] ata: remove unnecessary code
2011-06-16 16:39 [PATCH] ata: remove unnecessary code Greg Dietsche
@ 2011-07-09 15:21 ` Greg Dietsche
2011-07-12 14:17 ` Tejun Heo
2011-07-20 2:03 ` Greg Dietsche
2 siblings, 0 replies; 7+ messages in thread
From: Greg Dietsche @ 2011-07-09 15:21 UTC (permalink / raw)
To: jgarzik; +Cc: linux-ide, kernel-janitors, Gregory.Dietsche
On Thu, Jun 16, 2011 at 11:39:21AM -0500, Greg Dietsche wrote:
> Compile tested.
> remove unnecessary code that matches this coccinelle pattern
> if (...)
> return ret;
> return ret;
>
> Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
> ---
> drivers/ata/pata_acpi.c | 8 +-------
> 1 files changed, 1 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c
> index 91949d9..54145ed 100644
> --- a/drivers/ata/pata_acpi.c
> +++ b/drivers/ata/pata_acpi.c
> @@ -195,8 +195,6 @@ static int pacpi_port_start(struct ata_port *ap)
> struct pci_dev *pdev = to_pci_dev(ap->host->dev);
> struct pata_acpi *acpi;
>
> - int ret;
> -
> if (ap->acpi_handle == NULL)
> return -ENODEV;
>
> @@ -205,11 +203,7 @@ static int pacpi_port_start(struct ata_port *ap)
> return -ENOMEM;
> acpi->mask[0] = pacpi_discover_modes(ap, &ap->link.device[0]);
> acpi->mask[1] = pacpi_discover_modes(ap, &ap->link.device[1]);
> - ret = ata_bmdma_port_start(ap);
> - if (ret < 0)
> - return ret;
> -
> - return ret;
> + return ata_bmdma_port_start(ap);
> }
>
> static struct scsi_host_template pacpi_sht = {
> --
> 1.7.2.5
>
any feedback on this patch?
thanks!
Greg
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] ata: remove unnecessary code
2011-06-16 16:39 [PATCH] ata: remove unnecessary code Greg Dietsche
2011-07-09 15:21 ` Greg Dietsche
@ 2011-07-12 14:17 ` Tejun Heo
2011-07-20 2:03 ` Greg Dietsche
2 siblings, 0 replies; 7+ messages in thread
From: Tejun Heo @ 2011-07-12 14:17 UTC (permalink / raw)
To: Greg Dietsche; +Cc: jgarzik, linux-ide, kernel-janitors
On Thu, Jun 16, 2011 at 11:39:21AM -0500, Greg Dietsche wrote:
> Compile tested.
> remove unnecessary code that matches this coccinelle pattern
> if (...)
> return ret;
> return ret;
>
> Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Acked-by: Tejun Heo <tj@kernel.org>
Jeff?
--
tejun
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ata: remove unnecessary code
2011-06-16 16:39 [PATCH] ata: remove unnecessary code Greg Dietsche
2011-07-09 15:21 ` Greg Dietsche
2011-07-12 14:17 ` Tejun Heo
@ 2011-07-20 2:03 ` Greg Dietsche
2011-07-20 2:04 ` Greg Dietsche
2011-07-20 2:10 ` Jeff Garzik
2 siblings, 2 replies; 7+ messages in thread
From: Greg Dietsche @ 2011-07-20 2:03 UTC (permalink / raw)
To: Greg Dietsche; +Cc: jgarzik, linux-ide, kernel-janitors, tj
On 06/16/2011 11:39 AM, Greg Dietsche wrote:
> Compile tested.
> remove unnecessary code that matches this coccinelle pattern
> if (...)
> return ret;
> return ret;
>
> Signed-off-by: Greg Dietsche<Gregory.Dietsche@cuw.edu>
>
Acked-by: Tejun Heo<tj@kernel.org>
> ---
> drivers/ata/pata_acpi.c | 8 +-------
> 1 files changed, 1 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c
> index 91949d9..54145ed 100644
> --- a/drivers/ata/pata_acpi.c
> +++ b/drivers/ata/pata_acpi.c
> @@ -195,8 +195,6 @@ static int pacpi_port_start(struct ata_port *ap)
> struct pci_dev *pdev = to_pci_dev(ap->host->dev);
> struct pata_acpi *acpi;
>
> - int ret;
> -
> if (ap->acpi_handle == NULL)
> return -ENODEV;
>
> @@ -205,11 +203,7 @@ static int pacpi_port_start(struct ata_port *ap)
> return -ENOMEM;
> acpi->mask[0] = pacpi_discover_modes(ap,&ap->link.device[0]);
> acpi->mask[1] = pacpi_discover_modes(ap,&ap->link.device[1]);
> - ret = ata_bmdma_port_start(ap);
> - if (ret< 0)
> - return ret;
> -
> - return ret;
> + return ata_bmdma_port_start(ap);
> }
>
> static struct scsi_host_template pacpi_sht = {
>
This was acked by TJ, but seems to be lost in the shuffle thus far. I'm
adding trivial@kernel.org to the cc list since this is trivial and no
one has picked up this patch to date.
Greg
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] ata: remove unnecessary code
2011-07-20 2:03 ` Greg Dietsche
@ 2011-07-20 2:04 ` Greg Dietsche
2011-07-20 2:10 ` Jeff Garzik
1 sibling, 0 replies; 7+ messages in thread
From: Greg Dietsche @ 2011-07-20 2:04 UTC (permalink / raw)
To: Greg Dietsche; +Cc: jgarzik, linux-ide, kernel-janitors, tj, trivial
On 07/19/2011 09:03 PM, Greg Dietsche wrote:
>
>
> On 06/16/2011 11:39 AM, Greg Dietsche wrote:
>> Compile tested.
>> remove unnecessary code that matches this coccinelle pattern
>> if (...)
>> return ret;
>> return ret;
>>
>> Signed-off-by: Greg Dietsche<Gregory.Dietsche@cuw.edu>
>
> Acked-by: Tejun Heo<tj@kernel.org>
>
>
>> ---
>> drivers/ata/pata_acpi.c | 8 +-------
>> 1 files changed, 1 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c
>> index 91949d9..54145ed 100644
>> --- a/drivers/ata/pata_acpi.c
>> +++ b/drivers/ata/pata_acpi.c
>> @@ -195,8 +195,6 @@ static int pacpi_port_start(struct ata_port *ap)
>> struct pci_dev *pdev = to_pci_dev(ap->host->dev);
>> struct pata_acpi *acpi;
>>
>> - int ret;
>> -
>> if (ap->acpi_handle == NULL)
>> return -ENODEV;
>>
>> @@ -205,11 +203,7 @@ static int pacpi_port_start(struct ata_port *ap)
>> return -ENOMEM;
>> acpi->mask[0] = pacpi_discover_modes(ap,&ap->link.device[0]);
>> acpi->mask[1] = pacpi_discover_modes(ap,&ap->link.device[1]);
>> - ret = ata_bmdma_port_start(ap);
>> - if (ret< 0)
>> - return ret;
>> -
>> - return ret;
>> + return ata_bmdma_port_start(ap);
>> }
>>
>> static struct scsi_host_template pacpi_sht = {
> This was acked by TJ, but seems to be lost in the shuffle thus far.
> I'm adding trivial@kernel.org to the cc list since this is trivial and
> no one has picked up this patch to date.
>
> Greg
>
>
Sorry for the noise, but i forgot to add trivial to the cc :/ This mail
fixes that omission.
Greg
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] ata: remove unnecessary code
2011-07-20 2:03 ` Greg Dietsche
2011-07-20 2:04 ` Greg Dietsche
@ 2011-07-20 2:10 ` Jeff Garzik
2011-07-20 2:14 ` Greg Dietsche
1 sibling, 1 reply; 7+ messages in thread
From: Jeff Garzik @ 2011-07-20 2:10 UTC (permalink / raw)
To: Greg Dietsche; +Cc: linux-ide, kernel-janitors, tj
On 07/19/2011 10:03 PM, Greg Dietsche wrote:
>
>
> On 06/16/2011 11:39 AM, Greg Dietsche wrote:
>> Compile tested.
>> remove unnecessary code that matches this coccinelle pattern
>> if (...)
>> return ret;
>> return ret;
>>
>> Signed-off-by: Greg Dietsche<Gregory.Dietsche@cuw.edu>
>
> Acked-by: Tejun Heo<tj@kernel.org>
>
>
>> ---
>> drivers/ata/pata_acpi.c | 8 +-------
>> 1 files changed, 1 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c
>> index 91949d9..54145ed 100644
>> --- a/drivers/ata/pata_acpi.c
>> +++ b/drivers/ata/pata_acpi.c
>> @@ -195,8 +195,6 @@ static int pacpi_port_start(struct ata_port *ap)
>> struct pci_dev *pdev = to_pci_dev(ap->host->dev);
>> struct pata_acpi *acpi;
>>
>> - int ret;
>> -
>> if (ap->acpi_handle == NULL)
>> return -ENODEV;
>>
>> @@ -205,11 +203,7 @@ static int pacpi_port_start(struct ata_port *ap)
>> return -ENOMEM;
>> acpi->mask[0] = pacpi_discover_modes(ap,&ap->link.device[0]);
>> acpi->mask[1] = pacpi_discover_modes(ap,&ap->link.device[1]);
>> - ret = ata_bmdma_port_start(ap);
>> - if (ret< 0)
>> - return ret;
>> -
>> - return ret;
>> + return ata_bmdma_port_start(ap);
>> }
>>
>> static struct scsi_host_template pacpi_sht = {
> This was acked by TJ, but seems to be lost in the shuffle thus far. I'm
> adding trivial@kernel.org to the cc list since this is trivial and no
> one has picked up this patch to date.
It's in libata-dev, so it's been picked up...
We are in -rc, so it won't show up in a kernel until 3.0 is released,
and the merge window opens again.
Jeff
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] ata: remove unnecessary code
2011-07-20 2:10 ` Jeff Garzik
@ 2011-07-20 2:14 ` Greg Dietsche
0 siblings, 0 replies; 7+ messages in thread
From: Greg Dietsche @ 2011-07-20 2:14 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-ide, kernel-janitors, tj
On 07/19/2011 09:10 PM, Jeff Garzik wrote:
> On 07/19/2011 10:03 PM, Greg Dietsche wrote:
>>
>>
>> On 06/16/2011 11:39 AM, Greg Dietsche wrote:
>>> Compile tested.
>>> remove unnecessary code that matches this coccinelle pattern
>>> if (...)
>>> return ret;
>>> return ret;
>>>
>>> Signed-off-by: Greg Dietsche<Gregory.Dietsche@cuw.edu>
>>
>> Acked-by: Tejun Heo<tj@kernel.org>
>>
>>
>>> ---
>>> drivers/ata/pata_acpi.c | 8 +-------
>>> 1 files changed, 1 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c
>>> index 91949d9..54145ed 100644
>>> --- a/drivers/ata/pata_acpi.c
>>> +++ b/drivers/ata/pata_acpi.c
>>> @@ -195,8 +195,6 @@ static int pacpi_port_start(struct ata_port *ap)
>>> struct pci_dev *pdev = to_pci_dev(ap->host->dev);
>>> struct pata_acpi *acpi;
>>>
>>> - int ret;
>>> -
>>> if (ap->acpi_handle == NULL)
>>> return -ENODEV;
>>>
>>> @@ -205,11 +203,7 @@ static int pacpi_port_start(struct ata_port *ap)
>>> return -ENOMEM;
>>> acpi->mask[0] = pacpi_discover_modes(ap,&ap->link.device[0]);
>>> acpi->mask[1] = pacpi_discover_modes(ap,&ap->link.device[1]);
>>> - ret = ata_bmdma_port_start(ap);
>>> - if (ret< 0)
>>> - return ret;
>>> -
>>> - return ret;
>>> + return ata_bmdma_port_start(ap);
>>> }
>>>
>>> static struct scsi_host_template pacpi_sht = {
>> This was acked by TJ, but seems to be lost in the shuffle thus far. I'm
>> adding trivial@kernel.org to the cc list since this is trivial and no
>> one has picked up this patch to date.
>
> It's in libata-dev, so it's been picked up...
>
> We are in -rc, so it won't show up in a kernel until 3.0 is released,
> and the merge window opens again.
>
> Jeff
>
ok, sorry about that! I'd been watching the linux-next tree to see which
things were picked up so far.
Greg
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-07-20 2:14 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-16 16:39 [PATCH] ata: remove unnecessary code Greg Dietsche
2011-07-09 15:21 ` Greg Dietsche
2011-07-12 14:17 ` Tejun Heo
2011-07-20 2:03 ` Greg Dietsche
2011-07-20 2:04 ` Greg Dietsche
2011-07-20 2:10 ` Jeff Garzik
2011-07-20 2:14 ` Greg Dietsche
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).