linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>
Cc: Tim Waugh <tim@cyberelk.net>, Borislav Petkov <bp@alien8.de>,
	Jan Kara <jack@suse.com>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/7] ide-cd: rename cdrom_read_tocentry
Date: Thu, 23 Apr 2020 07:41:02 +0000	[thread overview]
Message-ID: <BY5PR04MB6900BB75766839E435B5B472E7D30@BY5PR04MB6900.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20200423071224.500849-3-hch@lst.de

On 2020/04/23 16:15, Christoph Hellwig wrote:
> Give the cdrom_read_tocentry function and ide_ prefix to not conflict
> with the soon to be added generic function.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  drivers/ide/ide-cd.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
> index 40e124eb918a..7f17f8303988 100644
> --- a/drivers/ide/ide-cd.c
> +++ b/drivers/ide/ide-cd.c
> @@ -1034,8 +1034,8 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity,
>  	return 0;
>  }
>  
> -static int cdrom_read_tocentry(ide_drive_t *drive, int trackno, int msf_flag,
> -				int format, char *buf, int buflen)
> +static int ide_cdrom_read_tocentry(ide_drive_t *drive, int trackno,
> +		int msf_flag, int format, char *buf, int buflen)
>  {
>  	unsigned char cmd[BLK_MAX_CDB];
>  
> @@ -1104,7 +1104,7 @@ int ide_cd_read_toc(ide_drive_t *drive)
>  				     sectors_per_frame << SECTOR_SHIFT);
>  
>  	/* first read just the header, so we know how long the TOC is */
> -	stat = cdrom_read_tocentry(drive, 0, 1, 0, (char *) &toc->hdr,
> +	stat = ide_cdrom_read_tocentry(drive, 0, 1, 0, (char *) &toc->hdr,
>  				    sizeof(struct atapi_toc_header));
>  	if (stat)
>  		return stat;
> @@ -1121,7 +1121,7 @@ int ide_cd_read_toc(ide_drive_t *drive)
>  		ntracks = MAX_TRACKS;
>  
>  	/* now read the whole schmeer */
> -	stat = cdrom_read_tocentry(drive, toc->hdr.first_track, 1, 0,
> +	stat = ide_cdrom_read_tocentry(drive, toc->hdr.first_track, 1, 0,
>  				  (char *)&toc->hdr,
>  				   sizeof(struct atapi_toc_header) +
>  				   (ntracks + 1) *
> @@ -1141,7 +1141,7 @@ int ide_cd_read_toc(ide_drive_t *drive)
>  		 * Heiko Eißfeldt.
>  		 */
>  		ntracks = 0;
> -		stat = cdrom_read_tocentry(drive, CDROM_LEADOUT, 1, 0,
> +		stat = ide_cdrom_read_tocentry(drive, CDROM_LEADOUT, 1, 0,
>  					   (char *)&toc->hdr,
>  					   sizeof(struct atapi_toc_header) +
>  					   (ntracks + 1) *
> @@ -1181,7 +1181,7 @@ int ide_cd_read_toc(ide_drive_t *drive)
>  
>  	if (toc->hdr.first_track != CDROM_LEADOUT) {
>  		/* read the multisession information */
> -		stat = cdrom_read_tocentry(drive, 0, 0, 1, (char *)&ms_tmp,
> +		stat = ide_cdrom_read_tocentry(drive, 0, 0, 1, (char *)&ms_tmp,
>  					   sizeof(ms_tmp));
>  		if (stat)
>  			return stat;
> @@ -1195,7 +1195,7 @@ int ide_cd_read_toc(ide_drive_t *drive)
>  
>  	if (drive->atapi_flags & IDE_AFLAG_TOCADDR_AS_BCD) {
>  		/* re-read multisession information using MSF format */
> -		stat = cdrom_read_tocentry(drive, 0, 1, 1, (char *)&ms_tmp,
> +		stat = ide_cdrom_read_tocentry(drive, 0, 1, 1, (char *)&ms_tmp,
>  					   sizeof(ms_tmp));
>  		if (stat)
>  			return stat;
> 

Looks OK to me.

Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>

-- 
Damien Le Moal
Western Digital Research

  reply	other threads:[~2020-04-23  7:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23  7:12 stop using ioctl_by_bdev for file system access to CDROMs Christoph Hellwig
2020-04-23  7:12 ` [PATCH 1/7] block: add a cdrom_device_info pointer to struct gendisk Christoph Hellwig
2020-04-23  7:40   ` Damien Le Moal
2020-04-23  7:12 ` [PATCH 2/7] ide-cd: rename cdrom_read_tocentry Christoph Hellwig
2020-04-23  7:41   ` Damien Le Moal [this message]
2020-04-23  7:12 ` [PATCH 3/7] cdrom: factor out a cdrom_read_tocentry helper Christoph Hellwig
2020-04-23  7:41   ` Damien Le Moal
2020-04-23  7:12 ` [PATCH 4/7] cdrom: factor out a cdrom_multisession helper Christoph Hellwig
2020-04-23  7:41   ` Damien Le Moal
2020-04-23  7:12 ` [PATCH 5/7] hfsplus: stop using ioctl_by_bdev Christoph Hellwig
2020-04-23  7:42   ` Damien Le Moal
2020-04-23  7:12 ` [PATCH 6/7] isofs: " Christoph Hellwig
2020-04-23  7:42   ` Damien Le Moal
2020-04-23 11:03   ` Jan Kara
2020-04-24  6:52     ` Christoph Hellwig
2020-04-24  9:21       ` Jan Kara
2020-04-23  7:12 ` [PATCH 7/7] udf: " Christoph Hellwig
2020-04-23  7:43   ` Damien Le Moal
2020-04-23 11:05   ` Jan Kara
2020-04-25  7:56 stop using ioctl_by_bdev for file system access to CDROMs v2 Christoph Hellwig
2020-04-25  7:57 ` [PATCH 2/7] ide-cd: rename cdrom_read_tocentry Christoph Hellwig
2020-04-27  6:16   ` Hannes Reinecke

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=BY5PR04MB6900BB75766839E435B5B472E7D30@BY5PR04MB6900.namprd04.prod.outlook.com \
    --to=damien.lemoal@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=bp@alien8.de \
    --cc=hch@lst.de \
    --cc=jack@suse.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=tim@cyberelk.net \
    /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).