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/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?

> +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.

Thanks,

Bart.



[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