bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnumach/linux/src/drivers/scsi/sr.c (requeue_sr_request): remove unn


From: Samuel Thibault
Subject: Re: gnumach/linux/src/drivers/scsi/sr.c (requeue_sr_request): remove unneeded variable
Date: Wed, 5 Jun 2013 10:48:58 +0200
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Hello,

Marin Ramesa, le Wed 05 Jun 2013 10:38:58 +0200, a écrit :
> A variable that is constant throughout the whole function and not used 
> in other statements except for keeping its value; probably a debugging 
> leftover.

This is code from Linux, I don't think we want to diverge from the
upstream source just for cleaning some warnings. This code will go away
when we move to diskdde, at least.

Samuel

> --- ./gnumach/linux/src/drivers/scsi/sr.c     2013-06-01 20:41:44.358545464 
> +0200
> +++ ./gnumach1/linux/src/drivers/scsi/sr.c    2013-06-05 10:11:22.746388719 
> +0200
> @@ -719,11 +719,9 @@
>  void requeue_sr_request (Scsi_Cmnd * SCpnt)
>  {
>       unsigned int dev, block, realcount;
> -     unsigned char cmd[10], *buffer, tries;
> +     unsigned char cmd[10], *buffer;
>       int this_count, start, end_rec;
>      
> -     tries = 2;
> -    
>   repeat:
>       if(!SCpnt || SCpnt->request.rq_status == RQ_INACTIVE) {
>               do_sr_request();
> @@ -738,14 +736,12 @@
>       if (dev >= sr_template.nr_dev) {
>               /* printk("CD-ROM request error: invalid device.\n");           
>         */
>               SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
> -             tries = 2;
>               goto repeat;
>       }
>      
>       if (!scsi_CDs[dev].use) {
>               /* printk("CD-ROM request error: device marked not in use.\n"); 
>         */
>               SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
> -             tries = 2;
>               goto repeat;
>       }
>      
> @@ -756,7 +752,6 @@
>        */
>               /* printk("CD-ROM has been changed.  Prohibiting further 
> I/O.\n");      */
>               SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors);
> -             tries = 2;
>               goto repeat;
>       }
>       


-- 
Samuel
<P> je sens venir la fonte 14 pour le rapport
 -+- #ens-mim -+-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]