Message ID | 20200423071224.500849-3-hch@lst.de |
---|---|
State | Not Applicable |
Delegated to: | David Miller |
Headers | show |
Series | [1/7] block: add a cdrom_device_info pointer to struct gendisk | expand |
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>
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;
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(-)