lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <D958900912E20642BCBC71664EFECE3E6E4F721A62@BGMAIL02.nvidia.com>
Date:	Wed, 6 Mar 2013 11:48:33 +0530
From:	Venu Byravarasu <vbyravarasu@...dia.com>
To:	"jg1.han@...sung.com" <jg1.han@...sung.com>
CC:	'Andrew Morton' <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	'Tejun Heo' <tj@...nel.org>, 'Greg KH' <greg@...ah.com>,
	'Alessandro Zummo' <a.zummo@...ertech.it>,
	"rtc-linux@...glegroups.com" <rtc-linux@...glegroups.com>
Subject: RE: [PATCH v3] rtc: add devm_rtc_device_{register,unregister}()

> -----Original Message-----
> From: Jingoo Han [mailto:jg1.han@...sung.com]
> Sent: Wednesday, March 06, 2013 11:43 AM
> To: Venu Byravarasu
> Cc: 'Andrew Morton'; linux-kernel@...r.kernel.org; 'Tejun Heo'; 'Greg KH';
> 'Alessandro Zummo'; rtc-linux@...glegroups.com; Jingoo Han
> Subject: Re: [PATCH v3] rtc: add devm_rtc_device_{register,unregister}()
> 
> On Wednesday, March 06, 2013 3:03 PM, Venu Byravarasu wrote:
> >
> > > --- a/drivers/rtc/class.c
> > > +++ b/drivers/rtc/class.c
> >
> > > +/**
> > > + * devm_rtc_device_register - resource managed rtc_device_register()
> > > + * @name: the name of the device
> > > + * @dev: the device to register
> > > + * @ops: the rtc operations structure
> > > + * @owner: the module owner
> > > + *
> > > + * @return a struct rtc on success, or an ERR_PTR on error
> > > + *
> > > + * Managed rtc_device_register(). The rtc_device returned from this
> > > function
> > > + * are automatically freed on driver detach. See rtc_device_register()
> > > + * for more information.
> > > + */
> > > +
> > > +struct rtc_device *devm_rtc_device_register(const char *name,
> > > +					struct device *dev,
> >
> > As most of devm_* functions use  " struct device *dev" as their first param,
> > why not this function also modified to be in sync with them?
> 
> Yes, but, I want to sync with the form of rtc_device_register().
> This function already uses 'struct device *dev' as second argument as below.
> 

IMO any kernel driver developer using devm_* API, expects struct device* as first argument.
Breaking this policy for one module (RTC here) & making this API special, might not be a good idea.
Anyhow, maintainers may add their comments on this.

Thanks,
Venu

>  struct rtc_device *rtc_device_register(const char *name, struct device *dev,
>                                          const struct rtc_class_ops *ops,
>                                          struct module *owner)
> 
> Best regards,
> Jingoo Han
> 
> >
> > > +					const struct rtc_class_ops *ops,
> > > +					struct module *owner)
> > > +{
> > > +	struct rtc_device **ptr, *rtc;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ