On 11/25/21 11:33 PM, Yanling Song wrote:
+/* bsg dispatch user command */ +static int spraid_bsg_host_dispatch(struct bsg_job *job) +{ + struct Scsi_Host *shost = dev_to_shost(job->dev); + struct spraid_dev *hdev = shost_priv(shost); + struct request *rq = blk_mq_rq_from_pdu(job); + struct spraid_bsg_request *bsg_req = (struct spraid_bsg_request *)(job->request);
Since job->request has type 'void *', no cast is necessary when assigning job->request to bsg_req. Hence please leave out the cast. Thanks, Bart.