#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