Skip to contentSkip to conversation

staging: media: cxd2099: remove memcpy of similar structure variables

PATCH In review Devendra Naga 3 participants 5 messages Aug 5, 2012 – Aug 12, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: media: cxd2099: remove memcpy of similar structure variables

structure variables can be assigned, no memcpy needed, remove the memcpy and use assignment for the cfg and en variables.

Tested by Compilation Only

---
 drivers/staging/media/cxd2099/cxd2099.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/cxd2099/cxd2099.c +2 -2
index 4f2235f..0ff1972 100644
@@ -696,13 +696,13 @@ struct dvb_ca_en50221 *cxd2099_attach(struct cxd2099_cfg *cfg,
 		return NULL;
 
 	mutex_init(&ci->lock);
-	memcpy(&ci->cfg, cfg, sizeof(struct cxd2099_cfg));
+	ci->cfg = *cfg;
 	ci->i2c = i2c;
 	ci->lastaddress = 0xff;
 	ci->clk_reg_b = 0x4a;
 	ci->clk_reg_f = 0x1b;
 
-	memcpy(&ci->en, &en_templ, sizeof(en_templ));
+	ci->en = en_templ;
 	ci->en.data = ci;
 	init(ci);
 	printk(KERN_INFO "Attached CXD2099AR at %02x\n", ci->cfg.adr);
Signature · 1 line
1.7.9.5
#1 lore raw

Hi Devendra,

Thanks for the patch,

Quoted 6 lines · Devendra Naga

structure variables can be assigned, no memcpy needed, remove the memcpy and use assignment for the cfg and en variables.

Tested by Compilation Only

I'm not sure this is completely valid or useful.

If you read Documentation/SubmittingPatches (which you should) you will find references to Acked-by, Reported-by, Tested-by, but not this one.

You don't need to give me credit for the patch:
it's *your* patch, all I did was a very simple suggestion :-)

Plus, there was some discussion called "Kernel Komedians" [1] where some developer expressed their concern on the number of weird signatures that have recently appeared.

Regards,
Ezequiel.

[1] http://lwn.net/Articles/503829/

#2 lore raw

Hi Ezequiel,

Quoted 13 lines · Ezequiel Garcia

Hi Devendra,

Thanks for the patch,

Quoted 6 lines · Devendra Naga

structure variables can be assigned, no memcpy needed, remove the memcpy and use assignment for the cfg and en variables.

Tested by Compilation Only

Quoted 9 lines

I'm not sure this is completely valid or useful.

If you read Documentation/SubmittingPatches (which you should) you will find references to Acked-by, Reported-by, Tested-by, but not this one.

You don't need to give me credit for the patch:
it's *your* patch, all I did was a very simple suggestion :-)

Ok. I will remove the Suggested-by line and send out the patch again with PATCH RESEND subject line.
Is it ok?

Quoted 8 lines

Plus, there was some discussion called "Kernel Komedians" [1] where some developer expressed their concern on the number of weird signatures that have recently appeared.

Regards,
Ezequiel.

[1] http://lwn.net/Articles/503829/

I will read out the Documentation and will try to send patches accordingly,

Thanks a lot for your help and your time,

#3 lore raw
Quoted 22 lines · Devendra Naga

Hi Ezequiel,

Quoted 19 lines · Ezequiel Garcia

Hi Devendra,

Thanks for the patch,

Quoted 6 lines · Devendra Naga

structure variables can be assigned, no memcpy needed, remove the memcpy and use assignment for the cfg and en variables.

Tested by Compilation Only

I'm not sure this is completely valid or useful.

If you read Documentation/SubmittingPatches (which you should) you will find references to Acked-by, Reported-by, Tested-by, but not this one.

Quoted 7 lines
Quoted 3 lines

You don't need to give me credit for the patch:
it's *your* patch, all I did was a very simple suggestion :-)

Ok. I will remove the Suggested-by line and send out the patch again with PATCH RESEND subject line.
Is it ok?

I'm not entirely sure. Perhaps you can leave it as it is, and let Mauro remove that line.

Regards,
Ezequiel.

#4 lore raw

Em 06-08-2012 07:40, Ezequiel Garcia escreveu:

Quoted 27 lines
Quoted 25 lines · Devendra Naga

Hi Ezequiel,

Quoted 22 lines · Ezequiel Garcia

Hi Devendra,

Thanks for the patch,

Quoted 6 lines · Devendra Naga

structure variables can be assigned, no memcpy needed, remove the memcpy and use assignment for the cfg and en variables.

Tested by Compilation Only

I'm not sure this is completely valid or useful.

If you read Documentation/SubmittingPatches (which you should) you will find references to Acked-by, Reported-by, Tested-by, but not this one.

You don't need to give me credit for the patch:
it's *your* patch, all I did was a very simple suggestion :-)

Quoted 7 lines
Quoted 4 lines

Ok. I will remove the Suggested-by line and send out the patch again with PATCH RESEND subject line.
Is it ok?

I'm not entirely sure. Perhaps you can leave it as it is, and let Mauro remove that line.

I prefer keeping it, to preserve this patch history.

Regards,
Mauro