Re: [PATCH 13/24] aic7xxx: make BUILD_SCSIID() a function

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

 



On 5/3/22 07:12, Christoph Hellwig wrote:
+{
+	unsigned int scsiid =
+		((sdev->id << TID_SHIFT) & TID) |
+		((sdev->channel == 0) ? ahc->our_id : ahc->our_id_b) |
+		(sdev->channel == 0) ? 0 : TWIN_CHNLB;
+	return scsiid;

This still look weird.  Why not:

	unsigned int scsiid = (sdev->id << TID_SHIFT) & TID);

	if (sdev->channel == 0) {
		scsiid |= ahc->our_id;
	else
		scsiid |= ahc->our_id_b | TWIN_CHNLB;
	return scsiid;

?
Yeah, kbuild had been complaining, too.

Will be fixing it up.

Cheers,

Hannes
--
Dr. Hannes Reinecke                Kernel Storage Architect
hare@xxxxxxx                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



[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