lkml.org 
[lkml]   [2015]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 13/40] staging: lustre: Dynamic LNet Configuration (DLC) show command
Date
>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.
>>
>
>I try (not very hard) to sound like a broken record but this business of
>sharing code with userland is a pain in the butt. It's not used in the
>kernel or in any patches you have sent.
>
>It would look better as an inline function though so I wouldn't have
>even noticed it.

I'm glad you noticed. I just looked at the production source code and yep it is only used
in the userland tools code. I need to update our tools so they don't break. Then we can
remove these macros.


\
 
 \ /
  Last update: 2015-12-15 20:01    [W:0.094 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site