Re: [PATCH] staging: silicom: hide conditionally used function in condition

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

 



On Wed, Mar 26, 2014 at 9:27 PM, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, Mar 26, 2014 at 02:58:50PM +0900, SeongJae Park wrote:
>> bp_proc_create() be called only when BP_PROC_SUPPORT defined but its
>> definition live outside of #ifdef BP_PROC_SUPPORT and cause following
>> trivial build warning:
>> drivers/staging/silicom/bpctl_mod.c:6786:12: warning:
>> ‘bp_proc_create’ defined but not used [-Wunused-function]
>>  static int bp_proc_create(void)
>>             ^
>>
>> Fix the warning by hide the definition inside #ifdef BP_PROC_SUPPORT.
>
> But no one can define that value, so why add more usages, it should just
> be ripped out.  Just remove everything "hidden" by this option as no
> one is obviously using it, and no driver should be messing around in
> /proc anyway.

Good point. I also thought in that way but hesitated big change.
Maybe I should be more brave and patient.
I will make and send patch with your opinion again in couple of hours.

Thanks.

>
> thanks,
>
> greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel





[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux