Re: [PATCH 1/3] scsi: libsas: introduce struct smp_disc_resp

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

 




  #define DISCOVER_REQ_SIZE  16
-#define DISCOVER_RESP_SIZE 56
+#define DISCOVER_RESP_SIZE sizeof(struct smp_disc_resp)

I feel that it would be nice to get rid of these.

Maybe something like:

#define smp_execute_task_wrap(dev, req, resp)\
smp_execute_task(dev, req, sizeof(*req), resp, DISCOVER_REQ_SIZE)


static int sas_ex_phy_discover_helper(struct domain_device *dev, u8 *disc_req, struct smp_disc_resp *disc_resp, int single)
{
	res = smp_execute_task_wrap(dev, disc_req, disc_resp);

We could even introduce a smp req struct to get rid of DISCOVER_REQ_SIZE - the (current) code would be a bit less cryptic then.

But no big deal. Looks ok apart from that.

Thanks,
John



[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