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

Christoph Hellwig
2022-05-03T14:12:59Z

> +{
> + 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;

?