Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1556903 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2017-01-11 21:40 +0100 |
| Last post | 2017-01-11 23:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 02/18] mtd-cfi_cmdset_0001: Improve another size determination in cfi_intelext_partition_fixup() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-01-11 21:40 +0100
Re: [PATCH 02/18] mtd-cfi_cmdset_0001: Improve another size determination in cfi_intelext_partition_fixup() Marek Vasut <marek.vasut@gmail.com> - 2017-01-11 23:10 +0100
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-01-11 21:40 +0100 |
| Subject | [PATCH 02/18] mtd-cfi_cmdset_0001: Improve another size determination in cfi_intelext_partition_fixup() |
| Message-ID | <sYxQC-34a-7@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Tue, 10 Jan 2017 19:09:58 +0100 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/mtd/chips/cfi_cmdset_0001.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index 68227aa74d22..0d7c2ef533d1 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c @@ -753,7 +753,7 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd, kfree(newcfi); return -ENOMEM; } - memcpy(newcfi, cfi, sizeof(struct cfi_private)); + memcpy(newcfi, cfi, sizeof(*cfi)); newcfi->numchips = numvirtchips; newcfi->chipshift = partshift; -- 2.11.0
[toc] | [next] | [standalone]
| From | Marek Vasut <marek.vasut@gmail.com> |
|---|---|
| Date | 2017-01-11 23:10 +0100 |
| Subject | Re: [PATCH 02/18] mtd-cfi_cmdset_0001: Improve another size determination in cfi_intelext_partition_fixup() |
| Message-ID | <sYzfI-42A-33@gated-at.bofh.it> |
| In reply to | #1556903 |
On 01/11/2017 09:37 PM, SF Markus Elfring wrote: > From: Markus Elfring <elfring@users.sourceforge.net> > Date: Tue, 10 Jan 2017 19:09:58 +0100 Please drop this stuff ^^^^^ git send-email should do that for you. > Replace the specification of a data structure by a pointer dereference > as the parameter for the operator "sizeof" to make the corresponding size > determination a bit safer according to the Linux coding style convention. > > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> > --- > drivers/mtd/chips/cfi_cmdset_0001.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c > index 68227aa74d22..0d7c2ef533d1 100644 > --- a/drivers/mtd/chips/cfi_cmdset_0001.c > +++ b/drivers/mtd/chips/cfi_cmdset_0001.c > @@ -753,7 +753,7 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd, > kfree(newcfi); > return -ENOMEM; > } > - memcpy(newcfi, cfi, sizeof(struct cfi_private)); > + memcpy(newcfi, cfi, sizeof(*cfi)); > newcfi->numchips = numvirtchips; > newcfi->chipshift = partshift; > > -- Best regards, Marek Vasut
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web