Re: [PATCH 09/12] n_tracesink header file.

From: Greg KH
Date: Tue Feb 22 2011 - 15:32:08 EST


On Tue, Feb 22, 2011 at 12:22:58PM -0800, J Freyensee wrote:
> On Thu, 2011-02-17 at 13:43 -0800, Greg KH wrote:
> > On Thu, Feb 17, 2011 at 12:10:47PM -0800, J Freyensee wrote:
> > > On Thu, 2011-02-17 at 11:54 -0800, Greg KH wrote:
> > > > On Thu, Feb 17, 2011 at 11:45:15AM -0800, J Freyensee wrote:
> > > > > On Thu, 2011-02-17 at 11:23 -0800, Greg KH wrote:
> > > > > > On Tue, Feb 08, 2011 at 11:34:54AM -0800, james_p_freyensee@xxxxxxxxxxxxxxx wrote:
> > > > > > > From: J Freyensee <james_p_freyensee@xxxxxxxxxxxxxxx>
> > > > > > >
> > > > > > > This header file allows the n_tracerouter to send it's information
> > > > > > > to the n_tracesink ldisc driver. It's part of the Intel-Atom
> > > > > > > PTI implementation solution.
> > > > > > >
> > > > > > > Signed-off-by: J Freyensee <james_p_freyensee@xxxxxxxxxxxxxxx>
> > > > > > > ---
> > > > > > > include/linux/n_tracesink.h | 32 ++++++++++++++++++++++++++++++++
> > > > > >
> > > > > > Why is this in include/linux/ ?
> > > > > >
> > > > >
> > > > > I thought this was the best place to stick this .h file. I'd be happy
> > > > > to change locations based off of your suggestion.
> > > >
> > > > Why do you need a .h file at all? Who is using it?
> > >
> > > The only current module that really uses it is n_tracerouter; however, I
> > > thought sticking this in a .h file made things slightly more modular and
> > > more re-usable, especially for future device driver writers that could
> > > want something like this.
> > >
> > > If you would like me to remove this though, I can, just let me know.
> >
> > Yes, please remove it.
> >
> Greg,
>
> If I remove this file I need to add the function header
> n_tracesink_datadrain() that is in this file to n_tracerouter.c.
>
> If I add that function header to n_tracerouter.c then checkpatch.pl
> complains that extern should be avoided in .c files.
>
> If I don't have this function header in n_tracerouter.c then it won't
> compile at all.
>
> Do you have an alternative suggestion on what I should do here? It
> appears the best solution is for me to keep this .h file considering the
> constraints.

Make it a "local" .h file, in the same directory as these two .c files,
no need to make it global for the whole of the kernel tree, right?

thanks,

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