Re: [PATCH 07/39] scsi: introduce scsi_status_is_check_condition()

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

 



On 4/26/21 5:34 AM, Bart Van Assche wrote:
> On 4/23/21 4:39 AM, Hannes Reinecke wrote:
>> Add a helper function scsi_status_is_check_condtion() to
>                                              ^^^^^^^^ typo
>> encapsulate the frequent checks for SAM_STAT_CHECK_CONDITION.
> 
> [ ... ]
> 
>> +/** scsi_status_is_check_condition - check the status return.
>> + *
>> + * @status: the status passed up from the driver (including host and
>> + *          driver components)
>> + *
>> + * This returns true if the status code is SAM_STAT_CHECK_CONDITION.
>> + */
> 
> Shouldn't the function name and the description appear on the second
> line of the kernel-doc header?
> 
Yeah, you're right. I used copy&paste from the function above, looked
kinda fishy even then ...

Will be fixing it up.

>> +static inline int scsi_status_is_check_condition(int status)
>> +{
>> +	if (status < 0)
>> +		return false;
>> +	status &= 0xfe;
>> +	return (status == SAM_STAT_CHECK_CONDITION);
>> +}
> 
> No parentheses around the expression in a return statement please.
> 
Will be fixing it up.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		        Kernel Storage Architect
hare@xxxxxxx			               +49 911 74053 688
SUSE Software Solutions Germany GmbH, 90409 Nürnberg
GF: F. Imendörffer, HRB 36809 (AG Nürnberg)



[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