[PATCH v6 03/15] net/xsc: add xsc mailbox
    Stephen Hemminger 
    stephen at networkplumber.org
       
    Mon Jan 20 19:19:24 CET 2025
    
    
  
On Mon, 20 Jan 2025 19:14:37 +0800
"WanRenyong" <wanry at yunsilicon.com> wrote:
> +static struct xsc_cmdq_req_msg *
> +xsc_cmdq_req_msg_alloc(struct xsc_dev *xdev, int len)
> +{
> +	struct xsc_cmdq_req_msg *msg;
> +	struct xsc_cmdq_mbox *head = NULL;
> +	int cmd_len, nb_mbox;
> +
> +	msg = (struct xsc_cmdq_req_msg *)malloc(sizeof(*msg));
Malloc returns void *, so cast here is unnecessary in C
    
    
More information about the dev
mailing list