LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Borislav Petkov <petkovbb@googlemail.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH 4/5] ide-cd: shorten lines longer than 80 columns
Date: Thu, 28 Feb 2008 07:16:54 +0100	[thread overview]
Message-ID: <20080228061654.GE9545@gollum.tnic> (raw)
In-Reply-To: <200802280001.43316.bzolnier@gmail.com>

On Thu, Feb 28, 2008 at 12:01:43AM +0100, Bartlomiej Zolnierkiewicz wrote:
> On Wednesday 27 February 2008, Borislav Petkov wrote:
> > On Wed, Feb 27, 2008 at 10:18:50PM +0100, Bartlomiej Zolnierkiewicz wrote:
> > > On Wednesday 27 February 2008, Borislav Petkov wrote:
> > > > Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
> > > 
> > > interdiff for the merged version
> > > 
> 
> [...]
> 
> > > diff -u b/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
> > > --- b/drivers/ide/ide-cd.c
> > > +++ b/drivers/ide/ide-cd.c
> > > @@ -510,7 +510,7 @@
> > >  	default:
> > >  		if (!(rq->cmd_flags & REQ_QUIET))
> > >  			printk(KERN_INFO "ide-cd: cmd 0x%x timed out\n",
> > > -				rq->cmd[0]);
> > > +					 rq->cmd[0]);
> > 
> > why do you push the rq->cmd[0] thingy back here. Shouldn't it be aligned
> > with the opening brace as the zillion others so far?
> 
> IDE is quite consistent with the above style but maybe it is just me being
> used to it.  I could revert this change if you feel strong about it...
> 

not at all, i'm not that concerned with codestyle issues as long as it is mostly
readable :). The only issue of importance is consistency along all the source
files so i'll try to keep up with the rest of ide.

> > > @@ -819,8 +819,8 @@
> > >  static void restore_request(struct request *rq)
> > >  {
> > >  	if (rq->buffer != bio_data(rq->bio)) {
> > > -		sector_t n = (rq->buffer - (char *) bio_data(rq->bio)) /
> > > -				SECTOR_SIZE;
> > > +		sector_t n =
> > > +			(rq->buffer - (char *)bio_data(rq->bio)) / SECTOR_SIZE;
> > 
> > i must say, lines like this one always look ugly, no matter the formatting
> > tricks.
> 
> For this case there is a simple solution: fix ide-cd to use hwif->sg_table
> instead of having it to walk rq->bio's and the whole function will vanish. ;-)

Is this hwif->sg_table walk something similar to what it is being done in
ide_build_sglist() or ide_build_dmatable()?

> [ IOW We are putting way too much time into these coding style fixes and as
>   the old code is replaced with the new one the coding style improves itself. ]

Exactly my thoughts. On the one hand, it is important to clean up the code
before you stare at it for a magnitude of hours looking for bugs and actually this
cleanup was supposed to be really brief, to begin with, but you know how things
really work out in reality :). On the other hand, there are places in ide-cd that
are just horrible and need rewriting, besides API changes.

On a different note, i'm working on ripping out pipelining from ide-tape
since this'll make ATAPI unification a lot easier. Do you happen to have figured
out what this tape->merge_stage is supposed to do, i know it is a pipeline stage
and in all r/w requests the tape->merge_stage->bh is the buffer that
receives/sends the data to/from the device but still it looks really strange.
What i've done so far is remove the pipeline control algos and have kept the
tape->merge_stage for simplicity. In a different cycle i'll have to kick it out
too replacing it with a simple data buffer.

Any ideas?

Thanks.

-- 
Regards/Gruß,
    Boris.

  parent reply	other threads:[~2008-02-28  6:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-27 18:20 [PATCH 0/5] ide-cd: trivial fixes Borislav Petkov
2008-02-27 18:20 ` [PATCH 1/5] ide-cd: include proper headers Borislav Petkov
2008-02-27 18:20 ` [PATCH 2/5] ide-cd: put all proc-related code at one place Borislav Petkov
2008-02-27 18:20 ` [PATCH 3/5] ide-cd: fixup comments Borislav Petkov
2008-02-27 21:18   ` Bartlomiej Zolnierkiewicz
2008-02-27 18:20 ` [PATCH 4/5] ide-cd: shorten lines longer than 80 columns Borislav Petkov
2008-02-27 21:18   ` Bartlomiej Zolnierkiewicz
2008-02-27 22:15     ` Borislav Petkov
2008-02-27 23:01       ` Bartlomiej Zolnierkiewicz
2008-02-27 23:15         ` Bartlomiej Zolnierkiewicz
2008-02-28  6:16         ` Borislav Petkov [this message]
2008-02-27 18:20 ` [PATCH 5/5] ide-cd: fix remaining checkpatch.pl issues Borislav Petkov
2008-02-27 21:18   ` Bartlomiej Zolnierkiewicz
2008-02-27 21:18 ` [PATCH 0/5] ide-cd: trivial fixes Bartlomiej Zolnierkiewicz
2008-02-27 22:18   ` Borislav Petkov
2008-02-27 22:48     ` Bartlomiej Zolnierkiewicz
2008-02-28  5:52       ` Borislav Petkov

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=20080228061654.GE9545@gollum.tnic \
    --to=petkovbb@googlemail.com \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petkovbb@gmail.com \
    --subject='Re: [PATCH 4/5] ide-cd: shorten lines longer than 80 columns' \
    /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

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).