Re: [PATCH 2/2] ttyFDC: Fix build problems due to use of module_{init,exit}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Paul,

On Tue, Oct 06, 2015 at 06:23:00PM -0400, Paul Gortmaker wrote:
> [[PATCH 2/2] ttyFDC: Fix build problems due to use of module_{init,exit}] On 06/10/2015 (Tue 15:12) James Hogan wrote:
> 
> > Commit 0fd972a7d91d (module: relocate module_init from init.h to
> > module.h) broke the build of ttyFDC driver due to that driver's (mis)use
> > of module_mips_cdmm_driver() without first including module.h, for
> > example:
> 
> The driver must not be hooked into any mips defconfigs or my build
> coverage should have caught it (or it was merged after my change went on

Indeed, something I intend to fix (or at least get enabled in our
buildbot builds).

> in)  -- in any case this is only the 2nd that slipped through out of
> the big shuffle that came from that, so I think that is not bad.

embarrasingly I think the other was the metag_da driver which this one
was based on. I should have guessed it'd affect ttyFDC too :-).

> 
> > 
> > In file included from ./arch/mips/include/asm/cdmm.h +11 :0,
> >                  from drivers/tty/mips_ejtag_fdc.c +34 :
> > include/linux/device.h +1295 :1: warning: data definition has no type or storage class
> > ./arch/mips/include/asm/cdmm.h +84 :2: note: in expansion of macro ‘module_driver’
> > drivers/tty/mips_ejtag_fdc.c +1157 :1: note: in expansion of macro ‘module_mips_cdmm_driver’
> > include/linux/device.h +1295 :1: error: type defaults to ‘int’ in declaration of ‘module_init’ [-Werror=implicit-int]
> > ./arch/mips/include/asm/cdmm.h +84 :2: note: in expansion of macro ‘module_driver’
> > drivers/tty/mips_ejtag_fdc.c +1157 :1: note: in expansion of macro ‘module_mips_cdmm_driver’
> > drivers/tty/mips_ejtag_fdc.c +1157 :1: warning: parameter names (without types) in function declaration
> > 
> > Instead of just adding the module.h include, switch to using the new
> > builtin_mips_cdmm_driver() helper macro and drop the remove callback,
> > since it isn't needed. If module support is added later, the code can
> > always be resurrected.
> 
> Thanks for taking the cleanup approach here and not the one line
> approach.  Saves me doing the cleanup work myself later.
> 
> Acked-by: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>

Thanks
James

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]