Re: [PATCH 2/2] staging: media: cxd2099: use kzalloc to allocate ci pointer of type struct cxd in cxd2099_attach

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

 



Hi Devendra,

On Sat, Aug 4, 2012 at 3:12 PM, Devendra Naga
<develkernel412222@xxxxxxxxx> wrote:
>
>         mutex_init(&ci->lock);
>         memcpy(&ci->cfg, cfg, sizeof(struct cxd2099_cfg));

While you're still looking at this driver, perhaps you can change the memcpy
with a plain struct assignment (if you feel like).
It's really pointless to use a memcpy here.

Something like this:

-       memcpy(&ci->cfg, cfg, sizeof(struct cxd2099_cfg));
+       ci->cfg = *cfg;

Regards,
Ezequiel.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux