lkml.org 
[lkml]   [2014]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] UBI: block: Implement kernel_param_ops->get()
Am 19.03.2014 14:15, schrieb Ezequiel Garcia:
> Hi Richard,
>
> On Mar 19, Richard Weinberger wrote:
>> The ->get() function is not optional.
>>
>
> [..]
>> static struct kernel_param_ops ubiblock_param_ops = {
>> .set = ubiblock_set_param,
>> + .get = param_get_charp,
>> };
>> module_param_cb(block, &ubiblock_param_ops, NULL, 0);
>
> The comment for the function says they are both optional:
>
> /**
> * module_param_cb - general callback for a module/cmdline parameter
> * @name: a valid C identifier which is the parameter name.
> * @ops: the set & get operations for this parameter.
> * @perm: visibility in sysfs.
> *
> * The ops can have NULL set or get functions.
> */
>
> This has no visibility in sysfs, so I can't see how having a NULL
> get() is a problem. What's the issue you're trying to fix here?
>
> Maybe I'm missing something?
>

BTW: I think we can omit ->get() as some other drivers also only have ->set().
Who want the credit for a documentation fix? ;)

Thanks,
//richard


\
 
 \ /
  Last update: 2014-03-19 16:01    [W:0.051 / U:5.556 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site