From: Greg KH <gregkh@linuxfoundation.org>
To: Aggrwal Poonam-B10812 <B10812@freescale.com>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
Singh Sandeep-B37400 <B37400@freescale.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [2/3][PATCH][v2] TDM Framework
Date: Mon, 30 Jul 2012 09:04:22 -0700 [thread overview]
Message-ID: <20120730160422.GC28703@kroah.com> (raw)
In-Reply-To: <ACB6D0C0104CFF42A45A5D82A0DD4F3D079C0B75@039-SN2MPN1-013.039d.mgd.msft.net>
On Mon, Jul 30, 2012 at 09:10:48AM +0000, Aggrwal Poonam-B10812 wrote:
>
>
> > -----Original Message-----
> > From: Linuxppc-dev [mailto:linuxppc-dev-
> > bounces+poonam.aggrwal=freescale.com@lists.ozlabs.org] On Behalf Of Greg
> > KH
> > Sent: Friday, July 27, 2012 11:30 PM
> > To: Singh Sandeep-B37400
> > Cc: devel@driverdev.osuosl.org; linuxppc-dev@lists.ozlabs.org; linux-arm-
> > kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> > Subject: Re: [2/3][PATCH][v2] TDM Framework
> >
> > On Fri, Jul 27, 2012 at 07:35:38PM +0530, sandeep@freescale.com wrote:
> > > +/* Data structures required for sysfs */ static struct tdm_sysfs attr
> > > += {
> > > + .attr.name = "use_latest_data",
> > > + .attr.mode = 0664,
> > > + .cmd_type = TDM_LATEST_DATA,
> > > +};
> >
> > What is this for?
> This knob is to control the behavior of the TDM framework with respect
> to handling the received TDM frames.
How will userspace know how to use this? Who will use this?
> The framework layer receives the TDM frames from the TDM adapter
> driver, de-interleaves the data and sends to respective client
> modules.
Why would userspace care about this then?
> In the case when the TDM client module has not consumed the data and
> emptied the Buffer, this flag decides whether to discard the
> un-fetched data, or discard the latest received data.
Again, why let userspace make this decision? How will it know to do
this or not?
Don't add options for things that don't need options.
> > > +int tdm_sysfs_init(void)
> > > +{
> > > + struct kobject *tdm_kobj;
> > > + int err = 1;
> > > + tdm_kobj = kzalloc(sizeof(*tdm_kobj), GFP_KERNEL);
> > > + if (tdm_kobj) {
> > > + kobject_init(tdm_kobj, &tdm_type);
> > > + if (kobject_add(tdm_kobj, NULL, "%s", "tdm")) {
> > > + pr_err("tdm: Sysfs creation failed\n");
> > > + kobject_put(tdm_kobj);
> > > + err = -EINVAL;
> > > + goto out;
> > > + }
> > > + } else {
> > > + pr_err("tdm: Unable to allocate tdm_kobj\n");
> > > + err = -ENOMEM;
> > > + goto out;
> > > + }
> > > +
> > > +out:
> > > + return err;
> > > +}
> >
> > You just leaked memory, what are you trying to do here?
> >
> > And why are you using "raw" kobjects? That's a sure sign that something
> > is really wrong.
> Will refer the documentation. Not very experienced on this stuff. Thanks for the comment.
> >
> > Your code doesn't look like it is tied into the driver model at all, why
> > not? What are you trying to do here?
> This is a framework layer, not associated to a particular device.
Not true, you have a parent pointer already, so you are hooked up to the
device tree.
> TDM adapter drivers will register to this framework.
Then you had better be part of the kernel driver model.
> We got this comment in internal freescale review list also.
Why did you ignore that feedback and make us ask the same thing?
> > Also, when creating new sysfs entries, like you are attempting to do here
> > (unsuccessfully I might add), you must create Documentation/ABI/ files as
> > well.
> Ok.
> >
> > And, to top it all off, you do realize you are asking us to do code
> > review in the middle of the merge window, when we are all busy doing
> > other things?
> Apologize for asking a review in the merge window time frame.
> Are there any guidelines when to send something for a review? We will
> be careful next time.
Anytime not in the merge window is usually good, also the week before
the merge window is usually busy as well.
greg k-h
next prev parent reply other threads:[~2012-07-30 16:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-27 14:05 [2/3][PATCH][v2] TDM Framework sandeep
2012-07-27 14:05 ` [1/3][PATCH][v2] Adding documentation for TDM sandeep
2012-07-27 14:05 ` [3/3][PATCH][v2] Added TDM device support and Freescale Starlite driver sandeep
2012-07-27 14:11 ` [2/3][PATCH][v2] TDM Framework John Stoffel
2012-07-30 9:29 ` Singh Sandeep-B37400
2012-07-30 14:10 ` John Stoffel
2012-07-31 6:40 ` Singh Sandeep-B37400
2012-07-27 14:51 ` Russell King - ARM Linux
2012-07-30 13:00 ` Singh Sandeep-B37400
2012-07-27 15:25 ` Francois Romieu
2012-07-30 9:50 ` Singh Sandeep-B37400
2012-07-30 16:01 ` Greg KH
2012-08-01 12:13 ` Singh Sandeep-B37400
2012-08-01 12:37 ` Greg KH
2012-08-21 14:13 ` Mark Brown
2012-07-30 15:45 ` Mark Brown
2012-07-31 6:41 ` Singh Sandeep-B37400
2012-07-27 17:59 ` Greg KH
2012-07-30 9:10 ` Aggrwal Poonam-B10812
2012-07-30 16:04 ` Greg KH [this message]
2012-07-27 18:12 ` Greg KH
2012-07-30 9:13 ` Aggrwal Poonam-B10812
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120730160422.GC28703@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=B10812@freescale.com \
--cc=B37400@freescale.com \
--cc=devel@driverdev.osuosl.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).