From: Mike Frysinger <vapier@gentoo.org>
To: "Adrian McMenamin" <lkmladrian@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org,
"Paul Mundt" <lethal@linux-sh.org>,
axboe@kernel.dk
Subject: Re: [PATCH - SH/Dreamcast] Add support for GD-Rom device
Date: Sat, 22 Dec 2007 05:44:24 -0500 [thread overview]
Message-ID: <200712220544.25102.vapier@gentoo.org> (raw)
In-Reply-To: <8b67d60712201607k66d67fa2la8b21fc698fdb3ab@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2457 bytes --]
On Thursday 20 December 2007, Adrian McMenamin wrote:
> On 20/12/2007, Adrian McMenamin <lkmladrian@gmail.com> wrote:
> > This patch adds support for the CD Rom device (called a "GD Rom") on
> > the SEGA Dreamcast.This device has a command block similar to a
> > standard ATA-3 device, though implements Sega's proprietary packet
> > interface - the so-called "Sega Packet Interface".
thanks for keeping the dc port up to date :)
> diff -ruN linux-2.6-orig/drivers/block/Kconfig
> +config GDROM
most people use a space here *shrug*
> + tristate "SEGA Dreamcast GD-ROM drive"
> + depends on SH_DREAMCAST
> + help
> + A standard SEGA Dreamcast comes with a modified CD ROM drive called a
> + "GD-ROM" by SEGA to signify it is capable of reading special disks
> + with up to 1 GB of data. This drive will also read standard CD ROM
> + disks. Select this option to access any disks in your GD ROM drive.
> + Most users will want to say "Y" here.
this line has broken whitespace at the start
> + You can also build this as a module - which will be called gdrom.ko
no need for the - there ...
> +static int gdrom_preparedisk_cmd(void)
> + if ((gd.status & 0x01) != 0) {
no need for the compare i dont think ?
if (gd.status & 0x01)
> +static int gdrom_readtoc_cmd(struct gdromtoc *toc, int session)
> + if ((gd.status & 0x01) != 0)
same here
> +static int gdrom_drivestatus(struct cdrom_device_info *cd_info, int
> + sense &=0xF0;
missing a space after the = ...
> +static void gdrom_request(struct request_queue *rq)
> + if (! blk_fs_request(req)) {
extraneous space with the ! there
> +static int __init probe_gdrom(struct platform_device *devptr)
> + sprintf(gd.cd_info->name, GDROM_DEV_NAME);
> + sprintf(gd.disk->disk_name, GDROM_DEV_NAME);
strcpy() prob runs with lower overhead
> +static int __init init_gdrom(void)
> +{
> + rc = platform_driver_register(&gdrom_driver);
> + if (rc) {
> + printk(KERN_INFO "Could not register GDROM driver - error 0x%X\n", rc);
> + return -EPERM;
shoudnt you return rc ? then there's probably no need to display the rc value
in the printk() as it'd get passed back to higher levels ...
> + pd = platform_device_register_simple(GDROM_DEV_NAME, -1, NULL, 0);
> + if (IS_ERR(pd)) {
> + platform_driver_unregister(&gdrom_driver);
> + return -ENODEV;
similar thing ... return the error stored in pd
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
prev parent reply other threads:[~2007-12-22 10:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-20 23:59 [PATCH - SH/Dreamcast] Add support for GD-Rom device Adrian McMenamin
2007-12-21 0:07 ` Adrian McMenamin
2007-12-21 12:14 ` Jens Axboe
2007-12-21 12:26 ` Jens Axboe
2007-12-21 14:11 ` Adrian McMenamin
2007-12-21 14:22 ` Jens Axboe
2007-12-21 14:43 ` Adrian McMenamin
2007-12-21 15:01 ` Jens Axboe
2007-12-21 19:12 ` Adrian McMenamin
2007-12-21 19:35 ` Jens Axboe
2007-12-21 19:53 ` Adrian McMenamin
2007-12-22 10:44 ` Mike Frysinger [this message]
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=200712220544.25102.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=axboe@kernel.dk \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=lkmladrian@gmail.com \
/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