Re: [PATCH v2] scsi: ufs: add trace event for ufs upiu

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

 



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.






[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