Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1640862 > unrolled thread

[PATCH 2/2] ipack: Improve a size determination in ipack_bus_register()

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2017-05-13 11:00 +0200
Last post2017-05-15 08:50 +0200
Articles 4 — 3 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.


Contents

  [PATCH 2/2] ipack: Improve a size determination in  ipack_bus_register() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-13 11:00 +0200
    Re: [PATCH 2/2] ipack: Improve a size determination in  ipack_bus_register() Samuel Iglesias Gonsálvez          <siglesias@igalia.com> - 2017-05-15 07:30 +0200
      Re: [PATCH 2/2] ipack: Improve a size determination in  ipack_bus_register() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-15 08:00 +0200
        Re: ipack: Improve a size determination in ipack_bus_register() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-15 08:50 +0200

#1640862 — [PATCH 2/2] ipack: Improve a size determination in ipack_bus_register()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-05-13 11:00 +0200
Subject[PATCH 2/2] ipack: Improve a size determination in ipack_bus_register()
Message-ID<tGB45-1aC-1@gated-at.bofh.it>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 13 May 2017 10:37:06 +0200

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/ipack/ipack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ipack/ipack.c b/drivers/ipack/ipack.c
index 575c4f29e0f7..a1e07a77d4e6 100644
--- a/drivers/ipack/ipack.c
+++ b/drivers/ipack/ipack.c
@@ -212,7 +212,7 @@ struct ipack_bus_device *ipack_bus_register(struct device *parent, int slots,
 	int bus_nr;
 	struct ipack_bus_device *bus;
 
-	bus = kzalloc(sizeof(struct ipack_bus_device), GFP_KERNEL);
+	bus = kzalloc(sizeof(*bus), GFP_KERNEL);
 	if (!bus)
 		return NULL;
 
-- 
2.12.3

[toc] | [next] | [standalone]


#1641286

FromSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Date2017-05-15 07:30 +0200
Message-ID<tHgJX-3MF-5@gated-at.bofh.it>
In reply to#1640862

[Multipart message — attachments visible in raw view] — view raw

Hello Markus,

Thanks for the patches!

Series is,

Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>

Greg, Would you mind picking this patch series through your char-misc
tree?

Sam

On Sat, 2017-05-13 at 10:56 +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 13 May 2017 10:37:06 +0200
> 
> 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/ipack/ipack.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ipack/ipack.c b/drivers/ipack/ipack.c
> index 575c4f29e0f7..a1e07a77d4e6 100644
> --- a/drivers/ipack/ipack.c
> +++ b/drivers/ipack/ipack.c
> @@ -212,7 +212,7 @@ struct ipack_bus_device
> *ipack_bus_register(struct device *parent, int slots,
>  	int bus_nr;
>  	struct ipack_bus_device *bus;
>  
> -	bus = kzalloc(sizeof(struct ipack_bus_device), GFP_KERNEL);
> +	bus = kzalloc(sizeof(*bus), GFP_KERNEL);
>  	if (!bus)
>  		return NULL;
>  

[toc] | [prev] | [next] | [standalone]


#1641291

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-05-15 08:00 +0200
Message-ID<tHhd0-3XJ-5@gated-at.bofh.it>
In reply to#1641286
On Mon, May 15, 2017 at 06:52:47AM +0200, Samuel Iglesias Gonsálvez wrote:
> Hello Markus,
> 
> Thanks for the patches!
> 
> Series is,
> 
> Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
> 
> Greg, Would you mind picking this patch series through your char-misc
> tree?

I'm sorry, but this person is in my blacklist and I don't have any of
their emails, so I don't have these patches anywhere.  If you wish to
have them applied, please resend them with your acked-by, or just ignore
them, it's up to you.

good luck!

greg k-h

[toc] | [prev] | [next] | [standalone]


#1641308 — Re: ipack: Improve a size determination in ipack_bus_register()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-05-15 08:50 +0200
SubjectRe: ipack: Improve a size determination in ipack_bus_register()
Message-ID<tHhZn-4vl-3@gated-at.bofh.it>
In reply to#1641291
>> Greg, Would you mind picking this patch series through your char-misc tree?
> 
> I'm sorry, but this person is in my blacklist

Some developers know this communication setting in the meantime.


> and I don't have any of their emails, so I don't have these patches anywhere.

I find this kind of feedback inappropriate.

You chose to exclude my update suggestions at a specific point in time.
They are still publicly available as they were stored also by other
information systems despite my messages vanish from your personal mail in-box
for a while.


> If you wish to have them applied, please resend them with your acked-by,

I am curious how other contributors will think about the shown change patterns.


> or just ignore them, it's up to you.

This reaction is also a possible option depending on your development priorities
for the affected software modules.

I hope that remaining open issues can be improved as desired after a bit of
constructive software development discussion.

Regards,
Markus

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web