Re: [PATCH 4/4] Staging: rtl8192u: r819xU_firmware: added space after comma

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

 



On Thu, 2015-02-19 at 21:54 -0800, Tolga Ceylan wrote:
> Resolved space required after that ',' errors reported by checkpatch.

trivia:

> diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
[]
> @@ -66,7 +66,7 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address,
>  		skb  = dev_alloc_skb(USB_HWDESC_HEADER_LEN + frag_length + 4);
>  		if (!skb)
>  			return false;
> -		memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev));
> +		memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev));


Might as well remove the unnecessary cast too:

		memcpy(skb->cb, &dev, sizeof(dev));

but it might be better to avoid the memcpy and use an assign

	*(struct net_device *)skb->cb = dev;

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux