Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cciss: fix build when !PROC_FS

Fix these build errors when CONFIG_PROC_FS is not set:
drivers/block/cciss.c: In function 'cciss_show_raid_level':
drivers/block/cciss.c:623: error: 'RAID_UNKNOWN' undeclared (first use in this function)
drivers/block/cciss.c:626: error: 'raid_label' undeclared (first use in this function)
drivers/block/cciss.c: In function 'cciss_geometry_inquiry':
drivers/block/cciss.c:2696: error: 'RAID_UNKNOWN' undeclared (first use in this function)

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

authored by

Alexander Beregalov and committed by
Jens Axboe
1e6f2dc1 5dee2477

+5 -4
+5 -4
drivers/block/cciss.c
··· 256 256 257 257 #include "cciss_scsi.c" /* For SCSI tape support */ 258 258 259 + static const char *raid_label[] = { "0", "4", "1(1+0)", "5", "5+1", "ADG", 260 + "UNKNOWN" 261 + }; 262 + #define RAID_UNKNOWN (sizeof(raid_label) / sizeof(raid_label[0])-1) 263 + 259 264 #ifdef CONFIG_PROC_FS 260 265 261 266 /* ··· 269 264 #define ENG_GIG 1000000000 270 265 #define ENG_GIG_FACTOR (ENG_GIG/512) 271 266 #define ENGAGE_SCSI "engage scsi" 272 - static const char *raid_label[] = { "0", "4", "1(1+0)", "5", "5+1", "ADG", 273 - "UNKNOWN" 274 - }; 275 - #define RAID_UNKNOWN (sizeof(raid_label) / sizeof(raid_label[0])-1) 276 267 277 268 static struct proc_dir_entry *proc_cciss; 278 269