Re: [PATCH v4 1/9] w1_therm: creating w1_therm.h

From: Akira shimahara
Date: Wed May 06 2020 - 06:43:38 EST


Le mercredi 06 mai 2020 Ã 08:51 +0200, Greg KH a Ãcrit :
> > > Why is this function needed to be declared in this .h file?
> > > Why is any of this needed? For some reason I thought you needed
> > > a .h
> > > file to make things simpler for other .c files, but if all of
> > > this is
> > > static, it's not needed at all, right?
> > > thanks,
> > > greg k-h
> > Hello,
> > Yes, you are right, header file could be avoided. But we separate
> > it
> > from .c for clarity purpose, and to ease future developpment (for
> > example adding support of new devices).
> > If you absolutely want to put everything in the .c file, I can do
> > it,
> > let me know.
>
>
> Keep it all in a .c file, only use .h files for when you need to
> share
>
> it across multiple .c files, otherwise it's not needed.
>
>
>
> thanks,
>
>
>
> greg k-h

Hi,

Ok well noted, I will do it tomorrow, and keep it as 8 patches.

Thanks for your time

Akira Shimahara