Re: [PATCH] scsi: st: Regression fix: Don't set pos_unknown just after device recognition

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

 



On 16. Dec 2024, at 19.18, Bart Van Assche <bvanassche@xxxxxxx> wrote:
> 
> On 12/16/24 3:37 AM, Kai Mäkisara wrote:
>> diff --git a/drivers/scsi/st.h b/drivers/scsi/st.h
>> index 7a68eaba7e81..1aaaf5369a40 100644
>> --- a/drivers/scsi/st.h
>> +++ b/drivers/scsi/st.h
>> @@ -170,6 +170,7 @@ struct scsi_tape {
>>   unsigned char rew_at_close;  /* rewind necessary at close */
>>   unsigned char inited;
>>   unsigned char cleaning_req;  /* cleaning requested? */
>> + unsigned char first_tur;     /* first TEST UNIT READY */
>>   int block_size;
>>   int min_block;
>>   int max_block;
> 
> Why 'unsigned char' instead of 'bool'?

For historical reasons I used the same type as in the other options.
(I happen to have 1.3.30 sources from 1995. The flags in st.h are
unsigned chars there. AFAIK, the type bool was introduces in C99
in 1999.)

> Should perhaps all 'unsigned char' occurrences in struct scsi_tape be
> changed into 'bool'? I'm not aware of any other Linux kernel code that
> uses the type 'unsigned char' for boolean values.

This also came into my mind, but this is a regression fix and I tried
to keep it minimal.

A patch to change the types can be done later.

Thanks,
Kai






[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