RE: [PATCH 05/37] smartpqi: ensure controller is in SIS mode at init

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

 



> -----Original Message-----
> From: Bart Van Assche [mailto:Bart.VanAssche@xxxxxxxxxxx]
> Sent: Tuesday, April 25, 2017 2:58 PM
> To: hch@xxxxxxxxxxxxx; Viswas G <viswas.g@xxxxxxxxxxxxx>; Gerry
> Morong <gerry.morong@xxxxxxxxxxxxx>; Mahesh Rajashekhara
> <mahesh.rajashekhara@xxxxxxxxxxxxx>; POSWALD@xxxxxxxx; Scott
> Benesh <scott.benesh@xxxxxxxxxxxxx>; Don Brace
> <don.brace@xxxxxxxxxxxxx>; Bader Ali - Saleh
> <bader.alisaleh@xxxxxxxxxxxxx>; Kevin Barnett
> <kevin.barnett@xxxxxxxxxxxxx>; joseph.szczypek@xxxxxxx; Scott Teel
> <scott.teel@xxxxxxxxxxxxx>; jejb@xxxxxxxxxxxxxxxxxx; Justin Lindley
> <justin.lindley@xxxxxxxxxxxxx>; John Hall <John.Hall@xxxxxxxxxxxxx>
> Cc: linux-scsi@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH 05/37] smartpqi: ensure controller is in SIS mode at init
> 
> EXTERNAL EMAIL
> 
> 
> On Tue, 2017-04-25 at 14:46 -0500, Don Brace wrote:
> > +bool sis_is_kernel_up(struct pqi_ctrl_info *ctrl_info)
> > +{
> > +     u32 status;
> > +     bool kernel_up;
> > +
> > +     status = readl(&ctrl_info->registers->sis_firmware_status);
> > +
> > +     if (status & SIS_CTRL_KERNEL_UP)
> > +             kernel_up = true;
> > +     else
> > +             kernel_up = false;
> > +
> > +     return kernel_up;
> > +}
> 
> Since bool is a synonym for the C11 type _Bool, it is not necessary to
> convert explicitly to a truth value. The above code can be simplified into:
> 
> bool sis_is_kernel_up(struct pqi_ctrl_info *ctrl_info)
> {
>         return readl(&ctrl_info->registers->sis_firmware_status) &
>                 SIS_CTRL_KERNEL_UP;
> }

Done
Thanks for your review

Thanks,
Don Brace
ESC - Smart Storage
Microsemi Corporation






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux