From: Elias Oltmanns <eo@nebensachen.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: jeff@garzik.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH 4/4] libata: clean up the SFF code for coding style
Date: Wed, 22 Oct 2008 17:48:38 +0200 [thread overview]
Message-ID: <874p34ska1.fsf@denkblock.local> (raw)
In-Reply-To: 20081017180903.7781.51521.stgit@localhost.localdomain
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> From: Alan Cox <alan@redhat.com>
>
> Signed-off-by: Alan Cox <alan@redhat.com>
> ---
>
> drivers/ata/libata-sff.c | 136 +++++++++++++++++++++++-----------------------
> 1 files changed, 69 insertions(+), 67 deletions(-)
>
>
> diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
> index 1afaa96..03c2d41 100644
> --- a/drivers/ata/libata-sff.c
> +++ b/drivers/ata/libata-sff.c
[...]
> @@ -1016,18 +1036,19 @@ static void atapi_pio_bytes(struct ata_queued_cmd *qc)
> * RETURNS:
> * 1 if ok in workqueue, 0 otherwise.
> */
> -static inline int ata_hsm_ok_in_wq(struct ata_port *ap, struct ata_queued_cmd *qc)
> +static inline int ata_hsm_ok_in_wq(struct ata_port *ap,
> + struct ata_queued_cmd *qc)
> {
> if (qc->tf.flags & ATA_TFLAG_POLLING)
> return 1;
>
> if (ap->hsm_task_state == HSM_ST_FIRST) {
> if (qc->tf.protocol == ATA_PROT_PIO &&
> - (qc->tf.flags & ATA_TFLAG_WRITE))
> + (qc->tf.flags & ATA_TFLAG_WRITE))
> return 1;
Sorry, I don't understand that at all. In my opinion, the nesting of
parentheses is more obvious and easier to understand without that
change. Moreover, the indentation of the return statement would have
needed fixing much more desperately ;-).
>
> if (ata_is_atapi(qc->tf.protocol) &&
> - !(qc->dev->flags & ATA_DFLAG_CDB_INTR))
> + !(qc->dev->flags & ATA_DFLAG_CDB_INTR))
Ditto.
[...]
> @@ -2711,17 +2760,18 @@ int ata_pci_sff_prepare_host(struct pci_dev *pdev,
> *r_host = host;
> return 0;
>
> - err_bmdma:
> +err_bmdma:
> /* This is necessary because PCI and iomap resources are
> * merged and releasing the top group won't release the
> * acquired resources if some of those have been acquired
> * before entering this function.
> */
> pcim_iounmap_regions(pdev, 0xf);
> - err_out:
> +err_out:
Yes, I've wondered about these myself occasionally. Personally, I don't
insert a blank before those labels either and would be in favour of such
a change. But do we actually have a convention regarding this matter?
Regards,
Elias
next prev parent reply other threads:[~2008-10-22 15:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-17 18:08 [PATCH 0/4] Small set of further libata patches Alan Cox
2008-10-17 18:08 ` [PATCH 1/4] pata_ninja32: suspend/resume support Alan Cox
2008-10-28 4:42 ` Jeff Garzik
2008-10-28 9:37 ` Alan Cox
2008-10-17 18:08 ` [PATCH 2/4] libata: Drain data on errors Alan Cox
2008-10-22 15:46 ` Elias Oltmanns
2008-10-22 16:44 ` Alan Cox
2008-10-27 19:14 ` Mark Lord
2008-10-27 21:54 ` Alan Cox
2008-10-17 18:08 ` [PATCH 3/4] libata: Improve timeout handling Alan Cox
2008-10-22 15:47 ` Elias Oltmanns
2008-10-22 16:04 ` Alan Cox
2008-10-17 18:09 ` [PATCH 4/4] libata: clean up the SFF code for coding style Alan Cox
2008-10-22 15:48 ` Elias Oltmanns [this message]
2008-10-22 16:02 ` Alan Cox
2008-10-23 0:35 ` Jeff Garzik
2008-10-28 1:49 ` Tejun Heo
2008-10-28 9:47 ` Elias Oltmanns
2008-10-29 2:05 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874p34ska1.fsf@denkblock.local \
--to=eo@nebensachen.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).