lkml.org 
[lkml]   [2018]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] scsi: ufs: add trace event for ufs upiu
Date
On Thu, 2018-03-22 at 13:50 +0200, Ohad Sharabi wrote:
> +static void ufshcd_add_cmd_upiu_trace(struct ufs_hba *hba, unsigned int tag,
> + const char *str)
> +{
> + struct utp_upiu_req *rq = hba->lrb[tag].ucd_req_ptr;
> +
> + trace_ufshcd_upiu(dev_name(hba->dev), str, (u8 *)&rq->header,
> + (u8 *)&rq->sc.cdb);
> +}
> +
> +static void ufshcd_add_query_upiu_trace(struct ufs_hba *hba, unsigned int tag,
> + const char *str)
> +{
> + struct utp_upiu_req *rq = hba->lrb[tag].ucd_req_ptr;
> +
> + trace_ufshcd_upiu(dev_name(hba->dev), str, (u8 *)&rq->header,
> + (u8 *)&rq->qr);
> +}
> +
> +static void ufshcd_add_tm_upiu_trace(struct ufs_hba *hba, unsigned int tag,
> + const char *str)
> +{
> + struct utp_task_req_desc *descp;
> + struct utp_upiu_task_req *task_req;
> + int off = (int)tag - hba->nutrs;
> +
> + descp = &hba->utmrdl_base_addr[off];
> + task_req = (struct utp_upiu_task_req *)descp->task_req_upiu;
> + trace_ufshcd_upiu(dev_name(hba->dev), str, (u8 *)&task_req->header,
> + (u8 *)&task_req->input_param1);
> +}

Can the trace_ufshcd_upiu() definition be changed such that the third and
fourth argument are declared as 'void *' such that the ugly '(u8 *)' casts
can be left out from the callers?

Thanks,

Bart.


\
 
 \ /
  Last update: 2018-03-22 15:16    [W:0.200 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site