Re: [PATCH v2] pciutils: Add decode support for RCECs

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

 



On Wed, 2020-06-24 at 12:44 -0700, Sean V Kelley wrote:
> That works well, I can also add the hyphen if it is adjacent with
> this,
> I think:
> 
> for (int dev=0; dev < 32; dev++)
>    {
>      if (BITS(bmap, dev, 1))
>        {
>          if (!adjcount)
>            printf("%s %u", (prevmatched) ? "," : "", dev);
>          prevmatched=1;
>          adjcount++;
>          prevdev=dev;
>        }
>      else
>        {
>          if (adjcount > 1)
>            printf("-%u", prevdev);
>          adjacent=0;

Rather, I meant:
adjcount=0; 

>        }
>    }
> 
> 




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux