[PATCH V4 09/16] staging: rtsx: use sg helper to operate scatterlist

Christoph Hellwig hch at lst.de
Mon Jun 17 09:24:46 UTC 2019

> +		struct scatterlist *sg = *cur_sg ?:
> +				(struct scatterlist *)scsi_sglist(srb);
> +

No need for the cast here.  And I have to say I hate that GNU C
non-standard shortshut in ? :.

Why not simply:

		struct scatterlist *sg = *cur_sg;

		if (!sg)
			sg = scsi_sglist(srb);

Which is a little more verbose, but much more readabe.

The rest of the patch looks fine to me.

More information about the devel mailing list