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


Groups > linux.kernel > #1292498

RE: [PATCH 13/40] staging: lustre: Dynamic LNet Configuration (DLC) show command

From "Simmons, James A." <simmonsja@ornl.gov>
Newsgroups linux.kernel
Subject RE: [PATCH 13/40] staging: lustre: Dynamic LNet Configuration (DLC) show command
Date 2015-12-15 20:50 +0100
Message-ID <qG3LH-78-9@gated-at.bofh.it> (permalink)
References <qx3rz-5CJ-5@gated-at.bofh.it> <qx3Bh-5Gz-37@gated-at.bofh.it> <qBdLI-6vD-29@gated-at.bofh.it> <qG2mC-7LE-13@gated-at.bofh.it> <qG2PE-7Xw-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


>On Tue, Dec 15, 2015 at 06:14:19PM +0000, Simmons, James A. wrote:
>>   
>> >>  struct libcfs_ioctl_hdr {
>> >>  	__u32 ioc_len;
>> >> @@ -87,6 +88,13 @@ do {						    \
>> >>  	data.ioc_hdr.ioc_len = sizeof(data);			\
>> >>  } while (0)
>> >>  
>> >> +#define LIBCFS_IOC_INIT_V2(data, hdr)			\
>> >> +do {							\
>> >> +	memset(&(data), 0, sizeof(data));		\
>> >> +	(data).hdr.ioc_version = LIBCFS_IOCTL_VERSION2;	\
>> >> +	(data).hdr.ioc_len = sizeof(data);		\
>> >> +} while (0)
>> >> +
>> >
>> >Do we really need this?
>> 
>> Would you be okay if this was a inline function? This is used by user
>> land and kernel space code.
>
>Then your code is broken, please never do that.

This brings up a good point. This header doesn't contain structures for userland so it is a uapi
type header.  Should such headers only contain data structures?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

RE: [PATCH 13/40] staging: lustre: Dynamic LNet Configuration (DLC)  show command "Simmons, James A." <simmonsja@ornl.gov> - 2015-12-15 19:20 +0100
  Re: [PATCH 13/40] staging: lustre: Dynamic LNet Configuration (DLC)  show command Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-15 19:30 +0100
    RE: [PATCH 13/40] staging: lustre: Dynamic LNet Configuration (DLC)  show command "Simmons, James A." <simmonsja@ornl.gov> - 2015-12-15 19:40 +0100
  Re: [PATCH 13/40] staging: lustre: Dynamic LNet Configuration (DLC)  show command Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-15 19:50 +0100
    RE: [PATCH 13/40] staging: lustre: Dynamic LNet Configuration (DLC)  show command "Simmons, James A." <simmonsja@ornl.gov> - 2015-12-15 20:50 +0100
      Re: [PATCH 13/40] staging: lustre: Dynamic LNet Configuration (DLC)  show command 'Greg Kroah-Hartman' <gregkh@linuxfoundation.org> - 2015-12-15 21:00 +0100

csiph-web