DriverDev-Devel Archive on lore.kernel.org
 help / color / Atom feed
* staging: most: configfs: PAGE_SIZE char arrays?
@ 2019-11-26 19:30 Joe Perches
  2019-11-27 10:33 ` Christian.Gromm
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2019-11-26 19:30 UTC (permalink / raw)
  To: Christian Gromm; +Cc: devel, Greg Kroah-Hartman

drivers/staging/most/configfs.c:struct mdev_link {
drivers/staging/most/configfs.c-        struct config_item item;
drivers/staging/most/configfs.c-        struct list_head list;
drivers/staging/most/configfs.c-        bool create_link;
drivers/staging/most/configfs.c-        bool destroy_link;
drivers/staging/most/configfs.c-        u16 num_buffers;
drivers/staging/most/configfs.c-        u16 buffer_size;
drivers/staging/most/configfs.c-        u16 subbuffer_size;
drivers/staging/most/configfs.c-        u16 packets_per_xact;
drivers/staging/most/configfs.c-        u16 dbr_size;
drivers/staging/most/configfs.c-        char datatype[PAGE_SIZE];
drivers/staging/most/configfs.c-        char direction[PAGE_SIZE];
drivers/staging/most/configfs.c-        char name[PAGE_SIZE];
drivers/staging/most/configfs.c-        char device[PAGE_SIZE];
drivers/staging/most/configfs.c-        char channel[PAGE_SIZE];
drivers/staging/most/configfs.c-        char comp[PAGE_SIZE];
drivers/staging/most/configfs.c-        char comp_params[PAGE_SIZE];
drivers/staging/most/configfs.c-};

Why are all the char arrays size PAGE_SIZE ?
That seems completely unnecessary.


_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: staging: most: configfs: PAGE_SIZE char arrays?
  2019-11-26 19:30 staging: most: configfs: PAGE_SIZE char arrays? Joe Perches
@ 2019-11-27 10:33 ` Christian.Gromm
  0 siblings, 0 replies; 2+ messages in thread
From: Christian.Gromm @ 2019-11-27 10:33 UTC (permalink / raw)
  To: joe; +Cc: devel, gregkh

On Di, 2019-11-26 at 11:30 -0800, Joe Perches wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> drivers/staging/most/configfs.c:struct mdev_link {
> drivers/staging/most/configfs.c-        struct config_item item;
> drivers/staging/most/configfs.c-        struct list_head list;
> drivers/staging/most/configfs.c-        bool create_link;
> drivers/staging/most/configfs.c-        bool destroy_link;
> drivers/staging/most/configfs.c-        u16 num_buffers;
> drivers/staging/most/configfs.c-        u16 buffer_size;
> drivers/staging/most/configfs.c-        u16 subbuffer_size;
> drivers/staging/most/configfs.c-        u16 packets_per_xact;
> drivers/staging/most/configfs.c-        u16 dbr_size;
> drivers/staging/most/configfs.c-        char datatype[PAGE_SIZE];
> drivers/staging/most/configfs.c-        char direction[PAGE_SIZE];
> drivers/staging/most/configfs.c-        char name[PAGE_SIZE];
> drivers/staging/most/configfs.c-        char device[PAGE_SIZE];
> drivers/staging/most/configfs.c-        char channel[PAGE_SIZE];
> drivers/staging/most/configfs.c-        char comp[PAGE_SIZE];
> drivers/staging/most/configfs.c-        char comp_params[PAGE_SIZE];
> drivers/staging/most/configfs.c-};
> 
> Why are all the char arrays size PAGE_SIZE ?
> That seems completely unnecessary.

Right. Probably a bad habit when handling userspace.

thanks,
Chris
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26 19:30 staging: most: configfs: PAGE_SIZE char arrays? Joe Perches
2019-11-27 10:33 ` Christian.Gromm

DriverDev-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/driverdev-devel/0 driverdev-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 driverdev-devel driverdev-devel/ https://lore.kernel.org/driverdev-devel \
		driverdev-devel@linuxdriverproject.org devel@driverdev.osuosl.org
	public-inbox-index driverdev-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linuxdriverproject.driverdev-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git