diff for duplicates of <20130318145618.GA16337@joana> diff --git a/a/1.txt b/N1/1.txt index f302375..62ec08e 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,54 +1,47 @@ Hi Alexandru, -* Alexandru Gheorghiu <gheorghiuandru@gmail.com> [2013-03-16 16:07:10 +0200= -]: +* Alexandru Gheorghiu <gheorghiuandru@gmail.com> [2013-03-16 16:07:10 +0200]: -> Replaced calls to kzalloc followed by memcpy with a single call to kmemdu= -p. +> Replaced calls to kzalloc followed by memcpy with a single call to kmemdup. > Patch found using coccinelle. ->=20 +> > Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com> > --- > net/bluetooth/a2mp.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) ->=20 +> > diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c > index eb0f4b1..140e81c 100644 > --- a/net/bluetooth/a2mp.c > +++ b/net/bluetooth/a2mp.c -> @@ -397,13 +397,12 @@ static int a2mp_getampassoc_rsp(struct amp_mgr *mgr= -, struct sk_buff *skb, +> @@ -397,13 +397,12 @@ static int a2mp_getampassoc_rsp(struct amp_mgr *mgr, struct sk_buff *skb, > if (ctrl) { > u8 *assoc; -> =20 -> - assoc =3D kzalloc(assoc_len, GFP_KERNEL); -> + assoc =3D kmemdup(rsp->amp_assoc, assoc_len, GFP_KERNEL); +> +> - assoc = kzalloc(assoc_len, GFP_KERNEL); +> + assoc = kmemdup(rsp->amp_assoc, assoc_len, GFP_KERNEL); > if (!assoc) { > amp_ctrl_put(ctrl); > return -ENOMEM; > } -> =20 +> > - memcpy(assoc, rsp->amp_assoc, assoc_len); -> ctrl->assoc =3D assoc; -> ctrl->assoc_len =3D assoc_len; -> ctrl->assoc_rem_len =3D assoc_len; -> @@ -472,13 +471,12 @@ static int a2mp_createphyslink_req(struct amp_mgr *= -mgr, struct sk_buff *skb, -> size_t assoc_len =3D le16_to_cpu(hdr->len) - sizeof(*req); +> ctrl->assoc = assoc; +> ctrl->assoc_len = assoc_len; +> ctrl->assoc_rem_len = assoc_len; +> @@ -472,13 +471,12 @@ static int a2mp_createphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, +> size_t assoc_len = le16_to_cpu(hdr->len) - sizeof(*req); > u8 *assoc; -> =20 -> - assoc =3D kzalloc(assoc_len, GFP_KERNEL); -> + assoc =3D kmemdup(rep->amp_assoc, assoc_len, GFP_KERNEL); +> +> - assoc = kzalloc(assoc_len, GFP_KERNEL); +> + assoc = kmemdup(rep->amp_assoc, assoc_len, GFP_KERNEL); -Please get into the habit of build your patches before sending them upstrea= -m: +Please get into the habit of build your patches before sending them upstream: CC [M] net/bluetooth/a2mp.o -net/bluetooth/a2mp.c: In function =E2=80=98a2mp_createphyslink_req=E2=80=99: -net/bluetooth/a2mp.c:474:19: error: =E2=80=98rep=E2=80=99 undeclared (first= - use in this function) -net/bluetooth/a2mp.c:474:19: note: each undeclared identifier is reported o= -nly once for each function it appears in +net/bluetooth/a2mp.c: In function ‘a2mp_createphyslink_req’: +net/bluetooth/a2mp.c:474:19: error: ‘rep’ undeclared (first use in this function) +net/bluetooth/a2mp.c:474:19: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [net/bluetooth/a2mp.o] Error 1 make[1]: *** [net/bluetooth] Error 2 diff --git a/a/content_digest b/N1/content_digest index e470ec1..05fa9c8 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -11,59 +11,52 @@ "b\0" "Hi Alexandru,\n" "\n" - "* Alexandru Gheorghiu <gheorghiuandru@gmail.com> [2013-03-16 16:07:10 +0200=\n" - "]:\n" + "* Alexandru Gheorghiu <gheorghiuandru@gmail.com> [2013-03-16 16:07:10 +0200]:\n" "\n" - "> Replaced calls to kzalloc followed by memcpy with a single call to kmemdu=\n" - "p.\n" + "> Replaced calls to kzalloc followed by memcpy with a single call to kmemdup.\n" "> Patch found using coccinelle.\n" - ">=20\n" + "> \n" "> Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>\n" "> ---\n" "> net/bluetooth/a2mp.c | 6 ++----\n" "> 1 file changed, 2 insertions(+), 4 deletions(-)\n" - ">=20\n" + "> \n" "> diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c\n" "> index eb0f4b1..140e81c 100644\n" "> --- a/net/bluetooth/a2mp.c\n" "> +++ b/net/bluetooth/a2mp.c\n" - "> @@ -397,13 +397,12 @@ static int a2mp_getampassoc_rsp(struct amp_mgr *mgr=\n" - ", struct sk_buff *skb,\n" + "> @@ -397,13 +397,12 @@ static int a2mp_getampassoc_rsp(struct amp_mgr *mgr, struct sk_buff *skb,\n" "> \tif (ctrl) {\n" "> \t\tu8 *assoc;\n" - "> =20\n" - "> -\t\tassoc =3D kzalloc(assoc_len, GFP_KERNEL);\n" - "> +\t\tassoc =3D kmemdup(rsp->amp_assoc, assoc_len, GFP_KERNEL);\n" + "> \n" + "> -\t\tassoc = kzalloc(assoc_len, GFP_KERNEL);\n" + "> +\t\tassoc = kmemdup(rsp->amp_assoc, assoc_len, GFP_KERNEL);\n" "> \t\tif (!assoc) {\n" "> \t\t\tamp_ctrl_put(ctrl);\n" "> \t\t\treturn -ENOMEM;\n" "> \t\t}\n" - "> =20\n" + "> \n" "> -\t\tmemcpy(assoc, rsp->amp_assoc, assoc_len);\n" - "> \t\tctrl->assoc =3D assoc;\n" - "> \t\tctrl->assoc_len =3D assoc_len;\n" - "> \t\tctrl->assoc_rem_len =3D assoc_len;\n" - "> @@ -472,13 +471,12 @@ static int a2mp_createphyslink_req(struct amp_mgr *=\n" - "mgr, struct sk_buff *skb,\n" - "> \t\tsize_t assoc_len =3D le16_to_cpu(hdr->len) - sizeof(*req);\n" + "> \t\tctrl->assoc = assoc;\n" + "> \t\tctrl->assoc_len = assoc_len;\n" + "> \t\tctrl->assoc_rem_len = assoc_len;\n" + "> @@ -472,13 +471,12 @@ static int a2mp_createphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb,\n" + "> \t\tsize_t assoc_len = le16_to_cpu(hdr->len) - sizeof(*req);\n" "> \t\tu8 *assoc;\n" - "> =20\n" - "> -\t\tassoc =3D kzalloc(assoc_len, GFP_KERNEL);\n" - "> +\t\tassoc =3D kmemdup(rep->amp_assoc, assoc_len, GFP_KERNEL);\n" + "> \n" + "> -\t\tassoc = kzalloc(assoc_len, GFP_KERNEL);\n" + "> +\t\tassoc = kmemdup(rep->amp_assoc, assoc_len, GFP_KERNEL);\n" "\n" - "Please get into the habit of build your patches before sending them upstrea=\n" - "m:\n" + "Please get into the habit of build your patches before sending them upstream:\n" "\n" " CC [M] net/bluetooth/a2mp.o\n" - "net/bluetooth/a2mp.c: In function =E2=80=98a2mp_createphyslink_req=E2=80=99:\n" - "net/bluetooth/a2mp.c:474:19: error: =E2=80=98rep=E2=80=99 undeclared (first=\n" - " use in this function)\n" - "net/bluetooth/a2mp.c:474:19: note: each undeclared identifier is reported o=\n" - "nly once for each function it appears in\n" + "net/bluetooth/a2mp.c: In function \342\200\230a2mp_createphyslink_req\342\200\231:\n" + "net/bluetooth/a2mp.c:474:19: error: \342\200\230rep\342\200\231 undeclared (first use in this function)\n" + "net/bluetooth/a2mp.c:474:19: note: each undeclared identifier is reported only once for each function it appears in\n" "make[2]: *** [net/bluetooth/a2mp.o] Error 1\n" "make[1]: *** [net/bluetooth] Error 2\n" "\n" "\n" "\tGustavo" -ee627d65d66ef4624e9e100ab2d6bc5e5269f3bfab478440e3d5e4ffc2a77abc +ea66421771dd17f4f319a2660f507cfe1d8ceebfc4912dd6c60a5eb43c26062d
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.