lkml.org 
[lkml]   [2019]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] drivers: scsi: remove unnecessary #ifdef MODULE
From
Date
On 07.06.19 02:41, James Bottomley wrote:
> On Thu, 2019-06-06 at 17:04 +0200, Enrico Weigelt, metux IT consult
> wrote:
>> From: Enrico Weigelt <info@metux.net>
>>
>> The MODULE_DEVICE_TABLE() macro already checks for MODULE defined,
>> so the extra check here is not necessary.
>>
>> Changes v2:
>> * make dptids const to fix warning on unused variable
>
> I don't think this works; in my version of gcc, const does not defeat
> the unused variable warning if I try with a test programme:
>
> jejb@jarvis:~> gcc -Wunused-variable -c test1.c
> test1.c:3:18: warning: ‘i’ defined but not used [-Wunused-cons
> t-variable=]
> static const int i[] = { 1, 2, 3};

Which gcc version are you using ?
Could you please have a try w/ the kernel (plus my patch) ?

Tested w/ 6.3.0-18+deb9u1 (stretch-amd64), got no warnings.


--mtx

--
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

\
 
 \ /
  Last update: 2019-06-07 23:51    [W:0.077 / U:48.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site